orderStatuses

    Get orderStatuses

    Gets the list of order statuses resources available.

    Request

    • Method: GET
    • Version: v3, this API call supports additional sort and filter mechanisms as well as retrieving only a sub-set of fields

      Note: In order to access the v3 API endpoints please make sure you have enabled the new rendering engine.

    • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
      • Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.
    • Path: /webresources/api/v3/sites/current/orderstatuses
      • Alternatively, use siteID instead of 'current'
    • Authorization header: This should contain the authorization token. Here is how to obtain the token.

    Response

    The details for the specified customer ID in JSON format.

    • id - the id of the order status (integer)
    • siteId - the id of the site (integer)
    • label - the name of the orderstatus (string)
    • default (boolean)
    • notifyCustomer (boolean)
    • soteNotificationId (numeric)
    • notification (JSON)
      • templateId (numeric)
      • fromAddress (string)
      • emailFormat (string)
      • subject (string)
      • body (string)

    The response is paginated, you can return only a few of the customer's fields. Take a look at the API V3: sorting and filtering for additional switches you can use.

    You can output additional fields to those listed above as default, see the API v3 Discovery APP for additional details.

    Accepts and returns JSON as Content-Type.


    Request:

    GET /webresources/api/v3/sites/current/orderstatuses HTTPS/1.1
    Authorization: 14f87f21c5ea4830a06a6314a8aad82b45bc61dc08f24a0fb55599cea83ca811
    Connection: keep-alive
    Content-Type: application/json
    

    Response:

    {
    	"items": [
    		{
    			"id": 102839,
    			"siteId": 2672227,
    			"siteNotificationId": 19277,
    			"label": "Goods Dispatched",
    			"default": false,
    			"notifyCustomer": false,
    			"notification": {
    				"templateId": -1,
    				"fromAddress": "\"Adobe® Business Catalyst\" info@testsuite.biz",
    				"emailFormat": 1,
    				"subject": "Your goods have been dispatched",
    				"body": "<html>\n\r    <head>\n\r        <title></title>\n\r        <style type=\"text/css\">\n\r            body { margin: 18px; }     body, table { font: 12px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { font: 11px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { border-right: 1px solid #eee; border-bottom: 1px solid #eee; }     table.border td { border-top: 1px solid #eee; border-left: 1px solid #eee; }     table span { color: #888; }\n\r        </style>\n\r    </head>\n\r    <body>\n\r        <p>Dear <b>{tag_recipientname}</b>,</p>\n\r        <p>We’d like to inform you that your order has been processed and dispatched to the address listed below:</p>\n\r        <table width=\"100%\" class=\"invoice\" cellspacing=\"0\" cellpadding=\"6\">\n\r            <tbody>\n\r                <tr>\n\r                    <td colspan=\"2\">{tag_addressshipping}</td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">&nbsp;</td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">\n\r                    <table width=\"100%\" class=\"border\" cellspacing=\"0\" cellpadding=\"6\">\n\r                        <tbody>\n\r                            <tr>\n\r                                <td style=\"width: 10%;\"><span>Product Code</span></td>\n\r                                <td style=\"width: 20%;\"><span>Product</span></td>\n\r                                <td style=\"width: 30%;\"><span>Description</span></td>\n\r                                <td style=\"width: 10%;\"><span>Quantity</span></td>\n\r                            </tr>\n\r                            <tr class=\"text\">\n\r                                <td style=\"width: 10%;\">{tag_productcode}</td>\n\r                                <td style=\"width: 20%;\">{tag_productname}</td>\n\r                                <td style=\"width: 30%;\">{tag_productdescription}</td>\n\r                                <td style=\"width: 10%;\">{tag_productquantity}</td>\n\r                            </tr>\n\r                        </tbody>\n\r                    </table>\n\r                    </td>\n\r                </tr>\n\r            </tbody>\n\r        </table>\n\r    </body>\n\r</html>"
    			}
    		},
    		{
    			"id": 102840,
    			"siteId": 2672227,
    			"siteNotificationId": 19278,
    			"label": "Goods Received",
    			"default": false,
    			"notifyCustomer": false,
    			"notification": {
    				"templateId": -1,
    				"fromAddress": "\"Adobe® Business Catalyst\" info@testsuite.biz",
    				"emailFormat": 1,
    				"subject": "Thank you for shopping with us!",
    				"body": "<html>\n\r    <head>\n\r        <title></title>\n\r        <style type=\"text/css\">\n\r            body { margin: 18px; }     body, table { font: 12px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { font: 11px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { border-right: 1px solid #eee; border-bottom: 1px solid #eee; }     table.border td { border-top: 1px solid #eee; border-left: 1px solid #eee; }     table span { color: #888; }\n\r        </style>\n\r    </head>\n\r    <body>\n\r        <p>Dear <b>{tag_recipientname}</b>,</p>\n\r        <p>Our records indicate that your goods have been received successfully. We’d just like to thank you for shopping with us and hope to see you again soon!</p>\n\r    </body>\n\r</html>"
    			}
    		},
    		{
    			"id": 102841,
    			"siteId": 2672227,
    			"siteNotificationId": 19279,
    			"label": "Purchase - Awaiting Payment",
    			"default": false,
    			"notifyCustomer": false,
    			"notification": {
    				"templateId": -1,
    				"fromAddress": "\"Adobe® Business Catalyst\" info@testsuite.biz",
    				"emailFormat": 1,
    				"subject": "Awaiting payment for your purchase",
    				"body": "<html>\n\r    <head>\n\r        <title></title>\n\r        <style type=\"text/css\">\n\r            body { margin: 18px; }     body, table { font: 12px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { font: 11px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { border-right: 1px solid #eee; border-bottom: 1px solid #eee; }     table.border td { border-top: 1px solid #eee; border-left: 1px solid #eee; }     table span { color: #888; }\n\r        </style>\n\r    </head>\n\r    <body>\n\r        <p>Dear <b>{tag_recipientname}</b>,</p>\n\r        <p>We’ve received your order and are awaiting payment before further processing. We’ll be in touch once payment has been successfully received. Below you’ll find the full details of your order:</p>\n\r        <table width=\"100%\" class=\"invoice\" cellspacing=\"0\" cellpadding=\"6\">\n\r            <tbody>\n\r                <tr>\n\r                    <td><strong>Invoice Date</strong><br />\n\r                    {tag_invoicedate} </td>\n\r                    <td align=\"right\"><strong>Invoice Number</strong><br />\n\r                    {tag_invoicenumber} </td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">&nbsp;</td>\n\r                </tr>\n\r                <tr>\n\r                    <td>{tag_recipientname}<br />\n\r                    {tag_addressdefault} </td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">&nbsp;</td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">\n\r                    <table width=\"100%\" class=\"border\" cellspacing=\"0\" cellpadding=\"6\">\n\r                        <tbody>\n\r                            <tr>\n\r                                <td style=\"width: 10%;\"><span>Product Code</span></td>\n\r                                <td style=\"width: 20%;\"><span>Product</span></td>\n\r                                <td style=\"width: 30%;\"><span>Description</span></td>\n\r                                <td style=\"width: 10%;\"><span>Unit Price</span></td>\n\r                                <td style=\"width: 10%;\"><span>Tax</span></td>\n\r                                <td style=\"width: 10%;\"><span>Quantity</span></td>\n\r                                <td style=\"width: 10%;\"><span>Total</span></td>\n\r                            </tr>\n\r                            <tr class=\"text\">\n\r                                <td style=\"width: 10%;\">{tag_productcode}</td>\n\r                                <td style=\"width: 20%;\">{tag_productname}</td>\n\r                                <td style=\"width: 30%;\">{tag_productdescription}</td>\n\r                                <td style=\"width: 10%;\">{tag_productextaxamount}</td>\n\r                                <td style=\"width: 10%;\">{tag_producttaxamount}</td>\n\r                                <td style=\"width: 10%;\">{tag_productquantity}</td>\n\r                                <td style=\"width: 10%;\">{tag_producttotal}</td>\n\r                            </tr>\n\r                        </tbody>\n\r                    </table>\n\r                    <table width=\"100%\" class=\"textb\" border=\"0\" cellspacing=\"0\" cellpadding=\"6\">\n\r                        <tbody>\n\r                            <tr>\n\r                                <td colspan=\"2\"><br />\n\r                                <hr />\n\r                                </td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Shipping Cost:</strong></td>\n\r                                <td class=\"text\">{tag_shippingextaxamount}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Shipping Tax:</strong></td>\n\r                                <td class=\"text\">{tag_shippingtaxamount}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Grand Total:</strong></td>\n\r                                <td>{tag_invoicetotal}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Paid Already:</strong></td>\n\r                                <td>{tag_amountpaid}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Outstanding:</strong></td>\n\r                                <td>{tag_amountoutstanding}</td>\n\r                            </tr>\n\r                        </tbody>\n\r                    </table>\n\r                    </td>\n\r                </tr>\n\r            </tbody>\n\r        </table>\n\r    </body>\n\r</html>"
    			}
    		},
    		{
    			"id": 102842,
    			"siteId": 2672227,
    			"siteNotificationId": 19280,
    			"label": "Purchase - Payment Received",
    			"default": true,
    			"notifyCustomer": false,
    			"notification": {
    				"templateId": -1,
    				"fromAddress": "\"Adobe® Business Catalyst\" info@testsuite.biz",
    				"emailFormat": 1,
    				"subject": "Payment has been received for your purchase",
    				"body": "<html>\n\r    <head>\n\r        <title></title>\n\r        <style type=\"text/css\">\n\r            body { margin: 18px; }     body, table { font: 12px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { font: 11px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { border-right: 1px solid #eee; border-bottom: 1px solid #eee; }     table.border td { border-top: 1px solid #eee; border-left: 1px solid #eee; }     table span { color: #888; }\n\r        </style>\n\r    </head>\n\r    <body>\n\r        <p>Dear <b>{tag_recipientname}</b>,</p>\n\r        <p>We’d like to inform you that we’ve successfully received payment for your order. We’ll be in touch again once your order has been dispatched. For your reference, please find the full details of your order below:</p>\n\r        <table width=\"100%\" class=\"invoice\" cellspacing=\"0\" cellpadding=\"6\">\n\r            <tbody>\n\r                <tr>\n\r                    <td><strong>Invoice Date</strong><br />\n\r                    {tag_invoicedate} </td>\n\r                    <td align=\"right\"><strong>Invoice Number</strong><br />\n\r                    {tag_invoicenumber} </td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">&nbsp;</td>\n\r                </tr>\n\r                <tr>\n\r                    <td>{tag_recipientname}<br />\n\r                    {tag_addressdefault} </td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">&nbsp;</td>\n\r                </tr>\n\r                <tr>\n\r                    <td colspan=\"2\">\n\r                    <table width=\"100%\" class=\"border\" cellspacing=\"0\" cellpadding=\"6\">\n\r                        <tbody>\n\r                            <tr>\n\r                                <td style=\"width: 10%;\"><span>Product Code</span></td>\n\r                                <td style=\"width: 20%;\"><span>Product</span></td>\n\r                                <td style=\"width: 30%;\"><span>Description</span></td>\n\r                                <td style=\"width: 10%;\"><span>Unit Price</span></td>\n\r                                <td style=\"width: 10%;\"><span>Tax</span></td>\n\r                                <td style=\"width: 10%;\"><span>Quantity</span></td>\n\r                                <td style=\"width: 10%;\"><span>Total</span></td>\n\r                            </tr>\n\r                            <tr class=\"text\">\n\r                                <td style=\"width: 10%;\">{tag_productcode}</td>\n\r                                <td style=\"width: 20%;\">{tag_productname}</td>\n\r                                <td style=\"width: 30%;\">{tag_productdescription}</td>\n\r                                <td style=\"width: 10%;\">{tag_productextaxamount}</td>\n\r                                <td style=\"width: 10%;\">{tag_producttaxamount}</td>\n\r                                <td style=\"width: 10%;\">{tag_productquantity}</td>\n\r                                <td style=\"width: 10%;\">{tag_producttotal}</td>\n\r                            </tr>\n\r                        </tbody>\n\r                    </table>\n\r                    <table width=\"100%\" class=\"textb\" border=\"0\" cellspacing=\"0\" cellpadding=\"6\">\n\r                        <tbody>\n\r                            <tr>\n\r                                <td colspan=\"2\"><br />\n\r                                <hr />\n\r                                </td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Shipping Cost:</strong></td>\n\r                                <td class=\"text\">{tag_shippingextaxamount}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Shipping Tax:</strong></td>\n\r                                <td class=\"text\">{tag_shippingtaxamount}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Grand Total:</strong></td>\n\r                                <td>{tag_invoicetotal}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Paid Already:</strong></td>\n\r                                <td>{tag_amountpaid}</td>\n\r                            </tr>\n\r                            <tr>\n\r                                <td align=\"right\" style=\"width: 90%;\"><strong>Outstanding:</strong></td>\n\r                                <td>{tag_amountoutstanding}</td>\n\r                            </tr>\n\r                        </tbody>\n\r                    </table>\n\r                    </td>\n\r                </tr>\n\r            </tbody>\n\r        </table>\n\r    </body>\n\r</html>"
    			}
    		},
    		{
    			"id": 105543,
    			"siteId": 2672227,
    			"siteNotificationId": 19330,
    			"label": "Received Order",
    			"default": false,
    			"notifyCustomer": true,
    			"notification": {
    				"templateId": -1,
    				"fromAddress": "\"Adobe® Business Catalyst\" info@testsuite.biz",
    				"emailFormat": 1,
    				"subject": "Your order status has changed",
    				"body": "<html>\n\r    <head>\n\r        <title></title>\n\r        <style type=\"text/css\">\n\r            body { margin: 18px; }     body, table { font: 12px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { font: 11px/18px \"Lucida Grande\", Arial, Verdana, sans-serif; }     table.border { border-right: 1px solid #eee; border-bottom: 1px solid #eee; }     table.border td { border-top: 1px solid #eee; border-left: 1px solid #eee; }     table span { color: #888; }\n\r        </style>\n\r    </head>\n\r    <body>\n\r        <p>Dear <b>{tag_recipientname}</b>,</p>\n\r        <p>We’d like to inform you that the status of your order has changed from {tag_orderstatusold} to {tag_orderstatusnew}. We’ll keep you updated with your order status as it’s processed further. </p>\n\r    </body>\n\r</html>"
    			}
    		}
    	],
    	"totalItemsCount": 5,
    	"skip": 0,
    	"limit": 10
    }

    Sample codes

    Get the list of order statuses (the notification is not included by default)

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
        url: "/webresources/api/v3/sites/current/orderstatuses",
        type: "GET",
        connection: "keep-alive",    
        contentType: "application/json",
        headers: {
            "Authorization": $.cookie('access_token')
        }
    });
    request.done(function (msg) {
        console.log(msg);
    })
    request.fail(function (jqXHR) {
        console.log("Request failed.");
        console.log("Error code: " + jqXHR.status);
        console.log("Error text: " + jqXHR.statusText);
        console.log("Response text: " + jqXHR.responseText);
    })

    Get the details of a particular order status (the notification is not included by default)

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
        url: "/webresources/api/v3/sites/current/orderstatuses/105543",
        type: "GET",
        connection: "keep-alive",    
        contentType: "application/json",
        headers: {
            "Authorization": $.cookie('access_token')
        }
    });
    request.done(function (msg) {
        console.log(msg);
    })
    request.fail(function (jqXHR) {
        console.log("Request failed.");
        console.log("Error code: " + jqXHR.status);
        console.log("Error text: " + jqXHR.statusText);
        console.log("Response text: " + jqXHR.responseText);
    })

    Get the notifications for an orderStatus item

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
        url: "/webresources/api/v3/sites/current/orderstatuses/105543",
        type: "GET",
        connection: "keep-alive",    
        contentType: "application/json",
        headers: {
            "Authorization": $.cookie('access_token')
        }
    });
    request.done(function (msg) {
        console.log(msg);
    })
    request.fail(function (jqXHR) {
        console.log("Request failed.");
        console.log("Error code: " + jqXHR.status);
        console.log("Error text: " + jqXHR.statusText);
        console.log("Response text: " + jqXHR.responseText);
    })

    Create a new orderStatus item

    Using this method you can add a new orderStatus irem to your site.

    Request

    • Method: POST
    • Version: v3
    • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
      • Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.
    • Path: /webresources/api/v3/sites/current/orderstatuses
      • Alternatively, use siteID instead of 'current'
    • Authorization header: This should contain the authorization token. Here is how to obtain the token.

    Parameters

    • label - the name of the orderstatus (string)
    • default (boolean)
    • notifyCustomer (boolean)
    • soteNotificationId (numeric)
    • notification (JSON)
      • templateId (numeric)
      • fromAddress (string)
      • emailFormat (string)
      • subject (string)
      • body (string)

    Response

    Returns an empty body if successful or a detailed error message.

    Accepts and returns JSON as Content-Type.


    Request:

    POST /webresources/api/v3/sites/current/orderstatuses HTTPS/1.1
    Authorization: 14f87f21c5ea4830a06a6314a8aad82b45bc61dc08f24a0fb55599cea83ca811
    Connection: keep-alive
    Content-Type: application/json
    
    {
        "label": "Command updated",
        "default": false,
        "notifyCustomer": false,
        "notification": {
            "templateId": -1,
            "fromAddress": "\"Adobe® Business Catalyst\" no-reply@businesscatalyst.com",
            "emailFormat": 1,
            "subject": "Your goods have been dispatched - customized",
            "body": "<html>\n\r    <head>\n\r        <title></title>\n\r ..."
          }
    }

    Response:

    
    HTTP/1.1 201 CREATED
    Location: /webresources/api/v3/sites/current/orderstatuses/28742
    Content-Type: application/json; charset=utf-8
    Content-Length: length

    Sample code

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
    url: "/webresources/api/v3/sites/current/orderstatuses",
    type: "POST",
    connection: "keep-alive",    
        contentType: "application/json",
    headers: {
        "Authorization": $.cookie('access_token')
    },
    processData: false,
    data: JSON.stringify({
        "label": "Command updated",
        "default": false,
        "notifyCustomer": false,
        "notification": {
            "templateId": -1,
            "fromAddress": "\"Adobe® Business Catalyst\" no-reply@businesscatalyst.com",
            "emailFormat": 1,
            "subject": "Your goods have been dispatched - customized",
            "body": "<html>\n\r    <head>\n\r        <title></title>\n\r ..."
          }
    })
    });
    request.done(function(msg) {
    console.log(msg);
    })
    request.fail(function(jqXHR) {
    console.log("Request failed.");
    console.log("Error code: " + jqXHR.status);
    console.log("Error text: " + jqXHR.statusText);
    console.log("Response text: " + jqXHR.responseText);
    })

    Edit an orderStatus resource

    Using this method you can edit an orderStatus resource.

    Request

    • Method: PUT
    • Version: v3
    • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
      • Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.
    • Path: /webresources/api/v3/sites/current/orderstatuses/[orderStatus_ID]
      • Alternatively, use siteID instead of 'current'
    • Authorization header: This should contain the authorization token. Here is how to obtain the token.

    Parameters

    • id - the id of the order status (integer)
    • label - the name of the orderstatus (string)
    • default (boolean)
    • notifyCustomer (boolean)
    • soteNotificationId (numeric)
    • notification (JSON)
      • templateId (numeric)
      • fromAddress (string)
      • emailFormat (string)
      • subject (string)
      • body (string)

    Response

    Returns an empty body if successful or a detailed error message.

    Accepts and returns JSON as Content-Type.


    Request:

    PUT /webresources/api/v3/sites/current/orderstatuses/28742 HTTPS/1.1
    Authorization: 14f87f21c5ea4830a06a6314a8aad82b45bc61dc08f24a0fb55599cea83ca811
    Connection: keep-alive
    Content-Type: application/json
    
    
    {
        "label": "Command updated",
        "default": false,
        "notifyCustomer": false,
        "notification": {
            "templateId": -1,
            "fromAddress": "\"Adobe® Business Catalyst\" no-reply@businesscatalyst.com",
            "emailFormat": 1,
            "subject": "Your goods have been dispatched - customized",
            "body": "<html>\n\r    <head>\n\r        <title></title>\n\r ..."
          }
    }

    Response:

    
    HTTP/1.1 204 NO CONTENT
    Location: /webresources/api/v3/sites/current/orderstatuses/28742
    Content-Type: application/json; charset=utf-8
    Content-Length: length

    Sample code

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
    url: "/webresources/api/v3/sites/current/orderstatuses/105545",
    type: "PUT",
    connection: "keep-alive",    
        contentType: "application/json",
    headers: {
        "Authorization": $.cookie('access_token')
    },
    processData: false,
    data: JSON.stringify({
        "label": Command has been updated",
        "default": false
    })
    });
    request.done(function(msg) {
    console.log(msg);
    })
    request.fail(function(jqXHR) {
    console.log("Request failed.");
    console.log("Error code: " + jqXHR.status);
    console.log("Error text: " + jqXHR.statusText);
    console.log("Response text: " + jqXHR.responseText);
    })

    Delete an orderStatus entity

    Delete an orderStatus entity.

    Request

    • Method: DELETE
    • Version: v3
    • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
      • Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.
    • Path: /webresources/api/v3/sites/current/orderstatuses/[orderStatus_ID]
      • Alternatively, use siteID instead of 'current'
    • Authorization header: This should contain the authorization token. Here is how to obtain the token.

    Response

    Returns an empty body if successful or a detailed error message.


    Request:

    DELETE /webresources/api/v3/sites/current/orderstatuses/9593213 HTTPS/1.1
    Authorization: 14f87f21c5ea4830a06a6314a8aad82b45bc61dc08f24a0fb55599cea83ca811
    Connection: keep-alive
    Content-Type: application/json
    

    Response:

    
    HTTP/1.1 204 NO CONTENT
    Location: /webresources/api/v3/sites/current/orderstatuses
    Content-Type: application/json; charset=utf-8
    Content-Length: length

    Sample code

    var access_token = BCAPI.Helper.Site.getAccessToken();
    var request = $.ajax({
        url: "/webresources/api/v3/sites/current/orderstatuses/105545",
        type: "DELETE",
        connection: "keep-alive",    
        contentType: "application/json",
        headers: {
            "Authorization": $.cookie('access_token')
        }
    });
    request.done(function(msg) {
        console.log(msg);
    })
    request.fail(function(jqXHR) {
        console.log("Request failed.");
        console.log("Error code: " + jqXHR.status);
        console.log("Error text: " + jqXHR.statusText);
        console.log("Response text: " + jqXHR.responseText);
    })