I'm using sales order API to create a sales order and in the request body, there are the parameters for tax_id on both levels i.e items_level and entity_level. In my case, there are different tax values for different items in a single sales order. So, I want to add different taxes for each item at items_level and then the total tax value at entity_level.
API allows to add tax_id for both levels using a request parameter tax_id that takes tax ids as input. According to the API doc tax_id only takes ids of taxes created in Zoho which would work when adding taxes at items_level but can't work with the entity_level as we don't know the total of the tax so we can't assign the tax id there. So, the only solution I can think of now is passing tax percentage value to the API request body instead of tax ids.
Is there any way to pass tax values to the request body instead of tax_ids? Or, If there is any other way to solve the problem exists will also work.
Sample request body from API doc.
"line_items": [
{
"item_order": 0,
"item_id": "460000000017088",
"rate": 120,
"name": "Hard Drive",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"quantity": 40,
"product_type": "goods",
"hsn_or_sac": 80540,
"tax_id": "460000000017093",
},
{
"item_order": 0,
"item_id": "460000000017089",
"rate": 120,
"name": "Hard Drive2",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"quantity": 40,
"product_type": "goods",
"hsn_or_sac": 80540,
"tax_id": "460000000017094",
},
{
"item_order": 0,
"item_id": "460000000017090",
"rate": 120,
"name": "Hard Drive3",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"quantity": 40,
"product_type": "goods",
"hsn_or_sac": 80540,
"tax_id": "460000000017095",
},
]
"tax_id": "total_of_all_taxe_values",
}
Any help is much appreciated! Thanks