Get Accounting Sales Return
GET /accounting/sales-returns/{id}
Group: Accounting › Sales Returns · Operation ID: getAccountingSalesReturn
Returns the sales return with the given identifier, including its lines. Use the sales return's id, not its salesReturnNumber.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier for the sales return to return. |
Response
200 Success
Under data (getAccountingSalesReturnOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the sales return. |
salesReturnNumber |
string | no | The RMA number, for example 'SR-1'. Absent while none has been assigned. |
status |
string | yes | The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'. |
returnType |
string | yes | The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'. |
returnDate |
string | yes | The transaction date for the return. Format YYYY-MM-DD. |
salesOrderId |
string | yes | The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id. |
currency |
string | yes | The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'. |
reasonCode |
string | no | The customer-facing reason for the return. Possible values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. It is for reporting and does not affect how the return is resolved. |
notes |
string | no | Free-form notes for the return. |
returnTrackingNumber |
string | no | The carrier tracking number for the inbound return shipment. |
totalReturnAmount |
string (decimal) | no | The total return amount, the sum of every line's totalPrice, in the return currency. |
returnFeeAmount |
string (decimal) | no | The fee deducted from the customer refund, such as a restocking fee, in the return currency. Credit returns only. It is set either here or on the lines, never both. |
shippingRefundAmount |
string (decimal) | no | The shipping charge refunded to the customer, in the return currency. Credit returns only. |
totalRevenueImpact |
string (decimal) | no | The revenue reversed to the customer, the product-line revenue impact plus the shipping refund, in the return currency. Always 0 for the replacement path. |
revenueStatus |
string | no | The revenue reversal status. Possible values: 'notApplicable', 'notStarted', 'reversed'. 'notApplicable' is the replacement path, and 'reversed' is a completed credit return. |
inventoryReturnNumber |
string | no | The document number of the linked inventory sales return. Absent until one has been created. |
lastModifiedDate |
string (date-time) | yes | The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
lines |
array of object | yes | The product lines being returned. |
lines[].id |
string | yes | The unique identifier for this return line. |
lines[].salesOrderProductLineId |
string | yes | The sales order product line this line returns. There is no endpoint for it. |
lines[].lineType |
string | yes | The product line type, copied from the sales order line at creation. |
lines[].quantity |
string (decimal) | yes | The quantity being returned. |
lines[].unitOfMeasure |
string | yes | The unit of measure, copied from the sales order line. |
lines[].currency |
string | yes | The currency of unitPrice, totalPrice and returnFeeAmount on this line, copied from the sales return. Format ISO 4217, for example 'USD'. |
lines[].unitPrice |
string (decimal) | yes | The unit price, copied from the sales order line at creation, in this line's currency. |
lines[].totalPrice |
string (decimal) | no | The total price for the line, quantity times unitPrice, in this line's currency. |
lines[].returnFeeAmount |
string (decimal) | no | The fee deducted from the customer refund for this line, in this line's currency. Credit returns only. Set only when fees are tracked per line rather than on the header. |
lines[].revenueImpactAmount |
string (decimal) | no | The revenue reversed for this line, in this line's currency. 0 for the replacement path. |
lines[].lineStatus |
string | yes | The lifecycle status of this line. Possible values: 'pending', 'received', 'approved', 'completed', 'cancelled', 'rejected'. |
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error