API Docs
/
No Results Found
Sales Order

Sales Order

A sales order is a financial document that confirms an impending sale. It is raised when an initial estimate is approved and the transaction is underway, and details the exact quantity, price and delivery details of the products or services being sold.

End Points
Create a sales order
Update a sales order using a custom field's unique value
List sales orders
Update a sales order
Get a sales order
Delete a sales order
Update custom field in existing salesorders
Mark a sales order as open
Mark a sales order as void
Update a sales order sub status
Email a sales order
Get sales order email content
Submit a sales order for approval
Approve a sales order.
Bulk export sales orders
Bulk print sales orders
Update billing address
Update shipping address
List sales order templates
Update sales order template
Add attachment to a sales order
Update attachment preference
Get a sales order attachment
Delete an attachment
Add comment
List sales order comments & history
Update comment
Delete a comment

Attribute

salesorder_id
string
ID of the Sales Order
documents
array
is_pre_gst
boolean
🇮🇳 India
only
Applicable for transactions that fall before july 1, 2017
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
place_of_supply
string
🇮🇳 India
, GCC only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
Supported codes for UAE emirates are :
Abu Dhabi - AB,
Ajman - AJ,
Dubai - DU,
Fujairah - FU,
Ras al-Khaimah - RA,
Sharjah - SH,
Umm al-Quwain - UM
Supported codes for the GCC countries are :
United Arab Emirates - AE,
Saudi Arabia - SA,
Bahrain - BH,
Kuwait - KW,
Oman - OM,
Qatar - QA.
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the sales order. 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 an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas(For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
tax_treatment
string
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the sales order.Allowed Values: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered supported only for UAE.
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
For Kenya Edition: vat_registered ,vat_not_registered ,non_kenya(A business that is located outside Kenya).
For SouthAfrica Edition: vat_registered, vat_not_registered, overseas(A business that is located outside SouthAfrica).
zcrm_potential_id
string
zcrm_potential_name
string
salesorder_number
string
Mandatory if auto number generation is disabled.
date
string
The date, the sales order is created.
status
string
Status of the Sales Order
shipment_date
string
Shipping date of sales order.
reference_number
string
Reference Number of the Sales Order.
customer_id
string
ID of the customer to whom the sales order has to be created.
customer_name
string
Name of the customer associated with the Sales Order
contact_persons
array
Array of contact person(s) for whom sales order has to be sent.
currency_id
string
ID of the Currency in Sales Order
currency_code
string
Code of the Currency involved in the Sales Order
currency_symbol
string
exchange_rate
double
Exchange rate of the currency.
discount_amount
double
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
discount_applied_on_amount
integer
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.
estimate_id
string
ID of the estimate from which the sales order is created.
delivery_method
string
delivery_method_id
string
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
, 🇨🇦 Canada
Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items
array
Line items of a sales order.
Show Sub-Attributes arrow
item_order
integer
item_id
string
ID of the item.
rate
double
Rate of the line item.
name
string
Name of the line item.
description
string
Description of the line item.
quantity
double
Quantity of the line item.
product_type
string
Enter goods or services .
For SouthAfrica Edition: service, goods, capital_service and capital_goods
hsn_or_sac
string
🇮🇳 India
, 🇿🇦 South Africa
, 🇰🇪 Kenya
only
Add HSN/SAC code for your goods/services
sat_item_key_code
string
🇲🇽 Mexico
only
Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs.
unitkey_code
string
🇲🇽 Mexico
only
Add SAT Unit Key Code for your goods/services. Download the CFDI Catalogs.
warehouse_id
string
ID of the warehouse.(If warehouse enabled and Inventory addon enabled)
warehouse_name
string
Name of the warehouse.
discount
string
Discount applied to the sales order. 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
tds_tax_id
string
🇲🇽 Mexico
only
ID of the TDS tax or TDS tax group applied
tags
array
Filter all your reports based on the tag
Show Sub-Attributes arrow
is_tag_mandatory
boolean
Boolean to check if the tag is mandatory
tag_id
string
ID of the reporting tag
tag_name
string
Name of the reporting tag
tag_option_id
string
ID of the reporting tag's option
tag_option_name
string
Name of the reporting tag's option
unit
string
Unit of the line item e.g. kgs, Nos.
item_custom_fields
array
Custom fields for a sales order items.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
index
integer
value
string
Value of the Custom Field
label
string
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
tax_treatment_code
string
GCC only
Specify reason for using out of scope.
Supported values for UAE are uae_same_tax_group, uae_reimbursed_expense and uae_others.
Supported values for Bahrain are bahrain_same_tax_group, bahrain_transfer_of_concern, bahrain_disbursement, bahrain_head_to_branch_transaction, bahrain_warranty_repair_services and bahrain_others.
Supported values for Saudi Arabia are ksa_pvt_health, ksa_pvt_edu, ksa_reimbursed_expense and ksa_house_sales.
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
project_id
string
ID of the project
shipping_charge
double
adjustment
double
adjustment_description
string
sub_total
double
Sub Total of the Sales Order
tax_total
double
total
double
Total of the Sales Order
taxes
array
Show Sub-Attributes arrow
tax_id
string
ID of the tax or tax group applied
tax_name
string
tax_amount
double
price_precision
integer
is_emailed
boolean
Check if the Sales Order is emailed to the customer
billing_address
object
Show Sub-Attributes arrow
address
string
Address
street2
string
city
string
City of the address
state
string
State of the Address
zip
string
ZIP Code of the Address
country
string
Country of the Address
fax
string
Fax Number
attention
string
shipping_address
object
Show Sub-Attributes arrow
address
string
Address
street2
string
city
string
City of the address
state
string
State of the Address
zip
string
ZIP Code of the Address
country
string
Country of the Address
fax
string
Fax Number
attention
string
notes
string
Notes for this Sales Order
terms
string
custom_fields
array
Custom fields for a sales order.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
index
integer
value
string
Value of the Custom Field
label
string
template_id
string
ID of the pdf template.
template_name
string
Name of the template
page_width
string
page_height
string
orientation
string
template_type
string
Type of the template
created_time
string
Creation Time of the Sales Order
last_modified_time
string
Last Modified time of the Sales Order
created_by_id
string
attachment_name
string
can_send_in_mail
boolean
Can the file be sent in mail.
salesperson_id
string
ID of the salesperson
salesperson_name
string
Name of the sales person.
merchant_id
string
ID of the merchant
merchant_name
string
Name of the merchant

Example

[ { "salesorder_id": "460000000039129", "documents": [ "document_id", "file_name" ], "is_pre_gst": false, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "place_of_supply": "TN", "vat_treatment": "string", "tax_treatment": "vat_registered", "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string", "salesorder_number": "SO-00001", "date": "2014-07-28", "status": "open", "shipment_date": "string", "reference_number": "REF-001", "customer_id": "460000000017138", "customer_name": "SAF Instruments Inc", "contact_persons": [ "460000000870911", "460000000870915" ], "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1.233, "discount_amount": 0, "discount": "string", "discount_applied_on_amount": 0, "is_discount_before_tax": true, "discount_type": "entity_level", "estimate_id": "string", "delivery_method": "Air", "delivery_method_id": "string", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "warehouse_id": "460000000041001", "warehouse_name": "Walmart", "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "is_tag_mandatory": false, "tag_id": 462000000009070, "tag_name": "Location", "tag_option_id": 462000000002670, "tag_option_name": "USA" } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378 } ], "shipping_charge": 2, "adjustment": 0.2, "adjustment_description": "Adjustment", "sub_total": 11800, "tax_total": 600, "total": 12400, "taxes": [ { "tax_id": "460000000017094", "tax_name": "string", "tax_amount": 600 } ], "price_precision": 2, "is_emailed": false, "billing_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "shipping_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "notes": "string", "terms": "string", "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "template_id": "460000000021001", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530", "created_by_id": "460000000053001", "attachment_name": "string", "can_send_in_mail": true, "salesperson_id": "460000000000097", "salesperson_name": "John Roberts", "merchant_id": "460000000000597", "merchant_name": "John Louis" } ]

