API documentation
Method list
Test your request

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

It is recommended to download only confirmed orders (get_unconfirmed_orders = false). Unconfirmed orders may be incomplete. The user may be, for example, in the process of creating an order - it already exists in the database, but not all information is completed. Unconfirmed orders may contain only a partial list of products and may be changed soon. Confirmed orders usually do not change anymore and can be safely downloaded to an external system.

The best way to download the ongoing orders is:
Collecting new order identifiers using getJournalList.

Or, using this method:
1. Setting the starting date and specifying it in the date_confirmed_from field
2. Processing of all received orders. If 100 orders are received, there may be even more to download.
3. Downloading the next package of orders by entering the value of the date_confirmed field from last downloaded order in the date_confirmed_from field. In order to avoid downloading the same orders value of date_confirmed should be increased by 1 second. This operation is repeated until you receive a package with less than 100 orders (this means that there are no more orders left to download).
4. Saving the date_confirmed last processed order. You can download orders from this date onwards so that you do not download the same order twice. It is not possible for an order to 'jump' into the database with an earlier confirmation date. This way you can be sure that all confirmed orders have been downloaded.

Input parameters
order_idint(optional) Order identifier. Completing this field will download information about only one specific order.
date_confirmed_fromint(optional) Date of order confirmation from which orders are to be collected. Format unix time stamp.
date_fromint(optional) The order date from which orders are to be collected. Format unix time stamp.
id_fromint(optional) The order ID number from which subsequent orders are to be collected.
get_unconfirmed_ordersbool(optional, false by default) Download unconfirmed orders as well (this is e.g. an order from Allegro to which the customer has not yet completed the delivery form). Default is false. Unconfirmed orders may not be complete yet, the shipping method and price is also unknown.
include_custom_extra_fieldsbool(optional, false by default) Download values of custom additional fields.
status_idint(optional) The status identifier from which orders are to be collected. Leave blank to download orders from all statuses.
filter_emailvarchar(50)(optional) Filtering of order lists by e-mail address (displays only orders with the given e-mail address).
filter_order_sourcevarchar(20)(optional) Filtering of order lists by order source, for instance "ebay", "amazon" (displays only orders come from given source). The list of order sources can be retrieved with getOrderSources method.
filter_order_source_idint(optional) Filtering of order lists by order source identifier, for instance "2523" (displays only orders come from order source defined in "filter_order_source" identified by given order source identifier). Filtering by order source indentifier requires "filter_order_source" to be set prior. The list of order source identifiers can be retrieved with getOrderSources method.

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
ordersarrayAn array of information about the orders found. Each order is described by the fields listed below.
order_idintOrder Identifier from BaseLinker order manager
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.
order_sourcevarchar(20)Order source - available values: "shop", "personal" or "marketplace_code" e.g. "ebay", "amazon", "ceneo", "emag", "allegro", etc.
order_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)
order_source_infovarchar(200)Description of the order source - e.g. shop address or eBay seller nickname ( field currently unavailable!)
order_status_idintOrder status (the list available to retrieve with getOrderStatusList)
date_addintDate of order creation (in unix time format)
date_confirmedintOrder confirmation date if confirmed (unix time format)
date_in_statusintDate from which the order is in current status (unix time format)
confirmedboolFlag indicating if the order is confirmed.
user_loginvarchar(100)Allegro or eBay user login
currencychar(3)3-letter currency symbol (e.g. EUR, PLN)
payment_methodvarchar(100)Payment method
payment_method_codvarchar(1)Flag indicating whether the type of payment is COD (cash on delivery): "1" - yes, "0" - no
payment_donefloatAmount paid
user_commentsvarchar(1000)Buyer comments
admin_commentsvarchar(200)Seller comments
emailvarchar(150)Buyer e-mail address
phonevarchar(100)Buyer phone number
delivery_methodvarchar(100)Delivery method name
delivery_pricefloatGross delivery price
delivery_package_modulevarchar(20)Courier name (if the shipment was created)
delivery_package_nrvarchar(40)Shipping number (if the shipment was created)
delivery_fullnamevarchar(100)Delivery address - name and surname
delivery_companyvarchar(100)Delivery address - company
delivery_addressvarchar(156)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)
delivery_point_idvarchar(40)Pick-up point delivery - pick-up point identifier
delivery_point_namevarchar(100)Pick-up point delivery - pick-up point name
delivery_point_addressvarchar(100)Pick-up point delivery - pick-up point address
delivery_point_postcodevarchar(100)Pick-up point delivery - pick-up point postcode
delivery_point_cityvarchar(100)Pick-up point delivery - pick-up point city
invoice_fullnamevarchar(200)Billing details - name and surname
invoice_companyvarchar(200)Billing details - company
invoice_nipvarchar(100)Billing details - Vat Reg. no./tax number
invoice_addressvarchar(250)Billing details - street and house number
invoice_postcodevarchar(20)Billing details - postcode
invoice_cityvarchar(100)Billing details - city
invoice_statevarchar(20)Billing details - state/province
invoice_countryvarchar(50)Billing details - country
invoice_country_codechar(2)Billing details - country code (two-letter, e.g. EN)
want_invoicevarchar(1)Flag indicating whether the customer wants an invoice: "1" - yes, "0" - no
extra_field_1varchar(50)Value of the "extra field 1". - the seller can store any information there
extra_field_2varchar(50)Value of the "extra field 2". - the seller can store any information there
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 getOrderExtraFields 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/caa37889b042cb92b4fed8677423893f.pdf" (url - the file url)
order_pagevarchar(150)Order information page address
pick_stateintFlag indicating the status of the order products collection (1 - all products have been collected, 0 - not all products have been collected)
pack_stateintFlag indicating the status of the order products packing (1 - all products have been packed, 0 - not all products have been packed)
productsarrayAn array of order products. Each element of the array is also an array containing fields:
storage (varchar(9)) - type of product source storage (available values: "db" - BaseLinker internal catalog, "shop" - online shop storage, "warehouse" - the connected wholesaler)
storage_id (int) - the identifier of the storage (inventory/shop/warehouse) from which the product comes.
order_product_id (int) - ID of order item from BaseLinker order manager
product_id (varchar(50)) - product identifier in BaseLinker or shop storage. Blank if the product number is unknown
variant_id (varchar(30)) - Product variant ID. Blank if the variant number is unknown
name (varchar(130)) - Product name
sku (varchar(50)) - Product sku
ean (varchar(32)) - Product ean
location (varchar(50)) - Product location
warehouse_id (int) - Product source warehouse identifier. Only applies to products from BaseLinker inventory.
auction_id (varchar(50)) - Listing ID number (if the order comes from ebay/allegro)
attributes (varchar(350)) - The detailed product attributes, e.g. "Colour: blue" (Variant name)
price_brutto (float) - Single item gross price
tax_rate (float) - VAT tax rate e.g. "23", (value from range 0-100, EXCEPTION values: "-1" for "EXPT"/"ZW" exempt from VAT, "-0.02" for "NP" annotation, "-0.03" for "OO" VAT reverse charge)
quantity (int) - Quantity of pieces
weight (float) - Single item weight
bundle_id (int) - ID of the bundle that was split to aquire this order item. Only applies to bundles from BaseLinker inventory. Returns 0 if the product was not aquired from splitting a bundle.

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