question

ismdcf avatar image
ismdcf asked chanel Deactivated edited

REST API | Send item modifications in Bulk Line Items

Hi

Am trying to make a bulk line item POST request with specifying the item modifications with in the request. This seems to fail while having the order placed in clover side but not having the modifications I added to the items in the clover web, nor the get orders api call.

Following is a sample of my request.
POST https://apisandbox.dev.clover.com/v3/merchants/ MERCHANTID/orders/ ORDERID/bulk_line_items

{
  "items": [
    {
      "item": {
        "id": "1KSDK117E1YEJ"
      },
      "name": "Ice Lemon Tea",
      "price": 128,
      "taxRates": {
        "elements": [
          {
            "rate": 200000,
            "name": "Drink Tax",
            "id": "8AXR1D1H5QB2Y"
          }
        ]
      },
      "modifications": {
        "elements": [
          {
            "name": "1 cube",
            "amount": 2,
            "modifier": {
              "id": "2RBSH3571V6GP"
            }
          }
        ]
      }
    }
  ]
}
The modifier is a valid one, but this doesn't get reflect in the final purchase order I see in clover web.
What am I missing here.

OrdersLineItemsModifiers
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

chanel avatar image
chanel Deactivated answered chanel Deactivated edited
Unfortunately, you'll have to add modifiers in a separate call. To create a modifier the way you're trying to do so, you'll need the ID of the modification that is associated with that line item (which only gets created through the modifications end point!)

It's slow, I know, but you'll need to call /v3/merchants/{mId}/orders/{orderId}/line_items/{lineItemId}/modifications for each line item.
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