Zoho books logo FAQ
Back

How do I migrate to the new line_items structure to use Headers via API?

You can add headers as rows in the Item Table when you create transactions in Zoho Books. Headers add a title to group related items.

You can add headers in the following transactions:

Sales: Quotes, Sales Orders, Sales Receipts, Invoices, Recurring Invoices, and Credit Notes.

Purchases: Purchase Orders, Bills, and Vendor Credits.

Previously, for API users, every entry in the line_items array represented a regular item. The same array now also includes header rows, identified by a new field called line_item_category. Items and headers are ordered by item_order.

If you want to create, update, or read transactions with headers via the API, update your payloads to the new structure.

Insight: This migration is needed only if you want to use headers via the API. Your existing integrations will continue to work without any changes.

Key changes in the line_items structure:

  • line_item_category accepts header. Regular items can omit this field.
  • item_order sets the position of the row in the Item Table.
  • Header rows need only description, item_order, and line_item_category: "header".
  • GET responses include header rows in line_items. If your code assumes every entry is an item, add a check on line_item_category to skip or handle these rows.

Note: Refer to the Zoho Books API docs for the updated line_items schema. For further assistance, reach out to our support team at support@zohobooks.com.

Was this document helpful?
Yes
No

Thank you for your feedback!