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.

Download Sales Order OpenAPI Document
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
Unique identifier linking the sales order to a Zoho CRM potential record.
zcrm_potential_name
string
Descriptive name of the Zoho CRM potential record associated with this sales order.
salesorder_number
string
Unique alphanumeric identifier for the sales order entity. Required when automatic numbering is disabled in organization settings. Must be unique within the organization and follows the configured numbering sequence pattern for sales order identification and tracking.
date
string
Date when the sales order was created in YYYY-MM-DD format. This date affects order processing timelines, delivery schedules, payment terms calculation, and appears on customer-facing documents and internal reports.
status
string
Status of the Sales Order
shipment_date
string
Expected or actual date when goods will be shipped to the customer in YYYY-MM-DD format. Used for delivery planning, customer communication, inventory management, and tracking order fulfillment timelines.
reference_number
string
External reference identifier for cross-referencing with customer purchase orders, internal tracking systems, or third-party applications. Used for order reconciliation, customer communication, and integration with external business systems and workflows.
customer_id
string
Unique identifier for the customer receiving the sales order. This ID links the order to a specific customer account and determines billing information, payment terms, pricing rules, and tax calculations based on customer settings. Can be fetched from the Get Contacts API or retrieved from existing customer records in your organization.
customer_name
string
Name of the customer associated with the Sales Order
contact_persons_associated
array
Contact Persons associated with the transaction.
Show Sub-Attributes arrow
contact_person_id
long
Unique ID of the Contact Person.
contact_person_name
string
Name of the Contact Person
first_name
string
First Name of the Contact Person.
last_name
string
Last name of the Contact Person.
contact_person_email
string
Email ID of the Contact Person.
phone
string
Phone Number of the Contact Person.
mobile
string
Mobile Number of the Contact Person.
communication_preference
object
Preferred modes of communication for the contact person at transaction level.
Show Sub-Attributes arrow
is_email_enabled
boolean
Used to check if Email communication preference is enabled for the contact person at transaction level.
is_whatsapp_enabled
boolean
WhatsApp integration only
Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
currency_id
string
Unique identifier for the currency used in the sales order transaction. Determines pricing display, exchange rate calculations, and affects financial reporting. If not specified, the organization default currency will be used automatically. Can be fetched from the Get Currencies API or retrieved from your organization currency settings.
currency_code
string
Code of the Currency involved in the Sales Order
currency_symbol
string
exchange_rate
double
Currency conversion rate from the transaction currency to the organization base currency. Required for multi-currency transactions to ensure accurate financial reporting, profit calculations, and tax computations in the base currency denomination.
discount_amount
double
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "190").
discount_applied_on_amount
integer
is_discount_before_tax
boolean
Boolean flag determining the sequence of discount application in tax calculations. When true, discount is applied before tax computation; when false, discount is applied after tax calculation. Affects final pricing accuracy and tax compliance reporting.
discount_type
string
Classification of discount application scope within the sales order. entity_level applies discount to the entire order total, while item_level applies discount to individual line items. Determines discount calculation methodology and affects pricing structure.
estimate_id
string
Unique identifier linking this sales order to its originating estimate document. Establishes audit trail continuity, enables estimate-to-order conversion tracking, and maintains historical reference for customer approval workflows and business process documentation.
delivery_method
string
Specification of the transportation and delivery mechanism for order fulfillment. Determines shipping costs, delivery timelines, carrier selection, and customer communication regarding order status and tracking information.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
location_name
string
Name of the location.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
location_name
string
Name of the location.
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "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
Additional cost associated with product delivery and logistics services. Applied to the sales order total and affects final pricing calculations, profit margins, and customer billing. Supports decimal precision for accurate cost allocation.
adjustment
double
Manual modification amount applied to the sales order total for rounding corrections, special pricing arrangements, or other business-specific adjustments. Supports positive and negative values for additions or deductions from the order total.
adjustment_description
string
Textual explanation for the adjustment amount applied to the sales order. Provides audit trail documentation, justification for pricing modifications, and contextual information for financial reporting and compliance verification purposes.
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
Free-form text field containing additional information, instructions, or comments related to the sales order. This field supports internal documentation, customer-specific requirements, special handling instructions, and inter-departmental communication for order processing workflows.
terms
string
Contractual terms and conditions governing the sales order transaction. Defines payment obligations, delivery specifications, warranty provisions, liability limitations, and other legal stipulations that establish the binding agreement between the organization and customer for this specific transaction.
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
Unique identifier for the PDF document template used for sales order presentation. Determines document layout, branding elements, formatting specifications, and visual presentation standards for customer-facing documents and printed materials.
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
Unique identifier for the salesperson responsible for this sales order. Links the order to a specific sales representative customer relationship management, and sales reporting purposes.
salesperson_name
string
Full name of the sales representative assigned to this sales order. Automatically populated when salesperson_id is specified.
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_associated": [ { "contact_person_id": 982000000567003, "contact_person_name": "David", "first_name": "David", "last_name": "Sujin", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-921-9201", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "location_name": "string", "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", "location_id": "460000000038080", "location_name": "string", "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)
Unique identifier for the customer receiving the sales order. This ID links the order to a specific customer account and determines billing information, payment terms, pricing rules, and tax calculations based on customer settings. Can be fetched from the Get Contacts API or retrieved from existing customer records in your organization.
currency_id
string
Unique identifier for the currency used in the sales order transaction. Determines pricing display, exchange rate calculations, and affects financial reporting. If not specified, the organization default currency will be used automatically. Can be fetched from the Get Currencies API or retrieved from your organization currency settings.
contact_persons_associated
array
Contact Persons associated with the transaction.
Show Sub-Attributes arrow
contact_person_id
long
Unique ID of the Contact Person.
communication_preference
object
Preferred modes of communication for the contact person at transaction level.
Show Sub-Attributes arrow
is_email_enabled
boolean
Used to check if Email communication preference is enabled for the contact person at transaction level.
is_whatsapp_enabled
boolean
WhatsApp integration only
Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
date
string
Date when the sales order was created in YYYY-MM-DD format. This date affects order processing timelines, delivery schedules, payment terms calculation, and appears on customer-facing documents and internal reports.
shipment_date
string
Expected or actual date when goods will be shipped to the customer in YYYY-MM-DD format. Used for delivery planning, customer communication, inventory management, and tracking order fulfillment timelines.
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
Unique identifier for the salesperson responsible for this sales order. Links the order to a specific sales representative customer relationship management, and sales reporting purposes.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "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
Free-form text field containing additional information, instructions, or comments related to the sales order. This field supports internal documentation, customer-specific requirements, special handling instructions, and inter-departmental communication for order processing workflows.
terms
string
Contractual terms and conditions governing the sales order transaction. Defines payment obligations, delivery specifications, warranty provisions, liability limitations, and other legal stipulations that establish the binding agreement between the organization and customer for this specific transaction.
billing_address_id
string
Unique identifier referencing the customer billing address entity. Determines the address used for invoice generation, payment processing, tax jurisdiction calculations, and financial record-keeping. Must correspond to a valid address record associated with the specified customer account.
shipping_address_id
string
Unique identifier referencing the customer shipping address entity. Specifies the delivery destination for goods fulfillment, logistics planning, shipping cost calculations, and delivery confirmation processes. Must correspond to a valid address record within the customer address registry.
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
Unique alphanumeric identifier for the sales order entity. Required when automatic numbering is disabled in organization settings. Must be unique within the organization and follows the configured numbering sequence pattern for sales order identification and tracking.
reference_number
string
External reference identifier for cross-referencing with customer purchase orders, internal tracking systems, or third-party applications. Used for order reconciliation, customer communication, and integration with external business systems and workflows.
is_update_customer
boolean
Boolean flag indicating whether customer billing address information should be synchronized with the sales order data. When enabled, updates the customer master record with address modifications, ensuring data consistency across customer relationship management systems.
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "190").
exchange_rate
double
Currency conversion rate from the transaction currency to the organization base currency. Required for multi-currency transactions to ensure accurate financial reporting, profit calculations, and tax computations in the base currency denomination.
salesperson_name
string
Full name of the sales representative assigned to this sales order. Automatically populated when salesperson_id is specified.
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
Additional cost associated with product delivery and logistics services. Applied to the sales order total and affects final pricing calculations, profit margins, and customer billing. Supports decimal precision for accurate cost allocation.
adjustment
double
Manual modification amount applied to the sales order total for rounding corrections, special pricing arrangements, or other business-specific adjustments. Supports positive and negative values for additions or deductions from the order total.
delivery_method
string
Specification of the transportation and delivery mechanism for order fulfillment. Determines shipping costs, delivery timelines, carrier selection, and customer communication regarding order status and tracking information.
estimate_id
string
ID of the estimate associated with the Sales Order
is_discount_before_tax
boolean
Boolean flag determining the sequence of discount application in tax calculations. When true, discount is applied before tax computation; when false, discount is applied after tax calculation. Affects final pricing accuracy and tax compliance reporting.
discount_type
string
Classification of discount application scope within the sales order. entity_level applies discount to the entire order total, while item_level applies discount to individual line items. Determines discount calculation methodology and affects pricing structure.
adjustment_description
string
Textual explanation for the adjustment amount applied to the sales order. Provides audit trail documentation, justification for pricing modifications, and contextual information for financial reporting and compliance verification purposes.
pricebook_id
string
Unique identifier for the pricing structure applied to the sales order. Determines item rates, discount rules, and pricing policies based on customer segments, volume tiers, or promotional campaigns. Can be retrieved from the Pricebooks API.
template_id
string
Unique identifier for the PDF document template used for sales order presentation. Determines document layout, branding elements, formatting specifications, and visual presentation standards for customer-facing documents and printed materials.
documents
array
zcrm_potential_id
string
Unique identifier linking the sales order to a Zoho CRM potential record.
zcrm_potential_name
string
Descriptive name of the Zoho CRM potential record associated with this sales order.

