Manage shopping list items via Glue API

Edit on GitHub

This endpoint lets you manage shopping list items.

Installation

For detailed information about the modules that provide the API functionality and related installation instructions, see these integration guides:

Add items to a shopping list

To add items to a shopping list, send the request:


POST /shopping-lists/{{shopping_list_id}}/shopping-list-items


PATH PARAMETER DESCRIPTION
{{shopping_list_id}} Unique identifier of a shopping list to add items to.

Request

HEADER KEY TYPE REQUIRED DESCRIPTION
Authorization string String containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value.
QUERY PARAMETER DESCRIPTION POSSIBLE VALUES
include Adds resource relationships to the request. concrete-products
Request sample: add items to a shopping list with the `ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a` unique identifier.

POST http://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items

{
    "data": {
        "type": "shopping-list-items",
        "attributes": {
            "quantity": 4,
            "sku": "005_30663301"
       }
    }
}
Request sample: add items to a shopping list with the `ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a` unique identifier. Include information about the concrete products in the shopping list in the response.

POST http://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items?include=concrete-products

{
    "data": {
        "type": "shopping-list-items",
        "attributes": {
            "quantity": 4,
            "sku": "005_30663301"
       }
    }
}
Request sample: add a configurable product to a shopping list.

POST https://glue.myspryker.com/shopping-lists/333327a9-3654-5382-b81b-4992458ebae8/shopping-list-items

{
    "data": {
        "type": "shopping-list-items",
        "attributes": {
            "sku": "093_24495843",
            "quantity": 3,
            "productConfigurationInstance": {
                "displayData": "{\"Preferred time of the day\": \"Afternoon\", \"Date\": \"9.09.2050\"}",
                "configuration": "{\"time_of_day\": \"4\"}",
                "configuratorKey": "installation_appointment_test",
                "isComplete": true,
                "quantity": 3,
                "availableQuantity": 4,
                 "prices": [
                	  {
                        "priceTypeName": "DEFAULT",
                        "netAmount": 23434,
                        "grossAmount": 42502,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        },
                        "volumePrices": [
                            {
                                "netAmount": 150,
                                "grossAmount": 165,
                                "quantity": 5
                            },
                            {
                                "netAmount": 145,
                                "grossAmount": 158,
                                "quantity": 10
                            },
                            {
                                "netAmount": 140,
                                "grossAmount": 152,
                                "quantity": 20
                            }
                        ]
                    }
                ]
            }
        }
    }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
sku String SKU of the product to add. Only concrete products and configurable products are allowed.
quantity Integer Quantity of the product to add.
productConfigurationInstance.displayData Array Array of variables that are proposed for a Storefront user to set up in the configurator.
productConfigurationInstance.configuration Array Default configurable product configuration.
productConfigurationInstance.configuratorKey String Configurator type.
productConfigurationInstance.isComplete Boolean Shows if the configurable product configuration is complete:
  • true—configuration complete.
  • false—configuration incomplete.
productConfigurationInstance.quantity Integer Quantity of the product that is added to the wishlist.
productConfigurationInstance.availableQuantity Integer Product quantity available in the store.

For details about the attributes of included resources, see Retrieve a concrete product.

For details about the attributes of abstract product prices, see Retrieve abstract product prices.

Response

