question

bohyeon avatar image
bohyeon asked bohyeon commented

How to Add Multiple Line Items with Modifiers to an Order Created via /v3/merchants/{mId}/atomic_order/orders API

I am trying to add multiple line items, including modifications, to an order created using the POST /v3/merchants/{mId}/atomic_order/orders API. Which API should I use to achieve this?

Previously, I attempted to use the POST /v3/merchants/{mId}/orders/{orderId}/bulk_line_items (Create multiple line items) API, but it seems that the modifiers are not being applied.

Could you please provide guidance on the correct API or method to include modifiers with the line items?

OrdersREST APILineItemsModifiers
10 |2000

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

joelraffa avatar image
joelraffa answered

You'll need to construct your request payload to include multiple line items and their associated modifiers. Each line item should specify the product or service being ordered, and each modifier should detail any additional options or changes to that item. geometry dash lite

10 |2000

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

ruby496williams avatar image
ruby496williams answered bohyeon commented

hello!

Use the POST /v3/merchants/{mId}/orders/{orderId}/line_items API to add multiple line items with modifiers to an existing order. This endpoint supports adding line items along with their associated modifications.


Best Regards,

upsers portal

3 comments
10 |2000

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

bohyeon avatar image bohyeon commented ·

Thank you for your response.

However, when I use the `POST /v3/merchants/{mId}/orders/{orderId}/line_items` API to add a line item with modifications, the modifications do not appear in the POS UI (though the line item itself is displayed correctly). Below is the body data I sent. Is there anything incorrect?

{
  "item": {
    "id": "JHDXSGT9RTWVW"
  },
  "printed": "false",
  "exchanged": "false",
  "refunded": "false",
  "isRevenue": "false",
  "modifications": [
    {
      "modifier": {
        "available": "true",
        "price": "0",
        "id": "M92CBETQ6MDZ0",
        "name": "Mex Potatoes"
      },
      "amount": 170,
      "name": "Mex Potatoes"
    }
  ],
  "name": "Huevos Rancheros",
  "price": 1500
}
0 Likes 0 ·
parquet76 avatar image parquet76 bohyeon commented ·

These are AI bots, don't listen to them... Read the clover docs I sent you. You CANNOT add modifications with the line_items endpoint.

1 Like 1 ·
bohyeon avatar image bohyeon parquet76 commented ·

Thank you! Your response has been very helpful!

0 Likes 0 ·

Welcome to the
Clover Developer Community