Query Parameters

organization_id
string
(Required)
ID of the organization
ignore_auto_number_generation
boolean
Ignore auto sales order number generation for this sales order. This mandates the sales order number.
can_send_in_mail
boolean
Can the file be sent in mail.
totalFiles
integer
Total number of files.
doc
binary
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_associated": [ { "contact_person_id": 982000000567003, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "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", "location_id": "460000000038080", "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_associated": [ { "contact_person_id": 982000000567003, "contact_person_name": "David", "first_name": "David", "last_name": "Sujin", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-921-9201", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "location_name": "string", "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", "location_id": "460000000038080", "location_name": "string", "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)
Unique identifier for the customer receiving the sales order. This ID links the order to a specific customer account and determines billing information, payment terms, pricing rules, and tax calculations based on customer settings. Can be fetched from the Get Contacts API or retrieved from existing customer records in your organization.
currency_id
string
Unique identifier for the currency used in the sales order transaction. Determines pricing display, exchange rate calculations, and affects financial reporting. If not specified, the organization default currency will be used automatically. Can be fetched from the Get Currencies API or retrieved from your organization currency settings.
contact_persons_associated
array
Contact Persons associated with the transaction.
Show Sub-Attributes arrow
contact_person_id
long
Unique ID of the Contact Person.
communication_preference
object
Preferred modes of communication for the contact person at transaction level.
Show Sub-Attributes arrow
is_email_enabled
boolean
Used to check if Email communication preference is enabled for the contact person at transaction level.
is_whatsapp_enabled
boolean
WhatsApp integration only
Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
date
string
Date when the sales order was created in YYYY-MM-DD format. This date affects order processing timelines, delivery schedules, payment terms calculation, and appears on customer-facing documents and internal reports.
shipment_date
string
Expected or actual date when goods will be shipped to the customer in YYYY-MM-DD format. Used for delivery planning, customer communication, inventory management, and tracking order fulfillment timelines.
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
Unique identifier for the salesperson responsible for this sales order. Links the order to a specific sales representative customer relationship management, and sales reporting purposes.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
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 value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "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
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
notes
string
Free-form text field containing additional information, instructions, or comments related to the sales order. This field supports internal documentation, customer-specific requirements, special handling instructions, and inter-departmental communication for order processing workflows.
terms
string
Contractual terms and conditions governing the sales order transaction. Defines payment obligations, delivery specifications, warranty provisions, liability limitations, and other legal stipulations that establish the binding agreement between the organization and customer for this specific transaction.
billing_address_id
string
Unique identifier referencing the customer billing address entity. Determines the address used for invoice generation, payment processing, tax jurisdiction calculations, and financial record-keeping. Must correspond to a valid address record associated with the specified customer account.
shipping_address_id
string
Unique identifier referencing the customer shipping address entity. Specifies the delivery destination for goods fulfillment, logistics planning, shipping cost calculations, and delivery confirmation processes. Must correspond to a valid address record within the customer address registry.
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
Unique alphanumeric identifier for the sales order entity. Required when automatic numbering is disabled in organization settings. Must be unique within the organization and follows the configured numbering sequence pattern for sales order identification and tracking.
reference_number
string
External reference identifier for cross-referencing with customer purchase orders, internal tracking systems, or third-party applications. Used for order reconciliation, customer communication, and integration with external business systems and workflows.
is_update_customer
boolean
Boolean flag indicating whether customer billing address information should be synchronized with the sales order data. When enabled, updates the customer master record with address modifications, ensuring data consistency across customer relationship management systems.
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "190").
exchange_rate
double
Currency conversion rate from the transaction currency to the organization base currency. Required for multi-currency transactions to ensure accurate financial reporting, profit calculations, and tax computations in the base currency denomination.
salesperson_name
string
Full name of the sales representative assigned to this sales order. Automatically populated when salesperson_id is specified.
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
Additional cost associated with product delivery and logistics services. Applied to the sales order total and affects final pricing calculations, profit margins, and customer billing. Supports decimal precision for accurate cost allocation.
adjustment
double
Manual modification amount applied to the sales order total for rounding corrections, special pricing arrangements, or other business-specific adjustments. Supports positive and negative values for additions or deductions from the order total.
delivery_method
string
Specification of the transportation and delivery mechanism for order fulfillment. Determines shipping costs, delivery timelines, carrier selection, and customer communication regarding order status and tracking information.
is_discount_before_tax
boolean
Boolean flag determining the sequence of discount application in tax calculations. When true, discount is applied before tax computation; when false, discount is applied after tax calculation. Affects final pricing accuracy and tax compliance reporting.
discount_type
string
Classification of discount application scope within the sales order. entity_level applies discount to the entire order total, while item_level applies discount to individual line items. Determines discount calculation methodology and affects pricing structure.
adjustment_description
string
Textual explanation for the adjustment amount applied to the sales order. Provides audit trail documentation, justification for pricing modifications, and contextual information for financial reporting and compliance verification purposes.
pricebook_id
string
Unique identifier for the pricing structure applied to the sales order. Determines item rates, discount rules, and pricing policies based on customer segments, volume tiers, or promotional campaigns. Can be retrieved from the Pricebooks API.
template_id
string
Unique identifier for the PDF document template used for sales order presentation. Determines document layout, branding elements, formatting specifications, and visual presentation standards for customer-facing documents and printed materials.
documents
array
zcrm_potential_id
string
Unique identifier linking the sales order to a Zoho CRM potential record.
zcrm_potential_name
string
Descriptive name of the Zoho CRM potential record associated with this sales order.

