Product Returns Mutations

CreateProductReturn

Creates a new product return record.

Parameters:

ParameterTypeDescription
inputProductReturnInput!All return data.

Example Query:

mutation CreateProductReturn($input: ProductReturnInput!) {
  CreateProductReturn(input: $input) {
    id
    label
    status
    dated_at
  }
}

CreateProductReturnFrom

Creates a product return by copying data from existing Orders or Invoices.

Parameters:

ParameterTypeDescription
inputProductReturnFromInput!IDs of source documents.

UpdateProductReturn

Updates an existing product return record.

Parameters:

ParameterTypeDescription
idInt!ID of the return document.
inputProductReturnInput!Fields to update.

DeleteProductReturn / DeleteProductReturns

Deletes one or multiple product returns.


TransformIntoRefund

Converts a product return into a Refund record for reimbursement.

Parameters:

ParameterTypeDescription
idID!ID of the product return to convert.

Example Query:

mutation TransformIntoRefund($id: ID!) {
  TransformIntoRefund(id: $id) {
    id
    label
    status
    total
  }
}

GenerateProductReturnNumber

Generates the next sequence label for a product return.

ParameterTypeDescription
location_idIDOptional location to use for sequence prefix.

GenerateProductReturnsPdfs

Generates PDF documents for multiple product returns.


Input Data Types

ProductReturnInput

FieldTypeDescription
idIntID for updates.
labelStringReturn document number.
total_unitsFloatTotal units for the return.
notesStringPublic notes.
internal_notesStringPrivate notes.
statusProductReturnStatusInitial or updated status.
add_in_stockBooleanWhether to return items to inventory.
dated_atDateDocument date.
customerCustomerInputLinked customer.
line_items[LineItemProductReturnInput]List of returned items.
season_idIntSeason link ID.
seasonSeasonInputSeason data.
account_representativeAccountRepresentativeInputSales rep link.
pdf_templatePdfTemplateInputPDF design link.
files[FileInput]Attachments.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

ProductReturnFromInput

FieldTypeDescription
Order[Int]Source Order IDs array.
Invoice[Int]Source Invoice IDs array.

TransformIntoCreditNote

Transforms a product return into a credit note.

Parameters:

ParameterTypeDescription
idID!ID of the product return to transform.

Example Query:

mutation TransformIntoCreditNote($id: ID!) {
  TransformIntoCreditNote(id: $id) {
    id
    label
    status
    total
    customer {
      id
      label
    }
  }
}

Example Variables:

{
  "id": 5001
}
Return TypeDescription
CreditNoteThe newly created credit note.

Enums

ProductReturnStatus

ValueDescription
unpublishedDraft status (hidden).
pendingDocument created, awaiting processing.
completedReturn fully processed.
cancelledDocument voided.