API Docs
/
No Results Found
Credit Notes

Credit Notes

A credit note is a promisory note issued to a person, when we owe him money. Credit notes are created when a refund is to be made to a customer. A credit note object allows you to keep track of all credit note related information.

Possible error codes:
Error CodeMessage
1002Credit Note does not exists
12003Credit notes that are in closed status cannot be applied to invoices
12004Credit notes that are in void status cannot be applied to invoices
12005Credits cannot be applied to invoices in the draft status
12006Credits cannot be applied to invoices in the closed status
12007Credits cannot be applied to invoices in the void status
12018The specified Credit Note Number already exists

End Points
Create a credit note
List Credit Notes
Update a credit note
Get a credit note
Delete a credit note
Email a credit note
Void a credit note
Open a voided credit note
Email history
Update billing address
Update Shipping address
List credit note templates
Update a credit note template
Credit to an invoice
List invoices credited
Delete invoices credited
Add a comment
List credit note comments & history
Delete a Comment
List credit note refunds
Refund credit note
List refunds of a credit note
Update credit note refund
Get credit note refund
Delete credit note refund

Attribute

creditnote_id
string
Unique ID of the credit note generated by the server.
creditnote_number
string
Unique number generated (starts with CN) which will be displayed in the interface and credit notes. Maximum Length [100]
date
string
The date on which credit note is raised. Date Format [yyyy-mm-dd]
status
string
Status of the credit note. This can be open, closed or void.
customer_id
string
Customer ID of the customer for whom the credit note is raised.
product_type
string
Enter goods/services
serial_numbers
string
Enter serial number
customer_name
string
Name of the customer to whom the credit note is raised. Maximum Length of the name [100]
custom_fields
array
Custom fields for a credit note.
Show Sub-Attributes arrow
customfield_id
long
Unique ID of the custom field
data_type
string
Data type of the custom field.
label
string
Label of the custom field.
show_on_pdf
boolean
Enable/Disable show this custom field on pdf for that invoice
show_in_all_pdf
Enable/Disable show this custom field on all the pdf
value
string
Value of the custom field.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
email
string
Email address of the customer.
total
double
Total credits raised in this credit note.
balance
double
The unapplied/existing credits.
line_items
array
Items present in a credit note
Show Sub-Attributes arrow
item_id
string
Unique string generated for the item to which a refund is to be made.
description
string
A small description about the item.
name
string
Name of the credit note item.
type
integer
Type of the creditnote line item.
quantity
int32
Quantity of the item included.
tax_id
string
Unique to denote the tax associate dto the creditnote
tds_tax_id
string
🇲🇽 Mexico
only
Unique ID to denote the TDS tax associated to the creditnote
rate
double
The rate of the item included.
item_total
double
Total credits raised by this item. This would be the multiplicative product of item price and quantity.
product_type
string
Enter goods/services
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
project_id
string
ID of the project
project_name
string
Name of the project.
sat_item_key_code
string
🇲🇽 Mexico
only
Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs.
unitkey_code
string
🇲🇽 Mexico
only
Add Unit Key Code for your goods/services. Download the CFDI Catalogs.
invoices
array
Invoices included for a credit note redemption
Show Sub-Attributes arrow
invoice_id
string
Invoice ID of the required invoice.
invoice_number
string
Invoice number of the required invoice.
amount
double
Amount of the invoice.
taxes
array
Taxes associated with the subscription.
Show Sub-Attributes arrow
tax_id
string
Unique to denote the tax associate dto the creditnote
tax_name
string
Unique name for tax.
tax_amount
string
Tax amount applied to the subscription.
currency_code
string
Customer's currency code. This currency code is used in credit notes.
currency_symbol
string
Customer's currency symbol.
billing_address
object
Address to which a customer is billed
Show Sub-Attributes arrow
address
string
Billing address for the invoice
city
string
City of the customer’s billing address.
state
string
State of the customer’s billing address.
zip
string
Zip code of the customer’s billing address.
country
string
Country of the customer’s billing address.
fax
string
Customer's fax number.
shipping_address
object
Address to which goods/any exchange must be shipped to contact
Show Sub-Attributes arrow
address
string
Billing address for the invoice
city
string
City of the customer’s billing address.
state
string
State of the customer’s billing address.
zip
string
Zip code of the customer’s billing address.
country
string
Country of the customer’s billing address.
fax
string
Customer's fax number.
created_time
string
Time at which the credit note was created.
updated_time
string
Time at which the credit note details were last updated.
template_id
string
Unique ID of the creditnote template used
template_name
string
Name of the default template of the creditnote used
notes
string
A short note for the credit note. Maximum length [5000]
terms
string
Terms & condition to be displayed in the credit note. Maximum length [10000]

