Top

Sales Order

List sales orders
GET /salesorders
List all sales orders.
Get a sales order
GET /salesorders/:salesorder_id
Get the details of a sales order.
Create a sales order
POST /salesorders
Create a sales order for your customer.
Update a sales order
PUT /salesorders/:salesorder_id
Update an existing sales order. To delete a line item just remove it from the line_items list.
Delete a sales order
DELETE /salesorders/:salesorder_id
Delete an existing sales order. Invoiced sales order cannot be deleted.
Mark a sales order as open
POST /salesorders/:salesorder_id/status/open
Mark a draft sales order as open.
Mark a sales order as void
POST /salesorders/:salesorder_ids/status/void
Mark a sales order as void.
Email a sales order
POST /salesorders/:salesorder_id/email
Email a sales order to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
Get sales order email content
GET /salesorders/:salesorder_id/email
Get the email content of a sales order.
Bulk export sales orders
GET /salesorders/pdf
Maximum of 25 sales orders can be exported in a single pdf.
Bulk print sales orders
GET /salesorders/print
Export sales orders as pdf and print them. Maximum of 25 sales orders can be printed.
Update billing address
PUT /salesorders/:salesorder_id/address/billing
Updates the billing address for this sales order alone.
Updates shipping address
PUT /salesorders/:salesorder_id/address/shipping
Updates the shipping address for this sales order alone.
List sales order templates
GET /salesorders/templates
Get all sales order pdf templates.
Update sales order template
PUT /salesorders/:salesorder_id/templates/:template_id
Update the pdf template associated with the sales order.

List sales orders

GET  /salesorders

List all sales orders.

Parameters

sort_column string Sort sales orders.
Allowed Values: customer_name, salesorder_number, shipment_date, total, date and created_time
search_text string
[100]
Search sales order by sales order number or reference number or customer name.
filter_by string Filter sales order by status.
Allowed Values: Status.All, Status.Open, Status.Draft, Status.OverDue, Status.PartiallyInvoiced, Status.Invoiced and Status.Void
salesorder_number string
[100]
Search sales order by sales order number.
Variants: salesorder_number.startswith and salesorder_number.contains
item_name string
[100]
Search sales order by item name.
Variants: item_name.startswith and item_name.contains
item_id string Search sales order by item id.
item_description string
[100]
Search sales order by item description.
Variants: item_description.startswith and item_description.contains
reference_number string
[100]
Search sales order by reference number.
Variants: reference_number.startswith and reference_number.contains
customer_name string
[100]
Search sales order by customer name.
Variants: customer_name.startswith and customer_name.contains
total double Search sales order by sales order total.
Variants: total.start, total.end, total.less_than, total.less_equals, total.greater_than and total.greater_equals
date string
[yyyy-mm-dd]
Search sales order by sales order date.
Variants: date.start, date.end, date.before and date.after
shipment_date string
[yyyy-mm-dd]
Search sales order by sales order shipment date.
Variants: shipment_date.start, shipment_date.end, shipment_date.before and shipment_date.after
status string Search sales order by sales order status.
Allowed Values: draft, open, invoiced, partially_invoiced, void and overdue
customer_id string Search sales order by customer id.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "salesorders": [
    {
      "salesorder_id": "460000000039129",
      "customer_name": "SAF Instruments Inc",
      "customer_id": "460000000017138",
      "status": "open",
      "salesorder_number": "SO-00001",
      "reference_number": "",
      "date": "2014-07-28",
      "shipment_date": "",
      "shipment_days": "",
      "currency_id": "460000000000097",
      "currency_code": "USD",
      "total": 12400.00,
      "bcy_total": 12400.00,
      "created_time": "2014-07-28T08:29:07+0530",
      "last_modified_time": "2014-08-21T08:45:50+0530",
      "is_emailed": false
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Sales Orders",
    "applied_filter": "Status.All",
    "sort_column": "created_time",
    "sort_order": "D"
  }
}

Get a sales order

