Skip to main content

Add products to order list

Add products to an existing order list. The mutation returns the updated list with all products.

Mutation

mutation AddItemsToOrderlist($id: Int!, $input: OrderlistItemsInput!) {
orderlistAddItems(id: $id, input: $input) {
id
products(input: { offset: 100, page: 1 }) {
items {
productId
names(language: "NL") { value }
}
itemsFound
}
}
}

Variables

{
"id": 230,
"input": {
"productIds": [31, 2151]
}
}

Response

{
"data": {
"orderlistAddItems": {
"id": 230,
"products": {
"items": [
{ "productId": 25, "names": [{ "value": "Industriële Kachel HT-1001" }] },
{ "productId": 26, "names": [{ "value": "Industriële Kachel HT-350" }] },
{ "productId": 28, "names": [{ "value": "Vuurvaste Bodemplaat HT-425" }] },
{ "productId": 31, "names": [{ "value": "Hitteschild Links HT-101" }] },
{ "productId": 2151, "names": [{ "value": "LED Paneel Backlit 60x60 3000K" }] }
],
"itemsFound": 5
}
}
}
}

How it works

Pass the order list id and a list of productIds to add. The response includes the full product list so you can verify the update. Products can also be referenced by external source using productSources instead of productIds.

See also