question

tombialy avatar image
tombialy asked David Marginian Deactivated edited

Adding line item with tax gives "Invalid line item"

Cmd=[POST https://sandbox.dev.clover.com/v3/merchants/H1Z*****Q1/orders/YSG*****RAJE/line_items HTTP/1.1]
  Header key=[Authorization] val=[Bearer 54c711************fd8bbf]
Payload=[{"name":"3 Egg Omlette","price":1802,"unitQty":1000,"taxRates":[{"rate":1200000,"taxAmount":216}]}]


Generates:


2020-05-30 14:34:29 DEBUG CloverServer:292 - Response[400] reply:{
  "message" : "Invalid line item"
}


API Token
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

I checked the logs, and it appears the tax rate may have to exist before creating a line item. Can you try adding the tax rate first - https://docs.clover.com/clover-platform/reference/inventory-1#taxratecreatetaxrate-1.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community