GET  /salesorders/:salesorder_id

Get the details of a sales order.

print boolean Print the exported pdf.
accept string [100] Get the details of a particular sales order in formats such as json/ pdf/ html. Default format is json.
Allowed Values: json, pdf and html

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "salesorder": {
    "salesorder_id": "460000000039129",
    "salesorder_number": "SO-00001",
    "date": "2014-07-28",
    "status": "open",
    "shipment_date": "",
    "reference_number": "",
    "customer_id": "460000000017138",
    "customer_name": "SAF Instruments Inc",
    "contact_persons": [],
    "currency_id": "460000000000097",
    "currency_code": "USD",
    "currency_symbol": "$",
    "exchange_rate": 1.00,
    "discount_amount": 0.00,
    "discount": 0.00,
    "is_discount_before_tax": true,
    "discount_type": "entity_level",
    "is_inclusive_tax": "false",
    "estimate_id": "",
    "delivery_method": "",
    "delivery_method_id": "",
    "line_items": [
      {
        "line_item_id": "460000000039131",
        "item_id": "460000000017088",
        "name": "Hard Drive",
        "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
        "item_order": 0,
        "bcy_rate": 120.00,
        "rate": 120.00,
        "quantity": 40.00,
        "unit": "Nos",
        "discount": 0.00,
        "tax_id": "460000000017094",
        "tax_name": "VAT",
        "tax_type": "tax",
        "tax_percentage": 12.5,
        "item_total": 4800.00,
        "is_invoiced": false,
        "tags": []
      },
      {
        "line_item_id": "460000000039133",
        "item_id": "460000000039125",
        "name": "Wifi Router",
        "description": "",
        "item_order": 1,
        "bcy_rate": 200.00,
        "rate": 200.00,
        "quantity": 35.00,
        "unit": "",
        "discount": 0.00,
        "tax_id": "",
        "tax_name": "",
        "tax_type": "tax",
        "tax_percentage": 0,
        "item_total": 7000.00,
        "is_invoiced": false,
        "tags": []
      }
    ],
    "shipping_charge": 0.00,
    "adjustment": 0.00,
    "adjustment_description": "Adjustment",
    "sub_total": 11800.00,
    "tax_total": 600.00,
    "total": 12400.00,
    "taxes": [
      {
        "tax_name": "VAT (12.5%)",
        "tax_amount": 600.00
      }
    ],
    "price_precision": 2,
    "is_emailed": false,
    "billing_address": {
      "address": "Popular",
      "city": "",
      "state": "",
      "zip": "",
      "country": "India",
      "fax": ""
    },
    "shipping_address": {
      "address": "",
      "city": "",
      "state": "",
      "zip": "",
      "country": "",
      "fax": ""
    },
    "notes": "",
    "terms": "",
    "custom_fields": [
      {
        "index": 1,
        "show_on_pdf": false,
        "value": "Normal",
        "label": "Priority"
      }
    ],
    "template_id": "460000000021001",
    "template_name": "Standard Template",
    "template_type": "standard",
    "created_time": "2014-07-28T08:29:07+0530",
    "last_modified_time": "2014-08-25T11:23:26+0530",
    "attachment_name": "",
    "can_send_in_mail": true,
    "salesperson_id": "",
    "salesperson_name": ""
  }
}

Create a sales order

POST  /salesorders

Create a sales order for your customer.

Parameters

ignore_auto_number_generation boolean Ignore auto sales order number generation for this sales order. This mandates the sales order number.

Request attributes