Response sample: add items to a shopping list.
  {
    "data": {
        "type": "shopping-list-items",
        "id": "00fed212-3dc9-569f-885f-3ddca41dea08",
        "attributes": {
            "quantity": 4,
            "sku": "005_30663301"
        },
        "links": {
            "self": "http://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08"
        }
    }
}  
Response sample: add items to a shopping list with the details on concrete products.
    {
    "data": {
        "type": "shopping-list-items",
        "id": "6283f155-6b8a-5d8c-96b7-3af4091eea3e",
        "attributes": {
            "quantity": 4,
            "sku": "128_27314278"
        },
        "links": {
            "self": "https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/6283f155-6b8a-5d8c-96b7-3af4091eea3e"
        },
        "relationships": {
            "concrete-products": {
                "data": [
                    {
                        "type": "concrete-products",
                        "id": "128_27314278"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "concrete-products",
            "id": "128_27314278",
            "attributes": {
                "sku": "128_27314278",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": null,
                "reviewCount": 0,
                "name": "Lenovo ThinkCentre E73",
                "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.",
                "attributes": {
                    "processor_threads": "8",
                    "pci_express_slots_version": "3",
                    "internal_memory": "8 GB",
                    "stepping": "C0",
                    "brand": "Lenovo",
                    "processor_frequency": "3.6 GHz"
                },
                "superAttributesDefinition": [
                    "internal_memory",
                    "processor_frequency"
                ],
                "metaTitle": "Lenovo ThinkCentre E73",
                "metaKeywords": "Lenovo,Tax Exempt",
                "metaDESCRIPTION": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep",
                "attributeNames": {
                    "processor_threads": "Processor Threads",
                    "pci_express_slots_version": "PCI Express slots version",
                    "internal_memory": "Max internal memory",
                    "stepping": "Stepping",
                    "brand": "Brand",
                    "processor_frequency": "Processor frequency"
                }
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/128_27314278"
            }
        }
    ]
}
Response sample: add a configurable product to a shopping list.
{
    "data": {
        "type": "shopping-list-items",
        "id": "f4ef6ec3-d0c1-55f8-80c9-6ef120d4761f",
        "attributes": {
            "productOfferReference": null,
            "merchantReference": "MER000001",
            "quantity": 3,
            "sku": "093_24495843",
            "productConfigurationInstance": {
                "displayData": "{\"Preferred time of the day\": \"Afternoon\", \"Date\": \"9.09.2050\"}",
                "configuration": "{\"time_of_day\": \"4\"}",
                "configuratorKey": "installation_appointment_test",
                "isComplete": true,
                "quantity": 3,
                "availableQuantity": 4,
                "prices": [
                    {
                        "netAmount": 23434,
                        "grossAmount": 42502,
                        "priceTypeName": "DEFAULT",
                        "volumeQuantity": null,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        },
                        "volumePrices": [
                            {
                                "grossAmount": 165,
                                "netAmount": 150,
                                "quantity": 5
                            },
                            {
                                "grossAmount": 158,
                                "netAmount": 145,
                                "quantity": 10
                            },
                            {
                                "grossAmount": 152,
                                "netAmount": 140,
                                "quantity": 20
                            }
                        ]
                    }
                ]
            }
        },
        "links": {
            "self": "https://glue.de.scos.demo-spryker.com/shopping-lists/333327a9-3654-5382-b81b-4992458ebae8/shopping-list-items/f4ef6ec3-d0c1-55f8-80c9-6ef120d4761f"
        }
    }
}

ATTRIBUTE TYPE DESCRIPTION
productOfferReference String Unique identifier of the product offer.
merchantReference String Unique identifier of the merchant.
quantity Integer Quantity of the product.
sku String Product SKU.
productConfigurationInstance.displayData Array Array of variables that are proposed to a Storefront user to set up in the configurator.
productConfigurationInstance.configuration Array Default configuration of the configurable product.
productConfigurationInstance.configuratorKey String Configurator type.
productConfigurationInstance.isComplete Boolean Shows if the configurable product configuration is complete:
  • true—configuration complete.
  • false—configuration incomplete.
productConfigurationInstance.quantity Integer Quantity of the product that is added to the wishlist.
productConfigurationInstance.availableQuantity Integer Product quantity available in the store.

For details about the attributes of included resources, see Retrieve a concrete product.

For details about the attributes of abstract product prices, see Retrieve abstract product prices.

Change item quantity in a shopping list

To change item quantity in a shopping list, send the request:


PATCH /shopping-lists/{{shopping_list_id}}/shopping-list-items/{{shopping_list_item_id}}


PATH PARAMETER DESCRIPTION
{{shopping_list_id}} Unique identifier of a shopping list to update item quantity in.
{{shopping_list_item_id}} Unique identifier of a shopping list item to change the quantity of. To get it, Retrieve shopping lists, or Retrieve a shopping list with the shopping-list-items included.

Request

HEADER KEY TYPE REQUIRED DESCRIPTION
Authorization string String containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value.
QUERY PARAMETER DESCRIPTION EXEMPLARY VALUES
include Adds resource relationships to the request. concrete-products
Request sample: in the shopping list with the id `ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a`, change quantity of the item with the id `00fed212-3dc9-569f-885f-3ddca41dea08`.

PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08

{
    "data": {
        "type": "shopping-list-items",
        "attributes": {
            "quantity": 12,
            "sku": "005_30663301"
       }
    }
}
In the shopping list with the id `ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a`, change quantity of the item with the id `00fed212-3dc9-569f-885f-3ddca41dea08`. Include information about the respective concrete product in the response.

PATCH https://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08?include=concrete-products

{
    "data": {
        "type": "shopping-list-items",
        "attributes": {
            "quantity": 12,
            "sku": "005_30663301"
       }
    }
}
Request sample: in the shopping list with the id `333327a9-3654-5382-b81b-4992458ebae8` change quantity of the configurable product item with the id `0323bd43-f9ff-5964-afe3-44a2085ce0c6`.

PATCH https://glue.mysprykershop.com/shopping-lists/333327a9-3654-5382-b81b-4992458ebae8/shopping-list-items/0323bd43-f9ff-5964-afe3-44a2085ce0c6

{
"data": {
        "type": "shopping-list-items",
        "attributes": {
            "quantity": 3,
            "productConfigurationInstance": {
                "displayData": "{\"Preferred time of the day\": \"Morning\", \"Date\": \"9.09.2055\"}",
                "configuration": "{\"time_of_day\": \"4\"}",
                "configuratorKey": "installation_appointment_edit123",
                "isComplete": false,
                "quantity": 3,
                "availableQuantity": 4,
                "prices": [
                    {
                        "priceTypeName": "DEFAULT",
                        "netAmount": 23434,
                        "grossAmount": 42502,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        },
                        "volumePrices": [
                            {
                                "netAmount": 150,
                                "grossAmount": 165,
                                "quantity": 5
                            },
                            {
                                "netAmount": 145,
                                "grossAmount": 158,
                                "quantity": 10
                            },
                            {
                                "netAmount": 140,
                                "grossAmount": 152,
                                "quantity": 20
                            }
                        ]
                    }
                ]
            }
        }
    }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
quantity Integer New quantity of the product.
productConfigurationInstance.displayData Array Array of variables that are proposed for a Storefront user to set up in the configurator.
productConfigurationInstance.configuration Array Default configurable product configuration.
productConfigurationInstance.configuratorKey String Configurator type.
productConfigurationInstance.isComplete Boolean Shows if the configurable product configuration is complete:
  • true—configuration complete.
  • false—configuration incomplete.
productConfigurationInstance.quantity Integer Quantity of the product that is added to the wishlist.
productConfigurationInstance.availableQuantity Integer Product quantity available in the store.

For details about the attributes of included resources, see Retrieve a concrete product.

For details about the attributes of abstract product prices, see Retrieve abstract product prices.

Response

Response sample: change item quantity in a shopping list.
    {
    "data": {
        "type": "shopping-list-items",
        "id": "00fed212-3dc9-569f-885f-3ddca41dea08",
        "attributes": {
            "quantity": 12,
            "sku": "005_30663301"
        },
        "links": {
            "self": "http://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08"
        }
    }
}
Response sample: change item quantity in a shopping list with the details on concrete products.
{
    "data": {
        "type": "shopping-list-items",
        "id": "6283f155-6b8a-5d8c-96b7-3af4091eea3e",
        "attributes": {...},
        "links": {... },
        "relationships": {
            "concrete-products": {
                "data": [
                    {
                        "type": "concrete-products",
                        "id": "128_27314278"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "concrete-products",
            "id": "128_27314278",
            "attributes": {
                "sku": "128_27314278",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": null,
                "reviewCount": 0,
                "name": "Lenovo ThinkCentre E73",
                "description": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep your business-critical information safe through USB port disablement and the password-protected BIOS and HDD. You can also safeguard your hardware by physically securing your mouse and keyboard, while the Kensington slot enables you to lock down your E73. Lenovo Desktop Power Manager lets you balance power management and performance to save energy and lower costs. The E73 is also ENERGY STAR compliant, EPEAT® Gold and Cisco EnergyWise™ certified—so you can feel good about the planet and your bottom line. With SuperSpeed USB 3.0, transfer data up to 10 times faster than previous USB technologies. You can also connect to audio- and video-related devices with WiFi and Bluetooth® technology.",
                "attributes": {
                    "processor_threads": "8",
                    "pci_express_slots_version": "3",
                    "internal_memory": "8 GB",
                    "stepping": "C0",
                    "brand": "Lenovo",
                    "processor_frequency": "3.6 GHz"
                },
                "superAttributesDefinition": [
                    "internal_memory",
                    "processor_frequency"
                ],
                "metaTitle": "Lenovo ThinkCentre E73",
                "metaKeywords": "Lenovo,Tax Exempt",
                "metaDESCRIPTION": "Small Form Factor Small Form Factor desktops provide the ultimate performance with full-featured scalability, yet weigh as little as 13.2 lbs / 6 kgs. Keep",
                "attributeNames": {
                    "processor_threads": "Processor Threads",
                    "pci_express_slots_version": "PCI Express slots version",
                    "internal_memory": "Max internal memory",
                    "stepping": "Stepping",
                    "brand": "Brand",
                    "processor_frequency": "Processor frequency"
                }
            },
            "links": {
                "self": "http://glue.mysprykershop.com/concrete-products/128_27314278"
            }
        }
    ]
}

Response sample: in the shopping list with the id `333327a9-3654-5382-b81b-4992458ebae8` change quantity of the configurable product with the id `0323bd43-f9ff-5964-afe3-44a2085ce0c6`.
{
    "data": {
        "type": "shopping-list-items",
        "id": "0323bd43-f9ff-5964-afe3-44a2085ce0c6",
        "attributes": {
            "productOfferReference": null,
            "merchantReference": "MER000001",
            "quantity": 3,
            "sku": "093_24495843",
            "productConfigurationInstance": {
                "displayData": "{\"Preferred time of the day\": \"Morning\", \"Date\": \"9.09.2055\"}",
                "configuration": "{\"time_of_day\": \"4\"}",
                "configuratorKey": "installation_appointment_edit123",
                "isComplete": false,
                "quantity": 3,
                "availableQuantity": 4,
                "prices": [
                    {
                        "netAmount": 23434,
                        "grossAmount": 42502,
                        "priceTypeName": "DEFAULT",
                        "volumeQuantity": null,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        },
                        "volumePrices": [
                            {
                                "grossAmount": 165,
                                "netAmount": 150,
                                "quantity": 5
                            },
                            {
                                "grossAmount": 158,
                                "netAmount": 145,
                                "quantity": 10
                            },
                            {
                                "grossAmount": 152,
                                "netAmount": 140,
                                "quantity": 20
                            }
                        ]
                    }
                ]
            }
        },
        "links": {
            "self": "https://glue.mysprykershop.com/shopping-lists/333327a9-3654-5382-b81b-4992458ebae8/shopping-list-items/0323bd43-f9ff-5964-afe3-44a2085ce0c6"
        }
    }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
productOfferReference String Unique identifier of the product offer.
merchantReference String Unique identifier of the merchant.
quantity Integer Updated quantity of the product.
sku String SKU of the product whose quantity has been updated. Only concrete products and configurable products are allowed.
productConfigurationInstance.displayData Array Array of variables that are proposed for a Storefront user to set up in the configurator.
productConfigurationInstance.configuration Array Default configurable product configuration.
productConfigurationInstance.configuratorKey String Configurator type.
productConfigurationInstance.isComplete Boolean Shows if the configurable product configuration is complete:
  • true—configuration complete.
  • false—configuration incomplete.
productConfigurationInstance.quantity Integer Quantity of the product that is added to the wishlist.
productConfigurationInstance.availableQuantity Integer Product quantity available in the store.

For details about the attributes of included resources, see Retrieve a concrete product.

For details about the attributes of abstract product prices, see Retrieve abstract product prices.

Remove an item from a shopping list

To remove an item from a shopping list, send the request:


DELETE /shopping-lists/{{shopping_list_id}}/shopping-list-items/{{shopping_list_item_id}}


PATH PARAMETER DESCRIPTION
{{shopping_list_id}} Unique identifier of a shopping list to delete an item from.
{{shopping_list_item_id}} Unique identifier of a shopping list item to remove. To get it, Retrieve shopping lists, or Retrieve a shopping list with the shopping-list-items included.

Request

HEADER KEY TYPE REQUIRED DESCRIPTION
Authorization string String containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value.

Request sample: remove an item from a shopping list

DELETE http://glue.mysprykershop.com/shopping-lists/ecdb5c3b-8bba-5a97-8e7b-c0a5a8f8a74a/shopping-list-items/00fed212-3dc9-569f-885f-3ddca41dea08

Response

If the item is removed successfully, the endpoint returns the 204 No Content status code.

Possible errors

CODE REASON
001 Access token is incorrect.
002 Access token is missing.
400 Provided access token is not an access token of a company user.
901 Shop list name or item name is not specified or too long.
OR
Item quantity is not specified or too large.
1501 Shopping list ID or item is not specified.
1503 Specified shopping list is not found.
1504 Specified shopping list item is not found.
1508 Concrete product is not found.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.