{
  "opencollection": "1.0.0",
  "info": {
    "name": "batches API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "batches",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List all batches",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches",
            "params": [
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              },
              {
                "name": "item_id",
                "value": "6780203000000167467",
                "type": "query",
                "description": "Unique identifier of the item to fetch batches for."
              },
              {
                "name": "include_empty_batches",
                "value": "false",
                "type": "query",
                "description": "Include batches that have zero quantity. Allowed values <code>true</code> and <code>false</code>."
              },
              {
                "name": "warehouse_id",
                "value": "6780203000000093215",
                "type": "query",
                "description": "Filter batches by warehouse ID."
              },
              {
                "name": "location_id",
                "value": "6780203000000093215",
                "type": "query",
                "description": "Filter batches by location ID."
              },
              {
                "name": "batch_ids",
                "value": "6780203000000176162,6780203000000176163",
                "type": "query",
                "description": "Comma-separated list of batch IDs to filter the response."
              },
              {
                "name": "search_text",
                "value": "BATCH",
                "type": "query",
                "description": "Search batches by batch number or manufacturer batch number."
              },
              {
                "name": "status",
                "value": "active",
                "type": "query",
                "description": "Filter batches by status. Allowed values <code>active</code> and <code>inactive</code>."
              },
              {
                "name": "filter_by",
                "value": "Status.All",
                "type": "query",
                "description": "Filter batches by status, expiry, type, or stock. For example <code>Status.All</code>, <code>Expiry.Expired</code>, <code>Stock.Empty</code>."
              },
              {
                "name": "sort_column",
                "value": "batch_number",
                "type": "query",
                "description": "Column to sort the response by. Allowed values <code>batch_number</code>, <code>external_batch_number</code>, <code>manufacturer_batch_number</code>, <code>manufactured_date</code>, <code>expiry_date</code>, <code>sales_rate</code>, and <code>label_rate</code>."
              },
              {
                "name": "sort_order",
                "value": "A",
                "type": "query",
                "description": "Order of sorting. Allowed values <code>A</code> for ascending and <code>D</code> for descending."
              },
              {
                "name": "page",
                "value": "1",
                "type": "query",
                "description": "Page number to be fetched. Default value is 1."
              },
              {
                "name": "per_page",
                "value": "200",
                "type": "query",
                "description": "Number of records to be fetched per page. Default value is 200."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "List all batches available for a given item."
        },
        {
          "info": {
            "name": "Create a batch",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches",
            "params": [
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Create a new batch for an item that has batch tracking enabled."
        },
        {
          "info": {
            "name": "Bulk delete batches",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches",
            "params": [
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              },
              {
                "name": "batch_ids",
                "value": "6780203000000176162,6780203000000176163",
                "type": "query",
                "description": "Comma-separated list of batch IDs to delete."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Delete multiple batches in a single request. Batches with associated transactions cannot be deleted."
        },
        {
          "info": {
            "name": "Retrieve a batch",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/:batch_id",
            "params": [
              {
                "name": "batch_id",
                "value": "6780203000000176162",
                "type": "path",
                "description": "Unique identifier of the batch."
              },
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Fetch the details of a specific batch."
        },
        {
          "info": {
            "name": "Update a batch",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/:batch_id",
            "params": [
              {
                "name": "batch_id",
                "value": "6780203000000176162",
                "type": "path",
                "description": "Unique identifier of the batch."
              },
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Update the details of an existing batch."
        },
        {
          "info": {
            "name": "Delete a batch",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/:batch_id",
            "params": [
              {
                "name": "batch_id",
                "value": "6780203000000176162",
                "type": "path",
                "description": "Unique identifier of the batch."
              },
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Delete a single batch. The batch must not have any associated transactions."
        },
        {
          "info": {
            "name": "Mark a batch as active",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/:batch_id/active",
            "params": [
              {
                "name": "batch_id",
                "value": "6780203000000176162",
                "type": "path",
                "description": "Unique identifier of the batch."
              },
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Mark a specific batch as active."
        },
        {
          "info": {
            "name": "Mark a batch as inactive",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/:batch_id/inactive",
            "params": [
              {
                "name": "batch_id",
                "value": "6780203000000176162",
                "type": "path",
                "description": "Unique identifier of the batch."
              },
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Mark a specific batch as inactive."
        },
        {
          "info": {
            "name": "Mark batches as active",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/active",
            "params": [
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              },
              {
                "name": "batch_ids",
                "value": "6780203000000176162,6780203000000176163",
                "type": "query",
                "description": "Comma-separated list of batch IDs to mark as active."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Mark multiple batches as active in a single request."
        },
        {
          "info": {
            "name": "Mark batches as inactive",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.zohoapis.com/inventory/v1/items/batches/inactive",
            "params": [
              {
                "name": "organization_id",
                "value": "10234695",
                "type": "query",
                "description": "ID of the organization"
              },
              {
                "name": "batch_ids",
                "value": "6780203000000176162,6780203000000176163",
                "type": "query",
                "description": "Comma-separated list of batch IDs to mark as inactive."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "implicit",
              "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
              "credentials": {
                "clientId": "{{clientId}}"
              }
            }
          },
          "docs": "Mark multiple batches as inactive in a single request."
        }
      ]
    }
  ],
  "bundled": true
}