Example

{ "creditnote_id": "90300000072369", "creditnote_number": "CN-29", "date": "2016-06-05", "status": "open", "customer_id": "903000000000099", "product_type": "goods", "serial_numbers": "string", "customer_name": "Bowman Furniture", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "text", "label": "label", "show_on_pdf": true, "show_in_all_pdf": true, "value": 129890 } ], "reference_number": "INV-384", "email": "test@zylker.org", "total": 450, "balance": 10, "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "project_name": "Sample Project", "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "amount": 450 } ], "taxes": [ { "tax_id": "903000000000356", "tax_name": "Basic Tax", "tax_amount": "2.50" } ], "currency_code": "USD", "currency_symbol": "$", "billing_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "shipping_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "created_time": "2016-06-05T02:30:08-0700", "updated_time": "2016-07-05T02:30:08-0700", "template_id": "90300000001336", "template_name": "Standard Template", "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again" }

Create a credit note

Details of an existing creditnote.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Arguments

customer_id
string
(Required)
Customer ID of the customer for whom the credit note is raised.
contact_persons
array
Contact Persons associated with the credit note.
date
string
(Required)
The date on which credit note is raised. Date Format [yyyy-mm-dd]
exchange_rate
string
Exchange rate for the currency associated with the customer.
line_items
array
(Required)
Items present in a credit note
Show Sub-Attributes arrow
item_id
string
Unique string generated for the item to which a refund is to be made.
description
string
A small description about the item.
name
string
Name of the credit note item.
type
integer
Type of the creditnote line item.
quantity
int32
Quantity of the item included.
tax_id
string
Unique to denote the tax associate dto the creditnote
tds_tax_id
string
🇲🇽 Mexico
only
Unique ID to denote the TDS tax associated to the creditnote
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax exemption.
avatax_tax_code
string
Avalara Integration only
A tax code is a unique label used to group Items (products, services, or charges) together. Maximum length [25]
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara [standard codes][1] or enter a custom code. Maximum length [25]
rate
double
The rate of the item included.
item_total
double
Total credits raised by this item. This would be the multiplicative product of item price and quantity.
product_type
string
Enter goods/services
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
project_id
string
ID of the project
sat_item_key_code
string
🇲🇽 Mexico
only
Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs.
unitkey_code
string
🇲🇽 Mexico
only
Add Unit Key Code for your goods/services. Download the CFDI Catalogs.
creditnote_number
string
(Required)
Unique number generated (starts with CN) which will be displayed in the interface and credit notes. Maximum Length [100]
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
string
🇲🇽 Mexico
only
VAT treatment for the Estimate.Allowed Values:
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
cfdi_usage
string
🇲🇽 Mexico
only
Choose CFDI Usage.
Allowed values: acquisition_of_merchandise, return_discount_bonus, general_expense, buildings, furniture_office_equipment, transport_equipment, computer_equipmentdye_molds_tools, telephone_communication, satellite_communication, other_machinery_equipment, hospital_expense, medical_expense_disability, funeral_expense, donation, interest_mortage_loans, contribution_sar, medical_expense_insurance_pormium, school_transportation_expense, deposit_saving_account, payment_educational_service, no_tax_effect, payment, payroll.
cfdi_reference_type
string
🇲🇽 Mexico
only
Choose CFDI Reference Type.
Allowed values: credit_note, debit_note, return_of_merchandise, substitution_previous_cfdi, transfer_of_goods, invoice_generated_from_order, cfdi_for_advance.
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
place_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
ignore_auto_number_generation
boolean
Set to true if you need to provide your own credit note number.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
custom_fields
array
Custom fields for a credit note.
Show Sub-Attributes arrow
label
string
Label of the custom field.
value
string
Value of the custom field.
notes
string
A short note for the credit note. Maximum length [5000]
terms
string
Terms & condition to be displayed in the credit note. Maximum length [10000]
template_id
string
Unique ID of the creditnote template used
tax_authority_id
string
🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax exemption.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara [standard codes][1] or enter a custom code. Maximum length [25]
avatax_tax_code
string
Avalara Integration only
A tax code is a unique label used to group Items (products, services, or charges) together. Maximum length [25]
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer. Maximum length [25]
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the credit notes. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).

