CreateProductReturn
CreateProductReturnCreates a new product return record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | ProductReturnInput! | All return data. |
Example Query:
mutation CreateProductReturn($input: ProductReturnInput!) {
CreateProductReturn(input: $input) {
id
label
status
dated_at
}
}CreateProductReturnFrom
CreateProductReturnFromCreates a product return by copying data from existing Orders or Invoices.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | ProductReturnFromInput! | IDs of source documents. |
UpdateProductReturn
UpdateProductReturnUpdates an existing product return record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the return document. |
input | ProductReturnInput! | Fields to update. |
DeleteProductReturn / DeleteProductReturns
DeleteProductReturn / DeleteProductReturnsDeletes one or multiple product returns.
TransformIntoRefund
TransformIntoRefundConverts a product return into a Refund record for reimbursement.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | ID of the product return to convert. |
Example Query:
mutation TransformIntoRefund($id: ID!) {
TransformIntoRefund(id: $id) {
id
label
status
total
}
}GenerateProductReturnNumber
GenerateProductReturnNumberGenerates the next sequence label for a product return.
| Parameter | Type | Description |
|---|---|---|
location_id | ID | Optional location to use for sequence prefix. |
GenerateProductReturnsPdfs
GenerateProductReturnsPdfsGenerates PDF documents for multiple product returns.
Input Data Types
ProductReturnInput
ProductReturnInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
label | String | Return document number. |
total_units | Float | Total units for the return. |
notes | String | Public notes. |
internal_notes | String | Private notes. |
status | ProductReturnStatus | Initial or updated status. |
add_in_stock | Boolean | Whether to return items to inventory. |
dated_at | Date | Document date. |
customer | CustomerInput | Linked customer. |
line_items | [LineItemProductReturnInput] | List of returned items. |
season_id | Int | Season link ID. |
season | SeasonInput | Season data. |
account_representative | AccountRepresentativeInput | Sales rep link. |
pdf_template | PdfTemplateInput | PDF design link. |
files | [FileInput] | Attachments. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
ProductReturnFromInput
ProductReturnFromInputTransformIntoCreditNote
TransformIntoCreditNoteTransforms a product return into a credit note.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | 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 Type | Description |
|---|---|
| CreditNote | The newly created credit note. |
Enums
ProductReturnStatus
ProductReturnStatus| Value | Description |
|---|---|
unpublished | Draft status (hidden). |
pending | Document created, awaiting processing. |
completed | Return fully processed. |
cancelled | Document voided. |
