POST UpdateOrder
Create/Update an order.
This feature must be enabled for your account.
Input and output parameters
*denotes required field.
    
        | Input Parameter Name | 
        Type/Info | 
    
    
        | id | 
        id of the order in the system, provide this if you want to update. | 
    
    
        | api_reference_id* | 
        your reference to identify the order, if no "id" is provided we'll use this to update your order. | 
    
    
        | contact_id | 
        ID of the contact in our system you want to assign the order to. Without we'll use "customer_email" to assign the contact. | 
    
    
        | order_reference* | 
        An additional user friendly reference for your order. | 
    
    
        | order_create_date | 
        When your order was created YYYY-MM-DD HH:MM:SS. | 
    
    
        | order_update_date | 
        When your order was updated YYYY-MM-DD HH:MM:SS. | 
    
    
        | order_status | 
        unknown | pending | processing | under-review | awaiting-payment | awaiting-fulfillment | awaiting-pickup | partially-shipped | completed | shipped | fraud | closed | cancelled | declined | refunded | disputed | partially-refunded. | 
    
    
        | invoice_tax_total | 
        Total tax on the order. | 
    
    
        | invoice_total | 
        Total worth of the order. | 
    
    
        | invoice_total_inc_tax | 
        Total worth of the order with tax. | 
    
    
        | invoice_discount_total | 
        Total discount applied. | 
    
    
        | shipping_tax_total | 
        Tax paid on shipping. | 
    
    
        | shipping_total | 
        Total shipping charges. | 
    
    
        | shipping_total_inc_tax | 
        Total shipping charges with tax. | 
    
    
        | shipping_discount_total | 
        Discount applied to shipping. | 
    
    
        | grand_total | 
        Total paid for order. | 
    
    
        | grand_total_inc_tax | 
        Total paid for order with tax. | 
    
    
        | iso_currency_code | 
        ISO alpha 3 currency code. | 
    
    
        | payment_type | 
        Type of payment made. | 
    
    
        | payment_type_name | 
        Friendly name for payment type. | 
    
    
        | number_of_products | 
        Number of products assigned to the order. | 
    
    
        | customer_email* | 
        Email address to the customer, without a contact_id, we'll use this to assign to the contact. | 
    
    
        | customer_firstname | 
        Customer first name. | 
    
    
        | customer_lastname | 
        Customer last name. | 
    
    
        | customer_gender | 
        Customer's gender. | 
    
    
        | customer_telephone | 
        Customer's contact number. | 
    
    
        | customer_mobile | 
        Customer's contact mobile number. | 
    
    
        | customer_dob | 
        Customer's date of birth. | 
    
    
        | customer_is_guest | 
        Is this a guest checkout. | 
    
    
        | customer_notes | 
        Any further info about the customer. | 
    
    
        | billing_first_name | 
        Billing first name. | 
    
    
        | billing_last_name | 
        Billing last name. | 
    
    
        | billing_address1 | 
        Billing address line 1. | 
    
    
        | billing_address2 | 
        Billing address line 2. | 
    
    
        | billing_city | 
        Billing address city. | 
    
    
        | billing_county | 
        Billing address county. | 
    
    
        | billing_post_code | 
        Billing address post-code. | 
    
    
        | billing_country | 
        Billing address country. | 
    
    
        | shipping_first_name | 
        Shipping first name. | 
    
    
        | shipping_last_name | 
        Shipping last name. | 
    
    
        | shipping_address1 | 
        Shipping address line 1. | 
    
    
        | shipping_address2 | 
        Shipping address line 2. | 
    
    
        | shipping_city | 
        Shipping address city. | 
    
    
        | shipping_county | 
        Shipping address county. | 
    
    
        | shipping_post_code | 
        Shipping address post-code. | 
    
    
        | shipping_country | 
        Shipping address country. | 
    
    
        | order_lines* | 
        
            Array of data:
            
                - order_line_id - Your order reference.
 
                - product_sku - Your product SKU.
 
                - product_name - Your product name.
 
                - product_description - Your product description.
 
                - tax_percent - Tax charged.
 
                - product_price - Price for product.
 
                - product_price_tax - Tax charged to product.
 
                - product_price_inc_tax - Product price with tax.
 
                - product_original_price - Original product price (rrp).
 
                - quantity - Number stocked.
 
                - row_total - Cost for the order line.
 
                - row_total_inc_tax - Cost for the order line with tax.
 
                - row_total_discount - Discount for the order line.
 
             
         | 
    
    
        | custom_fields | 
        
            Array of key value pairs for any custom fields data 
            Key is the field name then value assigned: 
            
         | 
    
    
         | 
    
    
        | Outputs: | 
         | 
    
    
        
            
                - id - system id for the order
 
                - status - http status code
 
                - message - action performed
 
                - error - only present during failure
 
             
         | 
    
