question

ivan-garcia avatar image
ivan-garcia asked chetan commented

Clover Order Management via API

Hello,

We have successfully create orders, modify them but we think there is a lack of information for the process flow or I didn't find it.

  • Can we add more than one line item to the order with one call to the add line inte Order method?
  • To mark an order as paid, is enough to call the method POST /v3/merchants/{mId}/orders/{orderId}/payments with a tender id? We are developing an app in iOS that will allow the user to pay the orders in a payment gateway we are using for other bookings and then place an order for a restaurant which is using Clover.

    • I'm trying to add the payment with the following object but no results. What's the mininum data to add a payment to an order? Any example? { "tender:{ "id": "JPYC7GFTBRKCE" }, "amount": "107", "cashTendered": "107", "employee": { "id": "DWBZANYG5SAP0" }, "result": "OK", "taxAmount": "7" }

      • Also I'm unable to add a Ordertype to an order. Can I do in the creation of the order or do I need first to create it and then update it? Any example of the Json to use for adding an Order Type.

Thanks!

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

Jacob Abrams avatar image
Jacob Abrams answered chetan commented

I don't see a way to add more than one line item at a time via our current REST API.

Yes to pay an order you may use POST /v3/merchants/{mId}/orders/{orderId}/payments. What do you mean by "no results"? What was the HTTP response code? Any error message? I was able to post a payment with as little JSON as this:

{
  "amount": "88",
  "tender": {
    "id": "AABBCCDDEEFFG"
  }
}

You can create an order with an orderType or update it later using POST /v3/merchants/{mId}/orders. Here is some JSON I used to POST an order with a pre-existing orderType:

{
  "total": 5,
  "orderType": {
    "id": "AABBCCDDEEFFG"
  }
}
1 comment
10 |2000

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

chetan avatar image chetan commented ·

IS it possible now to add multiple line item in a single order

0 Likes 0 ·

Welcome to the
Clover Developer Community