Query Parameters

invoice_id
Invoice ID of the required invoice.
ignore_auto_number_generation
Set to true if you need to provide your own credit note number.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes" 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/invoice/v3/creditnotes") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/creditnotes", 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": "/invoice/v3/creditnotes", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "contact_persons": [ "903000006532" ], "date": "2016-06-05", "exchange_rate": "5.5", "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "tax_exemption_id": "903000006345", "avatax_tax_code": "string", "avatax_use_code": "string", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "creditnote_number": "CN-29", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "cfdi_usage": "acquisition_of_merchandise", "cfdi_reference_type": "return_of_merchandise", "gst_no": "22AAAAA0000A1Z5", "place_of_supply": "TN", "ignore_auto_number_generation": false, "reference_number": "INV-384", "custom_fields": [ { "label": "label", "value": 129890 } ], "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again", "template_id": "90300000001336", "tax_authority_id": "903000006345", "tax_exemption_id": "903000006345", "avatax_use_code": "string", "avatax_tax_code": "string", "avatax_exempt_no": "string", "vat_treatment": "overseas" }

Response Example

{ "code": 0, "message": "The credit note has been created.", "creditnote": { "creditnote_id": "90300000072369", "creditnote_number": "CN-29", "date": "2016-06-05", "status": "open", "customer_id": "903000000000099", "product_type": "goods", "serial_numbers": "string", "customer_name": "Bowman Furniture", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "text", "label": "label", "show_on_pdf": true, "show_in_all_pdf": true, "value": 129890 } ], "reference_number": "INV-384", "email": "test@zylker.org", "total": 450, "balance": 10, "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "project_name": "Sample Project", "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "amount": 450 } ], "taxes": [ { "tax_id": "903000000000356", "tax_name": "Basic Tax", "tax_amount": "2.50" } ], "currency_code": "USD", "currency_symbol": "$", "billing_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "shipping_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "created_time": "2016-06-05T02:30:08-0700", "updated_time": "2016-07-05T02:30:08-0700", "template_id": "90300000001336", "template_name": "Standard Template", "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again" } }

List Credit Notes

List all the Credit Notes.
OAuth Scope : ZohoInvoice.creditnotes.READ

Query Parameters