Query Parameters

organization_id
string
(Required)
ID of the organization

Headers

X-Unique-Identifier-Key
string
(Required)
Unique CustomField Api Name
X-Unique-Identifier-Value
string
(Required)
Unique CustomField Value
X-Upsert
boolean
If there is no record is found unique custom field value , will create new invoice

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_associated": [ { "contact_person_id": 982000000567003, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "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, "location_id": "460000000038080" } ], "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_associated": [ { "contact_person_id": 982000000567003, "contact_person_name": "David", "first_name": "David", "last_name": "Sujin", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-921-9201", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "location_name": "string", "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", "location_id": "460000000038080", "location_name": "string", "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

organization_id
string
(Required)
ID of the organization
sort_column
string
Specify the column field for sorting sales order results. Available options include customer_name, salesorder_number, shipment_date, last_modified_time, reference_number, total, date, and created_time.
search_text
string
General search parameter for cross-field text matching across sales order number, reference number, and customer name fields. Enables unified search functionality for quick order identification and customer order lookup operations.
filter_by
string
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
string
Filter sales orders by sales order number using various matching operators. Available variants include salesorder_number_startswith, salesorder_number_not_in, salesorder_number_in, and salesorder_number_contains. Maximum search length: 100 characters.
item_name
string
Filter sales orders by line item name using various matching operators. Available variants include item_name_startswith, item_name_not_in, item_name_in, and item_name_contains. Maximum search length: 100 characters.
item_id
string
Filter sales orders by specific line item identifier. Retrieves all sales orders containing a particular product or service item based on its unique identifier for inventory tracking and item-based reporting purposes.
item_description
string
Filter sales orders by line item description text using various matching operators. Available variants include item_description_startswith, item_description_not_in, item_description_in, and item_description_contains. Maximum search length: 100 characters.
reference_number
string
Filter sales orders by external reference number using various matching operators. Available variants include reference_number_startswith, reference_number_not_in, reference_number_in, and reference_number_contains.
customer_name
string
Filter sales orders by customer name using various matching operators. Available variants include customer_name_startswith, customer_name_not_in, customer_name_in, and customer_name_contains. Maximum search length: 100 characters.
total
double
Filter sales orders by total amount using various range operators. Available variants include total_start, total_end, total_less_than, total_less_equals, total_greater_than, and total_greater_equals.
date
string
Filter sales orders by creation date using various date range operators. Available variants include date_start, date_end, date_before, and date_after. Default date format: yyyy-mm-dd.
shipment_date
string
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
string
Search sales order by sales order status. Allowed Values: draft, open, invoiced, partially_invoiced, void and overdue.
customer_id
string
Filter sales orders by specific customer identifier. Retrieves all sales orders associated with a particular customer account for customer relationship management, order history tracking, and customer-specific reporting and analysis purposes.
salesperson_id
string
Filter sales orders by specific sales representative identifier. Retrieves all sales orders assigned to a particular salesperson for performance tracking, commission calculations, sales territory management, and individual sales reporting purposes.
salesorder_ids
string
ID's of the salesorder [Comma seperated values] . Maximum Length : 200
zcrm_potential_id
long
Potential ID of a Deal in CRM.
last_modified_time
string
Last Modified time of the Sales Order
accept
string
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
boolean
Print the exported pdf. It will be used when accept = pdf and atleast one value in salesorder_ids
customview_id
string
ID of the customview
page
integer
Specify the page number for paginated results retrieval. Controls which subset of sales order records to return, enabling efficient data handling for large result sets. Default value is 1 for the first page.
per_page
integer
Specify the maximum number of sales order records to return per page. Controls result set size for optimal performance, memory usage, and user experience. Default value is 200 records per page.

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)
Unique identifier for the customer receiving the sales order. This ID links the order to a specific customer account and determines billing information, payment terms, pricing rules, and tax calculations based on customer settings. Can be fetched from the Get Contacts API or retrieved from existing customer records in your organization.
currency_id
string
Unique identifier for the currency used in the sales order transaction. Determines pricing display, exchange rate calculations, and affects financial reporting. If not specified, the organization default currency will be used automatically. Can be fetched from the Get Currencies API or retrieved from your organization currency settings.
contact_persons_associated
array
Contact Persons associated with the transaction.
Show Sub-Attributes arrow
contact_person_id
long
Unique ID of the Contact Person.
communication_preference
object
Preferred modes of communication for the contact person at transaction level.
Show Sub-Attributes arrow
is_email_enabled
boolean
Used to check if Email communication preference is enabled for the contact person at transaction level.
is_whatsapp_enabled
boolean
WhatsApp integration only
Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
date
string
Date when the sales order was created in YYYY-MM-DD format. This date affects order processing timelines, delivery schedules, payment terms calculation, and appears on customer-facing documents and internal reports.
shipment_date
string
Expected or actual date when goods will be shipped to the customer in YYYY-MM-DD format. Used for delivery planning, customer communication, inventory management, and tracking order fulfillment timelines.
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
Unique identifier for the salesperson responsible for this sales order. Links the order to a specific sales representative customer relationship management, and sales reporting purposes.
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.
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
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 value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "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
location_id
string
Unique identifier for the business location entity. Specifies the organizational location where the sales order transaction is processed, affecting tax jurisdiction calculations, inventory allocation, reporting segmentation, and location-specific business rules enforcement. Can be retrieved from the Locations API.
notes
string
Free-form text field containing additional information, instructions, or comments related to the sales order. This field supports internal documentation, customer-specific requirements, special handling instructions, and inter-departmental communication for order processing workflows.
terms
string
Contractual terms and conditions governing the sales order transaction. Defines payment obligations, delivery specifications, warranty provisions, liability limitations, and other legal stipulations that establish the binding agreement between the organization and customer for this specific transaction.
billing_address_id
string
Unique identifier referencing the customer billing address entity. Determines the address used for invoice generation, payment processing, tax jurisdiction calculations, and financial record-keeping. Must correspond to a valid address record associated with the specified customer account.
shipping_address_id
string
Unique identifier referencing the customer shipping address entity. Specifies the delivery destination for goods fulfillment, logistics planning, shipping cost calculations, and delivery confirmation processes. Must correspond to a valid address record within the customer address registry.
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
Unique alphanumeric identifier for the sales order entity. Required when automatic numbering is disabled in organization settings. Must be unique within the organization and follows the configured numbering sequence pattern for sales order identification and tracking.
reference_number
string
External reference identifier for cross-referencing with customer purchase orders, internal tracking systems, or third-party applications. Used for order reconciliation, customer communication, and integration with external business systems and workflows.
is_update_customer
boolean
Boolean flag indicating whether customer billing address information should be synchronized with the sales order data. When enabled, updates the customer master record with address modifications, ensuring data consistency across customer relationship management systems.
discount
string
Discount value applied to the sales order total, specified as either percentage or absolute amount. Supports decimal precision and affects final pricing calculations, tax computations, and financial reporting. Format: percentage (e.g., "12.5%") or amount (e.g., "190").
exchange_rate
double
Currency conversion rate from the transaction currency to the organization base currency. Required for multi-currency transactions to ensure accurate financial reporting, profit calculations, and tax computations in the base currency denomination.
salesperson_name
string
Full name of the sales representative assigned to this sales order. Automatically populated when salesperson_id is specified.
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
Additional cost associated with product delivery and logistics services. Applied to the sales order total and affects final pricing calculations, profit margins, and customer billing. Supports decimal precision for accurate cost allocation.
adjustment
double
Manual modification amount applied to the sales order total for rounding corrections, special pricing arrangements, or other business-specific adjustments. Supports positive and negative values for additions or deductions from the order total.
delivery_method
string
Specification of the transportation and delivery mechanism for order fulfillment. Determines shipping costs, delivery timelines, carrier selection, and customer communication regarding order status and tracking information.
is_discount_before_tax
boolean
Boolean flag determining the sequence of discount application in tax calculations. When true, discount is applied before tax computation; when false, discount is applied after tax calculation. Affects final pricing accuracy and tax compliance reporting.
discount_type
string
Classification of discount application scope within the sales order. entity_level applies discount to the entire order total, while item_level applies discount to individual line items. Determines discount calculation methodology and affects pricing structure.
adjustment_description
string
Textual explanation for the adjustment amount applied to the sales order. Provides audit trail documentation, justification for pricing modifications, and contextual information for financial reporting and compliance verification purposes.
pricebook_id
string
Unique identifier for the pricing structure applied to the sales order. Determines item rates, discount rules, and pricing policies based on customer segments, volume tiers, or promotional campaigns. Can be retrieved from the Pricebooks API.
template_id
string
Unique identifier for the PDF document template used for sales order presentation. Determines document layout, branding elements, formatting specifications, and visual presentation standards for customer-facing documents and printed materials.
documents
array
zcrm_potential_id
string
Unique identifier linking the sales order to a Zoho CRM potential record.
zcrm_potential_name
string
Descriptive name of the Zoho CRM potential record associated with this sales order.

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
ignore_auto_number_generation
boolean
Ignore auto sales order number generation for this sales order. This mandates the sales order number.
can_send_in_mail
boolean
Can the file be sent in mail.
totalFiles
integer
Total number of files.
doc
binary
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_associated": [ { "contact_person_id": 982000000567003, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "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, "location_id": "460000000038080" } ], "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_associated": [ { "contact_person_id": 982000000567003, "contact_person_name": "David", "first_name": "David", "last_name": "Sujin", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-921-9201", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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, "location_id": "460000000038080", "location_name": "string", "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", "location_id": "460000000038080", "location_name": "string", "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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
print
boolean
Print the exported pdf.
accept
string
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_associated": [ { "contact_person_id": 982000000567003, "contact_person_name": "David", "first_name": "David", "last_name": "Sujin", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-921-9201", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "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" } ], "location_id": "460000000038080", "location_name": "string", "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", "location_id": "460000000038080", "location_name": "string" } ], "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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(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/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