Examples
curl --request POST \
  --url https://api.wiredplus.com/v1/UpdateOrder \
  --header 'content-type: application/json' \
  --data '{"id":"abc","api_integration":"IntegrationName","api_resource":"order","api_reference_id":"1234","external_order_id":"abc-1020","contact_id":999,"create_date":"2019-12-1113:01:22","update_date":"2020-01-1008:42:27","order_create_date":"2019-12-1113:00:00","order_update_date":"2020-01-1008:42:27","order_status":"pending","invoice_tax_total":11.00,"invoice_total":12.00,"invoice_total_inc_tax":13.00,"invoice_discount_total":0.00,"shipping_tax_total":14.00,"shipping_total":15.00,"shipping_total_inc_tax":16.00,"shipping_discount_total":1.00,"grand_total":17.00,"grand_total_inc_tax":18.00,"payment_type":"online","payment_type_name":"WorldPay","number_of_products":2,"customer_email":"foo@bar.com","customer_firstname":"Foo","customer_lastname":"Bar","customer_gender":"Male","customer_telephone":"1122334455","customer_mobile":"5544332211","customer_dob":"1992-02-01","customer_is_guest":false,"customer_notes":null,"billing_first_name":"Foo","billing_last_name":"Bar","billing_address1":"Unit2","billing_address2":"KestrelCourt","billing_city":"Hapton","billing_county":"Lancashire","billing_post_code":"BB115NA","billing_country":"UnitedKingdom","shipping_first_name":"Foo","shipping_last_name":"Bar","shipping_address1":"Unit2","shipping_address2":"KestrelCourt","shipping_city":"Hapton","shipping_county":"Lancashire","shipping_post_code":"BB115NA","shipping_country":"UnitedKingdom","order_lines":[{"id":"xyz","order_id":"abc","order_line_id":20,"create_date":"2019-12-1113:01:22","update_date":"2020-01-1008:42:27","product_id":"aaabb1122","product_sku":"aabb-1122","product_name":"Myproduct","product_description":"Detailsaboutmyproduct","tax_percent":20.00,"product_price_tax":2.00,"product_original_price":7.00,"product_price":7.00,"product_price_inc_tax":9.00,"quantity":3,"row_total":21.00,"row_total_inc_tax":28.00,"row_total_discount":3.00}],"custom_fields":{"Favorite Colour": "Blue"}}'
    
    
    
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.wiredplus.com/v1/UpdateOrder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{"id":"abc","api_integration":"IntegrationName","api_resource":"order","api_reference_id":"1234","external_order_id":"abc-1020","contact_id":999,"create_date":"2019-12-1113:01:22","update_date":"2020-01-1008:42:27","order_create_date":"2019-12-1113:00:00","order_update_date":"2020-01-1008:42:27","order_status":"pending","invoice_tax_total":11.00,"invoice_total":12.00,"invoice_total_inc_tax":13.00,"invoice_discount_total":0.00,"shipping_tax_total":14.00,"shipping_total":15.00,"shipping_total_inc_tax":16.00,"shipping_discount_total":1.00,"grand_total":17.00,"grand_total_inc_tax":18.00,"payment_type":"online","payment_type_name":"WorldPay","number_of_products":2,"customer_email":"foo@bar.com","customer_firstname":"Foo","customer_lastname":"Bar","customer_gender":"Male","customer_telephone":"1122334455","customer_mobile":"5544332211","customer_dob":"1992-02-01","customer_is_guest":false,"customer_notes":null,"billing_first_name":"Foo","billing_last_name":"Bar","billing_address1":"Unit2","billing_address2":"KestrelCourt","billing_city":"Hapton","billing_county":"Lancashire","billing_post_code":"BB115NA","billing_country":"UnitedKingdom","shipping_first_name":"Foo","shipping_last_name":"Bar","shipping_address1":"Unit2","shipping_address2":"KestrelCourt","shipping_city":"Hapton","shipping_county":"Lancashire","shipping_post_code":"BB115NA","shipping_country":"UnitedKingdom","order_lines":[{"id":"xyz","order_id":"abc","order_line_id":20,"create_date":"2019-12-1113:01:22","update_date":"2020-01-1008:42:27","product_id":"aaabb1122","product_sku":"aabb-1122","product_name":"Myproduct","product_description":"Detailsaboutmyproduct","tax_percent":20.00,"product_price_tax":2.00,"product_original_price":7.00,"product_price":7.00,"product_price_inc_tax":9.00,"quantity":3,"row_total":21.00,"row_total_inc_tax":28.00,"row_total_discount":3.00}], "custom_fields":{"Favorite Colour": "Blue"}}',
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
    
    
var data = {
    "id": "abc",
    "api_integration": "IntegrationName",
    "api_resource": "order",
    "api_reference_id": "1234",
    "external_order_id": "abc-1020",
    "contact_id": 999,
    "create_date": "2019-12-11 13:01:22",
    "update_date": "2020-01-10 08:42:27",
    "order_create_date": "2019-12-11 13:00:00",
    "order_update_date": "2020-01-10 08:42:27",
    "order_status": "pending",
    "invoice_tax_total": 11.00,
    "invoice_total": 12.00,
    "invoice_total_inc_tax": 13.00,
    "invoice_discount_total": 0.00,
    "shipping_tax_total": 14.00,
    "shipping_total": 15.00,
    "shipping_total_inc_tax": 16.00,
    "shipping_discount_total": 1.00,
    "grand_total": 17.00,
    "grand_total_inc_tax": 18.00,
    "payment_type": "online",
    "payment_type_name": "World Pay",
    "number_of_products": 2,
    "customer_email": "foo@bar.com",
    "customer_firstname": "Foo",
    "customer_lastname": "Bar",
    "customer_gender": "Male",
    "customer_telephone": "1122334455",
    "customer_mobile": "5544332211",
    "customer_dob": "1992-02-01",
    "customer_is_guest": false,
    "customer_notes": null,
    "billing_first_name": "Foo",
    "billing_last_name": "Bar",
    "billing_address1": "Unit 2",
    "billing_address2": "Kestrel Court",
    "billing_city": "Hapton",
    "billing_county": "Lancashire",
    "billing_post_code": "BB11 5NA",
    "billing_country": "United Kingdom",
    "shipping_first_name": "Foo",
    "shipping_last_name": "Bar",
    "shipping_address1": "Unit 2",
    "shipping_address2": "Kestrel Court",
    "shipping_city": "Hapton",
    "shipping_county": "Lancashire",
    "shipping_post_code": "BB11 5NA",
    "shipping_country": "United Kingdom",
    "order_lines": [
        {
            "id": "xyz",
            "order_id": "abc",
            "order_line_id": 20,
            "create_date": "2019-12-11 13:01:22",
            "update_date": "2020-01-10 08:42:27",
            "product_id": "aaabb1122",
            "product_sku": "aabb-1122",
            "product_name": "My product",
            "product_description": "Details about my product",
            "tax_percent": 20.00,
            "product_price_tax": 2.00,
            "product_original_price": 7.00,
            "product_price": 7.00,
            "product_price_inc_tax": 9.00,
            "quantity": 3,
            "row_total": 21.00,
            "row_total_inc_tax": 28.00,
            "row_total_discount": 3.00
        }
    ],
    "custom_fields":{
        "Favorite Colour": "Blue"
    }
};
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.wiredplus.com/v1/UpdateOrder",
  "method": "POST",
  "headers": {},
  "processData": false,
  "contentType": false,
  "mimeType": "application/json",
  "data": JSON.stringify(data)
}
$.ajax(settings).done(function (response) {
  console.log(response);
});
    
    
Result Format JSON