Bills
When your vendor supplies goods/services to you on credit, you’re sent an invoice that details the amount of money you owe him. You can record this as a bill in Zoho Inventory and track it until it’s paid.
Attribute
tax_name
and tax_amount
.address
, city
, state
, zip
, country
and fax
. business_gst
, business_none
, overseas
, consumer
.place of contact
given for the contact will be taken){
"bill_id": 4815000000045067,
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"unused_credits_payable_amount": 0,
"status": "paid",
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"due_by_days": 69,
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"price_precision": 2,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"reverse_charge_tax_name": "inter",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"taxes": [
{
"tax_name": "Purchase tax",
"tax_amount": 29
}
],
"vendor_credits_applied": 24,
"sub_total": 30,
"tax_total": 2,
"balance": 0,
"billing_address": [
{
"address": "No:234,90 Church Street",
"city": "New York City",
"state": "New York",
"zip": 10048,
"country": "U.S.A",
"fax": "324-524242"
}
],
"payments": [
{
"payment_id": 4815000000046039,
"bill_id": 4815000000045067,
"bill_payment_id": 4815000000046041,
"payment_mode": "Cash",
"payment_number": 2,
"description": "Sample Description",
"date": "2015-05-29",
"reference_number": "PO-00003",
"exchange_rate": 1,
"amount": 234,
"paid_through_account_id": 4815000000000361,
"paid_through_account_name": "Petty Cash",
"is_single_bill_payment": true
}
],
"vendor_credits": [
{
"vendor_credit_id": 4815000000046039,
"vendor_credit_bill_id": 4815000000768039,
"vendor_credit_number": 67258,
"date": "2015-05-29",
"amount": 234
}
],
"created_time": "2015-05-29T00:00:00.000Z",
"last_modified_time": "2015-05-29T00:00:00.000Z",
"reference_id": 4815000000000342,
"notes": "Sample Note",
"terms": "Term & Conditions",
"attachment_name": "sample-attachments",
"open_purchaseorders_count": 4,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN",
"is_pre_gst": false,
"is_reverse_charge_applied": true
}
Create a Bill
Creates a Bill in Zoho Inventory. Description about the extra parameter attachment
Allowed extensions are gif, png, jpeg, jpg, bmp and pdf.
OAuth Scope : ZohoInventory.bills.CREATE
Arguments
business_gst
, business_none
, overseas
, consumer
.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.place of contact
given for the contact will be taken)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/bills?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/bills?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/bills?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/bills?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/bills?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/bills?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"currency_id": 4815000000000097,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"notes": "Sample Note",
"terms": "Term & Conditions",
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN"
}
{
"code": 0,
"message": "The Bill has been created.",
"bill": {
"bill_id": 4815000000045067,
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"unused_credits_payable_amount": 0,
"status": "paid",
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"due_by_days": 69,
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"price_precision": 2,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"reverse_charge_tax_name": "inter",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"taxes": [
{
"tax_name": "Purchase tax",
"tax_amount": 29
}
],
"vendor_credits_applied": 24,
"sub_total": 30,
"tax_total": 2,
"balance": 0,
"billing_address": [
{
"address": "No:234,90 Church Street",
"city": "New York City",
"state": "New York",
"zip": 10048,
"country": "U.S.A",
"fax": "324-524242"
}
],
"payments": [
{
"payment_id": 4815000000046039,
"bill_id": 4815000000045067,
"bill_payment_id": 4815000000046041,
"payment_mode": "Cash",
"payment_number": 2,
"description": "Sample Description",
"date": "2015-05-29",
"reference_number": "PO-00003",
"exchange_rate": 1,
"amount": 234,
"paid_through_account_id": 4815000000000361,
"paid_through_account_name": "Petty Cash",
"is_single_bill_payment": true
}
],
"vendor_credits": [
{
"vendor_credit_id": 4815000000046039,
"vendor_credit_bill_id": 4815000000768039,
"vendor_credit_number": 67258,
"date": "2015-05-29",
"amount": 234
}
],
"created_time": "2015-05-29T00:00:00.000Z",
"last_modified_time": "2015-05-29T00:00:00.000Z",
"reference_id": 4815000000000342,
"notes": "Sample Note",
"terms": "Term & Conditions",
"attachment_name": "sample-attachments",
"open_purchaseorders_count": 4,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN",
"is_pre_gst": false,
"is_reverse_charge_applied": true
}
}
List all Bills.
Lists all the Bills in Zoho Inventory.
OAuth Scope : ZohoInventory.bills.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/bills?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/bills?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/bills?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/bills?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/bills?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/bills?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"bills": [
{
"bill_id": 4815000000045067,
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"unused_credits_payable_amount": 0,
"status": "paid",
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"due_by_days": 69,
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"price_precision": 2,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"reverse_charge_tax_name": "inter",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"taxes": [
{
"tax_name": "Purchase tax",
"tax_amount": 29
}
],
"vendor_credits_applied": 24,
"sub_total": 30,
"tax_total": 2,
"balance": 0,
"billing_address": [
{
"address": "No:234,90 Church Street",
"city": "New York City",
"state": "New York",
"zip": 10048,
"country": "U.S.A",
"fax": "324-524242"
}
],
"payments": [
{
"payment_id": 4815000000046039,
"bill_id": 4815000000045067,
"bill_payment_id": 4815000000046041,
"payment_mode": "Cash",
"payment_number": 2,
"description": "Sample Description",
"date": "2015-05-29",
"reference_number": "PO-00003",
"exchange_rate": 1,
"amount": 234,
"paid_through_account_id": 4815000000000361,
"paid_through_account_name": "Petty Cash",
"is_single_bill_payment": true
}
],
"vendor_credits": [
{
"vendor_credit_id": 4815000000046039,
"vendor_credit_bill_id": 4815000000768039,
"vendor_credit_number": 67258,
"date": "2015-05-29",
"amount": 234
}
],
"created_time": "2015-05-29T00:00:00.000Z",
"last_modified_time": "2015-05-29T00:00:00.000Z",
"reference_id": 4815000000000342,
"notes": "Sample Note",
"terms": "Term & Conditions",
"attachment_name": "sample-attachments",
"open_purchaseorders_count": 4
},
{...},
{...}
]
}
Update a Bill
Updates the details of an existing Bill.
OAuth Scope : ZohoInventory.bills.UPDATE
Arguments
business_gst
, business_none
, overseas
, consumer
.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.place of contact
given for the contact will be taken)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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"currency_id": 4815000000000097,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"notes": "Sample Note",
"terms": "Term & Conditions",
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN",
"is_pre_gst": false,
"is_reverse_charge_applied": true
}
{
"code": 0,
"message": "The Bill has been updated.",
"bill": {
"bill_id": 4815000000045067,
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"unused_credits_payable_amount": 0,
"status": "paid",
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"due_by_days": 69,
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"price_precision": 2,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
],
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"reverse_charge_tax_name": "inter",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"taxes": [
{
"tax_name": "Purchase tax",
"tax_amount": 29
}
],
"vendor_credits_applied": 24,
"sub_total": 30,
"tax_total": 2,
"balance": 0,
"billing_address": [
{
"address": "No:234,90 Church Street",
"city": "New York City",
"state": "New York",
"zip": 10048,
"country": "U.S.A",
"fax": "324-524242"
}
],
"payments": [
{
"payment_id": 4815000000046039,
"bill_id": 4815000000045067,
"bill_payment_id": 4815000000046041,
"payment_mode": "Cash",
"payment_number": 2,
"description": "Sample Description",
"date": "2015-05-29",
"reference_number": "PO-00003",
"exchange_rate": 1,
"amount": 234,
"paid_through_account_id": 4815000000000361,
"paid_through_account_name": "Petty Cash",
"is_single_bill_payment": true
}
],
"vendor_credits": [
{
"vendor_credit_id": 4815000000046039,
"vendor_credit_bill_id": 4815000000768039,
"vendor_credit_number": 67258,
"date": "2015-05-29",
"amount": 234
}
],
"created_time": "2015-05-29T00:00:00.000Z",
"last_modified_time": "2015-05-29T00:00:00.000Z",
"reference_id": 4815000000000342,
"notes": "Sample Note",
"terms": "Term & Conditions",
"attachment_name": "sample-attachments",
"open_purchaseorders_count": 4,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN",
"is_pre_gst": false,
"is_reverse_charge_applied": true
}
}
Retrieve a Bill
Fetches the details of a Bill.
OAuth Scope : ZohoInventory.bills.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"bill": {
"bill_id": 4815000000045067,
"purchaseorder_id": 4815000000044972,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"unused_credits_payable_amount": 0,
"status": "paid",
"bill_number": "BL-00002",
"date": "2015-05-29",
"due_date": "2015-05-29",
"reference_number": "PO-00003",
"due_by_days": 69,
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"price_precision": 2,
"exchange_rate": 1,
"is_item_level_tax_calc": true,
"line_items": [
{
"purchaseorder_item_id": 4815000000045245,
"receive_item_id": 4815000000044131,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"account_id": 4815000000035003,
"account_name": "Inventory Asset",
"description": "Sample Description",
"bcy_rate": 122,
"rate": 6,
"quantity": 5,
"tax_id": 4815000000044043,
"tds_tax_id": "460000000027009",
"tax_name": "Purchase tax",
"tax_type": "Tax group",
"tax_percentage": 12,
"item_total": 290,
"item_order": 0,
"unit": "qty",
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"reverse_charge_tax_id": 460000000038056,
"reverse_charge_tax_name": "inter",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"hsn_or_sac": 80540,
"tax_exemption_code": "string",
"warehouse_id": 130426000000664020,
"tax_exemption_id": "string"
}
],
"taxes": [
{
"tax_name": "Purchase tax",
"tax_amount": 29
}
],
"vendor_credits_applied": 24,
"sub_total": 30,
"tax_total": 2,
"balance": 0,
"billing_address": [
{
"address": "No:234,90 Church Street",
"city": "New York City",
"state": "New York",
"zip": 10048,
"country": "U.S.A",
"fax": "324-524242"
}
],
"payments": [
{
"payment_id": 4815000000046039,
"bill_id": 4815000000045067,
"bill_payment_id": 4815000000046041,
"payment_mode": "Cash",
"payment_number": 2,
"description": "Sample Description",
"date": "2015-05-29",
"reference_number": "PO-00003",
"exchange_rate": 1,
"amount": 234,
"paid_through_account_id": 4815000000000361,
"paid_through_account_name": "Petty Cash",
"is_single_bill_payment": true
}
],
"vendor_credits": [
{
"vendor_credit_id": 4815000000046039,
"vendor_credit_bill_id": 4815000000768039,
"vendor_credit_number": 67258,
"date": "2015-05-29",
"amount": 234
}
],
"created_time": "2015-05-29T00:00:00.000Z",
"last_modified_time": "2015-05-29T00:00:00.000Z",
"reference_id": 4815000000000342,
"notes": "Sample Note",
"terms": "Term & Conditions",
"attachment_name": "sample-attachments",
"open_purchaseorders_count": 4,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "AP",
"destination_of_supply": "TN",
"is_pre_gst": false,
"is_reverse_charge_applied": true
}
}
Delete a Bill.
Deletes a Bill from Zoho Inventory.
OAuth Scope : ZohoInventory.bills.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?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/bills/4815000000045067?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The Bill has been deleted."
}
Update custom field in existing bills
Update the value of the custom field in existing bills.
OAuth Scope : ZohoInventory.bills.UPDATE
Arguments
Query Parameters
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/bill/460000000098765/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/inventory/v1/bill/460000000098765/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/inventory/v1/bill/460000000098765/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", "/inventory/v1/bill/460000000098765/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": "/inventory/v1/bill/460000000098765/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/inventory/v1/bill/460000000098765/customfields?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
[
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
{
"code": 0,
"message": "Custom Fields Updated Successfully"
}
Mark as Open
Marks a Bill as Open.
OAuth Scope : ZohoInventory.bills.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/bills/4815000000045067/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/inventory/v1/bills/4815000000045067/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/inventory/v1/bills/4815000000045067/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", "/inventory/v1/bills/4815000000045067/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": "/inventory/v1/bills/4815000000045067/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/inventory/v1/bills/4815000000045067/status/open?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The bill has been marked as open."
}
Mark as Void
Marks a Bill as Void.
OAuth Scope : ZohoInventory.bills.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/bills/4815000000045067/status/void?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/bills/4815000000045067/status/void?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/bills/4815000000045067/status/void?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/bills/4815000000045067/status/void?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/bills/4815000000045067/status/void?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/bills/4815000000045067/status/void?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The bill has been marked as Void."
}