API Docs
/
No Results Found
Sales Receipt

Sales Receipt

A sales receipt is a document sent to customers when you sell them goods or services and record payment for it simultaneously. In a retail environment, this means that you only need to create one single transaction to record sales and collect payment. Sales receipts are commonly used in places where cash and sale is recorded instantly such as e-commerce websites and POS.

Download Sales Receipt OpenAPI Document

Create a sales receipt

Create a sales receipt for immediate payment transactions.
OAuth Scope : ZohoBooks.invoices.CREATE

Arguments

customer_id
string
(Required)
Unique identifier for the customer
receipt_number
string
Sales receipt number (required if auto-numbering is disabled)
date
string
Date of the sales receipt
payment_mode
string
(Required)
Mode through which payment was received. Allowed values: cash, check, credit_card, bank_transfer, etc.
line_items
array
Line items for the sales receipt
Show Sub-Attributes arrow
item_id
string
ID of the item
rate
double
Rate of the item
quantity
double
Quantity of the item
tax_id
string
ID of the tax to be applied
notes
string
Notes for the sales receipt
terms
string
Terms and conditions

Query Parameters

organization_id
string
(Required)
ID of the organization
ignore_auto_number_generation
boolean
Ignore auto sales receipt number generation for this sales receipt. This mandates the sales receipt number.
can_send_in_mail
boolean
Send the sales receipt to customer via email.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesreceipts?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesreceipts?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url 'https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "460000000017138", "receipt_number": "SR-00001", "date": "2014-07-28", "payment_mode": "cash", "line_items": [ { "item_id": "460000000017088", "rate": 120, "quantity": 2, "tax_id": "460000000017094" } ], "notes": "Thank you for your business", "terms": "Payment received in full" }

Response Example

{ "code": 0, "message": "Sales Receipt Created Successfully.", "salesreceipt": { "sales_receipt_id": "460000000039129", "receipt_number": "SR-00001", "date": "2014-07-28", "status": "sent", "payment_mode": "cash", "customer_id": "460000000017138", "customer_name": "Instruments Inc", "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "line_items": [ { "item_id": "460000000017088", "name": "Hard Drive", "description": "500GB, USB 2.0 interface", "rate": 120, "quantity": 2, "unit": "Nos", "item_total": 240, "tax_id": "460000000017094", "tax_name": "Sales Tax", "tax_percentage": 10 } ], "sub_total": 240, "tax_total": 24, "total": 264, "notes": "Thank you for your business", "terms": "Payment received in full", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530" } }

List sales receipts

List all sales receipts.
OAuth Scope : ZohoBooks.invoices.READ

Query Parameters

organization_id
string
(Required)
ID of the organization
receipt_number
string
Search receipt by receipt number. Filters receipts based on their unique identifier. Supports receipt_number_startswith and receipt_number_contains variants. Maximum length is 100 characters. Useful for finding specific receipts or receipts with similar numbering patterns.
item_name
string
Search receipt by item name. Supports item_name_startswith and item_name_contains variants. Maximum length is 100 characters.
sort_column
string
Specify the column field for sorting sales receipt results. Available options include customer_name, receipt_number, date, total, and created_time.
filter_by
string
Filter sales receipts by status. Allowed Values: ThisWeek, ThisMonth, ThisQuarter, ThisYear,PreviousDay, PreviousWeek, PreviousMonth, PreviousQuarter, PreviousYear, Status.All, Status.Draft, Status.Sent
customer_id
string
Filter sales receipts by specific customer identifier.
date
string
Filter sales receipts by date. Available variants include date_start, date_end, date_before, and date_after. Default date format: yyyy-mm-dd.
total
double
Filter sales receipts by total amount using various range operators. Available variants include total_start, total_end, total_less_than, total_greater_than.
page
integer
Specify the page number for paginated results retrieval. Default value is 1 for the first page.
per_page
integer
Specify the maximum number of sales receipt records to return per page. Default value is 200 records per page.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesreceipts?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesreceipts?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesreceipts?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "salesreceipts": [ { "sales_receipt_id": "460000000039129", "receipt_number": "SR-00001", "date": "2014-07-28", "status": "sent", "payment_mode": "cash", "customer_id": "460000000017138", "customer_name": "Instruments Inc", "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "line_items": [ { "item_id": "460000000017088", "name": "Hard Drive", "description": "500GB, USB 2.0 interface", "rate": 120, "quantity": 2, "unit": "Nos", "item_total": 240, "tax_id": "460000000017094", "tax_name": "Sales Tax", "tax_percentage": 10 } ], "sub_total": 240, "tax_total": 24, "total": 264, "notes": "Thank you for your business", "terms": "Payment received in full", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530" }, {...}, {...} ] }

