question

wsadiq avatar image
wsadiq asked rachel Deactivated commented

Adding line items with modifiers using API

Hello,

I am trying to add line items to an order using the API. To be more specific, I am ordering bulklineitems api so that i can add multiple line items at once.

The problem I am having is with the modifiers. The line items get added fine but no modifiers are added and there are no errors. Here is the JSON that I am sending. Any help would be much appreciated.

{
  "items": [
    {
      "item": {
        "id": "361338"
      },
      "name": "Bread",
      "price": "245",
      "modifications": []
    },
    {
      "item": {
        "id": "361311"
      },
      "name": "Bagel",
      "price": "89",
      "modifications": [
        {
          "modifier": {
            "id": "4CYNQ0NVQ8DDM"
          },
          "name": "Egg",
          "amount": "80"
        },
        {
          "modifier": {
            "id": "FAY3KYGD1F4WW"
          },
          "name": "American Cheese",
          "amount": "50"
        }
      ]
    }
  ]
}
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.

0 Answers

Welcome to the
Clover Developer Community