Create Order

Creates a new order in Despatch Cloud and returns a success or failure message as well as the order id of the order created.

This API call can be used to create both manual orders and orders linked to a sales channel setup in Despatch Cloud.

Endpoint: https://YOUR-ACCOUNT-NAME.despatchcloud.co.uk/ws/v1/wsorders/create_order
Method: POST
 
Field Name  Required FormatNotes
order_idNoStringAutomatically generated if empty.
channel_idNoString 
channel_alt_idNoString 
date_receivedNoUnix Time Stamp Automatically generated if empty.
sales_channelNoStringMust be a valid sales channel, Automatically set to manual if empty. 
statusNoInteger1 = Draft / 2 = On Hold / 3 = Ready
invoice_name_companyNoString 
invoice_nameNoString 
invoice_address_line_oneNoString 
invoice_address_line_twoNoString 
invoice_address_cityNoString 
invoice_address_countyNoString 
invoice_address_countryNoString 
invoice_address_postcodeNoString 
invoice_address_isoNoString 
shipping_name_companyNoString 
shipping_nameNoString 
shipping_address_line_oneNoString 
shipping_address_line_twoNoString 
shipping_address_cityNoString 
shipping_address_countyNoString 
shipping_address_countryNoString 
shipping_address_postcodeNoString 
shipping_address_isoNoString 
emailNoString 
phone_oneNoString 
phone_twoNoString 
total_paidNoString 
tax_paidNoString 
shipping_paidNoString 
payment_methodNoString 
payment_refNoString 
payment_currencyNoString 
shipping_method_requested NoString 
customer_commentsNoString 
staff_notesNoString 


Example Request (POST):
CopyCopyCopyCopyCopyCopyCopy{
  "order": {
    "order_id": "123456789-9",
    "channel_id": "1",
    "channel_alt_id": "",
    "shipping_name_company": "Despatch Cloud Ltd",
    "shipping_name": "Jane Doe",
    "shipping_address_line_one": "Unit 76",
    "shipping_address_line_two": "Warfield Road",
    "shipping_address_city": "Driffield",
    "shipping_address_county": "East Yorkshire",
    "shipping_address_country": "United Kingdom",
    "shipping_address_postcode": "YO25 9DJ",
    "shipping_address_iso": "GB",
    "invoice_name_company": "Despatch Cloud Ltd",
    "invoice_name": "Jane Doe",
    "invoice_address_line_one": "Unit 76",
    "invoice_address_line_two": "Warfield Road",
    "invoice_address_city": "Driffield",
    "invoice_address_county": "East Yorkshire",
    "invoice_address_country": "United Kingdom",
    "invoice_address_postcode": "YO25 9DJ",
    "invoice_address_iso": "GB",
    "email": "[email protected]",
    "phone_one": "01377455180",
    "phone_two": "",
    "total_paid": "24.00",
    "tax_paid": "4.00",
    "shipping_paid": "4.00",
    "total_discount": "0.00",
    "shipping_method_requested": "Next Day",
    "shipping_tracking_code": "",
    "payment_method": "Shopifypayments",
    "payment_ref": "",
    "payment_currency": "GBP",
    "sales_channel": "Shopify",
    "date_received": "1564655767",
    "date_dispatched": "0",
    "status": "1",
    "customer_comments": "",
    "staff_comments": "",
    "deleted": "0",
    "files": "",
    "discount_code_used": "",
    "coupon_code": ""
  }
}

Example Response:
CopyCopyCopyCopyCopyCopyCopy{"status":"SUCCESS","order_id":"123456789-9"}