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

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
optional

ID of the return.

completed
boolean
optional

Whether the return was completed or not.

shipment
string
optional

Number of the shipment.

shipmentId
int
optional

ID of the shipment.

orderId
int
optional

ID of the order.

selectionId
string
optional

Selection ID of the order.

customerId
int
optional

Customer ID of the order.

date
datetime
optional

Date when return was created.

returnCost
float
optional

Cost of the return.

shippingCost
float
optional

Cost of shipping returned.

handlingCost
float
optional

Handling cost of the return.

voucherValue
float
optional

Voucher value included in the return.

taxValue
float
optional

Tax value of the return, zero if deducted.

taxDeduction
float
optional

Tax deduction in the return.

currency
string
optional

Currency code in which order and also return was made.

baseCurrencyRate
float
optional

Exchange rate between currency and baseCurrency above.

returnToStock
boolean
optional

Whether the return was marked as returned back to stock.

comment
string
optional

Optional description added to the return.

createdFrom
string
optional

Informs where this return originated, i.e. "Order API".

products
array
optional

Products inside the return.

returnLineId
int
optional

ID of the specific product item in this return.

shipmentLineId
int
optional

ID of the related shipment line.

orderLineId
int
optional

ID of the related order line.

productId
int
optional

ID of the product.

variantId
int
optional

ID of the product variant.

productName
string
optional

Name of the product.

productBrand
string
optional

Brand name of the product.

variantName
string
optional

Name of the product variant.

size
string
optional

Size description, if any.

sku
string
optional

Product SKU.

variantSku
string
optional

Product variant SKU.

sizeSku
string
optional

Size SKU.

ean
string
optional

EAN of the item.

quantity
int
optional

Quantity of this specific product item returned.

price
float
optional

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

Previous article: Order API - Create Return