creditnote_number
Unique number generated (starts with CN) which will be displayed in the interface and credit notes. Maximum Length [100]
date
The date on which credit note is raised. Date Format [yyyy-mm-dd]
status
Status of the credit note. This can be open, closed or void.
total
Total credits raised in this credit note.
reference_number
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
customer_name
Name of the customer to whom the credit note is raised. Maximum Length of the name [100]
item_name
Search credit notes by item name. Maximum length [100]
customer_id
Customer ID of the customer for whom the credit note is raised.
item_description
description for the item. Variants item_description_startswith and item_description_contains. Maximum length [100]
item_id
Unique string generated for the item to which a refund is to be made.
filter_by
Filter credit notes by status. Allowed values Status.All Status.Open Status.Draft Status.Closed and Status.Void
search_text
Search credit notes by credit note number or customer name or credit note reference number. Maximum length [100]
sort_column
Sort credit notes by following columns customer_name, creditnote_number, balance, total, date and created_time. Allowed Values customer_name creditnote_number balance total date and created_time

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes", 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": "/invoice/v3/creditnotes", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "creditnotes": [ { "creditnote_id": "90300000072369", "creditnote_number": "CN-29", "status": "open", "reference_number": "INV-384", "date": "2016-06-05", "total": 450, "balance": 10, "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "currency_id": "982000000567240", "currency_code": "USD", "created_time": "2016-06-05T02:30:08-0700", "last_modified_time": "2016-06-05T02:30:08-0700", "is_emailed": true }, {...}, {...} ] }

Update a credit note

Update Details of an existing creditnote.
OAuth Scope : ZohoInvoice.creditnotes.UPDATE

Arguments

customer_id
string
(Required)
Customer ID of the customer for whom the credit note is raised.
contact_persons
array
Contact Persons associated with the credit note.
date
string
(Required)
The date on which credit note is raised. Date Format [yyyy-mm-dd]
exchange_rate
string
Exchange rate for the currency associated with the customer.
line_items
array
(Required)
Items present in a credit note
Show Sub-Attributes arrow
item_id
string
Unique string generated for the item to which a refund is to be made.
description
string
A small description about the item.
name
string
Name of the credit note item.
type
integer
Type of the creditnote line item.
quantity
int32
Quantity of the item included.
tax_id
string
Unique to denote the tax associate dto the creditnote
tds_tax_id
string
🇲🇽 Mexico
only
Unique ID to denote the TDS tax associated to the creditnote
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax exemption.
avatax_tax_code
string
Avalara Integration only
A tax code is a unique label used to group Items (products, services, or charges) together. Maximum length [25]
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara [standard codes][1] or enter a custom code. Maximum length [25]
rate
double
The rate of the item included.
item_total
double
Total credits raised by this item. This would be the multiplicative product of item price and quantity.
product_type
string
Enter goods/services
hsn_or_sac
string
🇮🇳 India
only
Add HSN/SAC code for your goods/services
project_id
string
ID of the project
sat_item_key_code
string
🇲🇽 Mexico
only
Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs.
unitkey_code
string
🇲🇽 Mexico
only
Add Unit Key Code for your goods/services. Download the CFDI Catalogs.
creditnote_number
string
(Required)
Unique number generated (starts with CN) which will be displayed in the interface and credit notes. Maximum Length [100]
gst_treatment
string
🇮🇳 India
only
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
tax_treatment
string
🇲🇽 Mexico
only
VAT treatment for the Estimate.Allowed Values:
home_country_mexico,border_region_mexico,non_mexico supported only for MX.
cfdi_usage
string
🇲🇽 Mexico
only
Choose CFDI Usage.
Allowed values: acquisition_of_merchandise, return_discount_bonus, general_expense, buildings, furniture_office_equipment, transport_equipment, computer_equipmentdye_molds_tools, telephone_communication, satellite_communication, other_machinery_equipment, hospital_expense, medical_expense_disability, funeral_expense, donation, interest_mortage_loans, contribution_sar, medical_expense_insurance_pormium, school_transportation_expense, deposit_saving_account, payment_educational_service, no_tax_effect, payment, payroll.
cfdi_reference_type
string
🇲🇽 Mexico
only
Choose CFDI Reference Type.
Allowed values: credit_note, debit_note, return_of_merchandise, substitution_previous_cfdi, transfer_of_goods, invoice_generated_from_order, cfdi_for_advance.
gst_no
string
🇮🇳 India
only
15 digit GST identification number of the customer.
place_of_supply
string
🇮🇳 India
only
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
ignore_auto_number_generation
boolean
Set to true if you need to provide your own credit note number.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
custom_fields
array
Custom fields for a credit note.
Show Sub-Attributes arrow
label
string
Label of the custom field.
value
string
Value of the custom field.
notes
string
A short note for the credit note. Maximum length [5000]
terms
string
Terms & condition to be displayed in the credit note. Maximum length [10000]
template_id
string
Unique ID of the creditnote template used
tax_authority_id
string
🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
, 🇨🇦 Canada
only
Unique ID of the tax exemption.
avatax_use_code
string
Avalara Integration only
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara [standard codes][1] or enter a custom code. Maximum length [25]
avatax_tax_code
string
Avalara Integration only
A tax code is a unique label used to group Items (products, services, or charges) together. Maximum length [25]
avatax_exempt_no
string
Avalara Integration only
Exemption certificate number of the customer. Maximum length [25]
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the credit notes. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).

Query Parameters

ignore_auto_number_generation
Set to true if you need to provide your own credit note number.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369" 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/invoice/v3/creditnotes/90300000072369") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/creditnotes/90300000072369", 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": "/invoice/v3/creditnotes/90300000072369", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "contact_persons": [ "903000006532" ], "date": "2016-06-05", "exchange_rate": "5.5", "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "tax_exemption_id": "903000006345", "avatax_tax_code": "string", "avatax_use_code": "string", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "creditnote_number": "CN-29", "gst_treatment": "business_gst", "tax_treatment": "vat_registered", "cfdi_usage": "acquisition_of_merchandise", "cfdi_reference_type": "return_of_merchandise", "gst_no": "22AAAAA0000A1Z5", "place_of_supply": "TN", "ignore_auto_number_generation": false, "reference_number": "INV-384", "custom_fields": [ { "label": "label", "value": 129890 } ], "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again", "template_id": "90300000001336", "tax_authority_id": "903000006345", "tax_exemption_id": "903000006345", "avatax_use_code": "string", "avatax_tax_code": "string", "avatax_exempt_no": "string", "vat_treatment": "overseas" }

Response Example

{ "code": 0, "message": "The credit note has been updated.", "creditnote": { "creditnote_id": "90300000072369", "creditnote_number": "CN-29", "date": "2016-06-05", "status": "open", "customer_id": "903000000000099", "product_type": "goods", "serial_numbers": "string", "customer_name": "Bowman Furniture", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "text", "label": "label", "show_on_pdf": true, "show_in_all_pdf": true, "value": 129890 } ], "reference_number": "INV-384", "email": "test@zylker.org", "total": 450, "balance": 10, "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "project_name": "Sample Project", "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "amount": 450 } ], "taxes": [ { "tax_id": "903000000000356", "tax_name": "Basic Tax", "tax_amount": "2.50" } ], "currency_code": "USD", "currency_symbol": "$", "billing_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "shipping_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "created_time": "2016-06-05T02:30:08-0700", "updated_time": "2016-07-05T02:30:08-0700", "template_id": "90300000001336", "template_name": "Standard Template", "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again" } }

Get a credit note

Details of an existing creditnote.
OAuth Scope : ZohoInvoice.creditnotes.READ

Query Parameters

print
Export credit note pdf with default print option. Allowed Values: true, false, on and off
accept
You can get credit note details as json/pdf/html. Default format is html. Allowed Values: json, pdf and html

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369", 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": "/invoice/v3/creditnotes/90300000072369", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "creditnote": { "creditnote_id": "90300000072369", "creditnote_number": "CN-29", "date": "2016-06-05", "status": "open", "customer_id": "903000000000099", "product_type": "goods", "serial_numbers": "string", "customer_name": "Bowman Furniture", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "text", "label": "label", "show_on_pdf": true, "show_in_all_pdf": true, "value": 129890 } ], "reference_number": "INV-384", "email": "test@zylker.org", "total": 450, "balance": 10, "line_items": [ { "item_id": "90300000081501", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.", "name": "Hard Drive", "type": 1, "quantity": 1, "tax_id": "903000000000356", "tds_tax_id": "903000000000357", "rate": 100, "item_total": 100, "product_type": "goods", "hsn_or_sac": 80540, "project_id": 90300000087378, "project_name": "Sample Project", "sat_item_key_code": 71121206, "unitkey_code": "box" } ], "invoices": [ { "invoice_id": "90300000079426", "invoice_number": "INV-384", "amount": 450 } ], "taxes": [ { "tax_id": "903000000000356", "tax_name": "Basic Tax", "tax_amount": "2.50" } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-05T02:30:08-0700", "updated_time": "2016-07-05T02:30:08-0700", "billing_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "shipping_address": { "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "U.S.A", "fax": "+1-925-924-9600" }, "template_id": "90300000001336", "template_name": "Standard Template", "notes": "Offer for the referral", "terms": "Can be added for refund only if purchased again" } }

Delete a credit note

Delete an existing credit note.
OAuth Scope : ZohoInvoice.creditnotes.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/creditnotes/90300000072369", 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": "/invoice/v3/creditnotes/90300000072369", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

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

Email a credit note

Email a credit note.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Arguments

to_mail_ids
array
(Required)
The email IDs to which the credit note is to be mailed.
cc_mail_ids
array
The email IDs that have to be copied when the credit note is to be mailed.
subject
string
(Required)
The subject of the email. Maximum length [1000]
body
string
(Required)
The body/content of the email. Maximum length [5000]

Query Parameters

customer_id
Customer ID of the customer for whom the credit note is raised.
attachments
The files to be attached with the email.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/email" 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/invoice/v3/creditnotes/90300000072369/email") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/email', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/email", 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": "/invoice/v3/creditnotes/90300000072369/email", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/email \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "to_mail_ids": [ "test@zylker.org", "test1@zylker.org" ], "cc_mail_ids": [ "test@zylker.org" ], "subject": "Credit note for subscription.", "body": "Please find attached the credit note for your subscription." }

Response Example

{ "code": 0, "message": "Your creditnote has been sent." }

Void a credit note

To mark a credit note as invalid/nullify it content.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/void" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/void") .post(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/void', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/void", 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": "/invoice/v3/creditnotes/90300000072369/void", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/void \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The credit note has been marked as void." }

Open a voided credit note

Convert a voided credit note to open.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/converttoopen" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/converttoopen") .post(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/converttoopen', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/converttoopen", 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": "/invoice/v3/creditnotes/90300000072369/converttoopen", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/converttoopen \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Status of the credit note has been changed to open." }

Email history

Get email history of a credit code.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/emailhistory" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/emailhistory") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/emailhistory', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369/emailhistory", 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": "/invoice/v3/creditnotes/90300000072369/emailhistory", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/emailhistory \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "email_history": [ { "mailhistory_id": 982000000570005, "from": "gator@zillum.com", "to_mail_ids": [ "test@zylker.org", "test1@zylker.org" ], "subject": "Credit note for subscription.", "date": "2016-06-05" }, {...}, {...} ] }

Update billing address

Updates the billing address for an existing credit note alone.
OAuth Scope : ZohoInvoice.creditnotes.UPDATE

Arguments

address
string
Billing address of the contact
city
string
City of the contact
state
string
State of the contact's address
zip
string
ZIP code of a contacts billing address
country
string
Country of a contact's billing address
fax
string
FAX number of a contact

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/address/billing" 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/invoice/v3/creditnotes/90300000072369/address/billing") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/address/billing', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/creditnotes/90300000072369/address/billing", 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": "/invoice/v3/creditnotes/90300000072369/address/billing", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/address/billing \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "address": "4900 Hopyard Rd, Suite 310", "city": "Pleasanton", "state": "CA", "zip": 94588, "country": "USA", "fax": "+1-925-924-9600" }

Response Example

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

Update Shipping address

Updates the shipping address for an existing credit note alone.
OAuth Scope : ZohoInvoice.creditnotes.UPDATE

Arguments

