OpenAPI Specification
openapi: 3.0.0
info:
title: batches packages API
description: Batches help you track inventory items by batch numbers, manufacturing dates, and expiration dates.
contact: {}
version: 1.0.0
servers:
- url: https://www.zohoapis.com/inventory/v1
description: API Endpoint
tags:
- name: packages
description: Packages Module
paths:
/packages:
x-mcp-group:
- Packages
parameters:
- $ref: '#/components/parameters/organization_id'
post:
tags:
- packages
operationId: create_package
summary: Creating a package
description: A new package can be created. To create package, URL parameter salesorder_id also needed.
parameters:
- name: salesorder_id
in: query
description: Unique ID generated by the server for sales order
required: true
schema:
type: string
example: 504366000000062000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/creating-a-package-request'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/creating-a-package-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.CREATE
get:
tags:
- packages
operationId: list_packages
summary: List all packages
description: List all existing packages.
parameters:
- name: sort_column
in: query
description: sorting column. it can have values as <code>tracking_number|salesorder_number|package_number|date|created_time|last_modified_time|customer_name|customer_id|shipment_date|quantity|delivery_method</code>
required: false
schema:
type: string
example: created_by
- name: search_text
in: query
description: search the packages by text
required: false
schema:
type: string
example: PK-00001
- name: filter_by
in: query
description: 'filter the packages by status. Status can be <code>All|NotShipped|Shipped|Delivered</code> For example: Status.All'
required: false
schema:
type: string
example: Status.All
- name: packing_number_startswith
in: query
description: Used for searching package_id which starts with given number in advanced search option
required: false
schema:
type: integer
format: int64
example: 504366
- name: packing_number_contains
in: query
description: Used for searching package_id which contains given number in advanced search option
required: false
schema:
type: integer
format: int64
example: 66000
- name: salesorder_number_startswith
in: query
description: Used for searching salesorder_id which starts with given number in advanced search option
required: false
schema:
type: integer
format: int64
example: 504366
- name: salesorder_number_contains
in: query
description: Used for searching salesorder_id which contains given number in advanced search option
required: false
schema:
type: integer
format: int64
example: 66000
- name: date_start
in: query
description: Used for searching packages from specified date <code>Use the node as date_after if specified date is not to be considered</code>
required: false
schema:
type: string
format: date
example: 2017-01-10 00:00:00+00:00
- name: date_end
in: query
description: Used for searching packages till specified date <code>Use the node as date_before if specified date is not to be considered</code>
required: false
schema:
type: string
format: date
example: 2017-01-14 00:00:00+00:00
- name: shipment_date_start
in: query
description: Used for searching shipments from specified date <code>Use the node as shipment_date_after if specified date is not to be considered</code>
required: false
schema:
type: string
format: date
example: 2017-01-10 00:00:00+00:00
- name: shipment_date_end
in: query
description: Used for searching shipments till specified date <code>Use the node as shipment_date_before if specified date is not to be considered</code>
required: false
schema:
type: string
format: date
example: 2017-01-14 00:00:00+00:00
- name: customer_name_startswith
in: query
description: Used for searching salesorder_id which starts with given number in advanced search option
required: false
schema:
type: string
example: sam
- name: customer_name_contains
in: query
description: Used for searching salesorder_id which contains given number in advanced search option
required: false
schema:
type: string
example: ethan
- name: delivery_method_startswith
in: query
description: Used for searching delivery_method which starts with given string in advanced search option
required: false
schema:
type: string
example: sam
- name: delivery_method_contains
in: query
description: Used for searching delivery_method which contains given string in advanced search option
required: false
schema:
type: string
example: ethan
- name: status
in: query
description: status of the shipment order
required: false
schema:
type: string
example: shipped
- name: customer_id
in: query
description: Unique ID generated by the for the customer
required: false
schema:
type: string
example: 504366000000062000
- name: page
in: query
description: Page number to be fetched. Default value is 1.
required: false
schema:
type: integer
default: 1
example: 1
- name: per_page
in: query
description: Number of records to be fetched per page. Default value is 200.
required: false
schema:
type: integer
default: 200
example: 200
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-all-packages-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.READ
/packages/{package_id}:
x-mcp-group:
- Packages
parameters:
- name: package_id
in: path
required: true
description: Unique identifier of the package.
schema:
type: string
example: 504366000000062100
- $ref: '#/components/parameters/organization_id'
get:
tags:
- packages
operationId: get_package
summary: Retrieving a package
description: Retrieving details of existing package.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/retrieving-a-package-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.READ
put:
tags:
- packages
operationId: update_package
summary: Updating a package
description: Updating details of existing package.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updating-a-package-request'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/updating-a-package-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.UPDATE
delete:
tags:
- packages
operationId: delete_package
summary: Deleting a package
description: Deleting an existing package.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/deleting-a-package-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.DELETE
/packages/print:
x-mcp-group:
- Packages
parameters:
- $ref: '#/components/parameters/organization_id'
get:
tags:
- packages
operationId: bulk_print_packages
summary: Bulk print packages
description: Print package slips.
parameters:
- name: package_ids
in: query
description: Export packages as pdf and print them. <code>List of package ids separated by comma</code>
required: true
schema:
type: string
example: 5.0436600000006205e+35
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/bulk-print-packages-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.packages.READ
components:
schemas:
carrier:
description: Carrier used for shipment of package
type: string
example: FedEx
retrieving-a-package-response:
type: object
properties:
code:
type: integer
example: 0
readOnly: true
message:
type: string
example: success
readOnly: true
package:
type: array
items:
type: object
properties:
billing_address:
$ref: '#/components/schemas/billing_address'
contact_persons:
$ref: '#/components/schemas/contact_persons'
created_time:
$ref: '#/components/schemas/created_time'
customer_id:
$ref: '#/components/schemas/customer_id'
customer_name:
$ref: '#/components/schemas/customer_name'
date:
$ref: '#/components/schemas/date'
email:
$ref: '#/components/schemas/email'
is_emailed:
$ref: '#/components/schemas/is_emailed'
last_modified_time:
$ref: '#/components/schemas/last_modified_time'
line_items:
$ref: '#/components/schemas/line_items'
mobile:
$ref: '#/components/schemas/mobile'
notes:
$ref: '#/components/schemas/notes'
package_id:
$ref: '#/components/schemas/package_id'
package_number:
$ref: '#/components/schemas/package_number'
phone:
$ref: '#/components/schemas/phone'
salesorder_id:
$ref: '#/components/schemas/salesorder_id'
salesorder_number:
$ref: '#/components/schemas/salesorder_number'
shipment_order:
$ref: '#/components/schemas/shipment_order'
shipping_address:
$ref: '#/components/schemas/shipping_address'
template_id:
$ref: '#/components/schemas/template_id'
template_name:
$ref: '#/components/schemas/template_name'
template_type:
$ref: '#/components/schemas/template_type'
total_quantity:
$ref: '#/components/schemas/total_quantity'
custom_fields:
$ref: '#/components/schemas/custom_fields'
item_custom_fields:
description: Custom field of the item in package
type: array
items:
type: object
properties:
customfield_id:
$ref: '#/components/schemas/customfield_id'
data_type:
$ref: '#/components/schemas/data_type'
is_active:
$ref: '#/components/schemas/is_active'
label:
$ref: '#/components/schemas/label'
placeholder:
$ref: '#/components/schemas/placeholder'
show_in_all_pdf:
$ref: '#/components/schemas/show_in_all_pdf'
show_on_pdf:
$ref: '#/components/schemas/show_on_pdf'
value:
$ref: '#/components/schemas/value'
is_invoiced:
description: Sales order item is invoiced to the customer or not
type: boolean
example: false
creating-a-package-request:
type: object
required:
- date
- line_items
properties:
package_number:
$ref: '#/components/schemas/package_number'
date:
$ref: '#/components/schemas/date'
custom_fields:
$ref: '#/components/schemas/custom_fields'
line_items:
description: Details of the items in this package
type: array
items:
type: object
properties:
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
quantity:
$ref: '#/components/schemas/quantity'
mapped_items:
$ref: '#/components/schemas/mapped_items_create'
serial_numbers:
$ref: '#/components/schemas/serial_numbers'
batches:
$ref: '#/components/schemas/batches'
storages:
$ref: '#/components/schemas/storages'
notes:
$ref: '#/components/schemas/notes'
batches:
description: Batch details for the line item. Reference an existing batch using <code>batch_id</code>. Applicable only for items with batch tracking enabled.
type: array
items:
type: object
required:
- batch_id
- out_quantity
properties:
batch_id:
description: Unique identifier of an existing batch.
type: string
example: '6780203000000214019'
out_quantity:
description: Quantity removed from the batch.
type: number
format: float
example: 2
storages:
description: Bin/storage locations from which stock was issued for this batch.
type: array
x-node_available_in:
- Batch with Bin tracked items
items:
type: object
required:
- storage_id
- out_quantity
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093226'
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
zip:
description: Zipcode of the customer address
type: string
example: 11364
item_id:
description: Unique ID generated by the server of the item in package
type: string
example: 504366000000053200
shipping_date:
description: Date on which package is shipped
type: string
format: date
example: '2017-01-13'
package_number:
description: Name of the package
type: string
example: PA-00001
serial_numbers:
description: Serial numbers for the line item. Applicable only for items with serial tracking enabled.
type: array
items:
type: string
example: PKG-011
package-response:
type: object
properties:
billing_address:
$ref: '#/components/schemas/billing_address'
contact_persons:
$ref: '#/components/schemas/contact_persons'
created_time:
$ref: '#/components/schemas/created_time'
customer_id:
$ref: '#/components/schemas/customer_id'
customer_name:
$ref: '#/components/schemas/customer_name'
date:
$ref: '#/components/schemas/date'
email:
$ref: '#/components/schemas/email'
is_emailed:
$ref: '#/components/schemas/is_emailed'
last_modified_time:
$ref: '#/components/schemas/last_modified_time'
line_items:
$ref: '#/components/schemas/line_items'
mobile:
$ref: '#/components/schemas/mobile'
notes:
$ref: '#/components/schemas/notes'
package_id:
$ref: '#/components/schemas/package_id'
package_number:
$ref: '#/components/schemas/package_number'
phone:
$ref: '#/components/schemas/phone'
salesorder_id:
$ref: '#/components/schemas/salesorder_id'
salesorder_number:
$ref: '#/components/schemas/salesorder_number'
shipping_address:
$ref: '#/components/schemas/shipping_address'
template_id:
$ref: '#/components/schemas/template_id'
template_name:
$ref: '#/components/schemas/template_name'
template_type:
$ref: '#/components/schemas/template_type'
total_quantity:
$ref: '#/components/schemas/total_quantity'
custom_fields:
$ref: '#/components/schemas/custom_fields'
date:
description: Date on which package is prepared
type: string
example: '2017-01-11'
creating-a-package-response:
type: object
properties:
code:
type: integer
example: 0
readOnly: true
message:
type: string
example: Package created successfully. It's now time to ship!
readOnly: true
package:
$ref: '#/components/schemas/package'
custom_fields:
description: Custom fields for a package.
type: array
items:
type: object
properties:
customfield_id:
$ref: '#/components/schemas/customfield_id'
label:
$ref: '#/components/schemas/label'
value:
$ref: '#/components/schemas/value'
shipment_id:
description: Unique ID generated by the server for the shipment
type: string
example: 14954000000086344
batches-update:
description: Batch details for the line item. Reference an existing batch using <code>batch_id</code>. Applicable only for items with batch tracking enabled.
type: array
items:
type: object
required:
- batch_id
- out_quantity
properties:
batch_id:
description: Unique identifier of an existing batch.
type: string
example: '6780203000000214019'
out_quantity:
description: Quantity removed from the batch.
type: number
format: float
example: 2
storages:
description: Bin/storage locations from which stock was issued for this batch.
type: array
x-node_available_in:
- Batch with Bin tracked items
items:
type: object
required:
- storage_id
- out_quantity
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093226'
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
storage_out_id:
description: Unique identifier of the storage record. Applicable only when updating an existing storage entry.
type: string
example: '6780203000000997441'
value:
description: Value of the custom field
type: string
example: GBGD078
show_on_pdf:
example: null
updating-a-package-response:
type: object
properties:
code:
type: integer
example: 0
readOnly: true
message:
type: string
example: Package Updated Successfully.
readOnly: true
package:
$ref: '#/components/schemas/package'
mapped_items_update:
description: Items that are associated with the composite item (kit) in the line item. Applicable only when the line item is a kit type composite item.
type: array
items:
type: object
properties:
line_item_id:
$ref: '#/components/schemas/line_item_id'
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
quantity:
$ref: '#/components/schemas/quantity'
mapped_items:
description: Nested mapped items for kit within kit scenarios.
type: array
items:
type: object
properties:
line_item_id:
$ref: '#/components/schemas/line_item_id'
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
quantity:
$ref: '#/components/schemas/quantity'
shipment_number:
description: shipment number for the package
type: string
example: SN-00001
tracking_number:
description: Tracking number of the shipment
type: string
example: '794656855217'
country:
description: Name of the country of the customer address
type: string
example: U.S.A
status:
description: status of the shipment order
type: string
example: shipped
detailed_status:
description: Detailed shipment details received from the courier
type: string
example: Reached a courier facility near Toronto
label:
description: Label of the Custom Field
type: string
phone:
description: Phone number of the customer
type: string
example: +1 (999)999-9999
total_quantity:
description: Total quantity in the package
type: string
example: 1
quantity:
description: Number of quantity of line items in sales order
type: number
format: float
example: 2
storages-response:
description: Bin/storage locations tracked for the line item. Returned for items with bin tracking enabled.
type: array
items:
type: object
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093225'
storage_name:
description: Display name of the bin/storage location.
type: string
example: Bin A2
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
storage_out_id:
description: Unique identifier of the storage entry on the line item.
type: string
example: '6780203000000997440'
serial_numbers:
description: Serial numbers allocated to this bin.
type: array
x-node_available_in:
- Serial with Bin tracked items
items:
type: string
example: PKG-011
package_id:
description: Unique ID generated by the server for the package
type: string
example: 504366000000062100
mapped_items_create:
description: Items that are associated with the composite item (kit) in the line item. Applicable only when the line item is a kit type composite item.
type: array
items:
type: object
properties:
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
quantity:
$ref: '#/components/schemas/quantity'
mapped_items:
description: Nested mapped items for kit within kit scenarios.
type: array
items:
type: object
properties:
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
quantity:
$ref: '#/components/schemas/quantity'
billing_address:
description: Customer billing address
type: object
properties:
address:
$ref: '#/components/schemas/address'
city:
$ref: '#/components/schemas/city'
state:
$ref: '#/components/schemas/state'
country:
$ref: '#/components/schemas/country'
zip:
$ref: '#/components/schemas/zip'
phone:
$ref: '#/components/schemas/phone'
fax:
$ref: '#/components/schemas/fax'
delivery_method_id:
description: Unique ID generated by the server for delivery method
type: string
example: 14954000000086028
name:
description: Name of the packaged item
type: string
example: Apple Iphone
customer_name:
description: Name of the customer
type: string
example: Peter James
line_item_id:
description: Unique value generated by the server for an item of sales order in package
type: string
example: 504366000000062100
package:
type: array
items:
$ref: '#/components/schemas/package-response'
service:
description: Type of service selected for shipment
type: string
example: FEDEX_2_DAY
description:
description: Description of the item in package
type: string
example: Mobile Sales description
mobile:
description: Mobile number of the customer
type: string
example: +1 (999)999-9999
storages:
description: Bin/storage locations allocated (or consumed, for assemblies) for the line item. Applicable only for items with bin tracking enabled.
type: array
items:
type: object
required:
- storage_id
- out_quantity
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093225'
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
serial_numbers:
description: Serial numbers allocated to this bin.
type: array
x-node_available_in:
- Serial with Bin tracked items
items:
type: string
example: PKG-011
line_items:
description: Details of the items in this package
type: array
items:
type: object
properties:
description:
$ref: '#/components/schemas/description'
is_invoiced:
$ref: '#/components/schemas/is_invoiced'
item_custom_fields:
$ref: '#/components/schemas/item_custom_fields'
item_id:
$ref: '#/components/schemas/item_id'
item_order:
$ref: '#/components/schemas/item_order'
line_item_id:
$ref: '#/components/schemas/line_item_id'
name:
$ref: '#/components/schemas/name'
quantity:
$ref: '#/components/schemas/quantity'
so_line_item_id:
$ref: '#/components/schemas/so_line_item_id'
sku:
$ref: '#/components/schemas/sku'
unit:
$ref: '#/components/schemas/unit'
is_combo_product:
$ref: '#/components/schemas/is_combo_product'
combo_type:
$ref: '#/components/schemas/combo_type'
mapped_items:
$ref: '#/components/schemas/mapped_items'
serial_numbers:
$ref: '#/components/schemas/serial_numbers'
batches:
$ref: '#/components/schemas/batches-response'
storages:
$ref: '#/components/schemas/storages-response'
delivery_guarantee:
description: guarantee assured by the courier. <code> For guaranteed on-time deliveries, it is true else it is false</code>
type: boolean
example: true
notes:
description: Notes for package
type: string
example: notes
last_modified_time:
description: Time at which the package details were last modified.
type: string
format: date
example: 2017-01-11 00:00:00+00:00
storages-update:
description: Bin/storage locations allocated (or consumed, for assemblies) for the line item. Applicable only for items with bin tracking enabled.
type: array
items:
type: object
required:
- storage_id
- out_quantity
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093225'
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
storage_out_id:
description: Unique identifier of the storage record. Applicable only when updating an existing storage entry.
type: string
example: '6780203000000997440'
serial_numbers:
description: Serial numbers allocated to this bin.
type: array
x-node_available_in:
- Serial with Bin tracked items
items:
type: string
example: PKG-011
address:
description: Name of the street of the customer address
type: string
example: 432, Bayside, Queens
bulk-print-packages-response:
type: object
properties:
code:
type: integer
example: 0
readOnly: true
message:
type: string
example: success
readOnly: true
shipping_address:
description: Customer shipping address
type: object
properties:
address:
$ref: '#/components/schemas/address'
city:
$ref: '#/components/schemas/city'
state:
$ref: '#/components/schemas/state'
country:
$ref: '#/components/schemas/country'
zip:
$ref: '#/components/schemas/zip'
phone:
$ref: '#/components/schemas/phone'
fax:
$ref: '#/components/schemas/fax'
sku:
description: Stock keeping unit of the item in package
type: string
example: SKUM
list-all-packages-response:
type: object
properties:
code:
type: integer
example: 0
readOnly: true
message:
type: string
example: success
readOnly: true
packagea:
type: array
items:
type: object
properties:
created_time:
$ref: '#/components/schemas/created_time'
customer_id:
$ref: '#/components/schemas/customer_id'
customer_name:
$ref: '#/components/schemas/customer_name'
date:
$ref: '#/components/schemas/date'
email:
$ref: '#/components/schemas/email'
is_emailed:
$ref: '#/components/schemas/is_emailed'
last_modified_time:
$ref: '#/components/schemas/last_modified_time'
mobile:
$ref: '#/components/schemas/mobile'
notes:
$ref: '#/components/schemas/notes'
package_id:
$ref: '#/components/schemas/package_id'
package_number:
$ref: '#/components/schemas/package_number'
phone:
$ref: '#/components/schemas/phone'
salesorder_id:
$ref: '#/components/schemas/salesorder_id'
salesorder_number:
$ref: '#/components/schemas/sales
# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-inventory/refs/heads/main/openapi/zoho-inventory-packages-api-openapi.yml