addOrder
The method allows adding a new order to the BaseLinker order manager.
Input parameters
Output data:
A sample request in PHP:
order_status_id | int | Order status (the list available to retrieve with getOrderStatusList) |
custom_source_id | int | (optional) Identifier of custom order source defined in BaseLinker panel. If not provided, default order source is assigned. |
date_add | int | Date of order creation (in unix time format) |
currency | char(3) | 3-letter currency symbol (e.g. EUR, PLN) |
payment_method | varchar(30) | Payment method |
payment_method_cod | bool | Flag indicating whether the type of payment is COD (cash on delivery) |
paid | bool | Information whether the order is already paid. The value "1" automatically adds a full payment to the order. |
user_comments | varchar(510) | Buyer comments |
admin_comments | varchar(200) | Seller comments |
varchar(150) | Buyer e-mail address | |
phone | varchar(100) | Buyer phone number |
user_login | varchar(30) | Allegro or eBay user login |
delivery_method | varchar(30) | Delivery method name |
delivery_price | float | Gross delivery price |
delivery_fullname | varchar(100) | Delivery address - name and surname |
delivery_company | varchar(100) | Delivery address - company |
delivery_address | varchar(156) | Delivery address - street and number |
delivery_postcode | varchar(100) | Delivery address - postcode |
delivery_city | varchar(100) | Delivery address - city |
delivery_state | varchar(20) | Delivery address - state/province |
delivery_country_code | char(2) | Delivery address - country code (two-letter, e.g. EN) |
delivery_point_id | varchar(40) | Pick-up point delivery - pick-up point identifier |
delivery_point_name | varchar(100) | Pick-up point delivery - pick-up point name |
delivery_point_address | varchar(100) | Pick-up point delivery - pick-up point address |
delivery_point_postcode | varchar(100) | Pick-up point delivery - pick-up point postcode |
delivery_point_city | varchar(100) | Pick-up point delivery - pick-up point city |
invoice_fullname | varchar(100) | Billing details - name and surname |
invoice_company | varchar(100) | Billing details - company |
invoice_nip | varchar(100) | Billing details - Vat Reg. no./tax number |
invoice_address | varchar(100) | Billing details - street and house number |
invoice_postcode | varchar(100) | Billing details - postcode |
invoice_city | varchar(100) | Billing details - city |
invoice_state | varchar(20) | Billing details - state/province |
invoice_country_code | char(2) | Billing details - country code (two-letter, e.g. EN) |
want_invoice | bool | Flag indicating whether the customer wants an invoice (1 - yes, 0 - no) |
extra_field_1 | varchar(50) | Value of the "additional field 1". - the seller can store any information there |
extra_field_2 | varchar(50) | Value of the "additional field 2". - the seller can store any information there |
custom_extra_fields | array | A 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) } |
products | array | Order 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. To assign multiple locations, separate them with a semicolon. 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 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 |
Output data
The method returns the data in JSON format.
status | varchar(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_id | int | ID of added order. |
Sample
Input data:Output data:
A sample request in PHP: