Vendor Credits
Vendor credits are credits that you receive from your vendor, and is treated as an equivalent of physical cash that the vendor owes you. This helps you track the money you’re owed until it is either paid by said vendor at a later date i.e refunded, or subtracted from any future bill amount due to that vendor.
Attribute
place of contact
given for the contact will be taken)place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
.Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
. business_gst
, business_none
, overseas
, consumer
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
are supported only for UAE.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.uk
. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered
and if he resides outside the EU then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
).goods
, digital_service
and service
.uae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
. Supported values for KSA are ksa_reimbursed_expense
.{
"vendor_credit_id": "3000000002075",
"vendor_credit_number": "DN-00002",
"date": "2014-08-28",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"pricebook_id": "string",
"is_reverse_charge_applied": true,
"status": "open",
"reference_number": "string",
"vendor_id": "460000000020029",
"vendor_name": "Bowman and Co",
"currency_id": "3000000000083",
"currency_code": "USD",
"exchange_rate": 1,
"price_precision": 2,
"vat_treatment": "string",
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string",
"is_inclusive_tax": false,
"line_items": {
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"sku": "string",
"account_id": "460000000020097",
"product_type": "string",
"reverse_charge_tax_id": 460000000057089,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"account_name": "IT and Internet Expenses",
"name": "Premium Plan - Web hosting",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"bcy_rate": 30,
"rate": 30,
"tax_id": "string",
"tds_tax_id": "string",
"tax_treatment_code": "uae_others",
"tax_exemption_id": "string",
"tax_exemption_code": "string",
"tax_name": "string",
"tax_type": "string",
"tax_percentage": 0.1,
"project_id": 90300000087378,
"project_name": "Sample Project",
"item_total": 30,
"item_total_inclusive_of_tax": 30,
"hsn_or_sac": "string",
"acquisition_vat_id": "string",
"acquisition_vat_name": "string",
"acquisition_vat_percentage": "string",
"acquisition_vat_amount": "string",
"reverse_charge_vat_id": "string",
"reverse_charge_vat_name": "string",
"reverse_charge_vat_percentage": "string",
"reverse_charge_vat_amount": "string",
"stock_on_hand": "string",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
]
},
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"acquisition_vat_total": 0.1,
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"reverse_charge_vat_total": 0.1,
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"sub_total": 30,
"total": 30,
"total_credits_used": 0,
"total_refunded_amount": 0,
"balance": 30,
"notes": "string",
"comments": [
{
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "string",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"comment_type": "system",
"date": "2014-08-28",
"date_description": "32 minutes ago",
"time": "10:52 PM",
"operation_type": "Added",
"transaction_id": "460000000069087",
"transaction_type": "vendor_credit"
}
],
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"description": "string",
"amount_bcy": 13,
"amount_fcy": 13,
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string"
}
],
"bills_credited": [
{
"bill_id": "460000000057075",
"vendor_credit_bill_id": "string",
"date": "2014-08-28",
"bill_number": "string",
"amount": 13
}
],
"created_time": "2014-08-28T22:53:31-0700",
"last_modified_time": "2014-08-28T22:53:31-0700"
}
Create a vendor credit
Create a vendor credit for a vendor.
OAuth Scope : ZohoBooks.debitnotes.CREATE
Arguments
uk
. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered
and if he resides outside the EU then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
). business_gst
, business_none
, overseas
, consumer
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
are supported only for UAE.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.place of contact
given for the contact will be taken)place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
.Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.uae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
. Supported values for KSA are ksa_reimbursed_expense
.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/books/v3/vendorcredits?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/vendorcredits?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vendor_id": "460000000020029",
"currency_id": "3000000000083",
"vat_treatment": "string",
"vendor_credit_number": "DN-00002",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"pricebook_id": "string",
"reference_number": "string",
"is_update_customer": false,
"date": "2014-08-28",
"exchange_rate": 1,
"is_inclusive_tax": false,
"line_items": [
{
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"account_id": "460000000020097",
"name": "Premium Plan - Web hosting",
"hsn_or_sac": "string",
"reverse_charge_tax_id": 460000000057089,
"warehouse_id": "string",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"rate": 30,
"tax_id": "string",
"tds_tax_id": "string",
"tax_treatment_code": "uae_others",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"serial_numbers": [
"string"
],
"project_id": 90300000087378
}
],
"notes": "string",
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
]
}
{
"code": 0,
"message": "Vendor credit has been created.",
"vendor_credit": {
"vendor_credit_id": "3000000002075",
"vendor_credit_number": "DN-00002",
"date": "2014-08-28",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"pricebook_id": "string",
"is_reverse_charge_applied": true,
"status": "open",
"reference_number": "string",
"vendor_id": "460000000020029",
"vendor_name": "Bowman and Co",
"currency_id": "3000000000083",
"currency_code": "USD",
"exchange_rate": 1,
"price_precision": 2,
"vat_treatment": "string",
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string",
"is_inclusive_tax": false,
"line_items": {
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"sku": "string",
"account_id": "460000000020097",
"product_type": "string",
"reverse_charge_tax_id": 460000000057089,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"account_name": "IT and Internet Expenses",
"name": "Premium Plan - Web hosting",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"bcy_rate": 30,
"rate": 30,
"tax_id": "string",
"tds_tax_id": "string",
"tax_treatment_code": "uae_others",
"tax_exemption_id": "string",
"tax_exemption_code": "string",
"tax_name": "string",
"tax_type": "string",
"tax_percentage": 0.1,
"project_id": 90300000087378,
"project_name": "Sample Project",
"item_total": 30,
"item_total_inclusive_of_tax": 30,
"hsn_or_sac": "string",
"acquisition_vat_id": "string",
"acquisition_vat_name": "string",
"acquisition_vat_percentage": "string",
"acquisition_vat_amount": "string",
"reverse_charge_vat_id": "string",
"reverse_charge_vat_name": "string",
"reverse_charge_vat_percentage": "string",
"reverse_charge_vat_amount": "string",
"stock_on_hand": "string",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
]
},
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"acquisition_vat_total": 0.1,
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"reverse_charge_vat_total": 0.1,
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"sub_total": 30,
"total": 30,
"total_credits_used": 0,
"total_refunded_amount": 0,
"balance": 30,
"notes": "string",
"comments": [
{
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "string",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"comment_type": "system",
"date": "2014-08-28",
"date_description": "32 minutes ago",
"time": "10:52 PM",
"operation_type": "Added",
"transaction_id": "460000000069087",
"transaction_type": "vendor_credit"
}
],
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"description": "string",
"amount_bcy": 13,
"amount_fcy": 13,
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string"
}
],
"bills_credited": [
{
"bill_id": "460000000057075",
"vendor_credit_bill_id": "string",
"date": "2014-08-28",
"bill_number": "string",
"amount": 13
}
],
"created_time": "2014-08-28T22:53:31-0700",
"last_modified_time": "2014-08-28T22:53:31-0700"
}
}
List vendor credits
List vendor credits with pagination.
OAuth Scope : ZohoBooks.debitnotes.READ
Query Parameters
vendor_credit_number.startswith
and vendor_credit_number.contains
date_start
, date_end
, date_before
and date_after
open
, closed
and void
total.start
, total.end
, total.less_than
, total.less_equals
, total.greater_than
and total.greater_equals
reference_number.startswith
and reference_number.contains
customer_name.startswith
and customer_name.contains
item_name.startswith
and item_name.contains
item_description.startswith
and item_description.contains
notes.startswith
and notes.contains
custom_field_startswith
and custom_field_contains
Status.All
, Status.Open
, Status.Draft
, Status.Closed
and Status.Void
.vendor_name
, vendor_credit_number
, balance
, total
, date
, created_time
, last_modified_time
and reference_number
.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendorcredits": [
{
"vendor_credit_id": "3000000002075",
"vendor_credit_number": "DN-00002",
"status": "open",
"reference_number": "string",
"date": "2014-08-28",
"total": 30,
"balance": 30,
"vendor_id": "460000000020029",
"vendor_name": "Bowman and Co",
"currency_id": "3000000000083",
"currency_code": "USD",
"created_time": "2014-08-28T22:53:31-0700",
"last_modified_time": "2014-08-28T22:53:31-0700",
"has_attachment": false,
"exchange_rate": 1
},
{...},
{...}
]
}
Update vendor credit
Update an existing vendor credit.
OAuth Scope : ZohoBooks.debitnotes.UPDATE
Arguments
uk
. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered
and if he resides outside the EU then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
). business_gst
, business_none
, overseas
, consumer
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
are supported only for UAE.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.place of contact
given for the contact will be taken)place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
.Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.uae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
. Supported values for KSA are ksa_reimbursed_expense
.parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/vendorcredits/3000000002075?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vendor_id": "460000000020029",
"currency_id": "3000000000083",
"vat_treatment": "string",
"vendor_credit_number": "DN-00002",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"pricebook_id": "string",
"reference_number": "string",
"is_update_customer": false,
"date": "2014-08-28",
"exchange_rate": 1,
"is_inclusive_tax": false,
"line_items": [
{
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"account_id": "460000000020097",
"name": "Premium Plan - Web hosting",
"hsn_or_sac": "string",
"reverse_charge_tax_id": 460000000057089,
"warehouse_id": "string",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"rate": 30,
"tax_id": "string",
"tds_tax_id": "string",
"tax_treatment_code": "uae_others",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"serial_numbers": [
"string"
],
"project_id": 90300000087378
}
],
"notes": "string",
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
]
}
{
"code": 0,
"message": "Vendor credit information has been updated.",
"vendor_credit": {
"vendor_credit_id": "3000000002075",
"vendor_credit_number": "DN-00002",
"date": "2014-08-28",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"pricebook_id": "string",
"is_reverse_charge_applied": true,
"status": "open",
"reference_number": "string",
"vendor_id": "460000000020029",
"vendor_name": "Bowman and Co",
"currency_id": "3000000000083",
"currency_code": "USD",
"exchange_rate": 1,
"price_precision": 2,
"vat_treatment": "string",
"taxes": [
{
"tax_name": "string",
"tax_amount": 0.1
}
],
"is_inclusive_tax": false,
"line_items": {
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"sku": "string",
"account_id": "460000000020097",
"product_type": "string",
"reverse_charge_tax_id": 460000000057089,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"account_name": "IT and Internet Expenses",
"name": "Premium Plan - Web hosting",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"bcy_rate": 30,
"rate": 30,
"tax_id": "string",
"tds_tax_id": "string",
"tax_treatment_code": "uae_others",
"tax_exemption_id": "string",
"tax_exemption_code": "string",
"tax_name": "string",
"tax_type": "string",
"tax_percentage": 0.1,
"project_id": 90300000087378,
"project_name": "Sample Project",
"item_total": 30,
"item_total_inclusive_of_tax": 30,
"hsn_or_sac": "string",
"acquisition_vat_id": "string",
"acquisition_vat_name": "string",
"acquisition_vat_percentage": "string",
"acquisition_vat_amount": "string",
"reverse_charge_vat_id": "string",
"reverse_charge_vat_name": "string",
"reverse_charge_vat_percentage": "string",
"reverse_charge_vat_amount": "string",
"stock_on_hand": "string",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
]
},
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"acquisition_vat_total": 0.1,
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"reverse_charge_vat_total": 0.1,
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"sub_total": 30,
"total": 30,
"total_credits_used": 0,
"total_refunded_amount": 0,
"balance": 30,
"notes": "string",
"comments": [
{
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "string",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"comment_type": "system",
"date": "2014-08-28",
"date_description": "32 minutes ago",
"time": "10:52 PM",
"operation_type": "Added",
"transaction_id": "460000000069087",
"transaction_type": "vendor_credit"
}
],
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "string",
"refund_mode": "cash",
"reference_number": "string",
"description": "string",
"amount_bcy": 13,
"amount_fcy": 13
}
],
"bills_credited": [
{
"bill_id": "460000000057075",
"vendor_credit_bill_id": "string",
"date": "2014-08-28",
"bill_number": "string",
"amount": 13
}
],
"created_time": "2014-08-28T22:53:31-0700",
"last_modified_time": "2014-08-28T22:53:31-0700"
}
}
Get vendor credit
Get details of a vendor credit.
OAuth Scope : ZohoBooks.debitnotes.READ
Query Parameters
true
, false
, on
and off
.json
, xml
, csv
, xls
, pdf
, html
and jhtml
.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits/3000000002075?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendor_credit": {
"vendor_credit_id": "3000000002075",
"vendor_credit_number": "DN-00002",
"date": "2014-08-28",
"status": "open",
"reference_number": "string",
"source_of_supply": "TN",
"destination_of_supply": "TN",
"place_of_supply": "DU",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"pricebook_id": "string",
"is_reverse_charge_applied": true,
"vendor_id": "460000000020029",
"vendor_name": "Bowman and Co",
"currency_id": "3000000000083",
"currency_code": "USD",
"exchange_rate": 1,
"price_precision": 2,
"vat_treatment": "string",
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string",
"is_inclusive_tax": false,
"line_items": {
"item_id": "460000000020071",
"line_item_id": "460000000020077",
"sku": "string",
"account_id": "460000000020097",
"product_type": "string",
"reverse_charge_tax_id": 460000000057089,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 100,
"account_name": "IT and Internet Expenses",
"name": "Premium Plan - Web hosting",
"description": "string",
"item_order": 0,
"quantity": 1,
"unit": "Nos",
"bcy_rate": 30,
"rate": 30,
"tax_id": "string",
"tax_treatment_code": "uae_others",
"tax_exemption_id": "string",
"tax_exemption_code": "string",
"tax_name": "string",
"tax_type": "string",
"tax_percentage": 0.1,
"item_total": 30,
"item_total_inclusive_of_tax": 30,
"hsn_or_sac": "string",
"acquisition_vat_id": "string",
"acquisition_vat_name": "string",
"acquisition_vat_percentage": "string",
"acquisition_vat_amount": "string",
"reverse_charge_vat_id": "string",
"reverse_charge_vat_name": "string",
"reverse_charge_vat_percentage": "string",
"reverse_charge_vat_amount": "string",
"stock_on_hand": "string",
"tags": [
{
"tag_id": 0,
"tag_option_id": 0
}
],
"item_custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"project_id": 90300000087378,
"project_name": "Sample Project"
},
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"acquisition_vat_total": 0.1,
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "string",
"tax_amount": 0.1
}
}
],
"reverse_charge_vat_total": 0.1,
"documents": [
{
"document_id": 0,
"file_name": "string"
}
],
"custom_fields": [
{
"custom_field_id": 0,
"label": "string",
"value": "string",
"index": 0
}
],
"sub_total": 30,
"total": 30,
"total_credits_used": 0,
"total_refunded_amount": 0,
"balance": 30,
"notes": "string",
"comments": [
{
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "string",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"comment_type": "system",
"date": "2014-08-28",
"date_description": "32 minutes ago",
"time": "10:52 PM",
"operation_type": "Added",
"transaction_id": "460000000069087",
"transaction_type": "vendor_credit"
}
],
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"description": "string",
"amount_bcy": 13,
"amount_fcy": 13,
"filed_in_vat_return_id": "string",
"filed_in_vat_return_name": "string",
"filed_in_vat_return_type": "string"
}
],
"bills_credited": [
{
"bill_id": "460000000057075",
"vendor_credit_bill_id": "string",
"date": "2014-08-28",
"bill_number": "string",
"amount": 13
}
],
"created_time": "2014-08-28T22:53:31-0700",
"last_modified_time": "2014-08-28T22:53:31-0700"
}
}
Delete vendor credit
Delete a vendor credit.
OAuth Scope : ZohoBooks.debitnotes.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/vendorcredits/3000000002075?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The vendor credit has been deleted."
}
Convert to open
Change an existing vendor credit status to open.
OAuth Scope : ZohoBooks.debitnotes.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/status/open?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The status of the vendor credit has been changed to open."
}
Void vendor credit
Mark an existing vendor credit as void.
OAuth Scope : ZohoBooks.debitnotes.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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", "/books/v3/vendorcredits/3000000002075/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": "/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/status/void?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The vendor credit has been voided."
}
Submit a Vendor credit for approval
Submit a Vendor credit for approval.
OAuth Scope : ZohoBooks.debitnotes.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/submit?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The vendor credit has been submitted for approval successfully."
}
Approve a Vendor credit
Approve a Vendor credit.
OAuth Scope : ZohoBooks.debitnotes.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/approve?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "You have approved the vendor credit."
}
Apply credits to a bill
Apply vendor credit to existing bills.
OAuth Scope : ZohoBooks.debitnotes.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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", "/books/v3/vendorcredits/3000000002075/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": "/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/bills?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"bills": [
{
"bill_id": "460000000057075",
"amount_applied": 10
}
]
}
{
"code": 0,
"message": "Credits have been applied to the bill(s).",
"bills": null
}
List bills credited
List bills to which the vendor credit is applied.
OAuth Scope : ZohoBooks.debitnotes.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/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", "/books/v3/vendorcredits/3000000002075/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": "/books/v3/vendorcredits/3000000002075/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/books/v3/vendorcredits/3000000002075/bills?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"bills_credited": [
{
"vendor_credit_id": "3000000002075",
"bill_id": "460000000057075",
"vendor_credit_bill_id": "string",
"date": "2014-08-28",
"bill_number": "string"
},
{...},
{...}
]
}
Delete bills credited
Delete the credits applied to a bill. Note:
You should pass the vendor_credit_bill_id from "Get vendor credits > bills credited > vendor_credit_bill_id" section
OAuth Scope : ZohoBooks.debitnotes.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/bills/?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/bills/?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/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("DELETE", "/books/v3/vendorcredits/3000000002075/bills/?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/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 DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/bills/?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Credits applied to the bill have been deleted."
}
Refund a vendor credit
Refund vendor credit amount.
OAuth Scope : ZohoBooks.debitnotes.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"date": "2014-08-30",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"exchange_rate": 1,
"account_id": "460000000020097",
"description": "string"
}
{
"code": 0,
"message": "The refund information for this vendor credit has been saved.",
"vendor_credit_refund": {
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"exchange_rate": 1,
"account_id": "460000000020097",
"account_name": "IT and Internet Expenses",
"description": "string",
"imported_transactions": [
{
"imported_transaction_id": "460000000013297",
"date": "2014-08-28",
"amount": 13,
"payee": "John Roberts",
"description": "string",
"reference_number": "string",
"status": "open",
"account_id": "460000000020097"
}
]
}
}
List refunds of a vendor credit
List all refunds of an existing vendor credit.
OAuth Scope : ZohoBooks.debitnotes.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2017-01-22",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"vendor_credit_number": "DN-00002",
"customer_name": "Bowman and Co",
"description": "Cheque deposit",
"amount_bcy": 13,
"amount_fcy": 13
},
{...},
{...}
]
}
Update vendor credit refund
Update the refunded transaction.
OAuth Scope : ZohoBooks.debitnotes.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"exchange_rate": 1,
"account_id": "460000000020097",
"description": "string"
}
{
"code": 0,
"message": "The refund information has been saved.",
"vendor_credit_refund": {
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"exchange_rate": 1,
"account_id": "460000000020097",
"account_name": "IT and Internet Expenses",
"description": "string",
"imported_transactions": [
{
"imported_transaction_id": "460000000013297",
"date": "2014-08-28",
"amount": 13,
"payee": "John Roberts",
"description": "string",
"reference_number": "string",
"status": "open",
"account_id": "460000000020097"
}
]
}
}
Get vendor credit refund
Get refund of a particular vendor credit.
OAuth Scope : ZohoBooks.debitnotes.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendor_credit_refund": {
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2014-08-28",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"exchange_rate": 1,
"account_id": "460000000020097",
"account_name": "IT and Internet Expenses",
"description": "string",
"imported_transactions": [
{
"imported_transaction_id": "460000000013297",
"date": "2014-08-28",
"amount": 13,
"payee": "John Roberts",
"description": "string",
"reference_number": "string",
"status": "open",
"account_id": "460000000020097"
}
]
}
}
Delete vendor credit refund
Delete a vendor credit refund.
OAuth Scope : ZohoBooks.debitnotes.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The refund has been successfully deleted."
}
List vendor credit refunds
List all refunds with pagination.
OAuth Scope : ZohoBooks.debitnotes.READ
Query Parameters
vendor_name
, vendor_credit_number
, balance
, total
, date
, created_time
, last_modified_time
and reference_number
.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/refunds?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/refunds?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/refunds?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits/refunds?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/refunds?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/refunds?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendor_credit_refunds": [
{
"vendor_credit_refund_id": "3000000003151",
"vendor_credit_id": "3000000002075",
"date": "2017-01-22",
"refund_mode": "cash",
"reference_number": "string",
"amount": 13,
"vendor_credit_number": "DN-00002",
"customer_name": "Bowman and Co",
"description": "Cheque deposit",
"amount_bcy": 13,
"amount_fcy": 13
},
{...},
{...}
]
}
Add a comment
Add a comment to an existing vendor credit.
OAuth Scope : ZohoBooks.debitnotes.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"description": "Credits applied to Bill 1"
}
{
"code": 0,
"message": "Comments added.",
"comment": {
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "Credits applied to Bill 1",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"date": "2017-01-18"
}
}
List vendor credit comments & history
Get history and comments of a vendor credit.
OAuth Scope : ZohoBooks.debitnotes.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"comments": [
{
"comment_id": "3000000002089",
"vendor_credit_id": "3000000002075",
"description": "Credits applied to Bill 1",
"commented_by_id": "3000000000741",
"commented_by": "rajdeep.a",
"comment_type": "system",
"date": "2017-01-18",
"date_description": "32 minutes ago",
"time": "10:52 PM",
"operation_type": "Added",
"transaction_id": "460000000069087",
"transaction_type": "vendor_credit"
},
{...},
{...}
]
}
Delete a comment
Delete a vendor credit comment.
OAuth Scope : ZohoBooks.debitnotes.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorcredits/3000000002075/comments/3000000002089?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The comment has been deleted."
}