question

jmalone30 avatar image
jmalone30 asked David Marginian Deactivated answered

Can I Create an Order Line Item with a Price using the REST API?

I am creating a single line item with a price on an Order, but the price remains 0.

Here is my request package:

curl --request POST \ --url 'https://sandbox.dev.clover.com/v3/merchants/merchId/orders/orderId/line_items?access_token=token' \ --header 'Content-Type: application/json' \ --data '{"item":{"id":"YVHXYRK9J5FR6"},"printed":"false","exchanged":"false","refunded":"false","refund":{"transactionInfo":{"isTokenBasedTx":"false","emergencyFlag":"false"}},"isRevenue":"false","name":"Item One","price":59900,"note":"Serial: 8886664440"}'


REST API
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

The line_items endpoint will always use the price, etc. of the referenced inventory item and disregard anything in the request. If you would like to override the price of the inventory item (and loosely reference it) you will need to use the bulk_line_items endpoint.

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