API Docs
/
No Results Found
Sales Returns

Sales Returns

A Return Material Authorization (RMA) or Sales Return is the process of a seller accepting a purchased item back from the consumer. In turn, the customer receives credit, cash refund or a replacement.

End Points

Attribute

salesreturn_id
long
Unique ID generated by the server for the Sales Return.
salesreturn_number
string
Return Merchandise Authorisation (RMA) number of the Sales Return.
date
string
Date on which the entity was created.
reason
string
The reason for raising a Sales Return.
line_items
array
The underlying items in a Sales Return
Show Sub-Attributes arrow
line_item_id
long
Unique ID generated by the server for each line item. This is used as an identifier.
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
name
string
Name of the line item.
description
string
Description of the line item.
unit
string
Measurement unit of the line item.
rate
double
Price of the line item in an entity.
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order.
quantity
double
The quantity that can be received for the line item.
non_receive_quantity
double
The quantity that cannot be received for the line item.
warehouse_id
long
Unique ID generated by the server for each warehouse
warehouse_name
string
Name of the warehouse
comments
array
History related to the Sales Return.
Show Sub-Attributes arrow
comment_id
long
Unique ID generated by the server for the comment(history). This is used as an identifier.
salesreturn_id
long
Unique ID generated by the server for the Sales Return.
commented_by
string
Indicates the user who performed the action on the purchase order.
comment_type
string
Indicates the type of the action
date
string
Date on which the entity was created.
date_description
string
Indicates the time duration since the action was performed
time
string
Indicates the time when the action was performed
operation_type
string
Type of operation performed on the transaction
transaction_id
long
Unique ID generated by the server for the transaction. This is used as an identifier.
transaction_type
string
Indicates the type of transaction.
salesreturn_status
string
Status of the Sales Return.
salesorder_id
long
Unique ID generated by the server for the Sales Order from which the Sales Return is created.
salesorder_number
string
Unique sales order number for each sales order.

Example