customer_id* string ID of the customer the sales order has to be created.
contact_persons array Array of contact person(s) for whom sales order has to be sent.
salesorder_number string
[50]
Mandatory if auto number generation is disabled.
template_id string ID of the pdf template associated with the sales order.
date string
[yyyy-mm-dd]
The date the sales order is created.
is_update_customer boolean Boolean to update billing address of customer.
shipment_date string
[yyyy-mm-dd]
Shipping date of sales order.
discount string
[100]
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
is_discount_before_tax boolean Used to specify how the discount has to applied. Either before or after the calculation of tax.
discount_type string How the discount is specified. Allowed values are entity_level or item_level.
Allowed Values: entity_level and item_level
exchange_rate double Exchange rate of the currency.
is_inclusive_tax
(Not applicable for US and Canada editions)
boolean Used to specify whether the line item rates are inclusive or exclusive of tax.
avatax_use_code
(Avalara integration only)
string
[25]
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara standard codes or enter a custom code.
avatax_exempt_no
(Avalara integration only)
string
[25]
Exemption certificate number of the customer.
vat_treatment
(UK Edition only)
string (Optional) VAT treatment for the invoice. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in a EU country & if he is VAT registered then his VAT treatment is eu_vat_registered, if he resides in EU & if he is not VAT registered then his VAT treatment is eu_vat_not_registered and if he resides outside the EU then his VAT treatment is non_eu.
salesperson_name string
[200]
Name of the sales person.
custom_fields array Custom fields for a sales order.
line_items array Line items of a sales order.
item_id string ID of the item.
line_item_id string ID of the line item. Mandatory if the existing line item has to be updated. If empty, a new line item will be created.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
rate double Rate of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
quantity double Quantity of the line item.
discount string
[100]
Discount applied to the line item. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id string ID of the tax or tax group applied to the line item.
tax_exemption_id
(US Edition only)
string (Optional) ID of the tax exemption for the line item.
tax_id
(US Edition only)
string (Optional) ID of the tax or tax group applied to the sales order.
tax_authority_id
(US Edition only)
string (Optional) ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.
tax_exemption_id
(US Edition only)
string (Optional) ID of the tax exemption.
avatax_tax_code
(Avalara integration only)
string
[25]
A tax code is a unique label used to group Items (products, services, or charges) together. Refer the link for more deails.
avatax_use_code
(Avalara integration only)
string
[25]
Used to group like customers for exemption purposes at line item level. It is a custom value that links customers to a tax rule. Select from Avalara standard codes or enter a custom code.
estimate_id string ID of the estimate from which the sales order is created.

Sample Request

{
      "customer_id": "460000000017138",
      "vat_treatment": "",
      "pricebook_id": "",
      "contact_persons": [],
      "salesorder_number": "SO-00001",
      "reference_number": "",
      "template_id": "460000000021001",
      "date": "2014-07-28",
      "is_update_customer": "",
      "shipment_date": "",
      "discount": 0.00,
      "is_discount_before_tax": true,
      "discount_type": "entity_level",
      "is_inclusive_tax": "false",
      "exchange_rate": 1.00,
      "salesperson_name": "",
      "custom_fields": [
        {
          "index": 1,
          "value": "Normal"
        }
      ],
      "line_items": [
        {
          "item_id": "460000000017088",
          "line_item_id": "460000000039131",
          "name": "Hard Drive",
          "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
          "item_order": 0,
          "rate": 120.00,
          "unit": "Nos",
          "quantity": 40.00,
          "discount": 0.00,
          "tax_id": "460000000017094",
          "tax_exemption_id": "",
          "tax_exemption_code": "",
          "avatax_use_code": "",
          "avatax_tax_code": "",
          "tags": []
        },
        {
          "item_id": "460000000039125",
          "line_item_id": "460000000039133",
          "name": "Wifi Router",
          "description": "",
          "item_order": 1,
          "rate": 200.00,
          "unit": "",
          "quantity": 35.00,
          "discount": 0.00,
          "tax_id": "",
          "tax_exemption_id": "",
          "tax_exemption_code": "",
          "avatax_use_code": "",
          "avatax_tax_code": "",
          "tags": []
        }
      ],
      "notes": "",
      "notes_default": "",
      "terms": "",
      "terms_default": "",
      "tax_id": "",
      "tax_authority_id": "",
      "tax_exemption_id": "",
      "tax_authority_name": "",
      "tax_exemption_code": "",
      "avatax_exempt_no": "",
      "avatax_use_code": "",
      "shipping_charge": 0.00,
      "adjustment": 0.00,
      "adjustment_description": "Adjustment",
      "delivery_method": "",
      "estimate_id": ""
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 1002,
  "message": "Sales Order Created Successfully."
}