Create a sales order

Create a sales order for your customer.
OAuth Scope : ZohoBooks.salesorders.CREATE

Arguments

customer_id
string
(Required)
ID of the customer to whom the sales order has to be created.
currency_id
string
ID of the Currency in Sales Order
contact_persons
array
Array of contact person(s) for whom sales order has to be sent.
date
string
The date, the sales order is created.
shipment_date
string
Shipping date of sales order.
custom_fields
array
Custom fields for a sales order.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
place_of_supply
string
🇮🇳 India
, GCC only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
Supported codes for UAE emirates are :
Abu Dhabi - AB,
Ajman - AJ,
Dubai - DU,
Fujairah - FU,
Ras al-Khaimah - RA,
Sharjah - SH,
Umm al-Quwain - UM
Supported codes for the GCC countries are :
United Arab Emirates - AE,
Saudi Arabia - SA,
Bahrain - BH,
Kuwait - KW,
Oman - OM,
Qatar - QA.
salesperson_id
string
ID of the salesperson
merchant_id
string
ID of the merchant
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
, 🇨🇦 Canada
Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items
array
Line items of a sales order.
Show Sub-Attributes arrow
item_order
integer
item_id
string
ID of the item.
rate
double
Rate of the line item.
name
string
Name of the line item.
description
string
Description of the line item.
quantity
double
Quantity of the line item.
product_type
string
Enter goods or services .
For SouthAfrica Edition: service, goods, capital_service and capital_goods
hsn_or_sac
string
🇮🇳 India
, 🇿🇦 South Africa
, 🇰🇪 Kenya
only
Add HSN/SAC code for your goods/services
sat_item_key_code
string
🇲🇽 Mexico
only
Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs.
unitkey_code
string
🇲🇽 Mexico
only
Add SAT Unit Key Code for your goods/services. Download the CFDI Catalogs.
warehouse_id
string
ID of the warehouse.(If warehouse enabled and Inventory addon enabled)
warehouse_name
string
Name of the warehouse.
discount
string
Discount applied to the sales order. 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
tds_tax_id
string
🇲🇽 Mexico
only
ID of the TDS tax or TDS tax group applied
tags
array
Filter all your reports based on the tag
Show Sub-Attributes arrow
tag_id
string
ID of the reporting tag
tag_option_id
string
ID of the reporting tag's option
unit
string
Unit of the line item e.g. kgs, Nos.
item_custom_fields
array
Custom fields for a sales order items.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
tax_treatment_code
string
GCC only
Specify reason for using out of scope.
Supported values for UAE are uae_same_tax_group, uae_reimbursed_expense and uae_others.
Supported values for Bahrain are bahrain_same_tax_group, bahrain_transfer_of_concern, bahrain_disbursement, bahrain_head_to_branch_transaction, bahrain_warranty_repair_services and bahrain_others.
Supported values for Saudi Arabia are ksa_pvt_health, ksa_pvt_edu, ksa_reimbursed_expense and ksa_house_sales.
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
project_id
string
ID of the project
notes
string
Notes for this Sales Order
terms
string
billing_address_id
string
ID of the Billing Address
shipping_address_id
string
ID of the Shipping Address
crm_owner_id
string
crm_custom_reference_id
string
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the sales order. 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 an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas(For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
tax_treatment
string
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the sales order.Allowed Values: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered supported only for UAE.
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
For Kenya Edition: vat_registered ,vat_not_registered ,non_kenya(A business that is located outside Kenya).
For SouthAfrica Edition: vat_registered, vat_not_registered, overseas(A business that is located outside SouthAfrica).
is_reverse_charge_applied
boolean
🇿🇦 South Africa
only
(Required if customer tax treatment is vat_registered)
Used to specify whether the transaction is applicable for Domestic Reverse Charge (DRC) or not.
salesorder_number
string
Mandatory if auto number generation is disabled.
reference_number
string
Reference Number of the Sales Order.
is_update_customer
boolean
Boolean to update billing address of customer.
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
exchange_rate
double
Exchange rate of the currency.
salesperson_name
string
Name of the sales person.
notes_default
string
Default Notes for the Sales Order
terms_default
string
Default Terms of the Sales Order
tax_id
string
Tax ID for the Sales Order.
tax_authority_id
string
🇺🇸 United States
only
ID of the tax authority. Tax authority depends on the location of the customer.
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_authority_name
string
🇺🇸 United States
, 🇲🇽 Mexico
only
Tax Authority's name.
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
shipping_charge
double
adjustment
double
delivery_method
string
estimate_id
string
ID of the estimate associated with the Sales Order
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.
adjustment_description
string
pricebook_id
string
template_id
string
ID of the pdf template.
documents
array
zcrm_potential_id
string
zcrm_potential_name
string

Query Parameters

ignore_auto_number_generation
Ignore auto sales order number generation for this sales order. This mandates the sales order number.
can_send_in_mail
Can the file be sent in mail.
totalFiles
Total number of files.
doc
Document that is to be attached

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesorders?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "460000000017138", "currency_id": "460000000000097", "contact_persons": [ "460000000870911", "460000000870915" ], "date": "2014-07-28", "shipment_date": "string", "custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "place_of_supply": "TN", "salesperson_id": "460000000000097", "merchant_id": "460000000000597", "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "warehouse_id": "460000000041001", "warehouse_name": "Walmart", "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "tag_id": 462000000009070, "tag_option_id": 462000000002670 } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378 } ], "notes": "string", "terms": "string", "billing_address_id": 460000000032174, "shipping_address_id": "string", "crm_owner_id": "string", "crm_custom_reference_id": "string", "vat_treatment": "string", "tax_treatment": "vat_registered", "is_reverse_charge_applied": true, "salesorder_number": "SO-00001", "reference_number": "REF-001", "is_update_customer": false, "discount": "string", "exchange_rate": 1.233, "salesperson_name": "John Roberts", "notes_default": "string", "terms_default": "string", "tax_id": "460000000017094", "tax_authority_id": "string", "tax_exemption_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string", "avatax_exempt_no": "string", "avatax_use_code": "string", "shipping_charge": 2, "adjustment": 0.2, "delivery_method": "Air", "estimate_id": "string", "is_discount_before_tax": true, "discount_type": "entity_level", "adjustment_description": "Adjustment", "pricebook_id": "string", "template_id": "460000000021001", "documents": [ "document_id", "file_name" ], "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string" }

Response Example

{ "code": 0, "message": "Sales Order Created Successfully.", "salesorder": [ { "salesorder_id": "460000000039129", "documents": [ "document_id", "file_name" ], "is_pre_gst": false, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "place_of_supply": "TN", "vat_treatment": "string", "tax_treatment": "vat_registered", "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string", "salesorder_number": "SO-00001", "date": "2014-07-28", "status": "open", "shipment_date": "string", "reference_number": "REF-001", "customer_id": "460000000017138", "customer_name": "SAF Instruments Inc", "contact_persons": [ "460000000870911", "460000000870915" ], "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1.233, "discount_amount": 0, "discount": "string", "discount_applied_on_amount": 0, "is_discount_before_tax": true, "discount_type": "entity_level", "estimate_id": "string", "delivery_method": "Air", "delivery_method_id": "string", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "warehouse_id": "460000000041001", "warehouse_name": "Walmart", "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "is_tag_mandatory": false, "tag_id": 462000000009070, "tag_name": "Location", "tag_option_id": 462000000002670, "tag_option_name": "USA" } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378 } ], "shipping_charge": 2, "adjustment": 0.2, "adjustment_description": "Adjustment", "sub_total": 11800, "tax_total": 600, "total": 12400, "taxes": [ { "tax_id": "460000000017094", "tax_name": "string", "tax_amount": 600 } ], "price_precision": 2, "is_emailed": false, "billing_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "shipping_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "notes": "string", "terms": "string", "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "template_id": "460000000021001", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530", "created_by_id": "460000000053001", "attachment_name": "string", "can_send_in_mail": true, "salesperson_id": "460000000000097", "salesperson_name": "John Roberts", "merchant_id": "460000000000597", "merchant_name": "John Louis" }, {...}, {...} ] }

