Create Order API

CREATE Order API

Instruction

Note

  1. Order payment is not available via API. All the accepted orders are available in Unsubmitted orders. You have to manually pay for orders there.
  2. The limit is maximum 1 requests per second.

Authentication

Authentication is managed through HTTP Basic Authentication, using the customer's email as the username and the API token as the password. Fields such as customer, customer_id, or customer_email are not required in the request as they are determined by the authenticated user.

Header

Content-Type: application/json

Create Order

Description

Create Order

Action

POST

URL

/api_customer/orders

Sample request parameters


                                

Sample Successful Response


                                

Fields

customer_id OR customer_email
(optional) addressbook_id OR addressbook with the following fields: address, address2, province, country, postal_code, name, comments
(optional) customer_order_reference
(optional) comments_customer
order_products (Array)
product_id OR product_code
quantity
(optional) addressbook_id OR addressbook with the following fields: address, address2, province, country, postal_code, name, phone, comments
phone numbers should always be provided. If there’s no phone number available, please fill in your company’s number
Request parameters
Name
Type
Description
Required or optional?
Rules
customer_order_reference
string
Order reference by customer (eg purchase order no)
Optional
none
comments_customer
string
Your comment(s) to VidaXL about this order
Optional
none
product_code
integer
SKU code of a product
Required
none
quantity
integer
Quantity of the product_code
Required
none
address
string
Ship to address
Required
Max 30 char and atleast one number. If exceeds 30 char please fill in the rest at address2.
address2
string
Ship to additional address (as example: Building A)
Optional
none
city
string
Ship to city
Required
none
province
string
US/AU: Ship to state EU: Ship to province
US/AU: Required EU: Optional
none
postal_code
string
Ship to zip/postalcode
Required
none
country
string
Ship to country
Required
none
name
string
Ship to customers name
Required
none
phone
string
Ship to customers phone
Optional
none
comments
string
Comment(s) of your customer about this order
Optional
none
Field descriptions for Orders
Name
Type
Description
id
string
Order id
status_order_id
integer
Status of order
customer_id
integer
Id of customer
submitted_at
datetime
Date that the order was submitted by customer
comments_customer
string
VidaXL tracking portal url, you can follow your order products' journey here
address
string
none
city
string
none
province
string
none
country
string
none
postal_code
string
none
customer_order_reference
string
Order reference by customer (eg purchase order no)
total_products_before_discount
decimal
none
discount_percentage
decimal
none
discount_total
decimal
none
total_products_before_vat
decimal
none
total_before_vat
decimal
none
total_vat
decimal
none
total_products_after_vat
decimal
none
gross_total
decimal
none
shipping_option_id
integer
none
shipping_option_name
string
(available when shipping_option_id is available)
shipping_tracking
string
tracking number of order
shipping_costs
decimal
none
extra_fields
string
not supported by API
customer_email
string
none
customer_company
string
none
customer_name
string
none
customer_pricelist_id
integer
none
customer_phone
string
none
customer_reference_code
string
VidaXL partner id
Field descriptions for Order Products
Name
Type
Description
id
string
Id of record
order_id
integer
Id of order
product_id
integer
Id of product
quantity
decimal
Quantity ordered
price
decimal
Price (not including discounts)
final_price
decimal
Price (including discounts if applicable)
discount_percentage
decimal
Discount percentage
vat_percentage
decimal
VAT percentage (if applicable)
total_before_vat
decimal
Line total before VAT
total_vat
decimal
Total VAT
total_after_vat
decimal
Line total after VAT
product_name
string
Product name
product_code
string
Product code