API documentation
Method list
Test your request
Changelog


getOrderReturns
The method allows you to download order returns from a specific date from the BaseLinker return manager. The return list can be limited using the filters described in the method parameters. A maximum of 100 order returns are returned at a time.


Input parameters
order_idintIdentifier of an order the return was created from.
return_idintOrder return identifier. Completing this field will download information about only one specific order return.
date_fromintThe return creation date from which order return are to be collected. Format unix time stamp.
id_fromintThe order return ID number from which subsequent order returns are to be collected
status_idint(optional) The status identifier from which order returns are to be collected. Leave blank to download order returns from all statuses.
filter_order_return_sourcevarchar(20)(optional) Filtering of order return lists by order return source, for instance "ebay", "amazon" (displays only orders come from given source). The list of order return sources can be retrieved with getOrderSources method.
filter_order_return_source_idint(optional) Filtering of order return lists by order return source identifier, for instance "2523" (displays only order returns come from order return source defined in "filter_order_return_source" identified by given order return source identifier). Filtering by order return source identifier requires "filter_order_return_source" to be set prior. The list of order source identifiers can be retrieved with getOrderSources method.
include_custom_extra_fieldsbool(optional, false by default) Download values of custom additional fields.
include_connect_databool(optional, false by default) Base Connect and contractor data.



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
returnsarrayAn array of information about the order returns found. Each order return is described by the fields listed below.
| - return_idintReturn order identifier.
| - order_idintIdentifier of an order the return was created from.
| - shop_order_idintOrder ID given by the store
| - external_order_idvarchar(50)An order identifier taken from an external source. e.g. the order number in the store, or the eBay transaction number.
| - reference_numbervarchar(100)Reference number from external source.
| - order_return_sourcevarchar(20)Order source - available values: "shop", "personal" or "marketplace_code" e.g. "ebay", "amazon", "ceneo", "emag", "allegro", etc.
| - order_return_source_idintSource ID (e.g. internal allegro account ID, internal shop ID, etc.). Unique only in combination with the "order_source" field (e.g. an ebay account and an allegro account may have the same ID, but two ebay accounts always have different IDs)
| - status_idintOrder return status (the list available to retrieve with getOrderReturnStatusList).
| - date_addintDate of order creation (in unix time format).
| - date_in_statusintDate from which the order return is in current status (unix time format).
| - user_loginvarchar(100)Marketplace user login
| - currencychar(3)3-letter currency symbol (e.g. EUR, PLN)
| - refundedchar(3)Information whether the order return is already refunded.
| - emailvarchar(150)Buyer e-mail address
| - phonevarchar(100)Buyer phone number
| - delivery_pricefloatGross delivery price of a return
| - delivery_fullnamevarchar(100)Delivery address - name and surname
| - delivery_companyvarchar(100)Delivery address - company
| - delivery_addressvarchar(100)Delivery address - street and number
| - delivery_postcodevarchar(100)Delivery address - postcode
| - delivery_cityvarchar(100)Delivery address - city
| - delivery_statevarchar(20)Delivery address - state/province
| - delivery_countryvarchar(50)Delivery address - country
| - delivery_country_codechar(2)Delivery address - country code (two-letter, e.g. EN)
| - extra_field_1varchar(50)Value of the "extra field 1".
| - extra_field_2varchar(50)Value of the "extra field 2".
| - custom_extra_fieldsarrayA list containing order custom extra fields returned only if the input parameters include_custom_extra_fields is set to true, where the key is the extra field ID and value is an extra field content for given extra field. The list of extra fields can be retrieved with getOrderReturnExtraFields method.
In case of file the following format is returned as value:
{
    "title": "file.pdf" (varchar(40) - the file name)
    "url": "https://upload.cdn.baselinker.com/order_extra_files/23/..." (url - the file url)
}
| - admin_commentsvarchar(200)Seller comments
| - delivery_package_modulevarchar(20)Courier name (if the shipment was created).
| - delivery_package_nrvarchar(40)Shipping number (if the shipment was created).
| - connect_dataarrayData from Base Connect linked to the order. Contains fields described below.
| - productsarrayAn array of order return products. Each element of the array is also an array containing fields described below.
| - order_return_account_numbervarchar(50)Bank account number to issue a refund
| - order_return_ibanvarchar(34)IBAN of the bank account
| - order_return_swiftvarchar(11)SWIFT of the bank account
| - fulfillment_statusintFulfillment status ID:
0 - active
5 - accepted
1 - done
2 - canceled



Sample
Input data:
Output data:
A sample request in PHP: