API Docs
/
No Results Found
Purchase Orders

Purchase Orders

A purchase order is an official document that you issue to your vendors, indicating relevant information about what you want to buy, the quantity, the price agreed for that particular product or service.

Attribute

purchaseorder_id
long
Unique ID generated by the server for the Purchase Order.
documents
array
Purchase order can have files attached to them. Each attachment has the following attributes can_send_in_mail, file_name, file_type, file_size_formatted, attachment_order, document_id, file_size.
Show Sub-Attributes arrow
can_send_in_mail
boolean
Checks whether it can be sent in a mail or not.
file_name
string
This indicates the name of the file.
file_type
string
This indicates the type of the file.
file_size_formatted
string
This indicates the size of the formatted file.
attachment_order
integer
This indicates the chronological number of the attachment.
document_id
long
Unique ID generated by the server for the document. This is used as an identifier.
file_size
long
this indicates the size of the attached file.
purchaseorder_number
string
Purchase Order number.
date
string
Date of Purchase Order
expected_delivery_date
string
Expected date of delivery for the items ordered.
date_formatted
string
Indicates the date format.
expected_delivery_date_formatted
string
Indicates the date format.
delivery_date_formatted
string
Indicates the delivery date format.
status_formatted
string
Indicates the Format of the status.
billed_status
integer
Indiacates the Status of the bill.
is_emailed
boolean
Checks whether the purchase order has been emailed or not.
is_inclusive_tax
boolean
This indicates whether the tax is inclusive or not.
is_backorder
boolean
This indicates whether it is a Back order or not.
reference_number
string
Reference number of purchase order.
status
string
Status of Purchase Order.
vendor_id
long
Unique ID generated by the server for the vendor.
vendor_name
string
Name of the vendor.
contact_persons
array
Array of contact person IDs.
comments
array
History related to the purchase order.
Show Sub-Attributes arrow
comment_id
long
Unique ID generated by the server for the comment(history). This is used as an identifier.
purchaseorder_id
long
Unique ID generated by the server for the Purchase Order.
commented_by
string
Indicates the User who performed the action on the purchase oder
comment_type
string
Indicates the type of the action
date_description
string
Indicates the time duration since the action was performed
time
string
Indicates the time when the action was performed
operation_type
string
Type of operation performed
transaction_id
long
Unique ID generated by the server for the transaction. This is used as an identifier.
transaction_type
string
Indicates the type of the transaction.
currency_id
long
Unique ID generated by the server for the currency. This is used as an identifier.
currency_code
string
Currency code.
currency_symbol
string
The symbol for the selected currency.
exchange_rate
double
Exchange rate of the currency, with respect to the base currency.
delivery_date
string
Date of delivery of the product.
salesorder_id
long
Sales Order ID, in case of Drop Shipment.
is_drop_shipment
boolean
Default is FALSE, in case of drop shipment value must be TRUE.
custom_fields
array
Custom fields for a purchaseorder.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
line_items
array
List of line items in a purchase order
Show Sub-Attributes arrow
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
line_item_id
long
Unique ID generated by the server for each line item. This is used as an identifier.
account_id
long
Account ID of the item.
name
string
Name of the line item.
description
string
Description of the line item.
item_order
integer
The order of the line items, starts from 0 by default.
bcy_rate
double
Item rate in the organization's base currency.
purchase_rate
double
Purchase Price of the line item.
quantity
double
Quantity of the line item.
quantity_received
double
Quantity invoiced of the line item.
unit
string
Unit of line item.
item_total
double
Total of line item.
tax_id
long
Unique ID generated by the server for the tax. This is used as an identifier.
tds_tax_id
string
🇲🇽 Mexico
only
tax_name
string
Name of the tax applied on the line item.
tax_type
string
Denotes the type of the tax. This can either be a single tax or a tax group.
tax_percentage
double
Percentage of the tax.
image_id
double
Unique ID generated by the server for the item image. This is used an identifier.
image_name
string
Name of the image of the line item.
image_type
string
The type (file format) of the image.
reverse_charge_tax_id
string
Enter reverse charge tax ID
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.
hsn_or_sac
string
🇮🇳 India
only
HSN or SAC Code for the Item
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
warehouse_id
long
Unique ID generated by the server for the ware houses
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order. This is used for creating backorder or dropshipment
sub_total
double
Sub total of the Purchase Order.
sub_total_formatted
string
Format of the sub total.
tax_total
double
Tax total of the Purchase Order.
total
double
Total amount of the Purchase Order.
taxes
array
Number of taxes applied on the Purchase Order. Each tax contains: tax_name and tax_amount.
Show Sub-Attributes arrow
tax_name
string
Name of the tax applied on the line item.
tax_amount
double
Amount of the tax.
price_precision
integer
The precision level for the price's decimal point in a Purchase Order.
pricebook_id
string
Unique ID generated by the server for the Pricebook. This is used as an identifier.
billing_address
array
Customer's billing address. It contains - address, city, state, zip, country and fax.
Show Sub-Attributes arrow
address
string
Name of the street of the customer’s billing address.
city
string
Name of the city of the customer’s billing address.
state
string
Name of the state of the customer's billing address.
zip
string
Zip code of the customer’s billing address.
country
string
Name of the country of the customer’s billing address.
fax
string
Fax number of the customer’s billing address.
notes
string
Notes for the Purchase Order.
terms
string
Terms for the Purchase Order.
ship_via
string
Shipping method for the Purchase Order.
ship_via_id
long
Unique ID generated by the server. This is used as identifier.
attention
string
Name of the person, whose attention is required.
delivery_org_address_id
long
Unique ID generated by the server. This is used as identifier.
delivery_customer_id
long
Customer ID for delivery address
delivery_customer_name
string
Customer's name at the delivery address.
delivery_address
array
Customer's delivery address. It contains - address, city, state, zip, country and fax.
Show Sub-Attributes arrow
address
string
Name of the street of the customer’s billing address.
city
string
Name of the city of the customer’s billing address.
state
string
Name of the state of the customer's billing address.
zip
string
Zip code of the customer’s billing address.
country
string
Name of the country of the customer’s billing address.
fax
string
Fax number of the customer’s billing address.
attachment_name
string
Name of attached file with Purchase Order.
can_send_in_mail
boolean
Checks whether it can be sent in a mail or not.
template_id
long
Unique ID generated by the server for the Template. This is used as an identifier.
template_name
string
Name of the template used for the Purchase Order.
template_type
string
Type of Template used to create Purchase Order.
created_time
string
Time at which the Purchase Order was created.
last_modified_time
string
Time at which the Purchase Order details were last modified.
purchasereceives
array
Purchase receives for purchase order. Each Recieve contains- receive_id, receive_number, date and note.
Show Sub-Attributes arrow
receive_id
long
Unique ID generated by the server for the Purchase Receive. This is used as identifier.
receive_number
string
Number of the Purchase Receive.
date
string
Date of Purchase Order
notes
string
Notes for the Purchase Order.
line_items
array
List of line items in a purchase order
Show Sub-Attributes arrow
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
line_item_id
long
Unique ID generated by the server for each line item. This is used as an identifier.
account_id
long
Account ID of the item.
name
string
Name of the line item.
description
string
Description of the line item.
item_order
integer
The order of the line items, starts from 0 by default.
bcy_rate
double
Item rate in the organization's base currency.
purchase_rate
double
Purchase Price of the line item.
quantity
double
Quantity of the line item.
quantity_received
double
Quantity invoiced of the line item.
unit
string
Unit of line item.
item_total
double
Total of line item.
tax_id
long
Unique ID generated by the server for the tax. This is used as an identifier.
tds_tax_id
string
🇲🇽 Mexico
only
tax_name
string
Name of the tax applied on the line item.
tax_type
string
Denotes the type of the tax. This can either be a single tax or a tax group.
tax_percentage
double
Percentage of the tax.
image_id
double
Unique ID generated by the server for the item image. This is used an identifier.
image_name
string
Name of the image of the line item.
image_type
string
The type (file format) of the image.
reverse_charge_tax_id
string
Enter reverse charge tax ID
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.
hsn_or_sac
string
🇮🇳 India
only
HSN or SAC Code for the Item
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
warehouse_id
long
Unique ID generated by the server for the ware houses
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order. This is used for creating backorder or dropshipment
bills
array
Bills raised for purchase order. Each bill contains these fields: bill_id, bill_number, status, date, due_date, total, balance.
Show Sub-Attributes arrow
bill_id
long
Unique ID generated by the server. This is used as identifier.
bill_number
string
Bill number of Purchase Order.
status
string
Status of Purchase Order.
date
string
Date of Purchase Order
due_date
string
Due date of the Bill.
total
double
Total amount of the Purchase Order.
balance
double
Balance amount for the Bill.
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the 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)
is_pre_gst
boolean
🇮🇳 India
only
Applicable for transactions that fall before july 1, 2017
is_reverse_charge_applied
boolean
🇮🇳 India
only
Applicable for transactions where you pay reverse charge

Example

{ "purchaseorder_id": 4815000000044972, "documents": [ { "can_send_in_mail": true, "file_name": "sample.pdf", "file_type": "pdf", "file_size_formatted": "116.8 KB", "attachment_order": 1, "document_id": 16115000000096068, "file_size": 11957 } ], "purchaseorder_number": "PO-00002", "date": "2015-05-28", "expected_delivery_date": "2015-05-28", "date_formatted": "2015/05/28", "expected_delivery_date_formatted": "2015/05/28", "delivery_date_formatted": "2015/05/28", "status_formatted": "Draft", "billed_status": 1, "is_emailed": true, "is_inclusive_tax": false, "is_backorder": false, "reference_number": "REF-P-00002", "status": "Partially_Received", "vendor_id": 4815000000044080, "vendor_name": "Molly", "contact_persons": 4815000000044080, "comments": [ { "comment_id": 16115000000097016, "purchaseorder_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "purchaseorder" } ], "currency_id": 4815000000000097, "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "delivery_date": "2015-06-01", "salesorder_id": 4815000000044936, "is_drop_shipment": true, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "sub_total": 244, "sub_total_formatted": "string", "tax_total": 29, "total": 350, "taxes": [ { "tax_name": "Sales Tax", "tax_amount": 29 } ], "price_precision": 2, "pricebook_id": 4815000000044054, "billing_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "notes": "Sample Note", "terms": "Terms and Conditions", "ship_via": "FedEx", "ship_via_id": 4815000000044822, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "delivery_customer_name": "Tony", "delivery_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "attachment_name": "sample.pdf", "can_send_in_mail": true, "template_id": 4815000000017003, "template_name": "Standard", "template_type": "standard", "created_time": "2015-05-28T00:00:00.000Z", "last_modified_time": "2015-05-28T00:00:00.000Z", "purchasereceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ] } ], "bills": [ { "bill_id": 4815000000045067, "bill_number": "BL-00002", "status": "Partially_Received", "date": "2015-05-28", "due_date": "2015-06-28", "total": 350, "balance": 100 } ], "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "is_pre_gst": false, "is_reverse_charge_applied": false }

Create a Purchase Order

Creates a new Purchase Order in Zoho Inventory. Description about extra parameter ignore_auto_number_generation - Ignore auto purchase order number generation for this Purchase order. This mandates the Purchase Order number to be entered. Allowed Values true and false.
OAuth Scope : ZohoInventory.purchaseorders.CREATE

Arguments

purchaseorder_number
string
(Required)
Purchase Order number.
date
string
Date of Purchase Order
delivery_date
string
Date of delivery of the product.
reference_number
string
Reference number of purchase order.
ship_via
string
Shipping method for the Purchase Order.
vendor_id
long
(Required)
Unique ID generated by the server for the vendor.
salesorder_id
long
Sales Order ID, in case of Drop Shipment.
is_drop_shipment
boolean
Default is FALSE, in case of drop shipment value must be TRUE.
is_inclusive_tax
boolean
This indicates whether the tax is inclusive or not.
is_backorder
boolean
This indicates whether it is a Back order or not.
template_id
long
Unique ID generated by the server for the Template. This is used as an identifier.
contact_persons
array
Array of contact person IDs.
attention
string
Name of the person, whose attention is required.
delivery_org_address_id
long
Unique ID generated by the server. This is used as identifier.
delivery_customer_id
long
Customer ID for delivery address
notes
string
Notes for the Purchase Order.
terms
string
Terms for the Purchase Order.
exchange_rate
double
Exchange rate of the currency, with respect to the base currency.
custom_fields
array
Custom fields for a purchaseorder.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
line_items
array
(Required)
List of line items in a purchase order
Show Sub-Attributes arrow
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
account_id
long
Account ID of the item.
name
string
Name of the line item.
description
string
Description of the line item.
item_order
integer
The order of the line items, starts from 0 by default.
bcy_rate
double
Item rate in the organization's base currency.
purchase_rate
double
Purchase Price of the line item.
quantity
double
Quantity of the line item.
quantity_received
double
Quantity invoiced of the line item.
unit
string
Unit of line item.
item_total
double
Total of line item.
tax_id
long
Unique ID generated by the server for the tax. This is used as an identifier.
tds_tax_id
string
🇲🇽 Mexico
only
tax_name
string
Name of the tax applied on the line item.
tax_type
string
Denotes the type of the tax. This can either be a single tax or a tax group.
tax_percentage
double
Percentage of the tax.
image_id
double
Unique ID generated by the server for the item image. This is used an identifier.
image_name
string
Name of the image of the line item.
image_type
string
The type (file format) of the image.
reverse_charge_tax_id
string
Enter reverse charge tax ID
hsn_or_sac
string
🇮🇳 India
only
HSN or SAC Code for the Item
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
warehouse_id
long
Unique ID generated by the server for the ware houses
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order. This is used for creating backorder or dropshipment
documents
array
Purchase order can have files attached to them. Each attachment has the following attributes can_send_in_mail, file_name, file_type, file_size_formatted, attachment_order, document_id, file_size.
Show Sub-Attributes arrow
can_send_in_mail
boolean
Checks whether it can be sent in a mail or not.
file_name
string
This indicates the name of the file.
file_type
string
This indicates the type of the file.
file_size_formatted
string
This indicates the size of the formatted file.
attachment_order
integer
This indicates the chronological number of the attachment.
document_id
long
Unique ID generated by the server for the document. This is used as an identifier.
file_size
long
this indicates the size of the attached file.
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
🇲🇽 Mexico
only
VAT treatment for the purchase order. Choose whether the vendor falls under: home_country_mexico,border_region_mexico,non_mexico supported only for MX.
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)

Query Parameters

ignore_auto_number_generation
Ignore auto purchase order number generation for this purchase order. This mandates the purchase order number. Allowed values are true , false .

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/inventory/v1/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/inventory/v1/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/inventory/v1/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", "/inventory/v1/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": "/inventory/v1/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/inventory/v1/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
{ "purchaseorder_number": "PO-00002", "date": "2015-05-28", "delivery_date": "2015-06-01", "reference_number": "REF-P-00002", "ship_via": "FedEx", "vendor_id": 4815000000044080, "salesorder_id": 4815000000044936, "is_drop_shipment": true, "is_inclusive_tax": false, "is_backorder": false, "template_id": 4815000000017003, "contact_persons": 4815000000044080, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "notes": "Sample Note", "terms": "Terms and Conditions", "exchange_rate": 1, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "documents": [ { "can_send_in_mail": true, "file_name": "sample.pdf", "file_type": "pdf", "file_size_formatted": "116.8 KB", "attachment_order": 1, "document_id": 16115000000096068, "file_size": 11957 } ], "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN" }

Response Example

{ "code": 0, "message": "success", "purchase_order": { "purchaseorder_id": 4815000000044972, "documents": [ { "can_send_in_mail": true, "file_name": "sample.pdf", "file_type": "pdf", "file_size_formatted": "116.8 KB", "attachment_order": 1, "document_id": 16115000000096068, "file_size": 11957 } ], "purchaseorder_number": "PO-00002", "date": "2015-05-28", "expected_delivery_date": "2015-05-28", "date_formatted": "2015/05/28", "expected_delivery_date_formatted": "2015/05/28", "delivery_date_formatted": "2015/05/28", "status_formatted": "Draft", "billed_status": 1, "is_emailed": true, "is_inclusive_tax": false, "is_backorder": false, "reference_number": "REF-P-00002", "status": "Partially_Received", "vendor_id": 4815000000044080, "vendor_name": "Molly", "contact_persons": 4815000000044080, "comments": [ { "comment_id": 16115000000097016, "purchaseorder_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "purchaseorder" } ], "currency_id": 4815000000000097, "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "delivery_date": "2015-06-01", "salesorder_id": 4815000000044936, "is_drop_shipment": true, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "sub_total": 244, "sub_total_formatted": "string", "tax_total": 29, "total": 350, "taxes": [ { "tax_name": "Sales Tax", "tax_amount": 29 } ], "price_precision": 2, "pricebook_id": 4815000000044054, "billing_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "notes": "Sample Note", "terms": "Terms and Conditions", "ship_via": "FedEx", "ship_via_id": 4815000000044822, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "delivery_customer_name": "Tony", "delivery_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "attachment_name": "sample.pdf", "can_send_in_mail": true, "template_id": 4815000000017003, "template_name": "Standard", "template_type": "standard", "created_time": "2015-05-28T00:00:00.000Z", "last_modified_time": "2015-05-28T00:00:00.000Z", "purchasereceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ] } ], "bills": [ { "bill_id": 4815000000045067, "bill_number": "BL-00002", "status": "Partially_Received", "date": "2015-05-28", "due_date": "2015-06-28", "total": 350, "balance": 100 } ], "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "is_pre_gst": false, "is_reverse_charge_applied": false } }

List all Purchase Orders

Lists all the Purchase Orders present in Zoho Inventory.
OAuth Scope : ZohoInventory.purchaseorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/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/inventory/v1/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/inventory/v1/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", "/inventory/v1/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": "/inventory/v1/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/inventory/v1/purchaseorders?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "purchaseorders": [ { "purchaseorder_id": 4815000000044972, "vendor_id": 4815000000044080, "vendor_name": "Molly", "status": "Partially_Received", "purchaseorder_number": "PO-00002", "reference_number": "REF-P-00002", "date": "2015-05-28", "delivery_date": "2015-06-01", "currency_id": 4815000000000097, "currency_code": "USD", "price_precision": 2, "total": 350, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "created_time": "2015-05-28T00:00:00.000Z", "last_modified_time": "2015-05-28T00:00:00.000Z", "is_drop_shipment": true, "is_backorder": false, "receives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002" } ] }, {...}, {...} ] }

Update a Purchase Order

Updates a new Purchase Order in Zoho Inventory. Description about extra parameter ignore_auto_number_generation - Ignore auto Purchase order number generation for this Purchase Order. This mandates the Purchase Order number to be entered. Allowed Values true and false.
OAuth Scope : ZohoInventory.purchaseorders.UPDATE

Arguments

purchaseorder_number
string
(Required)
Purchase Order number.
date
string
Date of Purchase Order
expected_delivery_date
string
Expected date of delivery for the items ordered.
reference_number
string
Reference number of purchase order.
ship_via
string
Shipping method for the Purchase Order.
vendor_id
long
(Required)
Unique ID generated by the server for the vendor.
salesorder_id
long
Sales Order ID, in case of Drop Shipment.
is_drop_shipment
boolean
Default is FALSE, in case of drop shipment value must be TRUE.
contact_persons
array
Array of contact person IDs.
attention
string
Name of the person, whose attention is required.
delivery_org_address_id
long
Unique ID generated by the server. This is used as identifier.
delivery_customer_id
long
Customer ID for delivery address
notes
string
Notes for the Purchase Order.
terms
string
Terms for the Purchase Order.
exchange_rate
double
Exchange rate of the currency, with respect to the base currency.
custom_fields
array
Custom fields for a purchaseorder.
Show Sub-Attributes arrow
customfield_id
long
value
string
Value of the Custom Field
line_items
array
(Required)
List of line items in a purchase order
Show Sub-Attributes arrow
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
line_item_id
long
Unique ID generated by the server for each line item. This is used as an identifier.
account_id
long
Account ID of the item.
name
string
Name of the line item.
description
string
Description of the line item.
item_order
integer
The order of the line items, starts from 0 by default.
bcy_rate
double
Item rate in the organization's base currency.
purchase_rate
double
Purchase Price of the line item.
quantity
double
Quantity of the line item.
quantity_received
double
Quantity invoiced of the line item.
unit
string
Unit of line item.
item_total
double
Total of line item.
tax_id
long
Unique ID generated by the server for the tax. This is used as an identifier.
tax_name
string
Name of the tax applied on the line item.
tax_type
string
Denotes the type of the tax. This can either be a single tax or a tax group.
tax_percentage
double
Percentage of the tax.
image_id
double
Unique ID generated by the server for the item image. This is used an identifier.
image_name
string
Name of the image of the line item.
image_type
string
The type (file format) of the image.
reverse_charge_tax_id
string
Enter reverse charge tax ID
hsn_or_sac
string
🇮🇳 India
only
HSN or SAC Code for the Item
tax_exemption_code
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
, 🇲🇽 Mexico
only
Code of the Tax Exemption
warehouse_id
long
Unique ID generated by the server for the ware houses
tax_exemption_id
string
🇮🇳 India
, 🇦🇺 Australia
, 🇨🇦 Canada
only
ID of the Tax Exemption
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order. This is used for creating backorder or dropshipment
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
🇲🇽 Mexico
only
VAT treatment for the purchase order. Choose whether the vendor falls under: home_country_mexico,border_region_mexico,non_mexico supported only for MX.
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)

Query Parameters

ignore_auto_number_generation
Ignore auto purchase order number generation for this purchase order. This mandates the purchase order number. Allowed values are true , false .

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/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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", "/inventory/v1/purchaseorders/4815000000044972?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": "/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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
{ "purchaseorder_number": "PO-00002", "date": "2015-05-28", "expected_delivery_date": "2015-05-28", "reference_number": "REF-P-00002", "ship_via": "FedEx", "vendor_id": 4815000000044080, "salesorder_id": 4815000000044936, "is_drop_shipment": true, "contact_persons": 4815000000044080, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "notes": "Sample Note", "terms": "Terms and Conditions", "exchange_rate": 1, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN" }

Response Example

{ "code": 0, "message": "success", "purchase_order": { "purchaseorder_id": 4815000000044972, "purchaseorder_number": "PO-00002", "date": "2015-05-28", "expected_delivery_date": "2015-05-28", "reference_number": "REF-P-00002", "status": "Partially_Received", "vendor_id": 4815000000044080, "vendor_name": "Molly", "contact_persons": 4815000000044080, "currency_id": 4815000000000097, "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "delivery_date": "2015-06-01", "salesorder_id": 4815000000044936, "is_drop_shipment": true, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "sub_total": 244, "tax_total": 29, "total": 350, "taxes": [ { "tax_name": "Sales Tax", "tax_amount": 29 } ], "price_precision": 2, "pricebook_id": 4815000000044054, "billing_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "notes": "Sample Note", "terms": "Terms and Conditions", "ship_via": "FedEx", "ship_via_id": 4815000000044822, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "delivery_customer_name": "Tony", "delivery_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "attachment_name": "sample.pdf", "can_send_in_mail": true, "template_id": 4815000000017003, "template_name": "Standard", "template_type": "standard", "created_time": "2015-05-28T00:00:00.000Z", "last_modified_time": "2015-05-28T00:00:00.000Z", "purchasereceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ] } ], "bills": [ { "bill_id": 4815000000045067, "bill_number": "BL-00002", "status": "Partially_Received", "date": "2015-05-28", "due_date": "2015-06-28", "total": 350, "balance": 100 } ], "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "is_pre_gst": false, "is_reverse_charge_applied": false } }

Retrieve a Purchase Order

Retrieves the details for an existing Purchase Order.
OAuth Scope : ZohoInventory.purchaseorders.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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", "/inventory/v1/purchaseorders/4815000000044972?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": "/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "purchase_order": { "purchaseorder_id": 4815000000044972, "purchaseorder_number": "PO-00002", "date": "2015-05-28", "expected_delivery_date": "2015-05-28", "reference_number": "REF-P-00002", "status": "Partially_Received", "vendor_id": 4815000000044080, "vendor_name": "Molly", "contact_persons": 4815000000044080, "currency_id": 4815000000000097, "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "delivery_date": "2015-06-01", "salesorder_id": 4815000000044936, "is_drop_shipment": true, "is_backorder": false, "custom_fields": [ { "customfield_id": "46000000012845", "value": "Normal" } ], "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ], "sub_total": 244, "tax_total": 29, "total": 350, "taxes": [ { "tax_name": "Sales Tax", "tax_amount": 29 } ], "price_precision": 2, "pricebook_id": 4815000000044054, "billing_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "notes": "Sample Note", "terms": "Terms and Conditions", "ship_via": "FedEx", "ship_via_id": 4815000000044822, "attention": "Tony", "delivery_org_address_id": 4815000000044077, "delivery_customer_id": 4815000000044066, "delivery_customer_name": "Tony", "delivery_address": [ { "address": "No:234,90 Church Street", "city": "New York City", "state": "New York", "zip": 10048, "country": "U.S.A", "fax": "324-524242" } ], "attachment_name": "sample.pdf", "can_send_in_mail": true, "template_id": 4815000000017003, "template_name": "Standard", "template_type": "standard", "created_time": "2015-05-28T00:00:00.000Z", "last_modified_time": "2015-05-28T00:00:00.000Z", "purchasereceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "item_id": 4815000000044100, "line_item_id": 4815000000044897, "account_id": 4815000000035003, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "item_order": 0, "bcy_rate": 122, "purchase_rate": 122, "quantity": 2, "quantity_received": 2, "unit": "qty", "item_total": 244, "tax_id": 4815000000044043, "tds_tax_id": 90300000087370, "tax_name": "Sales Tax", "tax_type": "tax", "tax_percentage": 12, "image_id": 2077500000000002000, "image_name": "dell.jpg", "image_type": "jpg", "reverse_charge_tax_id": 460000000026068, "reverse_charge_tax_name": "inter", "reverse_charge_tax_percentage": 10, "reverse_charge_tax_amount": 100, "hsn_or_sac": "string", "tax_exemption_code": "string", "warehouse_id": 130426000000664020, "tax_exemption_id": "string", "salesorder_item_id": 4815000000044892 } ] } ], "bills": [ { "bill_id": 4815000000045067, "bill_number": "BL-00002", "status": "Partially_Received", "date": "2015-05-28", "due_date": "2015-06-28", "total": 350, "balance": 100 } ], "gst_treatment": "business_gst", "gst_no": "22AAAAA0000A1Z5", "source_of_supply": "AP", "destination_of_supply": "TN", "is_pre_gst": false, "is_reverse_charge_applied": false } }

Delete a Purchase Order

Deletes a Purchase Order from Zoho Inventory.
OAuth Scope : ZohoInventory.purchaseorders.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?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", "/inventory/v1/purchaseorders/4815000000044972?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": "/inventory/v1/purchaseorders/4815000000044972?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/inventory/v1/purchaseorders/4815000000044972?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Mark as Issued

Marks a Purchase Order as Issued.
OAuth Scope : ZohoInventory.purchaseorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/purchaseorders/4815000000044972/status/issued?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/inventory/v1/purchaseorders/4815000000044972/status/issued?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/inventory/v1/purchaseorders/4815000000044972/status/issued?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", "/inventory/v1/purchaseorders/4815000000044972/status/issued?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": "/inventory/v1/purchaseorders/4815000000044972/status/issued?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/inventory/v1/purchaseorders/4815000000044972/status/issued?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Mark as Cancelled

Marks a Purchase Order as Cancelled.
OAuth Scope : ZohoInventory.purchaseorders.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/purchaseorders/4815000000044972/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/inventory/v1/purchaseorders/4815000000044972/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/inventory/v1/purchaseorders/4815000000044972/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", "/inventory/v1/purchaseorders/4815000000044972/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": "/inventory/v1/purchaseorders/4815000000044972/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/inventory/v1/purchaseorders/4815000000044972/status/cancelled?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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