Update a sales order using a custom field's unique value

A custom field will have unique values if it's configured to not accept duplicate values. Now, you can use that custom field's value to update a sales order by providing its API name in the X-Unique-Identifier-Key header and its value in the X-Unique-Identifier-Value header. Based on this value, the corresponding sales order will be retrieved and updated. Additionally, there is an optional X-Upsert header. If the X-Upsert header is true and the custom field's unique value is not found in any of the existing sales orders, a new sales order will be created if the necessary payload details are available
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

customer_id
string
(Required)
ID of the customer to whom the sales order has to be created.
currency_id
string
ID of the Currency in Sales Order
contact_persons
array
Array of contact person(s) for whom sales order has to be sent.
date
string
The date, the sales order is created.
shipment_date
string
Shipping date of sales order.
custom_fields
array
Custom fields for a sales order.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
place_of_supply
string
🇮🇳 India
, GCC only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
Supported codes for UAE emirates are :
Abu Dhabi - AB,
Ajman - AJ,
Dubai - DU,
Fujairah - FU,
Ras al-Khaimah - RA,
Sharjah - SH,
Umm al-Quwain - UM
Supported codes for the GCC countries are :
United Arab Emirates - AE,
Saudi Arabia - SA,
Bahrain - BH,
Kuwait - KW,
Oman - OM,
Qatar - QA.
salesperson_id
string
ID of the salesperson
merchant_id
string
ID of the merchant
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
, 🇨🇦 Canada
Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items
array
Line items of a sales order.
Show Sub-Attributes arrow
item_order
integer
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.
item_id
string
ID of the item.
rate
double
Rate of the line item.
name
string
Name of the line item.
description
string
Description of the line item.
quantity
double
Quantity of the line item.
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id
string
Tax ID for the Sales Order.
tds_tax_id
string
🇲🇽 Mexico
only
ID of the TDS tax or TDS tax group applied
tags
array
Filter all your reports based on the tag
Show Sub-Attributes arrow
tag_id
string
ID of the reporting tag
tag_option_id
string
ID of the reporting tag's option
unit
string
Unit of the line item e.g. kgs, Nos.
item_custom_fields
array
Custom fields for a sales order items.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
tax_treatment_code
string
GCC only
Specify reason for using out of scope.
Supported values for UAE are uae_same_tax_group, uae_reimbursed_expense and uae_others.
Supported values for Bahrain are bahrain_same_tax_group, bahrain_transfer_of_concern, bahrain_disbursement, bahrain_head_to_branch_transaction, bahrain_warranty_repair_services and bahrain_others.
Supported values for Saudi Arabia are ksa_pvt_health, ksa_pvt_edu, ksa_reimbursed_expense and ksa_house_sales.
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
project_id
string
ID of the project
warehouse_id
string
ID of the warehouse.(If warehouse enabled and Inventory addon enabled)
notes
string
Notes for this Sales Order
terms
string
billing_address_id
string
ID of the Billing Address
shipping_address_id
string
ID of the Shipping Address
crm_owner_id
string
crm_custom_reference_id
string
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the sales order. 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 an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas(For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
tax_treatment
string
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the sales order.Allowed Values: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered supported only for UAE.
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
For Kenya Edition: vat_registered ,vat_not_registered ,non_kenya(A business that is located outside Kenya).
For SouthAfrica Edition: vat_registered, vat_not_registered, overseas(A business that is located outside SouthAfrica).
is_reverse_charge_applied
boolean
🇿🇦 South Africa
only
(Required if customer tax treatment is vat_registered)
Used to specify whether the transaction is applicable for Domestic Reverse Charge (DRC) or not.
salesorder_number
string
Mandatory if auto number generation is disabled.
reference_number
string
Reference Number of the Sales Order.
is_update_customer
boolean
Boolean to update billing address of customer.
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
exchange_rate
double
Exchange rate of the currency.
salesperson_name
string
Name of the sales person.
notes_default
string
Default Notes for the Sales Order
terms_default
string
Default Terms of the Sales Order
tax_id
string
Tax ID for the Sales Order.
tax_authority_id
string
🇺🇸 United States
only
ID of the tax authority. Tax authority depends on the location of the customer.
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_authority_name
string
🇺🇸 United States
, 🇲🇽 Mexico
only
Tax Authority's name.
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
shipping_charge
double
adjustment
double
delivery_method
string
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.
adjustment_description
string
pricebook_id
string
template_id
string
ID of the pdf template.
documents
array
zcrm_potential_id
string
zcrm_potential_name
string

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-Unique-Identifier-Key", "cf_unique_cf"); headers_data.put("X-Unique-Identifier-Value", "unique Value"); headers_data.put("X-Upsert", "true"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695") .put(body) .addHeader("X-Unique-Identifier-Key", "cf_unique_cf") .addHeader("X-Unique-Identifier-Value", "unique Value") .addHeader("X-Upsert", "true") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-Unique-Identifier-Key': 'cf_unique_cf', 'X-Unique-Identifier-Value': 'unique Value', 'X-Upsert': 'true', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-Unique-Identifier-Key': "cf_unique_cf", 'X-Unique-Identifier-Value': "unique Value", 'X-Upsert': "true", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorders?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders?organization_id=10234695", "headers": { "X-Unique-Identifier-Key": "cf_unique_cf", "X-Unique-Identifier-Value": "unique Value", "X-Upsert": "true", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-Unique-Identifier-Key: cf_unique_cf' \ --header 'X-Unique-Identifier-Value: unique Value' \ --header 'X-Upsert: true' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "460000000017138", "currency_id": "460000000000097", "contact_persons": [ "460000000870911", "460000000870915" ], "date": "2014-07-28", "shipment_date": "string", "custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "place_of_supply": "TN", "salesperson_id": "460000000000097", "merchant_id": "460000000000597", "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "line_item_id": "460000000039131", "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "tag_id": 462000000009070, "tag_option_id": 462000000002670 } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378, "warehouse_id": "460000000041001" } ], "notes": "string", "terms": "string", "billing_address_id": 460000000032174, "shipping_address_id": "string", "crm_owner_id": "string", "crm_custom_reference_id": "string", "vat_treatment": "string", "tax_treatment": "vat_registered", "is_reverse_charge_applied": true, "salesorder_number": "SO-00001", "reference_number": "REF-001", "is_update_customer": false, "discount": "string", "exchange_rate": 1.233, "salesperson_name": "John Roberts", "notes_default": "string", "terms_default": "string", "tax_id": "460000000017094", "tax_authority_id": "string", "tax_exemption_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string", "avatax_exempt_no": "string", "avatax_use_code": "string", "shipping_charge": 2, "adjustment": 0.2, "delivery_method": "Air", "is_discount_before_tax": true, "discount_type": "entity_level", "adjustment_description": "Adjustment", "pricebook_id": "string", "template_id": "460000000021001", "documents": [ "document_id", "file_name" ], "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string" }

