Mark status in Zoho Inventory
Table of Contents
Overview
The zoho.inventory.markStatus task is used to change the status field with one of the allowed values in the specified Zoho Inventory module.
Syntax
<response> = zoho.inventory.markStatus(<module>, <org_id>, <record_id>, <status>, [<connection>]);
Params | Data type | Description |
<response> | KEY-VALUE | The status of the executed task. |
<module> | TEXT | The name of the Zoho Inventory module in which the status field's value will be changed. Allowed Values:
|
<org_id> | TEXT | The organization ID of the account in which the value of the status field will be changed. Note: Learn how to fetch organization ID from the UI and from the response of zoho.inventory.getOrganization task. |
<record_id> | TEXT | The ID of the record whose status needs to be changed. |
<status> | TEXT | The status value. The following table lists the allowed status values for each module: Module Name - Allowed values
|
<connection> (optional)* | TEXT | The name of the connection. *Note: This parameter is mandatory in Zoho Cliq. |
Example
The following script sets the status of the specified record to void, in the Zoho Inventory module - SalesOrders.
response = zoho.inventory.markStatus("SalesOrders", "59XXXX43", "528XXXXXXXXXXX043", "void", "inventory_connection");
where:
response
"SalesOrders"
"59XXXX43"
"528XXXXXXXXXXX043"
"void"
"inventory_connection"
Response Format
Success Response
The success response will be returned in the following format:
{
"code": 0,
"message": "The status of the Sales order has been changed to Void.",
"data": {
}
}
Failure Response
The failure response returned for incorrect or non-existent organization ID will be returned in the following format:
{
"code": 6041,
"message": "This user is not associated with the CompanyID/CompanyName: 58XXXX50."
}The failure response returned for incorrect or non-existent record ID will be returned in the following format:
{
"code": 1002,
"message": "Sales Order does not exist."
}The failure response returned for supplying unallowed status value will be returned in the following format.
{
"code": 5,
"message": "Invalid URL Passed"
}