Update a sales order

PUT  /salesorders/:salesorder_id

Update an existing sales order. To delete a line item just remove it from the line_items list.

Parameters

ignore_auto_number_generation boolean Ignore auto sales order number generation for this sales order. This mandates the sales order number.

Request attributes

customer_id* string ID of the customer the sales order has to be created.
contact_persons array Array of contact person(s) for whom sales order has to be sent.
salesorder_number string
[50]
Mandatory if auto number generation is disabled.
template_id string ID of the pdf template associated with the sales order.
date string
[yyyy-mm-dd]
The date the sales order is created.
is_update_customer boolean Boolean to update billing address of customer.
shipment_date string
[yyyy-mm-dd]
Shipping date of sales order.
discount string
[100]
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
is_discount_before_tax boolean Used to specify how the discount has to applied. Either before or after the calculation of tax.
discount_type string How the discount is specified. Allowed values are entity_level or item_level.
Allowed Values: entity_level and item_level
exchange_rate double Exchange rate of the currency.
is_inclusive_tax
(Not applicable for US and Canada editions)
boolean Used to specify whether the line item rates are inclusive or exclusive of tax.
salesperson_name string
[200]
Name of the sales person.
avatax_use_code
(Avalara integration only)
string
[25]
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara standard codes or enter a custom code.
avatax_exempt_no
(Avalara integration only)
string
[25]
Exemption certificate number of the customer.
vat_treatment
(UK Edition only)
string (Optional) VAT treatment for the invoice. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in a EU country & if he is VAT registered then his VAT treatment is eu_vat_registered, if he resides in EU & if he is not VAT registered then his VAT treatment is eu_vat_not_registered and if he resides outside the EU then his VAT treatment is non_eu.
custom_fields array Custom fields for a sales order.
line_items array Line items of a sales order.
item_id string ID of the item.
line_item_id string ID of the line item. Mandatory if the existing line item has to be updated. If empty, a new line item will be created.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
rate double Rate of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
quantity double Quantity of the line item.
discount string
[100]
Discount applied to the line item. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id string ID of the tax or tax group applied to the line item.
tax_exemption_id
(US Edition only)
string (Optional) ID of the tax exemption for the line item.
tax_id
(US Edition only)
string (Optional) ID of the tax or tax group applied to the sales order.
tax_authority_id
(US Edition only)
string (Optional) ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.
tax_exemption_id
(US Edition only)
string (Optional) ID of the tax exemption.
avatax_tax_code
(Avalara integration only)
string
[25]
A tax code is a unique label used to group Items (products, services, or charges) together. Refer the link for more deails.
avatax_use_code
(Avalara integration only)
string
[25]
Used to group like customers for exemption purposes at line item level. It is a custom value that links customers to a tax rule. Select from Avalara standard codes or enter a custom code.
estimate_id string ID of the estimate from which the sales order is created.

Sample Request

