API Docs
/
No Results Found
Purchase Order

Purchase Order

A purchase order is an official document that a buyer issues to a seller, indicating relevant information about what they want to buy, the quantity, the price agreed for that particular product or service.

Download Purchase Order OpenAPI Document
End Points
Create a purchase order
Update a purchase order using a custom field's unique value
List purchase orders
Update a purchase order
Get a purchase order
Delete purchase order
Update custom field in existing purchaseorders
Mark a purchase order as open
Mark as billed
Cancel a purchase order
Submit a purchase order for approval
Approve a purchase order
Email a purchase order
Get purchase order email content
Update billing address
List purchase order templates
Update purchase order template
Add attachment to a purchase order
Update attachment preference
Get a purchase order attachment
Delete an attachment
Add comment
List purchase order comments & history
Update comment
Delete a comment

Attribute

purchaseorder_id
string
documents
array
Array of documents attached to the purchase order.
Show Sub-Attributes arrow
document_id
long
ID of the Document
file_name
string
Name of the attached document file. Includes file extension and represents the original filename as uploaded. Used for display purposes and file identification in the system.
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the purchase order. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor 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).
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the purchase order. Choose whether the vendor falls under: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered are 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_pre_gst
boolean
🇮🇳 India
only
Applicable for transactions that fall before july 1, 2017
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
place_of_supply
string
GCC only
The place of supply is where a transaction is considered to have occurred for VAT purposes. For the supply of goods, the place of supply is the location of the goods when the supply occurs. For the supply of services, the place of supply should be where the supplier is established. (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.
pricebook_id
string
Unique identifier of the pricebook to be used for this purchase order. The pricebook contains predefined pricing information for items and services. This field is optional and if not specified, the default pricebook will be used. You can obtain the pricebook ID by listing all available pricebooks in your organization. Ensure the pricebook exists and contains the relevant pricing information before referencing its ID here.
pricebook_name
string
Enter pricebook name
is_reverse_charge_applied
boolean
🇮🇳 India
only
Applicable for transactions where you pay reverse charge
purchaseorder_number
string
Unique identifier for the purchase order. This field is mandatory when auto number generation is disabled for your organization. If auto numbering is enabled, this field can be left empty as the system will automatically generate a sequential purchase order number. When manually specifying a number, ensure it follows your organization's numbering convention and is unique across all purchase orders.
date
string
The date when the purchase order was created or issued. This is the official date that appears on the purchase order document and is used for record-keeping, reporting, and tracking purposes. The date should be in YYYY-MM-DD format and typically represents when the purchase order was authorized and sent to the vendor.
expected_delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.
discount
string
The discount amount or percentage to be applied to the purchase order total. This can be specified as a fixed amount or percentage value. Discounts are typically offered by vendors for bulk purchases, early payments, or promotional purposes. The discount reduces the total amount payable and affects the final purchase order total.
discount_account_id
string
Unique identifier of the accounting account where the discount amount will be recorded. This account is used to track and categorize discount expenses in your general ledger. The discount account should be configured as an expense or contra-revenue account to properly reflect the impact of discounts on your financial statements.
is_discount_before_tax
boolean
Boolean flag that determines whether the discount is applied before or after tax calculations. When set to true, the discount is applied to the subtotal before tax is calculated, resulting in tax being calculated on the discounted amount. When set to false, the discount is applied after tax calculations, which may affect the final total differently depending on your tax configuration.
reference_number
string
External reference number or identifier for the purchase order. This field is optional and can be used to store additional reference information such as vendor order numbers, internal tracking codes, or any other external system identifiers. This reference number will be displayed on the purchase order document and can be used for cross-referencing with external systems or internal tracking purposes.
status
string
Status of the Purchase Order
vendor_id
string
Unique identifier of the vendor for whom the purchase order is being created. This value is mandatory to associate the purchase order with a specific vendor in your organization. You can obtain the vendor ID by listing all vendors using the contacts API. Ensure the vendor exists before referencing their ID here.
vendor_name
string
Name of the Vendor in Purchase Order
crm_owner_id
string
Unique identifier of the CRM owner assigned to this purchase order. This field links the purchase order to a specific CRM user who is responsible for managing the vendor relationship and overseeing the procurement process. The CRM owner can track, follow up, and manage all aspects of this purchase order within the CRM system.
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 of the currency for the purchase order. This value is mandatory to specify the currency in which the purchase order amounts will be displayed and processed. You can obtain the currency ID by listing all available currencies using the GET /settings/currencies API. Ensure the currency exists and is properly configured in your organization before referencing its ID here.
currency_code
string
Code of the Currency
currency_symbol
string
Symbol of the Currency
exchange_rate
double
The currency exchange rate used to convert the purchase order amounts from the vendor's currency to your organization's base currency. This rate is applied when the purchase order is created in a foreign currency. A value of 1 indicates the same currency as your base currency. This rate affects all monetary calculations and reporting for this purchase order.
delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format and is typically communicated to the vendor as part of the purchase order terms.
is_emailed
boolean
Check if the purchase order is emailed
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
Boolean flag that specifies whether the line item rates include or exclude tax amounts. When set to true, the specified rates are inclusive of tax, meaning the tax amount is already included in the rate. When set to false, the rates are exclusive of tax, and tax will be calculated and added separately. This setting affects how tax calculations are performed and displayed on the purchase order.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
location_name
string
Name of the location
line_items
array
Line items of purchase order.
Show Sub-Attributes arrow
item_id
string
Unique identifier of the item or service in the line item. Mandatory field that links to the item catalog. Determines item details, pricing, and inventory tracking. Obtain from GET /items API.
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.
sku
string
SKU of the Item
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
location_name
string
Name of the location
product_type
string
🇬🇧 United Kingdom
only
This denotes whether the Purchase Order line item is to be treated as a goods or service purchase. This only need to be specified in case purchase order is not enabled. Allowed Values: goods, digital_service and service.
reverse_charge_tax_id
string
Unique identifier of the reverse charge tax for the line item. Used when buyer is responsible for paying tax instead of vendor. Applicable for unregistered vendors or specific tax regulations. Must reference valid reverse charge tax configuration.
reverse_charge_tax_name
string
🇮🇳 India
only
Enter reverse charge tax name
reverse_charge_tax_percentage
double
🇮🇳 India
only
Enter reverse charge tax percentage
reverse_charge_tax_amount
double
🇮🇳 India
only
Tax amount for the reverse charge.
account_id
string
Unique identifier of the accounting account for the line item. Mandatory for non-inventory items/services. Determines expense categorization in general ledger.
account_name
string
Name of the Account
name
string
Display name of the line item on the purchase order. Auto-populated from item catalog when item_id is specified. Can be customized. Used for vendor reference and documentation.
description
string
Additional details, specifications, or notes about the line item. Can include technical specs, requirements, delivery instructions. Appears on purchase order document for vendor reference.
item_order
integer
Sequential order of line item within purchase order. Determines display order on documents and reports. Typically numbered sequentially from 0 or 1. Maintains consistency across related documents.
bcy_rate
integer
Rate in Base Currency
unit
string
Unit of measurement for the quantity (e.g., Nos, kgs, hours, meters). Should match vendor pricing structure. Used for quantity calculations and pricing.
rate
double
Unit price per item/service. Used to calculate total line item amount. Must be in purchase order currency. Tax inclusion depends on is_inclusive_tax setting. Affects pricing calculations and vendor billing.
quantity
string
Number of units being ordered. Used with rate to calculate total line item amount. Must match unit of measurement. Represents actual order quantity for delivery.
item_total
integer
Total of the Item
item_total_inclusive_of_tax
integer
Total of the Item inclusive tax
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
tax_id
string
Unique identifier of the tax for the line item. Determines tax rate, name, and treatment for calculations. Used in tax amount computation and display on purchase order. Obtain from taxes API.
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 KSA are ksa_reimbursed_expense.
tax_name
string
Name of the Tax
tax_type
string
Type of the Tax
tax_percentage
integer
Percentage of the Tax
hsn_or_sac
string
🇮🇳 India
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
HSN or SAC Code for the Item
acquisition_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the VAT Acquistion
acquisition_vat_name
string
🇬🇧 United Kingdom
, Europe only
Name of the VAT Acquistion
acquisition_vat_percentage
string
🇬🇧 United Kingdom
, Europe only
Percentage of the VAT Acquistion
acquisition_vat_amount
string
🇬🇧 United Kingdom
, Europe only
Amount of the VAT Acquistion
reverse_charge_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the Reverse Charge
reverse_charge_vat_name
string
🇬🇧 United Kingdom
, Europe only
Name of the Reverse Charge
reverse_charge_vat_percentage
string
🇬🇧 United Kingdom
, Europe only
Percentage of the Reverse Charge
reverse_charge_vat_amount
string
🇬🇧 United Kingdom
, Europe only
Percentage of the Reverse Charge
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
project_id
string
ID of the project
project_name
string
Name of the project.
sub_total
double
Sub Total of the Purchase Order
tax_total
double
Total of the Tax
total
double
Total of the Purchase Order
taxes
array
acquisition_vat_summary
array
🇬🇧 United Kingdom
, Europe only
Summary of the VAT Acquistion
Show Sub-Attributes arrow
tax_name
string
Name of the Tax
tax_amount
double
Amount of Tax
acquisition_vat_total
double
🇬🇧 United Kingdom
, Europe only
Total of the VAT Acquistion
reverse_charge_vat_summary
array
🇬🇧 United Kingdom
, Europe only
Summary of the Reverse Charge
Show Sub-Attributes arrow
tax_name
string
Name of the Tax
tax_amount
double
Amount of Tax
reverse_charge_vat_total
double
🇬🇧 United Kingdom
, Europe only
Total of the Reverse Charge
billing_address
object
Show Sub-Attributes arrow
address
string
Address associated with the Purchase Order
street2
string
city
string
City involved in the Address
state
string
State Involved in the Address
zip
string
ZIP Code of the Address
country
string
Country involved in the Address
fax
string
Fax Number
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
notes
string
Additional information, instructions, or comments to be displayed on the purchase order document. This field is typically used for delivery instructions, special requirements, vendor communications, or any other information relevant to the purchase order. The notes appear on the purchase order PDF and are visible to the vendor.
terms
string
Terms and conditions text to be displayed on the purchase order document. This field is used to specify payment terms, delivery conditions, return policies, warranty information, or any other legal or business terms that apply to this transaction. The terms appear on the purchase order PDF and form part of the contractual agreement with the vendor.
ship_via
string
Shipment Preference
ship_via_id
string
ID of the Shipment Preference
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
delivery_org_address_id
string
Unique identifier of the organization address where the goods or services from this purchase order should be delivered. This field specifies the delivery location within your organization, such as a warehouse, office, or branch location. The address details are retrieved from your organization's address book and displayed on the purchase order for vendor reference.
delivery_customer_id
string
Unique identifier of the customer for whom the goods or services in this purchase order are being procured. This field is used when the purchase order is created on behalf of a customer, such as in drop-shipping scenarios or when procuring items for specific customer projects. The customer information may be displayed on the purchase order for vendor reference.
delivery_address
object
Show Sub-Attributes arrow
zip
string
ZIP Code of the Address
is_verifiable
boolean
state
string
State Involved in the Address
address1
string
address2
string
is_valid
string
city
string
City involved in the Address
country
string
Country involved in the Address
address
string
Address associated with the Purchase Order
email
string
Email ID of the Vendor
is_primary
string
organization_address_id
string
ID of organization address.
phone
string
Phone Number of the Contact Person.
is_verified
boolean
price_precision
integer
Price Precision for the Values
custom_fields
array
Custom fields for purchase order.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
attachment_name
string
Name of the Attachment
can_send_in_mail
boolean
Boolean to send the attachment with the purchase order when emailed.
template_id
string
Unique identifier of the PDF template linked to the purchase order. Obtain this value from the `template_id` field in the response of the GET `/purchaseorders/templates` API for your organization. Determines which template is used for the purchase order PDF document, controlling the layout, formatting, and visual appearance of the generated purchase order.
template_name
string
Name of the template
page_width
string
Width of the Page
page_height
string
Height of the Page
orientation
string
Orientation of the Page
template_type
string
Type of the Template
created_time
string
Created Time of the Purchase Order
created_by_id
string
ID of the User who created the Purchase Order
last_modified_time
string
Last Modified Time of the Purchase Order
can_mark_as_bill
boolean
can_mark_as_unbill
boolean

Example

{ "purchaseorder_id": "460000000062001", "documents": [ { "document_id": 0, "file_name": "string" } ], "vat_treatment": "string", "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "is_pre_gst": false, "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "pricebook_name": "", "is_reverse_charge_applied": false, "purchaseorder_number": "PO-00001", "date": "2014-02-10", "expected_delivery_date": "string", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "reference_number": "ER/0034", "status": "draft", "vendor_id": "460000000026049", "vendor_name": "string", "crm_owner_id": "string", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "contact_person_name": "Peter", "first_name": "Peter", "last_name": "Parker", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-929-7211", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "currency_id": "460000000000099", "currency_code": "INR", "currency_symbol": "string", "exchange_rate": 1, "delivery_date": "2014-02-10", "is_emailed": false, "is_inclusive_tax": false, "location_id": "460000000038080", "location_name": "string", "line_items": [ { "item_id": "460000000027009", "line_item_id": "460000000074009", "sku": "string", "location_id": "460000000038080", "location_name": "string", "product_type": "string", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "account_id": "460000000074003", "account_name": "Other Expenses", "name": "Hard Drive", "description": "string", "item_order": 0, "bcy_rate": 40, "unit": "Nos", "rate": 112, "quantity": 1, "item_total": 40, "item_total_inclusive_of_tax": 40, "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_id": "string", "tax_treatment_code": "uae_others", "tax_name": "string", "tax_type": "tax", "tax_percentage": 0, "hsn_or_sac": "string", "acquisition_vat_id": "string", "acquisition_vat_name": "string", "acquisition_vat_percentage": "string", "acquisition_vat_amount": "string", "reverse_charge_vat_id": "string", "reverse_charge_vat_name": "string", "reverse_charge_vat_percentage": "string", "reverse_charge_vat_amount": "string", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "project_id": 90300000087378, "project_name": "Sample Project" } ], "sub_total": 40, "tax_total": 0, "total": 40, "taxes": [ "string" ], "acquisition_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "acquisition_vat_total": 0.1, "reverse_charge_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "reverse_charge_vat_total": 0.1, "billing_address": { "address": "string", "street2": "McMillan Avenue", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string" }, "notes": "Please deliver as soon as possible.", "terms": "Thanks for your business.", "ship_via": "string", "ship_via_id": "string", "attention": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "delivery_address": { "zip": "string", "is_verifiable": true, "state": "string", "address1": "string", "address2": "string", "is_valid": "string", "city": "string", "country": "string", "address": "string", "email": "peterparker@bowmanfurniture.com", "is_primary": "string", "organization_address_id": "string", "phone": "+1-925-929-7211", "is_verified": false }, "price_precision": 2, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "attachment_name": "7.png", "can_send_in_mail": false, "template_id": "460000000011003", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-02-10T15:26:26+0530", "created_by_id": "460000000053001", "last_modified_time": "2014-02-10T15:26:26+0530", "can_mark_as_bill": false, "can_mark_as_unbill": false }

Create a purchase order

Create a purchase order for your vendor.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Arguments

vendor_id
string
(Required)
Unique identifier of the vendor for whom the purchase order is being created. This value is mandatory to associate the purchase order with a specific vendor in your organization. You can obtain the vendor ID by listing all vendors using the contacts API. Ensure the vendor exists before referencing their ID here.
currency_id
string
Unique identifier of the currency for the purchase order. This value is mandatory to specify the currency in which the purchase order amounts will be displayed and processed. You can obtain the currency ID by listing all available currencies using the GET /settings/currencies API. Ensure the currency exists and is properly configured in your organization before referencing its ID here.
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.
purchaseorder_number
string
Unique identifier for the purchase order. This field is mandatory when auto number generation is disabled for your organization. If auto numbering is enabled, this field can be left empty as the system will automatically generate a sequential purchase order number. When manually specifying a number, ensure it follows your organization's numbering convention and is unique across all purchase orders.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the purchase order. Choose whether the vendor falls under: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered are 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).
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
place_of_supply
string
GCC only
The place of supply is where a transaction is considered to have occurred for VAT purposes. For the supply of goods, the place of supply is the location of the goods when the supply occurs. For the supply of services, the place of supply should be where the supplier is established. (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.
pricebook_id
string
Unique identifier of the pricebook to be used for this purchase order. The pricebook contains predefined pricing information for items and services. This field is optional and if not specified, the default pricebook will be used. You can obtain the pricebook ID by listing all available pricebooks in your organization. Ensure the pricebook exists and contains the relevant pricing information before referencing its ID here.
reference_number
string
External reference number or identifier for the purchase order. This field is optional and can be used to store additional reference information such as vendor order numbers, internal tracking codes, or any other external system identifiers. This reference number will be displayed on the purchase order document and can be used for cross-referencing with external systems or internal tracking purposes.
billing_address_id
long
Unique identifier of the billing address to be used for this purchase order. The billing address determines where invoices and related documents will be sent. This field is optional and if not specified, the default billing address from your organization settings will be used. You can obtain the billing address ID by listing all available addresses in your organization. Ensure the address exists and contains the correct billing information before referencing its ID here.
crm_owner_id
string
Unique identifier of the CRM owner assigned to this purchase order. This field links the purchase order to a specific CRM user who is responsible for managing the vendor relationship and overseeing the procurement process. The CRM owner can track, follow up, and manage all aspects of this purchase order within the CRM system.
crm_custom_reference_id
long
ID of CRM Custom Reference
template_id
string
Unique identifier of the PDF template linked to the purchase order. Obtain this value from the `template_id` field in the response of the GET `/purchaseorders/templates` API for your organization. Determines which template is used for the purchase order PDF document, controlling the layout, formatting, and visual appearance of the generated purchase order.
date
string
The date when the purchase order was created or issued. This is the official date that appears on the purchase order document and is used for record-keeping, reporting, and tracking purposes. The date should be in YYYY-MM-DD format and typically represents when the purchase order was authorized and sent to the vendor.
delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format and is typically communicated to the vendor as part of the purchase order terms.
due_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.
exchange_rate
double
The currency exchange rate used to convert the purchase order amounts from the vendor's currency to your organization's base currency. This rate is applied when the purchase order is created in a foreign currency. A value of 1 indicates the same currency as your base currency. This rate affects all monetary calculations and reporting for this purchase order.
discount
string
The discount amount or percentage to be applied to the purchase order total. This can be specified as a fixed amount or percentage value. Discounts are typically offered by vendors for bulk purchases, early payments, or promotional purposes. The discount reduces the total amount payable and affects the final purchase order total.
discount_account_id
string
Unique identifier of the accounting account where the discount amount will be recorded. This account is used to track and categorize discount expenses in your general ledger. The discount account should be configured as an expense or contra-revenue account to properly reflect the impact of discounts on your financial statements.
is_discount_before_tax
boolean
Boolean flag that determines whether the discount is applied before or after tax calculations. When set to true, the discount is applied to the subtotal before tax is calculated, resulting in tax being calculated on the discounted amount. When set to false, the discount is applied after tax calculations, which may affect the final total differently depending on your tax configuration.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
Boolean flag that specifies whether the line item rates include or exclude tax amounts. When set to true, the specified rates are inclusive of tax, meaning the tax amount is already included in the rate. When set to false, the rates are exclusive of tax, and tax will be calculated and added separately. This setting affects how tax calculations are performed and displayed on the purchase order.
notes
string
Additional information, instructions, or comments to be displayed on the purchase order document. This field is typically used for delivery instructions, special requirements, vendor communications, or any other information relevant to the purchase order. The notes appear on the purchase order PDF and are visible to the vendor.
notes_default
string
Default notes for purchase order
terms
string
Terms and conditions text to be displayed on the purchase order document. This field is used to specify payment terms, delivery conditions, return policies, warranty information, or any other legal or business terms that apply to this transaction. The terms appear on the purchase order PDF and form part of the contractual agreement with the vendor.
terms_default
string
Default terms for Purchase Orders
ship_via
string
Shipment Preference
delivery_org_address_id
string
Unique identifier of the organization address where the goods or services from this purchase order should be delivered. This field specifies the delivery location within your organization, such as a warehouse, office, or branch location. The address details are retrieved from your organization's address book and displayed on the purchase order for vendor reference.
delivery_customer_id
string
Unique identifier of the customer for whom the goods or services in this purchase order are being procured. This field is used when the purchase order is created on behalf of a customer, such as in drop-shipping scenarios or when procuring items for specific customer projects. The customer information may be displayed on the purchase order for vendor reference.
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the purchase order. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor 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).
is_update_customer
string
Check if customer should be updated
salesorder_id
long
Unique identifier of the sales order that is linked to this purchase order. This field establishes a connection between the sales order and purchase order, typically used in drop-shipping scenarios where you need to procure items to fulfill a customer's sales order. The linked sales order information may be displayed on the purchase order for vendor reference and internal tracking purposes.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
line_items
array
(Required)
Line items of purchase order.
Show Sub-Attributes arrow
item_id
string
Unique identifier of the item or service in the line item. Mandatory field that links to the item catalog. Determines item details, pricing, and inventory tracking. Obtain from GET /items API.
account_id
string
Unique identifier of the accounting account for the line item. Mandatory for non-inventory items/services. Determines expense categorization in general ledger.
name
string
Display name of the line item on the purchase order. Auto-populated from item catalog when item_id is specified. Can be customized. Used for vendor reference and documentation.
description
string
Additional details, specifications, or notes about the line item. Can include technical specs, requirements, delivery instructions. Appears on purchase order document for vendor reference.
unit
string
Unit of measurement for the quantity (e.g., Nos, kgs, hours, meters). Should match vendor pricing structure. Used for quantity calculations and pricing.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
hsn_or_sac
string
🇮🇳 India
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
HSN or SAC Code for the Item
reverse_charge_tax_id
string
Unique identifier of the reverse charge tax for the line item. Used when buyer is responsible for paying tax instead of vendor. Applicable for unregistered vendors or specific tax regulations. Must reference valid reverse charge tax configuration.
rate
double
Unit price per item/service. Used to calculate total line item amount. Must be in purchase order currency. Tax inclusion depends on is_inclusive_tax setting. Affects pricing calculations and vendor billing.
quantity
string
Number of units being ordered. Used with rate to calculate total line item amount. Must match unit of measurement. Represents actual order quantity for delivery.
item_order
integer
Sequential order of line item within purchase order. Determines display order on documents and reports. Typically numbered sequentially from 0 or 1. Maintains consistency across related documents.
tax_id
string
Unique identifier of the tax for the line item. Determines tax rate, name, and treatment for calculations. Used in tax amount computation and display on purchase order. Obtain from taxes API.
tds_tax_id
string
🇲🇽 Mexico
only
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 KSA are ksa_reimbursed_expense.
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
acquisition_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the VAT Acquistion
reverse_charge_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the Reverse Charge
item_custom_fields
array
Show Sub-Attributes arrow
index
integer
Index of the Custom Field
value
string
Value of the Custom Field
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
project_id
string
ID of the project
custom_fields
array
Custom fields for purchase order.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
documents
array
Array of documents attached to the purchase order.
Show Sub-Attributes arrow
document_id
long
ID of the Document
file_name
string
Name of the attached document file. Includes file extension and represents the original filename as uploaded. Used for display purposes and file identification in the system.

Query Parameters

organization_id
string
(Required)
ID of the organization
attachment
binary
Allowed Extensions: gif, png, jpeg, jpg, bmp, pdf, xls, xlsx, doc and docx.
ignore_auto_number_generation
boolean
Ignore auto purchase order number generation for this purchase order. This mandates the purchase order number.

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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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
{ "vendor_id": "460000000026049", "currency_id": "460000000000099", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "purchaseorder_number": "PO-00001", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "reference_number": "ER/0034", "billing_address_id": "460000000017491", "crm_owner_id": "string", "crm_custom_reference_id": 0, "template_id": "460000000011003", "date": "2014-02-10", "delivery_date": "2014-02-10", "due_date": "string", "exchange_rate": 1, "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "is_inclusive_tax": false, "notes": "Please deliver as soon as possible.", "notes_default": "string", "terms": "Thanks for your business.", "terms_default": "string", "ship_via": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "attention": "string", "vat_treatment": "string", "is_update_customer": "string", "salesorder_id": "460000124728314", "location_id": "460000000038080", "line_items": [ { "item_id": "460000000027009", "account_id": "460000000074003", "name": "Hard Drive", "description": "string", "unit": "Nos", "location_id": "460000000038080", "hsn_or_sac": "string", "reverse_charge_tax_id": 460000000026068, "rate": 112, "quantity": 1, "item_order": 0, "tax_id": "string", "tds_tax_id": 90300000087370, "tax_treatment_code": "uae_others", "tax_exemption_code": "string", "tax_exemption_id": "string", "acquisition_vat_id": "string", "reverse_charge_vat_id": "string", "item_custom_fields": [ { "index": 1, "value": "Normal" } ], "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "project_id": 90300000087378 } ], "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "documents": [ { "document_id": 0, "file_name": "string" } ] }