Path Parameters

salesorder_id
string
(Required)
status_code
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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.

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
salesorder_id
string
ID of the Sales Order
attachments
binary
Attachments of the Sales Order
send_attachment
boolean
Send the sales order attachment a with the email.
file_name
string
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

Get sales order email content

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

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

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": "David", "selected": true, "phone": "+1-925-921-9201", "email": "string", "last_name": "Sujin", "salutation": "Mr", "contact_person_id": 982000000567003, "mobile": "+1-4054439562" } ], "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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Query Parameters

organization_id
string
(Required)
ID of the organization

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 of the Contact Person.
fax
string
Fax Number
attention
string
is_one_off_address
boolean
is_update_customer
boolean
Boolean flag indicating whether customer billing address information should be synchronized with the sales order data. When enabled, updates the customer master record with address modifications, ensuring data consistency across customer relationship management systems.
is_verified
boolean
Avalara Integration only
Check if the Address is verified

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(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/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": "+1-925-921-9201", "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 flag indicating whether customer billing address information should be synchronized with the sales order data. When enabled, updates the customer master record with address modifications, ensuring data consistency across customer relationship management systems.
is_verified
boolean
Avalara Integration only
Check if the Address is verified

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(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/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

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Path Parameters

salesorder_id
string
(Required)
template_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
attachment
binary
The file that is to be added as an Attachment in the Sales Order
can_send_in_mail
boolean
Can the file be sent in mail.
doc
binary
Document that is to be attached
totalFiles
integer
Total number of files.
document_ids
string
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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
can_send_in_mail
boolean
(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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
preview
boolean
Check if preview of the Sales Order is required
inline
boolean
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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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
The description of the comment.

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(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/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": "This is a comment." }

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

Path Parameters

salesorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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
The description of the comment.

Path Parameters

salesorder_id
string
(Required)
comment_id
string
(Required)

Query Parameters

organization_id
string
(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/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": "This is a comment." }

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

Path Parameters

salesorder_id
string
(Required)
comment_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

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." }