Get returns

Order API v1
GET*base*/returns?[&limit=5][&page=2][&return=23]
Authentication:API key

Will list all returns, newest first.

Parameters

limit

int
optional
Limit the number of returns returned.

page

int
optional
Number of page of results to return.

return

int
optional
Only show a return with given ID.

shipment

string
optional
Only show a return with given shipment number.

order

int
optional
Only fetch returns for a specific order.

selection

int
optional
Only fetch returns for a specific selection.

customer_id

int
optional
Only fetch returns for a specific customer.

newer_than

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.

older_than

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.

xml

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

status

string
required
ok if success, else no.

returns

array
required

Array of fetched returns.

returnId

int
ID of the return.

completed

boolean
Whether the return was completed or not.

shipment

string
Number of the shipment.

shipmentId

int
ID of the shipment.

orderId

int
ID of the order.

selectionId

string
Selection ID of the order.

customerId

int
Customer ID of the order.

date

datetime
Date when return was created.

returnCost

float
Cost of the return.

shippingCost

float
Cost of shipping returned.

handlingCost

float
Handling cost of the return.

voucherValue

float
Voucher value included in the return.

taxValue

float
Tax value of the return, zero if deducted.

taxDeduction

float
Tax deduction in the return.

currency

string
Currency code in which order and also return was made.

baseCurrency

string
Code of the currency used as base in this store.

baseCurrencyRate

float
Exchange rate between currency and baseCurrency above.

returnToStock

boolean
Whether the return was marked as returned back to stock.

comment

string
Optional description added to the return.

createdFrom

string
Informs where this return originated, i.e. “Order API”.

products

array

Products inside the return.

returnLineId

int
ID of the specific product item in this return.

shipmentLineId

int
ID of the related shipment line.

orderLineId

int
ID of the related order line.

productId

int
ID of the product.

variantId

int
ID of the product variant.

productName

string
Name of the product.

productBrand

string
Brand name of the product.

variantName

string
Name of the product variant.

size

string
Size description, if any.

sku

string
Product SKU.

variantSku

string
Product variant SKU.

sizeSku

string
Size SKU.

ean

string
EAN of the item.

quantity

int
Quantity of this specific product item returned.

price

float
Unit price as seen on shipment.

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
                }
            ]
        }
    ]
}