Response Example

{ "code": 0, "message": "Purchase Order has been added.", "purchaseorder": { "purchaseorder_id": "460000000062001", "documents": [ { "document_id": 0, "file_name": "string" } ], "vat_treatment": "string", "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "is_pre_gst": false, "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "pricebook_name": "", "is_reverse_charge_applied": false, "purchaseorder_number": "PO-00001", "date": "2014-02-10", "expected_delivery_date": "string", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "reference_number": "ER/0034", "status": "draft", "vendor_id": "460000000026049", "vendor_name": "string", "crm_owner_id": "string", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "contact_person_name": "Peter", "first_name": "Peter", "last_name": "Parker", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-929-7211", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "currency_id": "460000000000099", "currency_code": "INR", "currency_symbol": "string", "exchange_rate": 1, "delivery_date": "2014-02-10", "is_emailed": false, "is_inclusive_tax": false, "location_id": "460000000038080", "location_name": "string", "line_items": [ { "item_id": "460000000027009", "line_item_id": "460000000074009", "sku": "string", "location_id": "460000000038080", "location_name": "string", "product_type": "string", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "account_id": "460000000074003", "account_name": "Other Expenses", "name": "Hard Drive", "description": "string", "item_order": 0, "bcy_rate": 40, "unit": "Nos", "rate": 112, "quantity": 1, "item_total": 40, "item_total_inclusive_of_tax": 40, "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_id": "string", "tax_treatment_code": "uae_others", "tax_name": "string", "tax_type": "tax", "tax_percentage": 0, "hsn_or_sac": "string", "acquisition_vat_id": "string", "acquisition_vat_name": "string", "acquisition_vat_percentage": "string", "acquisition_vat_amount": "string", "reverse_charge_vat_id": "string", "reverse_charge_vat_name": "string", "reverse_charge_vat_percentage": "string", "reverse_charge_vat_amount": "string", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "project_id": 90300000087378, "project_name": "Sample Project" } ], "sub_total": 40, "tax_total": 0, "total": 40, "taxes": [ "string" ], "acquisition_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "acquisition_vat_total": 0.1, "reverse_charge_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "reverse_charge_vat_total": 0.1, "billing_address": { "address": "string", "street2": "McMillan Avenue", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string" }, "notes": "Please deliver as soon as possible.", "terms": "Thanks for your business.", "ship_via": "string", "ship_via_id": "string", "attention": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "delivery_address": { "zip": "string", "is_verifiable": true, "state": "string", "address1": "string", "address2": "string", "is_valid": "string", "city": "string", "country": "string", "address": "string", "email": "peterparker@bowmanfurniture.com", "is_primary": "string", "organization_address_id": "string", "phone": "+1-925-929-7211", "is_verified": false }, "price_precision": 2, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "attachment_name": "7.png", "can_send_in_mail": false, "template_id": "460000000011003", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-02-10T15:26:26+0530", "created_by_id": "460000000053001", "last_modified_time": "2014-02-10T15:26:26+0530", "can_mark_as_bill": false, "can_mark_as_unbill": false } }

Update a purchase 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 purchase 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 purchase 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 purchase orders, a new purchase order will be created if the necessary payload details are available
OAuth Scope : ZohoBooks.purchaseorders.UPDATE

Arguments

vendor_id
string
(Required)
Unique identifier of the vendor for whom the purchase order is being created. This value is mandatory to associate the purchase order with a specific vendor in your organization. You can obtain the vendor ID by listing all vendors using the contacts API. Ensure the vendor exists before referencing their ID here.
currency_id
string
Unique identifier of the currency for the purchase order. This value is mandatory to specify the currency in which the purchase order amounts will be displayed and processed. You can obtain the currency ID by listing all available currencies using the GET /settings/currencies API. Ensure the currency exists and is properly configured in your organization before referencing its ID here.
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.
purchaseorder_number
string
Unique identifier for the purchase order. This field is mandatory when auto number generation is disabled for your organization. If auto numbering is enabled, this field can be left empty as the system will automatically generate a sequential purchase order number. When manually specifying a number, ensure it follows your organization's numbering convention and is unique across all purchase orders.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the purchase order. Choose whether the vendor falls under: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered are 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).
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
place_of_supply
string
GCC only
The place of supply is where a transaction is considered to have occurred for VAT purposes. For the supply of goods, the place of supply is the location of the goods when the supply occurs. For the supply of services, the place of supply should be where the supplier is established. (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.
pricebook_id
string
Unique identifier of the pricebook to be used for this purchase order. The pricebook contains predefined pricing information for items and services. This field is optional and if not specified, the default pricebook will be used. You can obtain the pricebook ID by listing all available pricebooks in your organization. Ensure the pricebook exists and contains the relevant pricing information before referencing its ID here.
reference_number
string
External reference number or identifier for the purchase order. This field is optional and can be used to store additional reference information such as vendor order numbers, internal tracking codes, or any other external system identifiers. This reference number will be displayed on the purchase order document and can be used for cross-referencing with external systems or internal tracking purposes.
discount
string
The discount amount or percentage to be applied to the purchase order total. This can be specified as a fixed amount or percentage value. Discounts are typically offered by vendors for bulk purchases, early payments, or promotional purposes. The discount reduces the total amount payable and affects the final purchase order total.
discount_account_id
string
Unique identifier of the accounting account where the discount amount will be recorded. This account is used to track and categorize discount expenses in your general ledger. The discount account should be configured as an expense or contra-revenue account to properly reflect the impact of discounts on your financial statements.
is_discount_before_tax
boolean
Boolean flag that determines whether the discount is applied before or after tax calculations. When set to true, the discount is applied to the subtotal before tax is calculated, resulting in tax being calculated on the discounted amount. When set to false, the discount is applied after tax calculations, which may affect the final total differently depending on your tax configuration.
billing_address_id
long
Unique identifier of the billing address to be used for this purchase order. The billing address determines where invoices and related documents will be sent. This field is optional and if not specified, the default billing address from your organization settings will be used. You can obtain the billing address ID by listing all available addresses in your organization. Ensure the address exists and contains the correct billing information before referencing its ID here.
crm_owner_id
string
Unique identifier of the CRM owner assigned to this purchase order. This field links the purchase order to a specific CRM user who is responsible for managing the vendor relationship and overseeing the procurement process. The CRM owner can track, follow up, and manage all aspects of this purchase order within the CRM system.
crm_custom_reference_id
long
ID of CRM Custom Reference
template_id
string
Unique identifier of the PDF template linked to the purchase order. Obtain this value from the `template_id` field in the response of the GET `/purchaseorders/templates` API for your organization. Determines which template is used for the purchase order PDF document, controlling the layout, formatting, and visual appearance of the generated purchase order.
date
string
The date when the purchase order was created or issued. This is the official date that appears on the purchase order document and is used for record-keeping, reporting, and tracking purposes. The date should be in YYYY-MM-DD format and typically represents when the purchase order was authorized and sent to the vendor.
delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format and is typically communicated to the vendor as part of the purchase order terms.
due_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.
exchange_rate
double
The currency exchange rate used to convert the purchase order amounts from the vendor's currency to your organization's base currency. This rate is applied when the purchase order is created in a foreign currency. A value of 1 indicates the same currency as your base currency. This rate affects all monetary calculations and reporting for this purchase order.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
Boolean flag that specifies whether the line item rates include or exclude tax amounts. When set to true, the specified rates are inclusive of tax, meaning the tax amount is already included in the rate. When set to false, the rates are exclusive of tax, and tax will be calculated and added separately. This setting affects how tax calculations are performed and displayed on the purchase order.
notes
string
Additional information, instructions, or comments to be displayed on the purchase order document. This field is typically used for delivery instructions, special requirements, vendor communications, or any other information relevant to the purchase order. The notes appear on the purchase order PDF and are visible to the vendor.
notes_default
string
Default notes for purchase order
terms
string
Terms and conditions text to be displayed on the purchase order document. This field is used to specify payment terms, delivery conditions, return policies, warranty information, or any other legal or business terms that apply to this transaction. The terms appear on the purchase order PDF and form part of the contractual agreement with the vendor.
terms_default
string
Default terms for Purchase Orders
ship_via
string
Shipment Preference
delivery_org_address_id
string
Unique identifier of the organization address where the goods or services from this purchase order should be delivered. This field specifies the delivery location within your organization, such as a warehouse, office, or branch location. The address details are retrieved from your organization's address book and displayed on the purchase order for vendor reference.
delivery_customer_id
string
Unique identifier of the customer for whom the goods or services in this purchase order are being procured. This field is used when the purchase order is created on behalf of a customer, such as in drop-shipping scenarios or when procuring items for specific customer projects. The customer information may be displayed on the purchase order for vendor reference.
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the purchase order. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor 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).
is_update_customer
string
Check if customer should be updated
salesorder_id
long
Unique identifier of the sales order that is linked to this purchase order. This field establishes a connection between the sales order and purchase order, typically used in drop-shipping scenarios where you need to procure items to fulfill a customer's sales order. The linked sales order information may be displayed on the purchase order for vendor reference and internal tracking purposes.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
line_items
array
(Required)
Line items of purchase order.
Show Sub-Attributes arrow
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
Unique identifier of the item or service in the line item. Mandatory field that links to the item catalog. Determines item details, pricing, and inventory tracking. Obtain from GET /items API.
account_id
string
Unique identifier of the accounting account for the line item. Mandatory for non-inventory items/services. Determines expense categorization in general ledger.
name
string
Display name of the line item on the purchase order. Auto-populated from item catalog when item_id is specified. Can be customized. Used for vendor reference and documentation.
description
string
Additional details, specifications, or notes about the line item. Can include technical specs, requirements, delivery instructions. Appears on purchase order document for vendor reference.
unit
string
Unit of measurement for the quantity (e.g., Nos, kgs, hours, meters). Should match vendor pricing structure. Used for quantity calculations and pricing.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
hsn_or_sac
string
🇮🇳 India
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
HSN or SAC Code for the Item
reverse_charge_tax_id
string
Unique identifier of the reverse charge tax for the line item. Used when buyer is responsible for paying tax instead of vendor. Applicable for unregistered vendors or specific tax regulations. Must reference valid reverse charge tax configuration.
rate
double
Unit price per item/service. Used to calculate total line item amount. Must be in purchase order currency. Tax inclusion depends on is_inclusive_tax setting. Affects pricing calculations and vendor billing.
quantity
string
Number of units being ordered. Used with rate to calculate total line item amount. Must match unit of measurement. Represents actual order quantity for delivery.
item_order
integer
Sequential order of line item within purchase order. Determines display order on documents and reports. Typically numbered sequentially from 0 or 1. Maintains consistency across related documents.
tax_id
string
Unique identifier of the tax for the line item. Determines tax rate, name, and treatment for calculations. Used in tax amount computation and display on purchase order. Obtain from taxes API.
tds_tax_id
string
🇲🇽 Mexico
only
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 KSA are ksa_reimbursed_expense.
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
acquisition_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the VAT Acquistion
reverse_charge_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the Reverse Charge
item_custom_fields
array
Show Sub-Attributes arrow
index
integer
Index of the Custom Field
value
string
Value of the Custom Field
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
project_id
string
ID of the project
custom_fields
array
Custom fields for purchase order.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
documents
array
Array of documents attached to the purchase order.
Show Sub-Attributes arrow
document_id
long
ID of the Document
file_name
string
Name of the attached document file. Includes file extension and represents the original filename as uploaded. Used for display purposes and file identification in the system.

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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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
{ "vendor_id": "460000000026049", "currency_id": "460000000000099", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "purchaseorder_number": "PO-00001", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "reference_number": "ER/0034", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "billing_address_id": "460000000017491", "crm_owner_id": "string", "crm_custom_reference_id": 0, "template_id": "460000000011003", "date": "2014-02-10", "delivery_date": "2014-02-10", "due_date": "string", "exchange_rate": 1, "is_inclusive_tax": false, "notes": "Please deliver as soon as possible.", "notes_default": "string", "terms": "Thanks for your business.", "terms_default": "string", "ship_via": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "attention": "string", "vat_treatment": "string", "is_update_customer": "string", "salesorder_id": "460000124728314", "location_id": "460000000038080", "line_items": [ { "line_item_id": "460000000074009", "item_id": "460000000027009", "account_id": "460000000074003", "name": "Hard Drive", "description": "string", "unit": "Nos", "location_id": "460000000038080", "hsn_or_sac": "string", "reverse_charge_tax_id": 460000000026068, "rate": 112, "quantity": 1, "item_order": 0, "tax_id": "string", "tds_tax_id": 90300000087370, "tax_treatment_code": "uae_others", "tax_exemption_code": "string", "tax_exemption_id": "string", "acquisition_vat_id": "string", "reverse_charge_vat_id": "string", "item_custom_fields": [ { "index": 1, "value": "Normal" } ], "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "project_id": 90300000087378 } ], "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "documents": [ { "document_id": 0, "file_name": "string" } ] }

Response Example

{ "code": 0, "message": "Purchase Order has been updated.", "purchaseorder": { "purchaseorder_id": "460000000062001", "documents": [ { "document_id": 0, "file_name": "string" } ], "vat_treatment": "string", "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "is_pre_gst": false, "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "pricebook_name": "", "is_reverse_charge_applied": false, "purchaseorder_number": "PO-00001", "date": "2014-02-10", "expected_delivery_date": "string", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "reference_number": "ER/0034", "status": "draft", "vendor_id": "460000000026049", "vendor_name": "string", "crm_owner_id": "string", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "contact_person_name": "Peter", "first_name": "Peter", "last_name": "Parker", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-929-7211", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "currency_id": "460000000000099", "currency_code": "INR", "currency_symbol": "string", "exchange_rate": 1, "delivery_date": "2014-02-10", "is_emailed": false, "is_inclusive_tax": false, "location_id": "460000000038080", "location_name": "string", "line_items": [ { "item_id": "460000000027009", "line_item_id": "460000000074009", "sku": "string", "location_id": "460000000038080", "location_name": "string", "product_type": "string", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "account_id": "460000000074003", "account_name": "Other Expenses", "name": "Hard Drive", "description": "string", "item_order": 0, "bcy_rate": 40, "unit": "Nos", "rate": 112, "quantity": 1, "item_total": 40, "item_total_inclusive_of_tax": 40, "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_id": "string", "tax_treatment_code": "uae_others", "tax_name": "string", "tax_type": "tax", "tax_percentage": 0, "hsn_or_sac": "string", "acquisition_vat_id": "string", "acquisition_vat_name": "string", "acquisition_vat_percentage": "string", "acquisition_vat_amount": "string", "reverse_charge_vat_id": "string", "reverse_charge_vat_name": "string", "reverse_charge_vat_percentage": "string", "reverse_charge_vat_amount": "string", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "project_id": 90300000087378, "project_name": "Sample Project" } ], "sub_total": 40, "tax_total": 0, "total": 40, "taxes": [ "string" ], "acquisition_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "acquisition_vat_total": 0.1, "reverse_charge_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "reverse_charge_vat_total": 0.1, "billing_address": { "address": "string", "street2": "McMillan Avenue", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string" }, "notes": "Please deliver as soon as possible.", "terms": "Thanks for your business.", "ship_via": "string", "ship_via_id": "string", "attention": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "delivery_address": { "zip": "string", "is_verifiable": true, "state": "string", "address1": "string", "address2": "string", "is_valid": "string", "city": "string", "country": "string", "address": "string", "email": "peterparker@bowmanfurniture.com", "is_primary": "string", "organization_address_id": "string", "phone": "+1-925-929-7211", "is_verified": false }, "price_precision": 2, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "attachment_name": "7.png", "can_send_in_mail": false, "template_id": "460000000011003", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-02-10T15:26:26+0530", "created_by_id": "460000000053001", "last_modified_time": "2014-02-10T15:26:26+0530", "can_mark_as_bill": false, "can_mark_as_unbill": false } }

List purchase orders

List all purchase orders.
OAuth Scope : ZohoBooks.purchaseorders.READ

Query Parameters

organization_id
string
(Required)
ID of the organization
purchaseorder_number
string
Search purchase order by purchase order number. Variants: purchaseorder_number_startswith and purchaseorder_number_contains. Example: Locate specific PO by number or partial match.
reference_number
string
Search purchase order by reference number. Variants: reference_number_startswith and reference_number_contains. Example: Monitor external vendor order numbers.
date
string
Search purchase order by creation date. Use YYYY-MM-DD format for exact date matching. Example: Retrieve POs created on specific date.
status
string
Search purchase order by status. Allowed values: draft, open, billed, cancelled. Example: Filter POs by current workflow state.
item_description
string
Search purchase order by item description. Variants: item_description_startswith and item_description_contains. Example: Discover POs containing specific items.
vendor_name
string
Search purchase order by vendor name. Variants: vendor_name_startswith and vendor_name_contains
total
double
Search purchase order by total amount. Variants: total_start, total_end, total_less_than, total_less_equals, total_greater_than, total_greater_equals. Example: Identify POs within price range.
vendor_id
string
Search purchase order by vendor ID. Use the unique identifier of the vendor to filter purchase orders. Example: Group POs by specific vendor.
last_modified_time
string
Search purchase order by last modified time. Use ISO 8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM). Example: Identify recently updated POs.
item_id
string
Search purchase order by item ID. Use the unique identifier of the specific item. Example: Locate all POs containing particular item.
filter_by
string
Filter purchase order by status. Allowed values: Status.All, Status.Draft, Status.Open, Status.Billed, Status.Cancelled. Example: Bulk status filtering for reporting.
search_text
string
Search purchase order by number, reference, or vendor name. General search across multiple fields. Example: Quick PO lookup without specific field.
sort_column
string
Sort purchase orders by column. Allowed values: vendor_name, purchaseorder_number, date, delivery_date, total, created_time. Example: Organize results for analysis.
custom_field
string
Search purchase order by purchase order’s custom field. Variants: custom_field_startswith, custom_field_contains
page
integer
Page number to be fetched. Default value is 1.
per_page
integer
Number of records to be fetched per page. Default value is 200.

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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?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/purchaseorders?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "purchaseorders": [ { "purchaseorder_id": "460000000062001", "vendor_id": "460000000026049", "vendor_name": "string", "status": "draft", "purchaseorder_number": "PO-00001", "reference_number": "ER/0034", "date": "2014-02-10", "delivery_date": "2014-02-10", "currency_id": "460000000000099", "currency_code": "INR", "price_precision": 2, "total": 40, "has_attachment": false, "created_time": "2014-02-10T15:26:26+0530", "last_modified_time": "2014-02-10T15:26:26+0530", "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ] }, {...}, {...} ] }

Update a purchase order

Update an existing purchase order.
OAuth Scope : ZohoBooks.purchaseorders.UPDATE

Arguments

vendor_id
string
(Required)
Unique identifier of the vendor for whom the purchase order is being created. This value is mandatory to associate the purchase order with a specific vendor in your organization. You can obtain the vendor ID by listing all vendors using the contacts API. Ensure the vendor exists before referencing their ID here.
currency_id
string
Unique identifier of the currency for the purchase order. This value is mandatory to specify the currency in which the purchase order amounts will be displayed and processed. You can obtain the currency ID by listing all available currencies using the GET /settings/currencies API. Ensure the currency exists and is properly configured in your organization before referencing its ID here.
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.
purchaseorder_number
string
Unique identifier for the purchase order. This field is mandatory when auto number generation is disabled for your organization. If auto numbering is enabled, this field can be left empty as the system will automatically generate a sequential purchase order number. When manually specifying a number, ensure it follows your organization's numbering convention and is unique across all purchase orders.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
GCC , 🇲🇽 Mexico
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
VAT treatment for the purchase order. Choose whether the vendor falls under: vat_registered,vat_not_registered,gcc_vat_not_registered,gcc_vat_registered,non_gcc.
dz_vat_registered and dz_vat_not_registered are 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).
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the vendor.
source_of_supply
string
🇮🇳 India
only
Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)
destination_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
place_of_supply
string
GCC only
The place of supply is where a transaction is considered to have occurred for VAT purposes. For the supply of goods, the place of supply is the location of the goods when the supply occurs. For the supply of services, the place of supply should be where the supplier is established. (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.
pricebook_id
string
Unique identifier of the pricebook to be used for this purchase order. The pricebook contains predefined pricing information for items and services. This field is optional and if not specified, the default pricebook will be used. You can obtain the pricebook ID by listing all available pricebooks in your organization. Ensure the pricebook exists and contains the relevant pricing information before referencing its ID here.
reference_number
string
External reference number or identifier for the purchase order. This field is optional and can be used to store additional reference information such as vendor order numbers, internal tracking codes, or any other external system identifiers. This reference number will be displayed on the purchase order document and can be used for cross-referencing with external systems or internal tracking purposes.
discount
string
The discount amount or percentage to be applied to the purchase order total. This can be specified as a fixed amount or percentage value. Discounts are typically offered by vendors for bulk purchases, early payments, or promotional purposes. The discount reduces the total amount payable and affects the final purchase order total.
discount_account_id
string
Unique identifier of the accounting account where the discount amount will be recorded. This account is used to track and categorize discount expenses in your general ledger. The discount account should be configured as an expense or contra-revenue account to properly reflect the impact of discounts on your financial statements.
is_discount_before_tax
boolean
Boolean flag that determines whether the discount is applied before or after tax calculations. When set to true, the discount is applied to the subtotal before tax is calculated, resulting in tax being calculated on the discounted amount. When set to false, the discount is applied after tax calculations, which may affect the final total differently depending on your tax configuration.
billing_address_id
long
Unique identifier of the billing address to be used for this purchase order. The billing address determines where invoices and related documents will be sent. This field is optional and if not specified, the default billing address from your organization settings will be used. You can obtain the billing address ID by listing all available addresses in your organization. Ensure the address exists and contains the correct billing information before referencing its ID here.
crm_owner_id
string
Unique identifier of the CRM owner assigned to this purchase order. This field links the purchase order to a specific CRM user who is responsible for managing the vendor relationship and overseeing the procurement process. The CRM owner can track, follow up, and manage all aspects of this purchase order within the CRM system.
crm_custom_reference_id
long
ID of CRM Custom Reference
template_id
string
Unique identifier of the PDF template linked to the purchase order. Obtain this value from the `template_id` field in the response of the GET `/purchaseorders/templates` API for your organization. Determines which template is used for the purchase order PDF document, controlling the layout, formatting, and visual appearance of the generated purchase order.
date
string
The date when the purchase order was created or issued. This is the official date that appears on the purchase order document and is used for record-keeping, reporting, and tracking purposes. The date should be in YYYY-MM-DD format and typically represents when the purchase order was authorized and sent to the vendor.
delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format and is typically communicated to the vendor as part of the purchase order terms.
due_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.
exchange_rate
double
The currency exchange rate used to convert the purchase order amounts from the vendor's currency to your organization's base currency. This rate is applied when the purchase order is created in a foreign currency. A value of 1 indicates the same currency as your base currency. This rate affects all monetary calculations and reporting for this purchase order.
is_inclusive_tax
boolean
Not applicable 🇺🇸 United States
Boolean flag that specifies whether the line item rates include or exclude tax amounts. When set to true, the specified rates are inclusive of tax, meaning the tax amount is already included in the rate. When set to false, the rates are exclusive of tax, and tax will be calculated and added separately. This setting affects how tax calculations are performed and displayed on the purchase order.
notes
string
Additional information, instructions, or comments to be displayed on the purchase order document. This field is typically used for delivery instructions, special requirements, vendor communications, or any other information relevant to the purchase order. The notes appear on the purchase order PDF and are visible to the vendor.
notes_default
string
Default notes for purchase order
terms
string
Terms and conditions text to be displayed on the purchase order document. This field is used to specify payment terms, delivery conditions, return policies, warranty information, or any other legal or business terms that apply to this transaction. The terms appear on the purchase order PDF and form part of the contractual agreement with the vendor.
terms_default
string
Default terms for Purchase Orders
ship_via
string
Shipment Preference
delivery_org_address_id
string
Unique identifier of the organization address where the goods or services from this purchase order should be delivered. This field specifies the delivery location within your organization, such as a warehouse, office, or branch location. The address details are retrieved from your organization's address book and displayed on the purchase order for vendor reference.
delivery_customer_id
string
Unique identifier of the customer for whom the goods or services in this purchase order are being procured. This field is used when the purchase order is created on behalf of a customer, such as in drop-shipping scenarios or when procuring items for specific customer projects. The customer information may be displayed on the purchase order for vendor reference.
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the purchase order. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is uk. If the vendor 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).
is_update_customer
string
Check if customer should be updated
salesorder_id
long
Unique identifier of the sales order that is linked to this purchase order. This field establishes a connection between the sales order and purchase order, typically used in drop-shipping scenarios where you need to procure items to fulfill a customer's sales order. The linked sales order information may be displayed on the purchase order for vendor reference and internal tracking purposes.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
line_items
array
(Required)
Line items of purchase order.
Show Sub-Attributes arrow
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
Unique identifier of the item or service in the line item. Mandatory field that links to the item catalog. Determines item details, pricing, and inventory tracking. Obtain from GET /items API.
account_id
string
Unique identifier of the accounting account for the line item. Mandatory for non-inventory items/services. Determines expense categorization in general ledger.
name
string
Display name of the line item on the purchase order. Auto-populated from item catalog when item_id is specified. Can be customized. Used for vendor reference and documentation.
description
string
Additional details, specifications, or notes about the line item. Can include technical specs, requirements, delivery instructions. Appears on purchase order document for vendor reference.
unit
string
Unit of measurement for the quantity (e.g., Nos, kgs, hours, meters). Should match vendor pricing structure. Used for quantity calculations and pricing.
location_id
string
Unique identifier of the business location or branch where this purchase order is being created and managed. This field is used to associate the purchase order with a specific location within your organization, enabling location-based reporting, inventory tracking, and multi-location business operations. The location information affects how the purchase order is processed and where inventory is received.
hsn_or_sac
string
🇮🇳 India
, 🇰🇪 Kenya
, 🇿🇦 South Africa
only
HSN or SAC Code for the Item
reverse_charge_tax_id
string
Unique identifier of the reverse charge tax for the line item. Used when buyer is responsible for paying tax instead of vendor. Applicable for unregistered vendors or specific tax regulations. Must reference valid reverse charge tax configuration.
rate
double
Unit price per item/service. Used to calculate total line item amount. Must be in purchase order currency. Tax inclusion depends on is_inclusive_tax setting. Affects pricing calculations and vendor billing.
quantity
string
Number of units being ordered. Used with rate to calculate total line item amount. Must match unit of measurement. Represents actual order quantity for delivery.
item_order
integer
Sequential order of line item within purchase order. Determines display order on documents and reports. Typically numbered sequentially from 0 or 1. Maintains consistency across related documents.
tax_id
string
Unique identifier of the tax for the line item. Determines tax rate, name, and treatment for calculations. Used in tax amount computation and display on purchase order. Obtain from taxes API.
tds_tax_id
string
🇲🇽 Mexico
only
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 KSA are ksa_reimbursed_expense.
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
acquisition_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the VAT Acquistion
reverse_charge_vat_id
string
🇬🇧 United Kingdom
, Europe only
ID of the Reverse Charge
item_custom_fields
array
Show Sub-Attributes arrow
index
integer
Index of the Custom Field
value
string
Value of the Custom Field
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
project_id
string
ID of the project
custom_fields
array
Custom fields for purchase order.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
documents
array
Array of documents attached to the purchase order.
Show Sub-Attributes arrow
document_id
long
ID of the Document
file_name
string
Name of the attached document file. Includes file extension and represents the original filename as uploaded. Used for display purposes and file identification in the system.

Path Parameters

purchase_order_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
attachment
binary
Allowed Extensions: gif, png, jpeg, jpg, bmp, pdf, xls, xlsx, doc and docx.
ignore_auto_number_generation
boolean
Ignore auto purchase order number generation for this purchase order. This mandates the purchase order number.

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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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
{ "vendor_id": "460000000026049", "currency_id": "460000000000099", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "purchaseorder_number": "PO-00001", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "reference_number": "ER/0034", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "billing_address_id": "460000000017491", "crm_owner_id": "string", "crm_custom_reference_id": 0, "template_id": "460000000011003", "date": "2014-02-10", "delivery_date": "2014-02-10", "due_date": "string", "exchange_rate": 1, "is_inclusive_tax": false, "notes": "Please deliver as soon as possible.", "notes_default": "string", "terms": "Thanks for your business.", "terms_default": "string", "ship_via": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "attention": "string", "vat_treatment": "string", "is_update_customer": "string", "salesorder_id": "460000124728314", "location_id": "460000000038080", "line_items": [ { "line_item_id": "460000000074009", "item_id": "460000000027009", "account_id": "460000000074003", "name": "Hard Drive", "description": "string", "unit": "Nos", "location_id": "460000000038080", "hsn_or_sac": "string", "reverse_charge_tax_id": 460000000026068, "rate": 112, "quantity": 1, "item_order": 0, "tax_id": "string", "tds_tax_id": 90300000087370, "tax_treatment_code": "uae_others", "tax_exemption_code": "string", "tax_exemption_id": "string", "acquisition_vat_id": "string", "reverse_charge_vat_id": "string", "item_custom_fields": [ { "index": 1, "value": "Normal" } ], "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "project_id": 90300000087378 } ], "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "documents": [ { "document_id": 0, "file_name": "string" } ] }

Response Example

{ "code": 0, "message": "Purchase Order has been updated.", "purchaseorder": { "purchaseorder_id": "460000000062001", "documents": [ { "document_id": 0, "file_name": "string" } ], "vat_treatment": "string", "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "is_pre_gst": false, "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "pricebook_name": "", "is_reverse_charge_applied": false, "purchaseorder_number": "PO-00001", "date": "2014-02-10", "expected_delivery_date": "string", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "reference_number": "ER/0034", "status": "draft", "vendor_id": "460000000026049", "vendor_name": "string", "crm_owner_id": "string", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "contact_person_name": "Peter", "first_name": "Peter", "last_name": "Parker", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-929-7211", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "currency_id": "460000000000099", "currency_code": "INR", "currency_symbol": "string", "exchange_rate": 1, "delivery_date": "2014-02-10", "is_emailed": false, "is_inclusive_tax": false, "location_id": "460000000038080", "location_name": "string", "line_items": [ { "item_id": "460000000027009", "line_item_id": "460000000074009", "sku": "string", "location_id": "460000000038080", "location_name": "string", "product_type": "string", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "account_id": "460000000074003", "account_name": "Other Expenses", "name": "Hard Drive", "description": "string", "item_order": 0, "bcy_rate": 40, "unit": "Nos", "rate": 112, "quantity": 1, "item_total": 40, "item_total_inclusive_of_tax": 40, "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_id": "string", "tax_treatment_code": "uae_others", "tax_name": "string", "tax_type": "tax", "tax_percentage": 0, "hsn_or_sac": "string", "acquisition_vat_id": "string", "acquisition_vat_name": "string", "acquisition_vat_percentage": "string", "acquisition_vat_amount": "string", "reverse_charge_vat_id": "string", "reverse_charge_vat_name": "string", "reverse_charge_vat_percentage": "string", "reverse_charge_vat_amount": "string", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "project_id": 90300000087378, "project_name": "Sample Project" } ], "sub_total": 40, "tax_total": 0, "total": 40, "taxes": [ "string" ], "acquisition_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "acquisition_vat_total": 0.1, "reverse_charge_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "reverse_charge_vat_total": 0.1, "billing_address": { "address": "string", "street2": "McMillan Avenue", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string" }, "notes": "Please deliver as soon as possible.", "terms": "Thanks for your business.", "ship_via": "string", "ship_via_id": "string", "attention": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "delivery_address": { "zip": "string", "is_verifiable": true, "state": "string", "address1": "string", "address2": "string", "is_valid": "string", "city": "string", "country": "string", "address": "string", "email": "peterparker@bowmanfurniture.com", "is_primary": "string", "organization_address_id": "string", "phone": "+1-925-929-7211", "is_verified": false }, "price_precision": 2, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "attachment_name": "7.png", "can_send_in_mail": false, "template_id": "460000000011003", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-02-10T15:26:26+0530", "created_by_id": "460000000053001", "last_modified_time": "2014-02-10T15:26:26+0530", "can_mark_as_bill": false, "can_mark_as_unbill": false } }

Get a purchase order

Get the details of a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.READ

Path Parameters

purchase_order_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 purchase order in formats such as json/ pdf/ html. Default format is json. Allowed Values: json, pdf 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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "purchaseorder": { "purchaseorder_id": "460000000062001", "documents": [ { "document_id": 0, "file_name": "string" } ], "vat_treatment": "string", "gst_no": "22AAAAA0000A1Z5", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "is_pre_gst": false, "source_of_supply": "AP", "destination_of_supply": "TN", "place_of_supply": "DU", "pricebook_id": 460000000026089, "pricebook_name": "", "is_reverse_charge_applied": false, "purchaseorder_number": "PO-00001", "date": "2014-02-10", "expected_delivery_date": "string", "discount": "10", "discount_account_id": "460000000011105", "is_discount_before_tax": true, "reference_number": "ER/0034", "status": "draft", "vendor_id": "460000000026049", "vendor_name": "string", "crm_owner_id": "string", "contact_persons_associated": [ { "contact_person_id": 460000000031001, "contact_person_name": "Peter", "first_name": "Peter", "last_name": "Parker", "contact_person_email": "willsmith@bowmanfurniture.com", "phone": "+1-925-929-7211", "mobile": "+1-4054439562", "communication_preference": { "is_email_enabled": true, "is_whatsapp_enabled": true } } ], "currency_id": "460000000000099", "currency_code": "INR", "currency_symbol": "string", "exchange_rate": 1, "delivery_date": "2014-02-10", "is_emailed": false, "is_inclusive_tax": false, "location_id": "460000000038080", "location_name": "string", "line_items": [ { "item_id": "460000000027009", "line_item_id": "460000000074009", "sku": "string", "location_id": "460000000038080", "location_name": "string", "product_type": "string", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "account_id": "460000000074003", "account_name": "Other Expenses", "name": "Hard Drive", "description": "string", "item_order": 0, "bcy_rate": 40, "unit": "Nos", "rate": 112, "quantity": 1, "item_total": 40, "item_total_inclusive_of_tax": 40, "tax_exemption_id": "string", "tax_exemption_code": "string", "tax_id": "string", "tax_treatment_code": "uae_others", "tax_name": "string", "tax_type": "tax", "tax_percentage": 0, "hsn_or_sac": "string", "acquisition_vat_id": "string", "acquisition_vat_name": "string", "acquisition_vat_percentage": "string", "acquisition_vat_amount": "string", "reverse_charge_vat_id": "string", "reverse_charge_vat_name": "string", "reverse_charge_vat_percentage": "string", "reverse_charge_vat_amount": "string", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "project_id": 90300000087378, "project_name": "Sample Project" } ], "sub_total": 40, "tax_total": 0, "total": 40, "taxes": [ "string" ], "acquisition_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "acquisition_vat_total": 0.1, "reverse_charge_vat_summary": [ { "tax_name": "string", "tax_amount": 0.1 } ], "reverse_charge_vat_total": 0.1, "billing_address": { "address": "string", "street2": "McMillan Avenue", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string" }, "notes": "Please deliver as soon as possible.", "terms": "Thanks for your business.", "ship_via": "string", "ship_via_id": "string", "attention": "string", "delivery_org_address_id": "string", "delivery_customer_id": "string", "delivery_address": { "zip": "string", "is_verifiable": true, "state": "string", "address1": "string", "address2": "string", "is_valid": "string", "city": "string", "country": "string", "address": "string", "email": "peterparker@bowmanfurniture.com", "is_primary": "string", "organization_address_id": "string", "phone": "+1-925-929-7211", "is_verified": false }, "price_precision": 2, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "attachment_name": "7.png", "can_send_in_mail": false, "template_id": "460000000011003", "template_name": "Standard Template", "page_width": "8.27in", "page_height": "11.69in", "orientation": "portrait", "template_type": "standard", "created_time": "2014-02-10T15:26:26+0530", "created_by_id": "460000000053001", "last_modified_time": "2014-02-10T15:26:26+0530", "can_mark_as_bill": false, "can_mark_as_unbill": false } }

Delete purchase order

Delete an existing purchase order.
OAuth Scope : ZohoBooks.purchaseorders.DELETE

Path Parameters

purchase_order_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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?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/purchaseorders/460000000062001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Update custom field in existing purchaseorders

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

Arguments

customfield_id
long
value
string
Value of the Custom Field

Path Parameters

purchaseorder_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/purchaseorder/460000000062001/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/purchaseorder/460000000062001/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/purchaseorder/460000000062001/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/purchaseorder/460000000062001/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/purchaseorder/460000000062001/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/purchaseorder/460000000062001/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": "46000000012845", "value": "Normal" } ]

Response Example

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

Mark a purchase order as open

Mark a draft purchase order as open.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/status/open?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The purchase order has been marked as open." }

Mark as billed

Mark a purchase order as billed.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/status/billed?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/purchaseorders/460000000062001/status/billed?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/purchaseorders/460000000062001/status/billed?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/purchaseorders/460000000062001/status/billed?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/purchaseorders/460000000062001/status/billed?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/purchaseorders/460000000062001/status/billed?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The purchase order has been marked as billed." }

Cancel a purchase order

Mark a purchase order as cancelled.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/status/cancelled?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/purchaseorders/460000000062001/status/cancelled?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/purchaseorders/460000000062001/status/cancelled?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/purchaseorders/460000000062001/status/cancelled?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/purchaseorders/460000000062001/status/cancelled?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/purchaseorders/460000000062001/status/cancelled?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The purchase order has been cancelled." }

Submit a purchase order for approval

Submit a purchase order for approval.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/submit?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Approve a purchase order

Approve a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/approve?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Email a purchase order

Email a purchase order to the vendor. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Arguments

send_from_org_email_id
boolean
Boolean to trigger the email from the organization's email address.
from_address_id
long
ID of From Address of the 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 cced.
bcc_mail_ids
array
Array of email address of the recipients to be BCC ed.
subject
string
Subject of the mail.
body
string
(Required)
Body of the mail
mail_documents
array
Show Sub-Attributes arrow
document_id
long
ID of the Document
file_name
string
Name of the attached document file. Includes file extension and represents the original filename as uploaded. Used for display purposes and file identification in the system.

Path Parameters

purchaseorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
attachments
binary
The files to be attached with the email.
send_attachment
boolean
Send the purchase 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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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
{ "send_from_org_email_id": true, "from_address_id": "460000008392548", "to_mail_ids": [ "willsmith@bowmanfurniture.com" ], "cc_mail_ids": [ "peterparker@bowmanfurniture.com" ], "bcc_mail_ids": [ "mark@safInstruments.com" ], "subject": "Purchase Order from Zillium Inc (PO #: PO-00001)", "body": "Dear Bowman and Co, <br><br>The purchase order (PO-00001) is attached with this email. <br><br>An overview of the purchase order is available below: <br>Purchase Order # : PO-00001 <br>Date : 10 Feb 2014 <br>Amount : $112.00(in USD) <br><br>Please go through it and confirm the order. We look forward to working with you again<br><br><br><br>Regards<br><br>Zillium Inc<br><br>", "mail_documents": [ { "document_id": 0, "file_name": "string" } ] }

Response Example

Get purchase order email content

Get the email content of a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.READ

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/email?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 purchase order alone.
OAuth Scope : ZohoBooks.purchaseorders.UPDATE

Arguments

address
string
Address associated with the Purchase Order
city
string
City involved in the Address
state
string
State Involved in the Address
zip
string
ZIP Code of the Address
country
string
Country involved in the Address
fax
string
Fax Number
attention
string
The name or designation of the specific person who should be contacted or notified regarding the delivery of goods or services from this purchase order. This field is typically used to specify the primary contact person at the delivery location, such as a warehouse manager, office administrator, or project coordinator who will receive and process the delivered items.
is_update_customer
string
Check if customer should be updated

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "fax": "string", "attention": "string", "is_update_customer": "string" }

Response Example

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

List purchase order templates

Get all purchase order pdf templates.
OAuth Scope : ZohoBooks.purchaseorders.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/purchaseorders/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/purchaseorders/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/purchaseorders/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/purchaseorders/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/purchaseorders/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/purchaseorders/templates?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Update purchase order template

Update the pdf template associated with the purchase order.
OAuth Scope : ZohoBooks.purchaseorders.UPDATE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/templates/460000000011003?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/purchaseorders/460000000062001/templates/460000000011003?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/purchaseorders/460000000062001/templates/460000000011003?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/purchaseorders/460000000062001/templates/460000000011003?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/purchaseorders/460000000062001/templates/460000000011003?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/purchaseorders/460000000062001/templates/460000000011003?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Purchase Order has been updated." }

Add attachment to a purchase order

Attach a file to a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Path Parameters

purchaseorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
attachment
binary
Allowed Extensions: gif, png, jpeg, jpg, bmp, pdf, xls, xlsx, doc and docx.

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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/attachment?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "The document has been attached." }

Update attachment preference

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

Path Parameters

purchaseorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
can_send_in_mail
boolean
(Required)
Boolean to send the attachment with the purchase order when emailed.

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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false" 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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false") .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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false', 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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false", 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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false", "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/purchaseorders/460000000062001/attachment?organization_id=10234695&can_send_in_mail=false' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Purchase Order has been updated." }

Get a purchase order attachment

Returns the file attached to the purchase order.
OAuth Scope : ZohoBooks.purchaseorders.READ

Path Parameters

purchaseorder_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
preview
boolean
Get the thumbnail of the attachment.

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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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 purchase order.
OAuth Scope : ZohoBooks.purchaseorders.DELETE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/attachment?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Add comment

Add a comment for a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.CREATE

Arguments

description
string
(Required)
The description of the comment.
expected_delivery_date
string
(Required)
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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.", "expected_delivery_date": "string" }

Response Example

{ "code": 0, "message": "Comments added.", "comment": { "comment_id": "460000000012345", "purchaseorder_id": "460000000062001", "description": "string", "commented_by_id": "string", "commented_by": "string", "comment_type": "system", "date": "2014-02-10", "date_description": "22 hours ago.", "time": "3.26PM" } }

List purchase order comments & history

Get the complete history and comments of purchase order.
OAuth Scope : ZohoBooks.purchaseorders.READ

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/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/purchaseorders/460000000062001/comments?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "comments": [ { "comment_id": "460000000012345", "description": "string", "commented_by_id": "string", "commented_by": "string", "comment_type": "system", "date": "2014-02-10", "date_description": "22 hours ago.", "time": "3.26PM", "operation_type": "Updated", "transaction_id": "string", "transaction_type": "purchaseorder" }, {...}, {...} ] }

Update comment

Update an existing comment of a purchase order.
OAuth Scope : ZohoBooks.purchaseorders.UPDATE

Arguments

description
string
The description of the comment.
expected_delivery_date
string
The expected delivery date when the goods or services ordered in this purchase order should be received. This date is used for planning, scheduling, and tracking deliveries. It helps in managing inventory, coordinating with vendors, and ensuring timely receipt of ordered items. The date should be in YYYY-MM-DD format.

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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.", "expected_delivery_date": "string" }

Response Example

{ "code": 0, "message": "Comment has been updated." }

Delete a comment

Delete a purchase order comment.
OAuth Scope : ZohoBooks.purchaseorders.DELETE

Path Parameters

purchaseorder_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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?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/purchaseorders/460000000062001/comments/460000000012345?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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