Approvals

Approvals

Approval rules determine who must approve a transaction (invoice, sales order, purchase order, bill, etc.) before it moves forward. Use these endpoints to create, list, retrieve, update, delete, and reorder approval rules in Zoho Inventory.

Download Approvals OpenAPI Document

Create an approval rule

Create a new approval rule for a transaction type in your organization.
OAuth Scope : ZohoInventory.settings.CREATE

Arguments

name
string
(Required)
Name of the approval rule. Max-length [100].
description
string
Description of the approval rule.
entity_type
string
(Required)
Transaction type the rule applies to (e.g. purchaseorder, bill, invoice).
is_default
boolean
Set to true to make this the default rule for the transaction type.
approval_type
string
Type of the approval rule.
rule
object
Condition rule that triggers this approval.
Show Sub-Attributes arrow
criteria_string
string
Criteria expression string (e.g. 1 AND 2).
columns
array
Array of rule condition columns.
Show Sub-Attributes arrow
index
integer
Position index of this condition.
field
string
Field name to evaluate.
comparator
string
Comparison operator (e.g. greater_than, equals).
value
string
Value to compare against.
approval_levels
array
Ordered list of approvers for this rule.
Show Sub-Attributes arrow
type
string
(Required)
Approver type. Allowed values: none, user, lookup.
order
integer
(Required)
Position of this approver in the approval sequence.
user_id
string
Unique ID of the approver. Required when type is user.
approval_policy_id
string
ID of the associated approval policy.
lookup_id
string
ID of the lookup field. Required when type is lookup.
sub_type
string
Hierarchy sub-type when using lookup. Allowed values: one_level, two_level, three_level, four_level, five_level, single_level, multi_level.
notes
string
Notes for this approval level. Max-length [500].

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

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/inventory/v1/settings/approvals?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/settings/approvals?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/inventory/v1/settings/approvals?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", "/inventory/v1/settings/approvals?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/settings/approvals?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/inventory/v1/settings/approvals?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
{ "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "is_default": false, "approval_type": "manual", "rule": { "criteria_string": "1", "columns": [ { "index": 1, "field": "total", "comparator": "greater_than", "value": "5000" } ] }, "approval_levels": [ { "type": "user", "order": 1, "user_id": "982000000554041", "approval_policy_id": "982000000567204", "lookup_id": "982000000567300", "sub_type": "one_level", "notes": "Manager review required" } ] }

Response Example

{ "code": 0, "message": "The approval rule has been created.", "approval": { "approval_id": "982000000567204", "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "entity_type_formatted": "Purchase Order", "is_default": false, "approval_type": "manual", "rule": { "criteria_string": "1", "columns": [ { "index": 1, "field": "total", "comparator": "greater_than", "value": "5000" } ] }, "approval_levels": [ { "user_id": "982000000554041", "user_name": "John Smith", "email": "john.smith@example.com", "order": 1 } ] } }

List approval rules

Get the list of approval rules configured for a specific transaction type.
OAuth Scope : ZohoInventory.settings.READ

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
entity_type
string
(Required)
Transaction type for which to list approval rules. Required. Examples: purchaseorder, bill, salesorder, invoice.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/settings/approvals?organization_id=10234695&entity_type=purchaseorder" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/inventory/v1/settings/approvals?organization_id=10234695&entity_type=purchaseorder") .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/inventory/v1/settings/approvals?organization_id=10234695&entity_type=purchaseorder', 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", "/inventory/v1/settings/approvals?organization_id=10234695&entity_type=purchaseorder", 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/settings/approvals?organization_id=10234695&entity_type=purchaseorder", "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/inventory/v1/settings/approvals?organization_id=10234695&entity_type=purchaseorder' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "approvals": [ { "approval_id": "982000000567204", "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "is_default": false }, {...}, {...} ] }

Update an approval rule

Update the details of an existing approval rule.
OAuth Scope : ZohoInventory.settings.UPDATE

Path Parameters

approval_id
string
(Required)
Unique ID of the approval rule.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

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/inventory/v1/settings/approvals/982000000567204?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/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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", "/inventory/v1/settings/approvals/982000000567204?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/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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
{ "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "is_default": false, "approval_type": "manual", "rule": { "criteria_string": "1", "columns": [ { "index": 1, "field": "total", "comparator": "greater_than", "value": "5000" } ] }, "approval_levels": [ { "type": "user", "order": 1, "user_id": "982000000554041", "approval_policy_id": "982000000567204", "lookup_id": "982000000567300", "sub_type": "one_level", "notes": "Manager review required" } ] }

Response Example

{ "code": 0, "message": "The approval rule has been updated.", "approval": { "approval_id": "982000000567204", "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "entity_type_formatted": "Purchase Order", "is_default": false, "approval_type": "manual", "rule": { "criteria_string": "1", "columns": [ { "index": 1, "field": "total", "comparator": "greater_than", "value": "5000" } ] }, "approval_levels": [ { "user_id": "982000000554041", "user_name": "John Smith", "email": "john.smith@example.com", "order": 1 } ] } }

Retrieve an approval rule

Get the details of an approval rule.
OAuth Scope : ZohoInventory.settings.READ

Path Parameters

approval_id
string
(Required)
Unique ID of the approval rule.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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", "/inventory/v1/settings/approvals/982000000567204?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/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "approval": { "approval_id": "982000000567204", "name": "Purchase Order Approval", "description": "Requires manager approval for all purchase orders.", "entity_type": "purchaseorder", "entity_type_formatted": "Purchase Order", "is_default": false, "approval_type": "manual", "rule": { "criteria_string": "1", "columns": [ { "index": 1, "field": "total", "comparator": "greater_than", "value": "5000" } ] }, "approval_levels": [ { "user_id": "982000000554041", "user_name": "John Smith", "email": "john.smith@example.com", "order": 1 } ] } }

Delete an approval rule

Delete an approval rule from your organization.
OAuth Scope : ZohoInventory.settings.DELETE

Path Parameters

approval_id
string
(Required)
Unique ID of the approval rule.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?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", "/inventory/v1/settings/approvals/982000000567204?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/settings/approvals/982000000567204?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/inventory/v1/settings/approvals/982000000567204?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

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

Reorder approval rules

Change the priority order of approval rules for a transaction type.
OAuth Scope : ZohoInventory.settings.CREATE

Arguments

entity_type
string
(Required)
Transaction type for which to reorder approvals (e.g. purchaseorder, bill, invoice).
order
array
(Required)
Array of objects specifying the new priority order.
Show Sub-Attributes arrow
index
integer
Position index for the approval rule in the new order.
approval_id
string
Unique ID of the approval rule.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

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/inventory/v1/settings/approvals/reorder?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/settings/approvals/reorder?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/inventory/v1/settings/approvals/reorder?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", "/inventory/v1/settings/approvals/reorder?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/settings/approvals/reorder?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/inventory/v1/settings/approvals/reorder?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
{ "entity_type": "purchaseorder", "order": [ { "index": 0, "approval_id": "982000000567204" } ] }

Response Example

{ "code": 0, "message": "Approval rules have been reordered." }