I am doing some testing in sandbox and am running into an error when using line item modifications.
I am creating orders in two steps. First with `POST /v3/merchants/{mId}/atomic_order/checkouts` with the body:
{ "orderCart": { "lineItems": [ { "item": { "id": "HX1A3W7GH5HAJ" }, "modifications": [ { "modifier": { "id": "91N3C8539H7SE", "modifierGroup": { "id": "Z5FYG3J9SZV4M" } } } ] } ], "groupLineItems": true, "currency": "GBP" } }
I have checked that the modifier IDs are correct by referencing `GET /v3/merchants/{mId}/modifier_groups`:
{ "id": "Z5FYG3J9SZV4M", "name": "Shoe Material", "maxAllowed": 1, "showByDefault": false, "modifierIds": "91N3C8539H7SE,GXGFSPPKBJQQ8,C2ABE6P5Y9460" }
So, I take the output from `/atomic_order/checkouts` and feed it into `POST /v3/merchants/{mId}/atomic_order/orders` (only showing relevant stuff):
{ "lineItems": { "elements": [ { "item": { "id": "HX1A3W7GH5HAJ" }, "name": "Swanky Shoes", "price": 2300, "itemCode": "shoo-de-woo", "modifications": { "elements": [ { "modifier": { "id": "91N3C8539H7SE", "modifierGroup": { "id": "Z5FYG3J9SZV4M" } } } ] }, "refunded": false, "isRevenue": true } ] } }
This gives me a 400 response with the plain text
"The operation could not be completed due to a data validation error."
I've played about with the request body to `/atomic_order/checkouts` to try and get a different outcome, but the only thing that prevents the error is removing the modifications. Is there something silly that I'm doing wrong?