API documentation
Method list
Test your request
Changelog


addOrder
The method allows adding a new order to the BaseLinker order manager.


Input parameters
order_status_idintOrder status (the list available to retrieve with getOrderStatusList)
custom_source_idint(optional) Identifier of custom order source defined in BaseLinker panel. If not provided, default order source is assigned.
date_addintDate of order creation (in unix time format)
currencychar(3)3-letter currency symbol (e.g. EUR, PLN)
payment_methodvarchar(30)Payment method
payment_method_codboolFlag indicating whether the type of payment is COD (cash on delivery)
paidboolInformation whether the order is already paid. The value "1" automatically adds a full payment to the order.
user_commentsvarchar(510)Buyer comments
admin_commentsvarchar(200)Seller comments
emailvarchar(150)Buyer e-mail address
phonevarchar(100)Buyer phone number
user_loginvarchar(30)Allegro or eBay user login
delivery_methodvarchar(30)Delivery method name
delivery_pricefloatGross delivery price
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_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(100)Billing details - name and surname
invoice_companyvarchar(100)Billing details - company
invoice_nipvarchar(100)Billing details - Vat Reg. no./tax number
invoice_addressvarchar(100)Billing details - street and house number
invoice_postcodevarchar(100)Billing details - postcode
invoice_cityvarchar(100)Billing details - city
invoice_country_codechar(2)Billing details - country code (two-letter, e.g. EN)
want_invoiceboolFlag indicating whether the customer wants an invoice (1 - yes, 0 - no)
extra_field_1varchar(50)Value of the "additional field 1". - the seller can store any information there
extra_field_2varchar(50)Value of the "additional field 2". - the seller can store any information there
custom_extra_fieldsarrayA list containing order custom extra fields, 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 removing a field the empty string is expected.
In case of file the following format is expected:
{
    "title": "file.pdf" (varchar(40) - the file name)
    "file": "data:4AAQSkZJRgABA[...]" (binary - the file body limited to 2MB)
}
productsarrayOrder product array. Each element of the array is also an array containing fields:
storage (varchar) - type of magazine from which the product comes (available values: "db" - BaseLinker internal catalog, "shop" - the online store magazine, "warehouse" - a connected wholesaler).
storage_id (int) - the identifier of the magazine from which the product comes (one of the shops connected to the account). Value "0" for a product from the BaseLinker internal catalog.
product_id (varchar) - Product identifier in BaseLinker or store magazine. Blank if the product number is unknown
variant_id (int) - Product variant ID. Blank if the variant number is unknown
name (varchar) - Product name
sku (varchar) - Product sku
ean (varchar) - Product ean
location (varchar) - Product location
warehouse_id (int) - Product source warehouse identifier. Only applies to products from BaseLinker inventory. By default warehouse_id is determined based on the source of the order.
attributes (varchar) - Specific product attributes (e.g. "Color: blue")
price_brutto (float) - Single item gross price
tax_rate (float) - VAT rate
quantity (int) - Quantity of pieces
weight (float) - Single item weight



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
order_idintID of added order.



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