How do I use the Web API (V3 REST API) to create an order?

  1. POST to /v3/merchants/{mId}/orders/ to create the top-level order object. The payload should include state set to open {"state": "open"}. Otherwise it will not show up in your orders.
  2. POST to /v3/merchants/{mId}/orders/{orderId}/line_items to create each line item in the order (i.e. each item the customer bought). The payload only needs to include the item ID (for example, {"item": {"id": u"9ZRXGGERXGYSG"}})/
  3. POST to /v3/merchants/{mId}/orders/{orderId}/line_items/modifications to add modifiers to the line items (e.g. x-large size for $1).
  4. POST to /v3/merchants/{mId}/orders/{orderId}/line_items/{lineItemId}/discounts to add discounts to specific line items (e.g. $1 off french fries).
  5. POST to /v3/merchants/{mId}/orders/{orderId}/discounts to add discounts to the whole order (instead of just the individual line item in #4).
  6. POST to /v3/merchants/{mId}/orders/{orderId} to update the order object with a state of 'open'. You may set the state to 'open' in step 1.

When an order is created or updated, the order data is automatically synchronized between the Clover Server and the merchant's Clover device

Did this page help you?