question

gdhussak avatar image
gdhussak asked brokenoval commented

REST API: Unable to add modifiers via bulk_line_items or line_items endpoints

We've been trying to add modifiers to line items in both the bulklineitems and lineitems API endpoints without success (note: a single modifier via the lineitems endpoint works, but not an array of modifiers, or, any modifiers in the bulklineitems endpoint).

Here's a sample of what we've been sending:

{
    "items": [{
        "item": {
            "id": "<item id>"
        },
        "price": 1195,
        "name": "SANDWICH",
        "modifications": [
            {
                "amount": 0,
                    "modifier": {
                        "price": 0,
                        "id": <modifier id>,
                        "name": <modifier name>
                    }
            }
        ]
    },
    {
        "item": {
            "id": "<item id>"
        },
        "price": 1295,
        "name": "PIZZA",
        "modifications": [
            {
                "amount": 0,
                    "modifier": {
                        "price": 0,
                         "id": <modifier id>,
                        "name": <modifier name>
                    }
            }
        ]
    }]
}

The line items get created without a problem, but never with any modifiers. Any ideas/suggestions?

LineItems
2 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.

gonogo-dev avatar image gonogo-dev commented ·

Did you ever find an answer to this? We're also struggling to figure out how to add multiple / bulk modifiers to an item.

0 Likes 0 ·
brokenoval avatar image brokenoval commented ·

For anyone coming across this question in the future. This can't be done, a separate API request needs to be sent to

POST orders/orderId/line_items/lineItemId/modifications


0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community