{ "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "rate": 122, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020, "warehouse_name": "WarehouseName" } ], "comments": [ { "comment_id": 16115000000097016, "salesreturn_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date": "2015-05-28", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "salesreturn" } ], "salesreturn_status": "approved", "salesorder_id": 4815000000044936, "salesorder_number": "SO-00032" }

Create a Sales Return

Creation of Sales Return. Sales return can be created for all the shipped units of the items in a sales order.
oauthscope : ZohoInventory.salesreturns.CREATE

Arguments

salesreturn_number
string
Return Merchandise Authorisation (RMA) number of the Sales Return.
date
string
Date on which the entity was created.
reason
string
The reason for raising a Sales Return.
line_items
array
(Required)
The underlying items in a Sales Return
Show Sub-Attributes arrow
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order.
quantity
double
The quantity that can be received for the line item.
non_receive_quantity
double
The quantity that cannot be received for the line item.
warehouse_id
long
Unique ID generated by the server for each warehouse

Query Parameters

salesorder_id
Unique ID generated by the server for the Sales Order from which the Sales Return is created.

Request Example

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

Body Parameters

Click to copy
{ "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "item_id": 4815000000044100, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020 } ] }

Response Example

{ "code": 0, "message": "Return created successfully", "salesreturn": { "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "rate": 122, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020, "warehouse_name": "WarehouseName" } ], "comments": [ { "comment_id": 16115000000097016, "salesreturn_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date": "2015-05-28", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "salesreturn" } ], "salesreturn_status": "approved", "salesorder_id": 4815000000044936, "salesorder_number": "SO-00032" } }

List all Sales Returns

Lists all the Sales Returns present in Zoho Inventory.
oauthscope : ZohoInventory.salesreturns.GET

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/salesreturns?organization_id=10234695" type: GET headers: headers_data content-type: application/octet-stream connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/inventory/v1/salesreturns?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f' } }; fetch('https://www.zohoapis.com/inventory/v1/salesreturns?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.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } conn.request("GET", "/inventory/v1/salesreturns?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/inventory/v1/salesreturns?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/inventory/v1/salesreturns?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f'

Response Example

{ "code": 0, "message": "success", "salesreturns": { "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "salesorder_id": 4815000000044936, "salesorder_number": "SO-00032", "customer_id": 4815000000044080, "customer_name": "Molly", "salesreturn_status": "approved", "receive_status": "received", "refund_status": "refunded", "quantity": 5, "refunded_amount": 2670 } }

Update a Sales Return

Updation of Sales Return.
oauthscope : ZohoInventory.salesreturns.UPDATE

Arguments

salesreturn_number
string
Return Merchandise Authorisation (RMA) number of the Sales Return.
date
string
Date on which the entity was created.
reason
string
The reason for raising a Sales Return.
line_items
array
(Required)
The underlying items in a Sales Return
Show Sub-Attributes arrow
line_item_id
long
Unique ID generated by the server for each line item. This is used as an identifier.
item_id
long
Unique ID generated by the server for the item. This is used as an identifier.
salesorder_item_id
long
Unique ID generated by the server for each line item in a sales order.
quantity
double
The quantity that can be received for the line item.
non_receive_quantity
double
The quantity that cannot be received for the line item.
warehouse_id
long
Unique ID generated by the server for each warehouse

Query Parameters

salesorder_id
Unique ID generated by the server for the Sales Order from which the Sales Return is created.

Request Example

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

Body Parameters

Click to copy
{ "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020 } ] }

Response Example

{ "code": 0, "message": "Return updated successfully", "salesreturn": { "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "rate": 122, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020, "warehouse_name": "WarehouseName" } ], "comments": [ { "comment_id": 16115000000097016, "salesreturn_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date": "2015-05-28", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "salesreturn" } ], "salesreturn_status": "approved", "receive_status": "received", "refund_status": "refunded", "salesorder_id": 4815000000044936, "salesorder_number": "SO-00032", "salesreturnreceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "quantity": 3 } ] } ], "creditnotes": [ { "creditnote_id": 90300000072369, "creditnote_number": "CN-0029", "status": "closed", "date": "2015-05-28", "total": 2670 } ] } }

Retrieve a Sales Return

Retrieves the details for an existing Sales Return.
oauthscope : ZohoInventory.salesreturns.GET

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695" type: GET headers: headers_data content-type: application/octet-stream connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f' } }; fetch('https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?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.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } conn.request("GET", "/inventory/v1/salesreturns/4815000000044972?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/inventory/v1/salesreturns/4815000000044972?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url 'https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f'

Response Example

{ "code": 0, "message": "success", "salesreturn": { "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "reason": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "rate": 122, "salesorder_item_id": 4815000000044892, "quantity": 3, "non_receive_quantity": 2, "warehouse_id": 130426000000664020, "warehouse_name": "WarehouseName" } ], "comments": [ { "comment_id": 16115000000097016, "salesreturn_id": 4815000000044972, "commented_by": "John", "comment_type": "string", "date": "2015-05-28", "date_description": "few seconds ago", "time": "2:18 PM", "operation_type": "Updated", "transaction_id": 1232423434, "transaction_type": "salesreturn" } ], "salesreturn_status": "approved", "receive_status": "received", "refund_status": "refunded", "salesorder_id": 4815000000044936, "salesorder_number": "SO-00032", "salesreturnreceives": [ { "receive_id": 4815000000045035, "receive_number": "PR-00002", "date": "2015-05-28", "notes": "Sample Note", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "quantity": 3 } ] } ], "creditnotes": [ { "creditnote_id": 90300000072369, "creditnote_number": "CN-0029", "status": "closed", "date": "2015-05-28", "total": 2670 } ] } }

Delete a Sales Return

Deletes a Sales Return from Zoho Inventory.
oauthscope : ZohoInventory.salesreturns.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695" type: DELETE headers: headers_data content-type: application/octet-stream connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f' } }; fetch('https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?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.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } conn.request("DELETE", "/inventory/v1/salesreturns/4815000000044972?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/inventory/v1/salesreturns/4815000000044972?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/inventory/v1/salesreturns/4815000000044972?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f'

Response Example

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

Create a Sales Return Receive

Creating a sales return receive to mark the receivable goods as received.
oauthscope : ZohoInventory.salesreturnreceives.CREATE

Arguments

date
string
Date on which the entity was created.
line_items
array
(Required)
The underlying items in a Sales Return
Show Sub-Attributes arrow
line_item_id
Unique ID generated by the server for each line item. This is used as an identifier.
quantity
double
The quantity that can be received for the line item.
notes
string
Notes for the current entity.

Query Parameters

salesreturn_id
Unique ID generated by the server for the Sales Return.

Request Example

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

Body Parameters

Click to copy
{ "date": "2015-05-28", "line_items": [ { "line_item_id": null, "quantity": 3 } ], "notes": "Sample Note" }

Response Example

{ "code": 0, "message": "Sales Return Receive Created Successfully", "salesreturn": { "receive_id": 4815000000045035, "receive_number": "PR-00002", "salesreturn_id": 4815000000044972, "salesreturn_number": "RMA-00001", "date": "2015-05-28", "line_items": [ { "line_item_id": 4815000000044897, "item_id": 4815000000044100, "name": "Laptop-white/15inch/dell", "description": "Just a sample description.", "unit": "qty", "quantity": 3 } ], "notes": "Sample Note" } }

Delete a Sales Return Receive

Deletes the sales return receive of a sales return.
oauthscope : ZohoInventory.salesreturnreceives.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/salesreturnreceives/987000000654321?organization_id=10234695" type: DELETE headers: headers_data content-type: application/octet-stream connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/inventory/v1/salesreturnreceives/987000000654321?organization_id=10234695") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { Authorization: 'Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f' } }; fetch('https://www.zohoapis.com/inventory/v1/salesreturnreceives/987000000654321?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.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } conn.request("DELETE", "/inventory/v1/salesreturnreceives/987000000654321?organization_id=10234695", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/inventory/v1/salesreturnreceives/987000000654321?organization_id=10234695", "headers": { "Authorization": "Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url 'https://www.zohoapis.com/inventory/v1/salesreturnreceives/987000000654321?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f'

Response Example

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