{
      "customer_id": "460000000017138",
      "vat_treatment": "",
      "pricebook_id": "",
      "contact_persons": [],
      "salesorder_number": "SO-00001",
      "reference_number": "",
      "template_id": "460000000021001",
      "date": "2014-07-28",
      "is_update_customer": "",
      "shipment_date": "",
      "discount": 0.00,
      "is_discount_before_tax": true,
      "discount_type": "entity_level",
      "is_inclusive_tax": "false",
      "exchange_rate": 1.00,
      "salesperson_name": "",
      "custom_fields": [
        {
          "index": 1,
          "value": "Normal"
        }
      ],
      "line_items": [
        {
          "item_id": "460000000017088",
          "line_item_id": "460000000039131",
          "name": "Hard Drive",
          "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
          "item_order": 0,
          "rate": 120.00,
          "unit": "Nos",
          "quantity": 40.00,
          "discount": 0.00,
          "tax_id": "460000000017094",
          "tax_exemption_id": "",
          "tax_exemption_code": "",
          "avatax_use_code": "",
          "avatax_tax_code": "",
          "tags": []
        },
        {
          "item_id": "460000000039125",
          "line_item_id": "460000000039133",
          "name": "Wifi Router",
          "description": "",
          "item_order": 1,
          "rate": 200.00,
          "unit": "",
          "quantity": 35.00,
          "discount": 0.00,
          "tax_id": "",
          "tax_exemption_id": "",
          "tax_exemption_code": "",
          "avatax_use_code": "",
          "avatax_tax_code": "",
          "tags": []
        }
      ],
      "notes": "",
      "notes_default": "",
      "terms": "",
      "terms_default": "",
      "tax_id": "",
      "tax_authority_id": "",
      "tax_exemption_id": "",
      "tax_authority_name": "",
      "tax_exemption_code": "",
      "avatax_exempt_no": "",
      "avatax_use_code": "",
      "shipping_charge": 0.00,
      "adjustment": 0.00,
      "adjustment_description": "Adjustment",
      "delivery_method": "",
      "estimate_id": ""
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Sales Order Updated Successfully.",
      "salesorder": {
        "salesorder_id": "460000000039129",
        "salesorder_number": "SO-00001",
        "date": "2014-07-28",
        "status": "open",
        "shipment_date": "",
        "reference_number": "",
        "customer_id": "460000000017138",
        "customer_name": "SAF Instruments Inc",
        "contact_persons": [],
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "currency_symbol": "$",
        "exchange_rate": 1.00,
        "discount_amount": 0.00,
        "discount": 0.00,
        "is_discount_before_tax": true,
        "discount_type": "entity_level",
        "is_inclusive_tax": "false",
        "estimate_id": "",
        "delivery_method": "",
        "delivery_method_id": "",
        "line_items": [
          {
            "line_item_id": "460000000039131",
            "item_id": "460000000017088",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 0,
            "bcy_rate": 120.00,
            "rate": 120.00,
            "quantity": 40.00,
            "unit": "Nos",
            "discount": 0.00,
            "tax_id": "460000000017094",
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 12.5,
            "item_total": 4800.00,
            "is_invoiced": false,
            "tags": []
          },
          {
            "line_item_id": "460000000039133",
            "item_id": "460000000039125",
            "name": "Wifi Router",
            "description": "",
            "item_order": 1,
            "bcy_rate": 200.00,
            "rate": 200.00,
            "quantity": 35.00,
            "unit": "",
            "discount": 0.00,
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": 0,
            "item_total": 7000.00,
            "is_invoiced": false,
            "tags": []
          }
        ],
        "shipping_charge": 0.00,
        "adjustment": 0.00,
        "adjustment_description": "Adjustment",
        "sub_total": 11800.00,
        "tax_total": 600.00,
        "total": 12400.00,
        "taxes": [
          {
            "tax_name": "VAT (12.5%)",
            "tax_amount": 600.00
          }
        ],
        "price_precision": 2,
        "is_emailed": false,
        "billing_address": {
          "address": "Popular",
          "city": "",
          "state": "",
          "zip": "",
          "country": "India",
          "fax": ""
        },
        "shipping_address": {
          "address": "",
          "city": "",
          "state": "",
          "zip": "",
          "country": "",
          "fax": ""
        },
        "notes": "",
        "terms": "",
        "custom_fields": [
          {
            "index": 1,
            "show_on_pdf": false,
            "value": "Normal",
            "label": "Priority"
          }
        ],
        "template_id": "460000000021001",
        "template_name": "Standard Template",
        "template_type": "standard",
        "created_time": "2014-07-28T08:29:07+0530",
        "last_modified_time": "2014-08-25T11:23:26+0530",
        "attachment_name": "",
        "can_send_in_mail": true,
        "salesperson_id": "",
        "salesperson_name": ""
      }
    }