Response Example

{ "code": 0, "message": "Sales Order Updated Successfully.", "salesorder": [ { "salesorder_id": "460000000039129", "documents": [ "document_id", "file_name" ], "is_pre_gst": false, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "place_of_supply": "TN", "vat_treatment": "string", "tax_treatment": "vat_registered", "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string", "salesorder_number": "SO-00001", "date": "2014-07-28", "status": "open", "shipment_date": "string", "reference_number": "REF-001", "customer_id": "460000000017138", "customer_name": "SAF Instruments Inc", "contact_persons": [ "460000000870911", "460000000870915" ], "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1.233, "discount_amount": 0, "discount": "string", "discount_applied_on_amount": 0, "is_discount_before_tax": true, "discount_type": "entity_level", "estimate_id": "string", "delivery_method": "Air", "delivery_method_id": "string", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "warehouse_id": "460000000041001", "warehouse_name": "Walmart", "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "is_tag_mandatory": false, "tag_id": 462000000009070, "tag_name": "Location", "tag_option_id": 462000000002670, "tag_option_name": "USA" } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378 } ], "shipping_charge": 2, "adjustment": 0.2, "adjustment_description": "Adjustment", "sub_total": 11800, "tax_total": 600, "total": 12400, "taxes": [ { "tax_id": "460000000017094", "tax_name": "string", "tax_amount": 600 } ], "price_precision": 2, "is_emailed": false, "billing_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "shipping_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "notes": "string", "terms": "string", "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "template_id": "460000000021001", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530", "created_by_id": "460000000053001", "attachment_name": "string", "can_send_in_mail": true, "salesperson_id": "460000000000097", "salesperson_name": "John Roberts", "merchant_id": "460000000000597", "merchant_name": "John Louis" }, {...}, {...} ] }