address
string
Billing Address field
city
string
City of a contacts billing address
state
string
State of a contct's billing address
zip
string
ZIP code of a billing address
country
string
Country of a contacts billing address
fax
string
Customer's fax number.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/address/shipping" 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/invoice/v3/creditnotes/90300000072369/address/shipping") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/address/shipping', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/creditnotes/90300000072369/address/shipping", 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": "/invoice/v3/creditnotes/90300000072369/address/shipping", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/address/shipping \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "address": "Suite 125, McMillan Avenue", "city": "San Francisco", "state": "CA", "zip": 94134, "country": "USA", "fax": "+1-925-924-9600" }

Response Example

{ "code": 0, "message": "Shipping address updated" }

List credit note templates

Get all credit note pdf templates.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/templates" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/templates") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/templates', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/templates", 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": "/invoice/v3/creditnotes/templates", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/templates \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

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

Update a credit note template

Update the pdf template associated with the credit note.
OAuth Scope : ZohoInvoice.creditnotes.UPDATE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/templates/90300000001336" type: PUT headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/templates/90300000001336") .put(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/templates/90300000001336', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("PUT", "/invoice/v3/creditnotes/90300000072369/templates/90300000001336", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/invoice/v3/creditnotes/90300000072369/templates/90300000001336", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request PUT \ --url https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/templates/90300000001336 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The credit note has been updated." }

Credit to an invoice

Apply credit note to existing invoices.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Arguments

invoices
array
List of invoices used for a credit redemption
Show Sub-Attributes arrow
invoice_id
string
Invoice ID of the required invoice.
amount_applied
double
The total amount applied for redemption from the credit note on an invoice.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices" 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/invoice/v3/creditnotes/90300000072369/invoices") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/invoices", 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": "/invoice/v3/creditnotes/90300000072369/invoices", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/invoices \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "invoices": [ { "invoice_id": "90300000079426", "amount_applied": 41.82 } ] }

Response Example

{ "code": 0, "message": "Credits have been applied to the invoice(s)." }

List invoices credited

List invoices to which the credit note is applied.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369/invoices", 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": "/invoice/v3/creditnotes/90300000072369/invoices", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/invoices \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "invoices_credited": [ { "creditnote_id": "90300000072369", "invoice_id": "90300000079426", "creditnote_invoice_id": "982000000567172", "date": "2016-06-05", "invoice_number": "INV-384", "creditnote_number": "CN-29", "credited_amount": 12.02 }, {...}, {...} ] }

Delete invoices credited

Delete the credits applied to an invoice.
OAuth Scope : ZohoInvoice.creditnotes.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices/982000000567172" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices/982000000567172") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/invoices/982000000567172', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/creditnotes/90300000072369/invoices/982000000567172", 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": "/invoice/v3/creditnotes/90300000072369/invoices/982000000567172", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/invoices/982000000567172 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Credits applied to an invoice have been deleted." }

Add a comment

Add a comment to an existing credit note.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Arguments

description
string
A short note on the credit applied

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments" 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/invoice/v3/creditnotes/90300000072369/comments") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/comments", 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": "/invoice/v3/creditnotes/90300000072369/comments", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/comments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "description": "Credits applied to invoice INV-00004" }

Response Example

{ "code": 0, "message": "Comments added." }

List credit note comments & history

Get history and comments of a credit note.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369/comments", 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": "/invoice/v3/creditnotes/90300000072369/comments", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/comments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Comments of the credit note are displayed successfully.", "comments": [ { "comment_id": "982000000570001", "creditnote_id": "90300000072369", "description": "Credits applied to invoice INV-00004", "commented_by_id": "982000000554041", "commented_by": "David Sujin", "comment_type": "system", "date": "2016-06-05", "date_description": "7 hours ago", "time": "10:43 PM", "operation_type": "Updated", "transaction_id": "903000002072369", "transaction_type": "email" }, {...}, {...} ] }

Delete a Comment

