Get returns¶
Order API v1
GET
*base*/returns?[&limit=5][&page=2][&return=23]
Authentication:API key
Will list all returns, newest first.
Parameters¶
int
optional
|
Limit the number of returns returned. |
int
optional
|
Number of the page of results to return. Can be used instead of offset. Page numbers start at 1. |
int
optional
|
Offset how far in to start returning the returns. Can be used instead of page. Offset starts at 0. |
int
optional
|
Only show a return with given ID. |
string
optional
|
Only show a return with given shipment number. |
int
optional
|
Only fetch returns for a specific order. |
int
optional
|
Only fetch returns for a specific selection. |
int
optional
|
Only fetch returns for a specific customer. |
date/datetime
optional
|
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. |
date/datetime
optional
|
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. |
boolean
optional
|
Response in xml format instead of json. |
Request example¶
1 | GET <base>/returns?limit=2 HTTP/1.1
|
Response¶
200
Content-type: application/json
string
required
|
ok if success, else no . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array
required
|
Array of fetched returns.
|
Response example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | 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",
"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",
"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
}
]
}
]
}
|