List sales orders

List all sales orders.
OAuth Scope : ZohoBooks.salesorders.READ

Query Parameters

sort_column
Sort sales orders. Allowed Values: customer_name, salesorder_number, shipment_date, last_modified_time, reference_number , total, date and created_time.
search_text
Search sales order by sales order number or reference number or customer name.
filter_by
Filter sales order by status. Allowed Values: Status.All, Status.Open, Status.Draft, Status.OverDue, Status.PartiallyInvoiced, Status.Invoiced, Status.Void and Status.Closed
salesorder_number
Search Sales Order by Sales Order Number. Variants: salesorder_number_startswith , salesorder_number_not_in , salesorder_number_in , salesorder_number_contains. Maximum Length : 100
item_name
Search sales order by item name. Variants: item_name_startswith , item_name_not_in ,item_name_in and item_name_contains. Maximum Length : 100
item_id
Search Sales Order Based on Item ID.
item_description
Search sales order by item description. Variants: item_description_startswith , item_description_not_in , item_description_in and item_description_contains. Maximum Length: 100
reference_number
Search sales order by reference number. Variants: reference_number_startswith , reference_number_not_in , reference_number_in and reference_number_contains .
customer_name
Search sales order by customer name. Variants: customer_name_startswith , customer_name_not_in , customer_name_in and customer_name_contains. Maximum Length : 100
total
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
Search sales order by sales order date. Variants: date_start, date_end, date_before and date_after. Default date format : yyyy-mm-dd
shipment_date
Search sales order by sales order shipment date. Variants: shipment_date_start, shipment_date_end, shipment_date_before and shipment_date_after. Default date format : yyyy-mm-dd
status
Search sales order by sales order status. Allowed Values: draft, open, invoiced, partially_invoiced, void and overdue.
customer_id
Search Sales Order based on customer_id
salesperson_id
ID of the salesperson
salesorder_ids
ID's of the salesorder [Comma seperated values] . Maximum Length : 200
zcrm_potential_id
last_modified_time
Last Modified time of the Sales Order
accept
Get the details of a particular sales order in formats such as json/ pdf/ html. Default format is json. Allowed Values: json, csv , xml, xls, xlsx, pdf, jhtml and html.
print
Print the exported pdf. It will be used when accept = pdf and atleast one value in salesorder_ids
customview_id
ID of the customview
zcrm_potential_id
Potential ID of a Deal in CRM.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "salesorders": [ { "salesorder_id": "460000000039129", "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string", "customer_name": "SAF Instruments Inc", "customer_id": "460000000017138", "status": "open", "salesorder_number": "SO-00001", "reference_number": "REF-001", "date": "2014-07-28", "shipment_date": "string", "shipment_days": 2, "currency_id": "460000000000097", "currency_code": "USD", "total": 12400, "sub_total": 11800, "bcy_total": 400, "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530", "is_emailed": false, "has_attachment": false, "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ] }, {...}, {...} ] }

Update a sales order

Update an existing sales order. To delete a line item just remove it from the line_items list.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

customer_id
string
(Required)
ID of the customer to whom the sales order has to be created.
currency_id
string
ID of the Currency in Sales Order
contact_persons
array
Array of contact person(s) for whom sales order has to be sent.
date
string
The date, the sales order is created.
shipment_date
string
Shipping date of sales order.
custom_fields
array
Custom fields for a sales order.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
place_of_supply
string
🇮🇳 India
, GCC only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
Supported codes for UAE emirates are :
Abu Dhabi - AB,
Ajman - AJ,
Dubai - DU,
Fujairah - FU,
Ras al-Khaimah - RA,
Sharjah - SH,
Umm al-Quwain - UM
Supported codes for the GCC countries are :
United Arab Emirates - AE,
Saudi Arabia - SA,
Bahrain - BH,
Kuwait - KW,
Oman - OM,
Qatar - QA.
salesperson_id
string
ID of the salesperson
merchant_id
string
ID of the merchant
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
, 🇨🇦 Canada
Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items
array
Line items of a sales order.
Show Sub-Attributes arrow
item_order
integer
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.
item_id
string
ID of the item.
rate
double
Rate of the line item.
name
string
Name of the line item.
description
string
Description of the line item.
quantity
double
Quantity of the line item.
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id
string
Tax ID for the Sales Order.
tds_tax_id
string
🇲🇽 Mexico
only
ID of the TDS tax or TDS tax group applied
tags
array
Filter all your reports based on the tag
Show Sub-Attributes arrow
tag_id
string
ID of the reporting tag
tag_option_id
string
ID of the reporting tag's option
unit
string
Unit of the line item e.g. kgs, Nos.
item_custom_fields
array
Custom fields for a sales order items.
Show Sub-Attributes arrow
customfield_id
long
ID of the Custom Field
value
string
Value of the Custom Field
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
tax_treatment_code
string
GCC only
Specify reason for using out of scope.
Supported values for UAE are uae_same_tax_group, uae_reimbursed_expense and uae_others.
Supported values for Bahrain are bahrain_same_tax_group, bahrain_transfer_of_concern, bahrain_disbursement, bahrain_head_to_branch_transaction, bahrain_warranty_repair_services and bahrain_others.
Supported values for Saudi Arabia are ksa_pvt_health, ksa_pvt_edu, ksa_reimbursed_expense and ksa_house_sales.
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
project_id
string
ID of the project
warehouse_id
string
ID of the warehouse.(If warehouse enabled and Inventory addon enabled)
notes
string
Notes for this Sales Order
terms
string
billing_address_id
string
ID of the Billing Address
shipping_address_id
string
ID of the Shipping Address
crm_owner_id
string
crm_custom_reference_id
string
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the sales order. 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 an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered and if he resides outside the UK then his VAT treatment is overseas(For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
tax_treatment
string
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the sales order.Allowed Values: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered supported only for UAE.
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
For Kenya Edition: vat_registered ,vat_not_registered ,non_kenya(A business that is located outside Kenya).
For SouthAfrica Edition: vat_registered, vat_not_registered, overseas(A business that is located outside SouthAfrica).
is_reverse_charge_applied
boolean
🇿🇦 South Africa
only
(Required if customer tax treatment is vat_registered)
Used to specify whether the transaction is applicable for Domestic Reverse Charge (DRC) or not.
salesorder_number
string
Mandatory if auto number generation is disabled.
reference_number
string
Reference Number of the Sales Order.
is_update_customer
boolean
Boolean to update billing address of customer.
discount
string
Discount applied to the sales order. It can be either in % or in amount. e.g. 12.5% or 190.
exchange_rate
double
Exchange rate of the currency.
salesperson_name
string
Name of the sales person.
notes_default
string
Default Notes for the Sales Order
terms_default
string
Default Terms of the Sales Order
tax_id
string
Tax ID for the Sales Order.
tax_authority_id
string
🇺🇸 United States
only
ID of the tax authority. Tax authority depends on the location of the customer.
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the tax exemption applied
tax_authority_name
string
🇺🇸 United States
, 🇲🇽 Mexico
only
Tax Authority's name.
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
, 🇲🇽 Mexico
only
Code of Tax Exemption that is applied
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule.
shipping_charge
double
adjustment
double
delivery_method
string
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.
adjustment_description
string
pricebook_id
string
template_id
string
ID of the pdf template.
documents
array
zcrm_potential_id
string
zcrm_potential_name
string

Query Parameters

ignore_auto_number_generation
Ignore auto sales order number generation for this sales order. This mandates the sales order number.
can_send_in_mail
Can the file be sent in mail.
totalFiles
Total number of files.
doc
Document that is to be attached

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorders/460000000039129?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "460000000017138", "currency_id": "460000000000097", "contact_persons": [ "460000000870911", "460000000870915" ], "date": "2014-07-28", "shipment_date": "string", "custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "place_of_supply": "TN", "salesperson_id": "460000000000097", "merchant_id": "460000000000597", "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "line_item_id": "460000000039131", "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "tag_id": 462000000009070, "tag_option_id": 462000000002670 } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "value": "Normal" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378, "warehouse_id": "460000000041001" } ], "notes": "string", "terms": "string", "billing_address_id": 460000000032174, "shipping_address_id": "string", "crm_owner_id": "string", "crm_custom_reference_id": "string", "vat_treatment": "string", "tax_treatment": "vat_registered", "is_reverse_charge_applied": true, "salesorder_number": "SO-00001", "reference_number": "REF-001", "is_update_customer": false, "discount": "string", "exchange_rate": 1.233, "salesperson_name": "John Roberts", "notes_default": "string", "terms_default": "string", "tax_id": "460000000017094", "tax_authority_id": "string", "tax_exemption_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string", "avatax_exempt_no": "string", "avatax_use_code": "string", "shipping_charge": 2, "adjustment": 0.2, "delivery_method": "Air", "is_discount_before_tax": true, "discount_type": "entity_level", "adjustment_description": "Adjustment", "pricebook_id": "string", "template_id": "460000000021001", "documents": [ "document_id", "file_name" ], "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string" }

Response Example

{ "code": 0, "message": "Sales Order Updated Successfully.", "salesorder": [ { "salesorder_id": "460000000039129", "documents": [ "document_id", "file_name" ], "is_pre_gst": false, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "place_of_supply": "TN", "vat_treatment": "string", "tax_treatment": "vat_registered", "zcrm_potential_id": "460000000033001", "zcrm_potential_name": "string", "salesorder_number": "SO-00001", "date": "2014-07-28", "status": "open", "shipment_date": "string", "reference_number": "REF-001", "customer_id": "460000000017138", "customer_name": "SAF Instruments Inc", "contact_persons": [ "460000000870911", "460000000870915" ], "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1.233, "discount_amount": 0, "discount": "string", "discount_applied_on_amount": 0, "is_discount_before_tax": true, "discount_type": "entity_level", "estimate_id": "string", "delivery_method": "Air", "delivery_method_id": "string", "is_inclusive_tax": false, "line_items": [ { "item_order": 0, "item_id": "460000000017088", "rate": 120, "name": "Hard Drive", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "quantity": 40, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "warehouse_id": "460000000041001", "warehouse_name": "Walmart", "discount": "string", "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tags": [ { "is_tag_mandatory": false, "tag_id": 462000000009070, "tag_name": "Location", "tag_option_id": 462000000002670, "tag_option_name": "USA" } ], "unit": "Nos", "item_custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_treatment_code": "uae_others", "avatax_exempt_no": "string", "avatax_use_code": "string", "project_id": 90300000087378 } ], "shipping_charge": 2, "adjustment": 0.2, "adjustment_description": "Adjustment", "sub_total": 11800, "tax_total": 600, "total": 12400, "taxes": [ { "tax_id": "460000000017094", "tax_name": "string", "tax_amount": 600 } ], "price_precision": 2, "is_emailed": false, "billing_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "shipping_address": { "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "street2": "McMillan Avenue", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "fax": "+86-10-82637827", "attention": "string" }, "notes": "string", "terms": "string", "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "template_id": "460000000021001", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530", "created_by_id": "460000000053001", "attachment_name": "string", "can_send_in_mail": true, "salesperson_id": "460000000000097", "salesperson_name": "John Roberts", "merchant_id": "460000000000597", "merchant_name": "John Louis" }, {...}, {...} ] }

Get a sales order

Get the details of a sales order.
OAuth Scope : ZohoBooks.salesorders.READ

Query Parameters

print
Print the exported pdf.
accept
Get the details of a particular sales order in formats such as json/ pdf/ html. Default format is json. Allowed Values: json, csv , xml, xls, xlsx, pdf, jhtml and html.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/460000000039129?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "salesorder": [ { "customer_id": "460000000017138", "billing_address_id": 460000000032174, "shipping_address_id": "string", "is_pre_gst": false, "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "place_of_supply": "TN", "crm_owner_id": "string", "crm_custom_reference_id": "string", "zcrm_potential_id": "460000000033001", "vat_treatment": "string", "tax_treatment": "vat_registered", "is_reverse_charge_applied": true, "is_update_customer": false, "contact_persons": [ { "contact_person_id": "string" } ], "salesorder_number": "SO-00001", "reference_number": "REF-001", "template_id": "460000000021001", "date": "string", "documents": [ "document_id", "file_name" ], "shipment_date": "string", "exchange_rate": 1.233, "discount": "string", "is_discount_before_tax": true, "discount_type": "entity_level", "salesperson_id": "460000000000097", "salesperson_name": "John Roberts", "merchant_id": "460000000000597", "merchant_name": "John Louis", "estimate_id": "string", "tax_id": "460000000017094", "tax_authority_id": "string", "tax_authority_name": "string", "tax_exemption_id": "string", "tax_exemption_code": "string", "avatax_exempt_no": "string", "avatax_use_code": "string", "is_inclusive_tax": false, "sub_statuses": [ { "status_id": "460000000000097", "status_code": "cs_openshi", "parent_status": "open", "description": "Packed is shipped.", "display_name": "Open Shipped", "label_name": "cs_openshi", "color_code": "208eff" } ], "custom_fields": [ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ], "line_items": [ { "line_item_id": "460000000039131", "sku": "string", "bcy_rate": 120, "tax_name": "string", "tax_type": "string", "tax_percentage": 0.1, "tax_id": "460000000017094", "tds_tax_id": "460000000017098", "tax_treatment_code": "uae_others", "is_taxable": false, "product_exemption_id": "string", "product_exemption_code": "string", "avatax_use_code_id": "string", "avatax_use_code_desc": "string", "avatax_tax_code_id": "string", "avatax_tax_code_desc": "string", "item_total_inclusive_of_tax": 48, "product_type": "goods", "hsn_or_sac": 80540, "sat_item_key_code": 71121206, "unitkey_code": "E48", "is_invoiced": false, "stock_on_hand": "string", "image_id": "string", "image_name": "string", "image_type": "string", "project_id": 90300000087378, "project_name": "Sample Project", "warehouse_id": "460000000041001" } ], "pricebook_id": "string", "shipping_charge": 2, "adjustment": 0.2, "adjustment_description": "Adjustment", "delivery_method": "Air", "notes": "string", "notes_default": "string", "terms": "string", "terms_default": "string" }, {...}, {...} ] }

Delete a sales order

Delete an existing sales order. Invoiced sales order cannot be deleted.
OAuth Scope : ZohoBooks.salesorders.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/books/v3/salesorders/460000000039129?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales Order Deleted Successfully." }

Update custom field in existing salesorders

Update the value of the custom field in existing salesorders.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

customfield_id
long
ID of the Custom Field
index
integer
value
string
Value of the Custom Field
label
string

Query Parameters

organization_id
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorder/460000000039129/customfields?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorder/460000000039129/customfields?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorder/460000000039129/customfields?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorder/460000000039129/customfields?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorder/460000000039129/customfields?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorder/460000000039129/customfields?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
[ { "customfield_id": "460000000639129", "index": 1, "value": "Normal", "label": "Priority" } ]

Response Example

{ "code": 0, "message": "Custom Fields Updated Successfully" }

Mark a sales order as open

Mark a draft sales order as open.
OAuth Scope : ZohoBooks.salesorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/open?organization_id=10234695" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/open?organization_id=10234695") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/open?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/books/v3/salesorders/460000000039129/status/open?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/status/open?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/open?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales order status has been changed to Open." }

Mark a sales order as void

Mark a sales order as void.
OAuth Scope : ZohoBooks.salesorders.CREATE

Arguments

reason
string
Reason to convert sales order as void . Maximum Length: 500

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/void?organization_id=10234695" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/void?organization_id=10234695") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/void?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesorders/460000000039129/status/void?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/status/void?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/status/void?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "reason": " " }

Response Example

{ "code": 0, "message": "Sales order status has been changed to Void." }

Update a sales order sub status

Update a sales order sub status.
OAuth Scope : ZohoBooks.salesorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/substatus/cs_openshi?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales Order status updated successfully." }

Email a sales order

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.
OAuth Scope : ZohoBooks.salesorders.CREATE

Arguments

from_address_id
string
From Address of the Email Address
send_from_org_email_id
boolean
Boolean to trigger the email from the organization's email address.
to_mail_ids
array
(Required)
Array of email address of the recipients.
cc_mail_ids
array
Array of email address of the recipients to be CC ed.
bcc_mail_ids
array
Array of email address of the recipients to be BCC ed.
subject
string
(Required)
Subject of the mail.
documents
binary
Documents of the Sales Order
invoice_id
string
ID of the invoice
body
string
(Required)
Body of the mail.

Query Parameters

salesorder_id
ID of the Sales Order
attachments
Attachments of the Sales Order
send_attachment
Send the sales order attachment a with the email.
file_name
Name of the file.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesorders/460000000039129/email?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/email?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "from_address_id": "johnRoberts@safInstrument.com", "send_from_org_email_id": true, "to_mail_ids": [ "john@safInstruments.com" ], "cc_mail_ids": [ "smith@safInstruments.com" ], "bcc_mail_ids": [ "mark@safInstruments.com" ], "subject": "Sales Order from Zillium Inc (Sales Order #: SO-00001)", "documents": "string", "invoice_id": 460000000028192, "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>" }

Response Example

{ "code": 0, "message": "Your Sales Order has been sent." }

Get sales order email content

Get the email content of a sales order.
OAuth Scope : ZohoBooks.salesorders.READ

Query Parameters

email_template_id
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.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/460000000039129/email?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/email?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/email?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "data": [ { "bcc_mails": [ "string" ], "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>", "error_list": [ "string" ], "bcc_mails_str": "string", "documents": [ "document_id", "file_name" ], "subject": "Sales Order from Zillium Inc (Sales Order #: SO-00001)", "customer_name": "SAF Instruments Inc", "entity_id": "460000000058039", "cc_mails_list": [], "file_name": "string", "from_emails": [ { "organization_contact_id": "460000000053003", "user_name": "string", "selected": true, "email": "string", "is_org_email_id": true } ], "file_name_without_extension": "SO-00001", "to_mails_str": "string", "cc_mails_str": "string", "from_email": "string", "from_address": "string", "emailtemplates": [ { "selected": true, "name": "Hard Drive", "email_template_id": 460000000001287 } ], "to_contacts": [ { "first_name": "string", "selected": true, "phone": "(555) 555-1234", "email": "string", "last_name": "string", "salutation": "Ms.", "contact_person_id": "string", "mobile": "string" } ], "attachment_name": "string", "emailtemplate_documents": [ "string" ], "customer_id": "460000000017138" }, {...}, {...} ] }

Submit a sales order for approval

Submit a sales order for approval.
OAuth Scope : ZohoBooks.salesorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/submit?organization_id=10234695" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/submit?organization_id=10234695") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/submit?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/books/v3/salesorders/460000000039129/submit?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/submit?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/submit?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The Sales Order has been successfully submitted for approval." }

Approve a sales order.

Approve a sales order.
OAuth Scope : ZohoBooks.salesorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/approve?organization_id=10234695" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/approve?organization_id=10234695") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/approve?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/books/v3/salesorders/460000000039129/approve?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/approve?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/approve?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "You have approved the Sales Order." }

Bulk export sales orders

Maximum of 25 sales orders can be exported in a single pdf.
OAuth Scope : ZohoBooks.salesorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/pdf?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/pdf?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/pdf?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/pdf?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/pdf?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/pdf?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success" }

Bulk print sales orders

Export sales orders as pdf and print them. Maximum of 25 sales orders can be printed.
OAuth Scope : ZohoBooks.salesorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/print?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/print?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/print?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/print?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/print?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/print?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success" }

Update billing address

Updates the billing address for this sales order alone.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

address
string
Address
city
string
City of the address
state
string
State of the Address
zip
string
ZIP Code of the Address
country
string
Country of the Address
phone
string
Phone number
fax
string
Fax Number
attention
string
is_one_off_address
boolean
is_update_customer
boolean
Boolean to update billing address of customer.
is_verified
boolean
Avalara Integration only
Check if the Address is verified

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/billing?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District", "city": "Beijing", "state": "Beijing", "zip": "1000881", "country": "China", "phone": "(555) 555-1234", "fax": "+86-10-82637827", "attention": "string", "is_one_off_address": true, "is_update_customer": false, "is_verified": true }

Response Example

{ "code": 0, "message": "Billing address updated." }

Update shipping address

Updates the shipping address for this sales order alone.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

address
string
Address
city
string
City of the address
state
string
State of the Address
zip
string
ZIP Code of the Address
country
string
Country of the Address
fax
string
Fax Number
attention
string
is_one_off_address
boolean
is_update_customer
boolean
Boolean to update billing address of customer.
is_verified
boolean
Avalara Integration only
Check if the Address is verified

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/address/shipping?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "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", "attention": "string", "is_one_off_address": true, "is_update_customer": false, "is_verified": true }