Delete a sales order

DELETE  /salesorders/:salesorder_id

Delete an existing sales order. Invoiced sales order cannot be deleted.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Sales Order Deleted Successfully."
}

Mark a sales order as open

POST  /salesorders/:salesorder_id/status/open

Mark a draft sales order as open.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Sales order status has been changed to Open."
    }

Mark a sales order as void

POST  /salesorders/:salesorder_ids/status/void

Mark a sales order as void.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Sales order status has been changed to Void."
}

Email a sales order

POST  /salesorders/:salesorder_id/email

Email a sales order to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.

Parameters

send_attachment boolean Send the sales order attachment a with the email.
file_name string [100]
[100]
Name of the file.

Request attributes

send_from_org_email_id boolean Boolean to trigger the email from the organization's email address.
to_mail_ids* array Array of email address of the recipients.
cc_mail_ids array Array of email address of the recipients to be cced.
subject* string
[1000]
Subject of the mail.
body* string
[10000]
Body of the mail.

Sample Request

{
      "send_from_org_email_id": "true",
      "to_mail_ids": [
        "john@safInstruments.com"
      ],
      "cc_mail_ids": [
        "smith@safInstruments.com"
      ],
      "subject": "Sales Order from Zillium Inc (Sales Order #: SO-00001)",
      "body": "<br>Dear SAF Instruments Inc,&nbsp;<br><br>Thanks for your interest in our services. Please find our sales order attached with this mail.<br><br> An overview of the sales order is available below for your reference: &nbsp;<br><br> ----------------------------------------------------------------------------------------<br> <h2>Sales Order&nbsp;# :&nbsp;SO-00001</h2><br> ----------------------------------------------------------------------------------------<br> <b>&nbsp;Order Date &nbsp; &nbsp;&nbsp;&nbsp;: &nbsp;28 Jul 2014</b><br><b>&nbsp;Amount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp;&nbsp;$12,400.00</b><br>----------------------------------------------------------------------------------------<br><br><span>Assuring you of our best services at all times.</span><br><br><br>Regards,<br><br>John<br>Zillium Inc<br><br><br>"
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Your Sales Order has been sent."
}

Get sales order email content

GET  /salesorders/:salesorder_id/email

Get the email content of a sales order.

Parameters

email_template_id string Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 1002,
  "message": "Sales Order does not exist."
}

Bulk export sales orders

GET  /salesorders/pdf

Maximum of 25 sales order can be exported in a single pdf.

Parameters

salesorder_ids* string
[100]
Comma separated sales order ids which are to be export as pdf.

Bulk print sales orders

GET  /salesorders/print

Export sales orders as pdf and print them. Maximum of 25 sales orders can be printed.

Parameters

salesorder_ids* string
[100]
Comma separated sales order ids which are to be printed.

Update billing address

PUT  /salesorders/:salesorder_id/address/billing

Updates the billing address for this sales order alone.

Sample Request

{
          "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District",
          "city": "Beijing",
          "state": "Beijing",
          "zip": "1000881",
          "country": "China",
          "fax": "+86-10-82637827"
        }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Billing address updated"
    }

Updates shipping address

PUT  /salesorders/:salesorder_id/address/shipping

Updates the shipping address for this sales order alone.

Sample Request

{
              "address": "4900 Hopyard Rd, Suit 310",
              "city": "Pleasanton",
              "state": "CA",
              "zip": "94588",
              "country": "USA",
              "fax": "+1-925-924-9600"
            }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Shipping address updated"
    }

List sales order templates

GET  /salesorders/templates

Get all sales order pdf templates.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "templates": [
    {
      "template_name": "Standard Template",
      "template_id": "460000000021001",
      "template_type": "standard"
    }
  ]
}

Update sales order template

PUT  /salesorders/:salesorder_id/templates/:template_id

Update the pdf template associated with the sales order.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Sales Order Updated Successfully."
    }