API Docs
/
No Results Found
Receipts

Receipts

Upload receipts for autoscanning.

End Points
Upload Receipts

Upload Receipts

Upload receipts for autoscanning.

Arguments

receipt
binary
(Required)
File Path of the Receipt to be uploaded.

Request Example

Click to copy
parameters_data = Map(); parameters_data.put("field1", "value1") parameters_data.put("field2", "value2") headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses" type: POST headers: headers_data parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001"); RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/expenses") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001") .build(); Response response = client.newCall(request).execute();
const form = new FormData(); form.append("field1", "value1"); form.append("field2", "value2"); const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' } }; options.body = form; fetch('https://www.zohoapis.com/expense/v1/expenses', 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 = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n" headers = { 'X-com-zoho-expense-organizationid': "10234695", 'content-type': "multipart/form-data; boundary=---011000010111000001101001" } conn.request("POST", "/expense/v1/expenses", 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": "/expense/v1/expenses", "headers": { "X-com-zoho-expense-organizationid": "10234695", "content-type": "multipart/form-data; boundary=---011000010111000001101001" } }; 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("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/expenses \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: multipart/form-data' \ --form field1=value1 \ --form field2=value2

Body Parameters

Click to copy
{ "receipt": "@/receipt.jpg" }

Response Example

{ "code": 0, "message": "The receipt has been uploaded successfully." }