Update a sales receipt

Update an existing sales receipt.
OAuth Scope : ZohoBooks.invoices.UPDATE

Arguments

customer_id
string
(Required)
Unique identifier for the customer
receipt_number
string
Sales receipt number
date
string
Date of the sales receipt
payment_mode
string
Mode through which payment was received
line_items
array
Line items for the sales receipt
Show Sub-Attributes arrow
item_id
string
ID of the item
rate
double
Rate of the item
quantity
double
Quantity of the item
notes
string
Notes for the sales receipt

Path Parameters

sales_receipt_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/books/v3/salesreceipts/460000000039129?organization_id=10234695", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesreceipts/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url 'https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "460000000017138", "receipt_number": "SR-00001", "date": "2014-07-28", "payment_mode": "cash", "line_items": [ { "item_id": "460000000017088", "rate": 120, "quantity": 2 } ], "notes": "Thank you for your business" }

Response Example

{ "code": 0, "message": "Sales Receipt Updated Successfully.", "salesreceipt": { "sales_receipt_id": "460000000039129", "receipt_number": "SR-00001", "date": "2014-07-28", "status": "sent", "payment_mode": "cash", "customer_id": "460000000017138", "customer_name": "Instruments Inc", "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "line_items": [ { "item_id": "460000000017088", "name": "Hard Drive", "description": "500GB, USB 2.0 interface", "rate": 120, "quantity": 2, "unit": "Nos", "item_total": 240, "tax_id": "460000000017094", "tax_name": "Sales Tax", "tax_percentage": 10 } ], "sub_total": 240, "tax_total": 24, "total": 264, "notes": "Thank you for your business", "terms": "Payment received in full", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530" } }

Get a sales receipt

Get the details of a sales receipt.
OAuth Scope : ZohoBooks.invoices.READ

Path Parameters

sales_receipt_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization
accept
string
Get the details of a particular sales receipt in formats such as json/ pdf/ html. Default format is json. Allowed Values: json, pdf, html.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/books/v3/salesreceipts/460000000039129?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesreceipts/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "salesreceipt": { "sales_receipt_id": "460000000039129", "receipt_number": "SR-00001", "date": "2014-07-28", "status": "sent", "payment_mode": "cash", "customer_id": "460000000017138", "customer_name": "Instruments Inc", "currency_id": "460000000000097", "currency_code": "USD", "currency_symbol": "$", "exchange_rate": 1, "line_items": [ { "item_id": "460000000017088", "name": "Hard Drive", "description": "500GB, USB 2.0 interface", "rate": 120, "quantity": 2, "unit": "Nos", "item_total": 240, "tax_id": "460000000017094", "tax_name": "Sales Tax", "tax_percentage": 10 } ], "sub_total": 240, "tax_total": 24, "total": 264, "notes": "Thank you for your business", "terms": "Payment received in full", "created_time": "2014-07-28T08:29:07+0530", "last_modified_time": "2014-08-25T11:23:26+0530" } }

Delete a sales receipt

Delete an existing sales receipt.
OAuth Scope : ZohoBooks.invoices.DELETE

Path Parameters

sales_receipt_id
string
(Required)

Query Parameters

organization_id
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/books/v3/salesreceipts/460000000039129?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/books/v3/salesreceipts/460000000039129?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/books/v3/salesreceipts/460000000039129?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Sales Receipt Deleted Successfully." }

Email a sales receipt

Email a sales receipt to the customer.
OAuth Scope : ZohoBooks.invoices.CREATE

Arguments

to_mail_ids
array
(Required)
Array of email addresses of the recipients
subject
string
(Required)
Subject of the mail
body
string
(Required)
Body of the mail

Query Parameters

attach_pdf
boolean
Send the sales receipt pdf with the email.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/books/v3/salesreceipts/%7Bsales_receipt_id%7D/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/books/v3/salesreceipts/%7Bsales_receipt_id%7D/email") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/books/v3/salesreceipts/%7Bsales_receipt_id%7D/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 = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/books/v3/salesreceipts/%7Bsales_receipt_id%7D/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": "/books/v3/salesreceipts/%7Bsales_receipt_id%7D/email", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url https://www.zohoapis.com/books/v3/salesreceipts/%7Bsales_receipt_id%7D/email \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "to_mail_ids": [ "john@safinstruments.com" ], "subject": "Sales Receipt from Zillium Inc", "body": "Please find the sales receipt attached." }

Response Example