Order API - Get Returns
Get returns
Endpoint: GET *base*/returns?[&limit=5][&page=2][&return=23]
Authentication: API Key
Will list all returns, newest first.
Parameters
Limit the number of returns returned.
Number of page of results to return.
Only show a return with given ID.
Only show a return with given shipment number.
Only fetch returns for a specific order.
Only fetch returns for a specific selection.
Only fetch returns for a specific customer.
Only fetch returns created after given date or datetime (inclusive). Allowed formats YYYY-mm-dd
and YYYY-mm-dd HH:MM:SS
. Timezone is system-wide and decided by the company using Centra.
Only fetch returns created before given date or datetime (exclusive). Allowed formats YYYY-mm-dd
and YYYY-mm-dd HH:MM:SS
. Timezone is system-wide and decided by the company using Centra.
Response in xml format instead of json.
Request example
GET <base>/returns?limit=2 HTTP/1.1
Response
200
Content-type: application/json
ok
if success, else no
.
Array of fetched returns.
ID of the return.
Whether the return was completed or not.
Number of the shipment.
ID of the shipment.
ID of the order.
Selection ID of the order.
Customer ID of the order.
Date when return was created.
Cost of the return.
Cost of shipping returned.
Handling cost of the return.
Voucher value included in the return.
Tax value of the return, zero if deducted.
Tax deduction in the return.
Currency code in which order and also return was made.
Exchange rate between currency
and baseCurrency
above.
Whether the return was marked as returned back to stock.
Optional description added to the return.
Informs where this return originated, i.e. "Order API".
Products inside the return.
ID of the specific product item in this return.
ID of the related shipment line.
ID of the related order line.
ID of the product.
ID of the product variant.
Name of the product.
Brand name of the product.
Name of the product variant.
Size description, if any.
Product SKU.
Product variant SKU.
Size SKU.
EAN of the item.
Quantity of this specific product item returned.
Unit price as seen on shipment.
Response example
HTTP/1.1 200 OK
Content-type: application/json
{
"status": "ok",
"returns": [
{
"returnId": 385,
"completed": false,
"shipment": "20059-1",
"shipmentId": 8039,
"orderId": 20059,
"selectionId": "8bf93dd57e9ebf9291c8c3a5f0cb63bf",
"customerId": 416715,
"date": "2019-07-11 14:34:32",
"marketId": 1,
"pricelistId": 1,
"returnCost": 0,
"shippingCost": 0,
"handlingCost": 0,
"voucherValue": 0,
"taxValue": 21.41,
"taxDeduction": 0,
"currency": "EUR",
"baseCurrency": "SEK",
"baseCurrencyRate": 10.6453,
"returnToStock": true,
"comment": "Godkänd retur",
"createdFrom": "Order API",
"products": [
{
"returnLineId": 555,
"shipmentLineId": 30672,
"orderLineId": 60288,
"productId": 159,
"variantId": 372,
"productName": "Muffin man",
"productBrand": "Handcrafted",
"variantName": "Big cart",
"size": "One Size",
"sku": "MUF1042",
"variantSku": "",
"sizeSku": "",
"ean": "7340112910426",
"quantity": 1,
"price": 124.1
}
]
},
{
"returnId": 384,
"shipment": "20179-1",
"shipmentId": 8094,
"orderId": 20179,
"selectionId": "ae6eb1befe5d6f850a016932ca4276dc",
"customerId": 734042,
"date": "2019-07-11 14:33:56",
"marketId": 1,
"pricelistId": 1,
"returnCost": 0,
"shippingCost": 0,
"handlingCost": 0,
"voucherValue": 0,
"taxValue": 9.08,
"taxDeduction": 0,
"currency": "GBP",
"baseCurrency": "SEK",
"baseCurrencyRate": 11.61479,
"returnToStock": true,
"comment": null,
"createdFrom": "Order API",
"products": [
{
"returnLineId": 553,
"shipmentLineId": 30800,
"orderLineId": 60669,
"productId": 196,
"variantId": 430,
"productName": "Plush Guitar",
"productBrand": "",
"variantName": "Pink",
"size": null,
"sku": "PNKG8484",
"variantSku": "",
"sizeSku": "",
"ean": "7340082321862",
"quantity": 1,
"price": 54.5
}
]
}
]
}