question

shahnawazrajper avatar image
shahnawazrajper asked Rohit Bhardwaj edited

Invalid line item



Hi I'm posting and order, the order is created and an order object is returned, but when I'm posting it for line_items it's saying Invalid line item infact it's returning all the line_item details when I'm getting data with line_item_id

I'm posting 2 jsons one for order and other for line_items as :

Order : 
{"currency":"USD","state":"open","total":49000,"payments":{"amount":50},"refunds":{"amount":1}}

LineItems :
{"price":4.99,"unitQty":10,"item":{"id":"1GRX6GWB46NXW"}}

Kindly solve my problem.

Thanks!<br>


OrdersLineItems
capture.png (50.3 KiB)
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

Rohit Bhardwaj avatar image
Rohit Bhardwaj answered Rohit Bhardwaj edited
Hi @shahnawaz.rajper

The price object accepts a long value. You have to enter 499 instead of 4.99.

The baseurl for sandbox is https://apisandbox.dev.clover.com/
and the baseurl for production account is https://api.clover.com/
10 |2000

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