Response Example

{ "code": 0, "message": "Shipping address updated." }

List sales order templates

Get all sales order pdf templates.
OAuth Scope : ZohoBooks.salesorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/templates?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/templates?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/templates?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/templates?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/templates?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/templates?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "templates": [ { "template_name": "Standard Template", "template_id": "460000000021001", "template_type": "standard" }, {...}, {...} ] }

Update sales order template

Update the pdf template associated with the sales order.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695" type: PUT headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695") .put(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("PUT", "/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/templates/460000000021001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales Order Updated Successfully." }

Add attachment to a sales order

Attach a file to a sales order.
OAuth Scope : ZohoBooks.salesorders.CREATE

Query Parameters

attachment
The file that is to be added as an Attachment in the Sales Order
can_send_in_mail
Can the file be sent in mail.
doc
Document that is to be attached
totalFiles
Total number of files.
document_ids
ID's of the document

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Your file has been successfully attached to the sales order." }

Update attachment preference

Set whether you want to send the attached file while emailing the sales order.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Query Parameters

can_send_in_mail
(Required)
Can the file be sent in mail.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true" type: PUT headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true") .put(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("PUT", "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695&can_send_in_mail=true' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales Oder Updated Successfully." }

Get a sales order attachment

Returns the file attached to the sales order.
OAuth Scope : ZohoBooks.salesorders.READ

Query Parameters

preview
Check if preview of the Sales Order is required
inline
Check if inline response is required

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Success" }

Delete an attachment

Delete the file attached to the sales order.
OAuth Scope : ZohoBooks.salesorders.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/attachment?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/attachment?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Your file is no longer attached to the sales order." }

Add comment

Add a comment for a sales order.
OAuth Scope : ZohoBooks.salesorders.CREATE

Arguments

description
string
Description of the line item.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesorders/460000000039129/comments?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/comments?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." }

Response Example

{ "code": 0, "message": "Comments added.", "comment": [ { "salesorder_id": "460000000039129", "comment_id": "460000000048023", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "commented_by_id": "460000000017003", "commented_by": "John", "comment_type": "system", "date": "2014-07-28", "date_description": "6 minutes ago", "time": "2:12 PM", "operation_type": "Added", "transaction_id": "string", "transaction_type": "salesorder" }, {...}, {...} ] }

List sales order comments & history

Get the complete history and comments of sales order.
OAuth Scope : ZohoBooks.salesorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesorders/460000000039129/comments?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/comments?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "comments": null }

Update comment

Update existing comment of a sales order.
OAuth Scope : ZohoBooks.salesorders.UPDATE

Arguments

description
string
Description of the line item.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." }

Response Example

{ "code": 0, "message": "Comment has been updated.", "comment": [ { "salesorder_id": "460000000039129", "comment_id": "460000000048023", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "commented_by_id": "460000000017003", "commented_by": "John", "comment_type": "system", "date": "2014-07-28", "date_description": "6 minutes ago", "time": "2:12 PM", "operation_type": "Added", "transaction_id": "string", "transaction_type": "salesorder" }, {...}, {...} ] }

Delete a comment

Delete a sales order comment.
OAuth Scope : ZohoBooks.salesorders.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/books/v3/salesorders/460000000039129/comments/460000000048023?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The comment has been deleted." }