question

mtt avatar image
mtt asked ·

lineItems on order create or update

Is it possible to add lineItems when creating/updating an order via REST API. My line items are not going through.

Sample request python dict:

{
    'manualTransaction': True,
    'note': 'asdf',
    'state': 'open',
    'total': '1234', 
    'lineItems': [{
      'name': receipt_label,
      'price': total_cents,  # clover takes cents
      'isRevenue': True,
    }]
  }
OrdersLineItems
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Miguel avatar image
Miguel answered ·

That's not currently supported. You will need to make a separate call to POST v3/merchants/{mId}/orders/{orderId}/line_items with the following body for each line item:

{ 
      "name": "receipt_label",
      "price": 100,  
      "isRevenue": "true"
}
Share
10 |2000 characters needed characters left characters exceeded

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