Example return:
{
"returnId": "R-200 CAL-1",
"returnUrl": "/demo/api/return/10094",
"statusId": "RETURN_CREATED",
"primaryOrderUrl": "/demo/api/order/200%20CAL",
"returnDate": "2020-10-25T16:00:00",
"notes": "Internal notes",
"publicNotes": "Public notes",
"fromPartyUrl": "/demo/api/partygroup/10028",
"actionUrlComplete": "/demo/api/return/10094/complete",
"actionUrlCancel": "/demo/api/return/10094/cancel",
"lastUpdatedDate": "2021-05-18T09:59:31",
"createdDate": "2020-10-26T00:30:28",
"destinationFacilityUrl": "/demo/api/facility/10075",
"shipmentUrlList": [
"/demo/api/shipment/20802"
],
"returnItemList": [
{
"productId": "Cégep Al",
"productUrl": "/demo/api/product/10020196",
"quantity": 1,
"returnReasonId": "##user_00003",
"unitPrice": 10
}
]
}
Fields for the return resource:
- returnId: The unique ID for the return. Can be set when the return is first created, and after that is read only. Limited to 20 ASCII characters.
- returnUrl: The unique identifier for the return. Read only.
- statusId: One of the values: RETURN_CREATED (that is displayed as "Draft" in the UI), RETURN_COMPLETED, RETURN_CANCELLE
- primaryOrderUrl: Id of the sales order that this return corresponds to. Optiona
- returnDate: Date of the return. Optional
- notes: Internal notes of the return. Optional
- publicNotes: Public notes of the return. Optional
- fromPartyUrl: Id of the customer associated with the return. Optional.
- actionUrlComplete: POST to this URL with an empty body to change status to RETURN_COMPLETED. Returns in the completed state can not be modified.
- actionUrlCancel: POST to this URL with an empty body to change status to RETURN_CANCELLED. This also marks all associated shipments cancelled. Returns in the cancelled state can not be modified.
- actionUrlEdit: POST to this URL with an empty body to change status to RETURN_CREATED which corresponds to the status of draft in the user interface.
- destinationFacilityUrl: Reference to destination location. Must not be a sublocation. Optional.
- shipmentUrlList: List of references to shipments related to this return. To add a new shipment to the return, create the shipment using shipment collection service and add the returned URL to this array
- returnItemList: Array representing the items in the order, each having one or more of the following fields:
- productUrl: Reference to the product for this item.
- quantity: Floating point value.
- unitPrice: Floating point value for price of product used for this return.
- returnReasonId: Id of the configured reason associated with this return item. Return reasons can be configured in the UI in application settings.
- normalizedPackingString: Canonical description of packing for the item (see patterns for description of this data type).
- lotId: Canonical description of Lot ID for the item (see patterns for description of this data type).
- The order of the items in the array is significant and represents the order they are displayed in the user interface. Return items with no productUrl and no quantity are not displayed and from the standpoint of the user interface no longer exist.