Delete a credit note comment.
OAuth Scope : ZohoInvoice.creditnotes.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments/982000000570001" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments/982000000570001") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/comments/982000000570001', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/creditnotes/90300000072369/comments/982000000570001", 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": "/invoice/v3/creditnotes/90300000072369/comments/982000000570001", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/comments/982000000570001 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

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

List credit note refunds

List all refunds with pagination.
OAuth Scope : ZohoInvoice.creditnotes.READ

Query Parameters

customer_id
Customer ID of the customer for whom the credit note is raised.
sort_column
Sort refunds list. Allowed Values: refund_mode, reference_number, date, creditnote_number, customer_name, amount_bcy and amount_fcy

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/refunds" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/refunds") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/refunds', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/refunds", 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": "/invoice/v3/creditnotes/refunds", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/refunds \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The list of credit note refunds are displayed successfully.", "creditnote_refunds": [ { "creditnote_refund_id": "982000000567158", "creditnote_id": "90300000072369", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "creditnote_number": "CN-29", "customer_name": "Bowman Furniture", "description": "Offer", "amount_bcy": 10, "amount_fcy": 10 }, {...}, {...} ] }

Refund credit note

Refund credit note amount.
OAuth Scope : ZohoInvoice.creditnotes.CREATE

Arguments

date
string
The date on which credit note is raised. Date Format [yyyy-mm-dd]
refund_mode
string
The method of refund.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
amount
double
Amount of the invoice.
exchange_rate
string
Exchange rate for the currency associated with the customer.
description
string
A small description about the item.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds" 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/invoice/v3/creditnotes/90300000072369/refunds") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/creditnotes/90300000072369/refunds", 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": "/invoice/v3/creditnotes/90300000072369/refunds", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/refunds \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": "5.5", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." }

Response Example

{ "code": 0, "message": "The credit note amount is refunded successfully.", "creditnote_refund": { "creditnote_refund_id": "982000000567158", "creditnote_id": "90300000072369", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "customer_name": "Bowman Furniture", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." } }

List refunds of a credit note

List all refunds of an existing credit note.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369/refunds", 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": "/invoice/v3/creditnotes/90300000072369/refunds", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/refunds \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The refunds of the existing credit note are displayed successfully.", "creditnote_refunds": [ { "creditnote_refund_id": "982000000567158", "creditnote_id": "90300000072369", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "creditnote_number": "CN-29", "customer_name": "Bowman Furniture", "description": "Offer", "amount_bcy": 10, "amount_fcy": 10 }, {...}, {...} ] }

Update credit note refund

Update the refunded transaction.
OAuth Scope : ZohoInvoice.creditnotes.UPDATE

Arguments

date
string
The date on which credit note is raised. Date Format [yyyy-mm-dd]
refund_mode
string
The method of refund.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum Length [100]
amount
double
Amount of the invoice.
exchange_rate
string
Exchange rate for the currency associated with the customer.
description
string
A small description about the item.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158" 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/invoice/v3/creditnotes/90300000072369/refunds/982000000567158") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", 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": "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/refunds/982000000567158 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": "5.5", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." }

Response Example

{ "code": 0, "message": "The credit note refund is updated successfully.", "creditnote_refund": { "creditnote_refund_id": "982000000567158", "creditnote_id": "90300000072369", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "customer_name": "Bowman Furniture", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." } }

Get credit note refund

Get refund of a particular credit note.
OAuth Scope : ZohoInvoice.creditnotes.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", 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": "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/refunds/982000000567158 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The refund of the credit note is displayed successfully.", "creditnote_refund": { "creditnote_refund_id": "982000000567158", "creditnote_id": "90300000072369", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "customer_name": "Bowman Furniture", "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case." } }

Delete credit note refund

Delete a credit note refund.
OAuth Scope : ZohoInvoice.creditnotes.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/creditnotes/90300000072369/refunds/982000000567158', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", 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": "/invoice/v3/creditnotes/90300000072369/refunds/982000000567158", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/creditnotes/90300000072369/refunds/982000000567158 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

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