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 HTTP Basic authentication with username equal to the customer's email and password the API token of the customer
customer_id OR customer_email fields are not required in the request because they are set based on the authenticated user
Header
Content-Type: application/json
Create Order
-
Description Create Order Action POST URL /api_customer/orders Sample request parameters {
"customer_order_reference": "70000001",
"addressbook":{
"country":"GB" },
"order_products":[
{
"product_code":"274181",
"quantity":1,
"addressbook":{
"address":"Covent Garden",
"address2":"",
"city":"London",
"province": "",
"postal_code":"NR33 7NL",
"country":"GB",
"email":"endconsumer@vidaxl.com",
"name":"Test Company",
"phone": "0684541247",
"comments":""
}
},
{
"product_code":"99999",
"quantity":1,
"addressbook":{
"address":"Covent Garden",
"address2":"",
"city":"London",
"province": "",
"postal_code":"NR33 7NL",
"country":"GB",
"email":"endconsumer@vidaxl.com",
"name":"Test Company",
"phone": "0684541247",
"comments":""
}
}
]
}Sample Successful Response {
"order": {
"id": 70,
"status_order_id": 1,
"customer_id": 9,
"invoice_no": null,
"customer_reference_no": 123521478861,
"comments_customer": "Please deliver asap",
"comments_wholesaler": null,
"shipping_way": null,
"shipping_costs": "0.0",
"date_estimated": null,
"total_before_discount": "95.97",
"discount_percentage": "0.0",
"discount_comments": null,
"discount_total": null,
"gross_total": "95.97",
"address": null,
"address2": null,
"city": null,
"province": null,
"country": null,
"postal_code": null,
"created_at": "2018-06-08T03:47:48.000-04:00",
"updated_at": "2018-06-08T03:47:48.000-04:00",
"addressbook_id": 99,
"submitted_at": null,
"customer_order_reference": "74160086",
"total_before_vat": "95.97",
"total_after_vat": "0.0",
"vat_group_id": null,
"total_products_before_discount": "95.97",
"total_vat": "0.0",
"total_products_before_vat": "95.97",
"total_products_after_vat": "95.97",
"total_shipping_after_vat": "0.0",
"sales_rep_id": null,
"sales_rep_commission": "0.0",
"extra_fields": {},
"submitted_by": {},
"submitted_by_class": null,
"integration_ref": null,
"payment_way_id": null,
"payment_ip": null,
"payment_token": null,
"payment_payer_id": null,
"paid_amount": "0.0",
"is_paid": false,
"shipping_option_id": null,
"total_m3": "0.0",
"request_delivery_at": null,
"pricelist_id": 25,
"shipping_tracking": null,
"coupon_id": null,
"brightpearl_sales_order_id": null,
"cc_first_name": null,
"cc_last_name": null,
"cc_city": null,
"cc_province": null,
"cc_postal_code": null,
"cc_country": null,
"cc_address": null,
"total_quantity": "1.0",
"payment_date": null,
"total_weight": "0.0",
"payment_requested": false,
"total_dimension": "0.0",
"coupon_amount": "0.0",
"coupon_vat": "0.0",
"custom_discount_amount": "0.0",
"save_for_later": true,
"integration_ref_status": null,
"shipping_service_code": null,
"shipping_service_name": null,
"integration_data": {},
"estimated_delivery_at": null,
"error_code": null,
"notes": null
},
"order_products": [
{
"id": 108,
"order_id": 70,
"product_id": 12646,
"quantity": "1.0",
"price": "95.97",
"final_price": "95.97",
"discount_percentage": "0.0",
"vat_percentage": "0.0",
"total_before_vat": "95.97",
"comments_customer": null,
"comments_wholesaler": null,
"total_vat": "0.0",
"total_after_vat": "95.97",
"option_value_ids": null,
"created_at": "2018-06-08T03:47:48.000-04:00",
"updated_at": "2018-06-08T03:47:48.000-04:00",
"option_values": {},
"product_variant_id": 0,
"has_custom_price": false,
"addressbook_id": 100,
"status_order_id": null,
"is_backorder": false,
"estimated_delivery_at": null,
"cost": "0.0",
"estimated_dispatch_at": null
}
]
}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, commentsphone 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 comments_customer string Your comment(s) to VidaXL about this order Optional product_code integer SKU code of a product Required quantity integer Quantity of the product_code Required 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 city string Ship to city Required province string US/AU: Ship to state
EU: Ship to provinceUS/AU: Required
EU: Optionalpostal_code string Ship to zip/postalcode Required country string Ship to country Required name string Ship to customers name Required phone string Ship to customers phone Optional comments string Comment(s) of your customer about this order Optional
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 - city string - province string - country string - postal_code string - customer_order_reference string Order reference by customer (eg purchase order no) total_products_before_discount decimal - discount_percentage decimal - discount_total decimal - total_products_before_vat decimal - total_before_vat decimal - total_vat decimal - total_products_after_vat decimal - gross_total decimal - shipping_option_id integer - shipping_option_name string (available when shipping_option_id is available) shipping_tracking string tracking number of order shipping_costs decimal - extra_fields string - not supported by API customer_email string - customer_company string - customer_name string - customer_pricelist_id integer - customer_phone string - 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