Glue API: Manage carts of registered users

Edit on GitHub

This endpoint allows managing carts by creating, retrieving, and deleting them.

Multiple carts

Unlike guest carts, carts of registered users have an unlimited lifetime. If the Multiple Carts feature is integrated into your project, and Glue is enabled for multi-cart operations, registered users can also have an unlimited number of carts.

Installation

For detailed information on the modules that provide the API functionality and related installation instructions, see:

Create a cart

To create a cart, send the request:


POST /carts


Carts created via Glue API are always set as the default carts for the user.

Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string Alphanumeric string that authorizes the customer or company user to send requests to protected resources. Get it by authenticating as a customer or authenticating as a company user.

Request sample: POST https://glue.mysprykershop.com/carts

{
   "data":{
      "type":"carts",
      "attributes":{
         "name":"My Cart",
         "priceMode":"GROSS_MODE",
         "currency":"EUR",
         "store":"DE"
      }
   }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
name String Sets the cart name.
This field can be set only if you are using the multiple carts feature. If you are operating in a single-cart environment, an attempt to set the value will result in an error with the “422 Unprocessable Entry” status code.
priceMode Enum Sets the price mode to be used for the cart. Possible values:
  • GROSS_MODE—prices after tax;
  • NET_MODE—prices before tax.
For details, see Net & Gross Prices.
currency String Sets the cart currency.
store String Sets the name of the store where to create the cart.

Response

Response sample
"data":
        {
            "type": "carts",
            "id": "f23f5cfa-7fde-5706-aefb-ac6c6bbadeab",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "discounts": [],
                "totals": {
                    "expenseTotal": null,
                    "discountTotal": null,
                    "taxTotal": null,
                    "subtotal": null,
                    "grandTotal": null
                },
                "name": "My Cart",
                "isDefault": true
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab"
            }
        }
}

General cart information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts currency String Currency that was selected when the cart was created.
carts isDefault Boolean Specifies whether the cart is the default one for the customer. The field is available in multi-cart environments only.
carts name String Specifies a cart name. The field is available in multi-cart environments only.
carts priceMode String Price mode that was active when the cart was created.
carts store String Store for which the cart was created.

Discount information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts displayName String Discount name.
carts amount Integer Discount amount applied to the cart.
carts code String Discount code applied to the cart.

Totals

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts expenseTotal String Total amount of expenses (including, e.g., shipping costs).
carts discountTotal Integer Total amount of discounts applied to the cart.
carts taxTotal Integer Total amount of taxes to be paid.
carts subTotal Integer Subtotal of the cart.
carts grandTotal Integer Grand total of the cart.
carts priceToPay Integer Total price of the cart to pay after discounts.
carts selectedProductOptions array List of attributes describing the product options that were added to cart with the product.

Thresholds

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts threshold Array Thresholds applied.
carts type String Threshold type.
carts threshold Integer Threshold monetary amount.
carts fee Integer Fee to be paid if the threshold is not reached.
carts deltaWithSubtotal Integer Displays the remaining amount that needs to be added to pass the threshold.
carts message String Message shown to the customer if the threshold is not fulfilled.

Retrieve registered user’s carts

To retrieve all carts, send the request:


GET /carts


Note

Alternatively, you can retrieve all carts belonging to a customer through the /customers/{{customerId}}/carts endpoint. For details, see Retrieving customer carts.

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string Alphanumeric string that authorizes the customer or company user to send requests to protected resources. Get it by authenticating as a customer or authenticating as a company user.
QUERY PARAMETER DESCRIPTION EXEMPLARY VALUES
include Adds resource relationships to the request.
  • items
  • cart-permission-groups
  • shared-carts
  • company-users
  • cart-rules
  • promotional-items
  • vouchers
  • gift-cards
  • concrete-products
  • product-options
  • product-labels
Included resources
  • To retrieve all the product options of the item in a cart, include items, concrete-products, and product-options.
  • To retrieve information about the company user a cart is shared with, include shared-carts and company-users.
  • To retrieve product labels of the products in a cart, include items, concrete-products, and product-labels.
REQUEST USAGE
GET https://glue.mysprykershop.com/carts Retrieve all carts of a user.
GET https://glue.mysprykershop.com/carts?include=items Retrieve all carts of a user with the items in them included.
GET https://glue.mysprykershop.com/carts?include=cart-permission-groups Retrieve all carts of a user with cart permission groups included.
GET https://glue.mysprykershop.com/carts?include=shared-carts Retrieve all carts of a user with shared carts.
GET https://glue.mysprykershop.com/carts?include=shared-carts,company-users Retrieve all carts of a user with information about shared carts and the company uses they are shared with.
GET https://glue.mysprykershop.com/carts?include=cart-rules Retrieve all carts of a user with cart rules.
GET https://glue.mysprykershop.com/carts?include=vouchers Retrieve all carts of a user with information about applied vouchers.
GET https://glue.mysprykershop.com/carts?include=promotional-items Retrieve information about promotional items for the cart.
GET https://glue.mysprykershop.com/carts?include=gift-cards Retrieve all carts of a user with applied gift cards.
GET https://glue.mysprykershop.com/carts?include=items,concrete-products,product-options Retrieve all carts of a user with items, respective concrete product, and their product options.
GET https://glue.mysprykershop.com/carts?include=items,concrete-products,product-labels Retrieve all carts of a user with information about concrete products and the product labels assigned to the products in the carts.

Response

Response sample: no carts
{
    "data": [],
    "links": {
        "self": "https://glue.mysprykershop.com/carts"
    }
}
Response sample: multiple carts
{
    "data": [
        {
            "type": "carts",
            "id": "61ab15e9-e24a-5dec-a1ef-fc333bd88b0a",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 3744,
                    "taxTotal": 5380,
                    "subtotal": 37440,
                    "grandTotal": 33696
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 3744,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/61ab15e9-e24a-5dec-a1ef-fc333bd88b0a"
            }
        },
        {
            "type": "carts",
            "id": "482bdbd6-137f-5b58-bd1c-37f3fa735a16",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Black Friday Conf Bundle",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 8324,
                    "taxTotal": 1469,
                    "subtotal": 83236,
                    "grandTotal": 74912
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16"
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts"
    }
}
Response sample with items
{
    "data": [
        {
            "type": "carts",
            "id": "ac3da9eb-f4fc-5803-94b9-343d6cd4cda4",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 4158,
                    "taxTotal": 5974,
                    "subtotal": 41575,
                    "grandTotal": 37417,
                    "priceToPay": 37417
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 4158,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/ac3da9eb-f4fc-5803-94b9-343d6cd4cda4"
            },
            "relationships": {
                "items": {
                    "data": [
                        {
                            "type": "items",
                            "id": "070_133913222"
                        }
                    ]
                }
            }
        },
        {
            "type": "carts",
            "id": "e877356a-5d8f-575e-aacc-c790eeb20a27",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Everyday purchases",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 6165,
                    "taxTotal": 3630,
                    "subtotal": 61647,
                    "grandTotal": 55482,
                    "priceToPay": 55482
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 6165,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27"
            },
            "relationships": {
                "items": {
                    "data": [
                        {
                            "type": "items",
                            "id": "089_29634947"
                        },
                        {
                            "type": "items",
                            "id": "201_11217755"
                        }
                    ]
                }
            }
        },
        {
            "type": "carts",
            "id": "8ef901fe-fe47-5569-9668-2db890dbee6d",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Shopping cart",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 4200,
                    "taxTotal": 6035,
                    "subtotal": 42000,
                    "grandTotal": 37800,
                    "priceToPay": 37800
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 4200,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8ef901fe-fe47-5569-9668-2db890dbee6d"
            },
            "relationships": {
                "items": {
                    "data": [
                        {
                            "type": "items",
                            "id": "005_30663301"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=items"
    },
    "included": [
        {
            "type": "items",
            "id": "070_133913222",
            "attributes": {
                "sku": "070_133913222",
                "quantity": "1",
                "groupKey": "070_133913222",
                "abstractSku": "070",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": "MER000001",
                "calculations": {
                    "unitPrice": 41575,
                    "sumPrice": 41575,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 41575,
                    "sumGrossPrice": 41575,
                    "unitTaxAmountFullAggregation": 5974,
                    "sumTaxAmountFullAggregation": 5974,
                    "sumSubtotalAggregation": 41575,
                    "unitSubtotalAggregation": 41575,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 4158,
                    "sumDiscountAmountAggregation": 4158,
                    "unitDiscountAmountFullAggregation": 4158,
                    "sumDiscountAmountFullAggregation": 4158,
                    "unitPriceToPayAggregation": 37417,
                    "sumPriceToPayAggregation": 37417
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/ac3da9eb-f4fc-5803-94b9-343d6cd4cda4/items/070_133913222"
            }
        },
        {
            "type": "items",
            "id": "089_29634947",
            "attributes": {
                "sku": "089_29634947",
                "quantity": "1",
                "groupKey": "089_29634947",
                "abstractSku": "089",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": "MER000001",
                "calculations": {
                    "unitPrice": 41393,
                    "sumPrice": 41393,
                    "taxRate": 7,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 41393,
                    "sumGrossPrice": 41393,
                    "unitTaxAmountFullAggregation": 2437,
                    "sumTaxAmountFullAggregation": 2437,
                    "sumSubtotalAggregation": 41393,
                    "unitSubtotalAggregation": 41393,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 4140,
                    "sumDiscountAmountAggregation": 4140,
                    "unitDiscountAmountFullAggregation": 4140,
                    "sumDiscountAmountFullAggregation": 4140,
                    "unitPriceToPayAggregation": 37253,
                    "sumPriceToPayAggregation": 37253
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27/items/089_29634947"
            }
        },
        {
            "type": "items",
            "id": "201_11217755",
            "attributes": {
                "sku": "201_11217755",
                "quantity": "1",
                "groupKey": "201_11217755",
                "abstractSku": "201",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": "MER000002",
                "calculations": {
                    "unitPrice": 20254,
                    "sumPrice": 20254,
                    "taxRate": 7,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 20254,
                    "sumGrossPrice": 20254,
                    "unitTaxAmountFullAggregation": 1193,
                    "sumTaxAmountFullAggregation": 1193,
                    "sumSubtotalAggregation": 20254,
                    "unitSubtotalAggregation": 20254,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 2025,
                    "sumDiscountAmountAggregation": 2025,
                    "unitDiscountAmountFullAggregation": 2025,
                    "sumDiscountAmountFullAggregation": 2025,
                    "unitPriceToPayAggregation": 18229,
                    "sumPriceToPayAggregation": 18229
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27/items/201_11217755"
            }
        },
        {
            "type": "items",
            "id": "005_30663301",
            "attributes": {
                "sku": "005_30663301",
                "quantity": 6,
                "groupKey": "005_30663301",
                "abstractSku": "005",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": null,
                "calculations": {
                    "unitPrice": 7000,
                    "sumPrice": 42000,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 7000,
                    "sumGrossPrice": 42000,
                    "unitTaxAmountFullAggregation": 1006,
                    "sumTaxAmountFullAggregation": 6035,
                    "sumSubtotalAggregation": 42000,
                    "unitSubtotalAggregation": 7000,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 700,
                    "sumDiscountAmountAggregation": 4200,
                    "unitDiscountAmountFullAggregation": 700,
                    "sumDiscountAmountFullAggregation": 4200,
                    "unitPriceToPayAggregation": 6300,
                    "sumPriceToPayAggregation": 37800
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8ef901fe-fe47-5569-9668-2db890dbee6d/items/005_30663301"
            }
        }
    ]
}
Response sample with cart permission groups
{
    "data": [
        {
            "type": "carts",
            "id": "59743e37-0182-5153-9935-77106741a9d2",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Purchases",
                "isDefault": true,
                "totals": {
                    "expenseTotal": null,
                    "discountTotal": null,
                    "taxTotal": null,
                    "subtotal": null,
                    "grandTotal": null
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/59743e37-0182-5153-9935-77106741a9d2"
            }
        },
        {
            "type": "carts",
            "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 2965,
                    "taxTotal": 4261,
                    "subtotal": 29651,
                    "grandTotal": 26686
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 2965,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
            },
            "relationships": {
                "cart-permission-groups": {
                    "data": [
                        {
                            "type": "cart-permission-groups",
                            "id": "1"
                        }
                    ]
                }
            }
        },
        {
            "type": "carts",
            "id": "2b72635a-9363-56f5-9ba7-55631b8ad71e",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "New",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 10206,
                    "taxTotal": 14666,
                    "subtotal": 102063,
                    "grandTotal": 91857
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 10206,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2b72635a-9363-56f5-9ba7-55631b8ad71e"
            },
            "relationships": {
                "cart-permission-groups": {
                    "data": [
                        {
                            "type": "cart-permission-groups",
                            "id": "2"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=cart-permission-groups"
    },
    "included": [
        {
            "type": "cart-permission-groups",
            "id": "1",
            "attributes": {
                "name": "READ_ONLY",
                "isDefault": true
            },
            "links": {
                "self": "https://glue.mysprykershop.com/cart-permission-groups/1"
            }
        },
        {
            "type": "cart-permission-groups",
            "id": "2",
            "attributes": {
                "name": "FULL_ACCESS",
                "isDefault": false
            },
            "links": {
                "self": "https://glue.mysprykershop.com/cart-permission-groups/2"
            }
        }
    ]
}
Response sample with shared carts
{
    "data": [
        {
            "type": "carts",
            "id": "59743e37-0182-5153-9935-77106741a9d2",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Purchases",
                "isDefault": true,
                "totals": {
                    "expenseTotal": null,
                    "discountTotal": null,
                    "taxTotal": null,
                    "subtotal": null,
                    "grandTotal": null
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/59743e37-0182-5153-9935-77106741a9d2"
            }
        },
        {
            "type": "carts",
            "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 2965,
                    "taxTotal": 4261,
                    "subtotal": 29651,
                    "grandTotal": 26686
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 2965,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
            },
            "relationships": {
                "shared-carts": {
                    "data": [
                        {
                            "type": "shared-carts",
                            "id": "8ceae991-0b8d-5c85-9f40-06c4c04fc7f4"
                        }
                    ]
                }
            }
        },
        {
            "type": "carts",
            "id": "2b72635a-9363-56f5-9ba7-55631b8ad71e",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "New",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 10206,
                    "taxTotal": 14666,
                    "subtotal": 102063,
                    "grandTotal": 91857
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 10206,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2b72635a-9363-56f5-9ba7-55631b8ad71e"
            },
            "relationships": {
                "shared-carts": {
                    "data": [
                        {
                            "type": "shared-carts",
                            "id": "180ab2c2-60be-5ed4-8158-abee52d9d640"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=shared-carts"
    },
    "included": [
        {
            "type": "shared-carts",
            "id": "8ceae991-0b8d-5c85-9f40-06c4c04fc7f4",
            "attributes": {
                "idCompanyUser": "72778771-2020-574f-bbaf-05da5889e79e",
                "idCartPermissionGroup": 1
            },
            "links": {
                "self": "https://glue.mysprykershop.com/shared-carts/8ceae991-0b8d-5c85-9f40-06c4c04fc7f4"
            }
        },
        {
            "type": "shared-carts",
            "id": "180ab2c2-60be-5ed4-8158-abee52d9d640",
            "attributes": {
                "idCompanyUser": "72778771-2020-574f-bbaf-05da5889e79e",
                "idCartPermissionGroup": 2
            },
            "links": {
                "self": "https://glue.mysprykershop.com/shared-carts/180ab2c2-60be-5ed4-8158-abee52d9d640"
            }
        }
    ]
}
Response sample with shared carts and company users they are shared with
{
    "data": [
        {
            "type": "carts",
            "id": "dc16f734-968d-5a45-92b7-aae5f804f77c",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": true,
                "totals": {
                    "expenseTotal": null,
                    "discountTotal": null,
                    "taxTotal": null,
                    "subtotal": null,
                    "grandTotal": null,
                    "priceToPay": null
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/dc16f734-968d-5a45-92b7-aae5f804f77c?include=shared-carts,company-users"
            }
        },
        {
            "type": "carts",
            "id": "0c3ec260-694a-5cec-b78c-d37d32f92ee9",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "CHF",
                "store": "DE",
                "name": "Weekly office",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 0,
                    "taxTotal": 1999,
                    "subtotal": 12522,
                    "grandTotal": 12522,
                    "priceToPay": 12522
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9?include=shared-carts,company-users"
            },
            "relationships": {
                "shared-carts": {
                    "data": [
                        {
                            "type": "shared-carts",
                            "id": "79e91e88-b83a-5095-aa64-b3914bdd4863"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=shared-carts,company-users"
    },
    "included": [
        {
            "type": "company-users",
            "id": "2816dcbd-855e-567e-b26f-4d57f3310bb8",
            "attributes": {
                "isActive": true,
                "isDefault": false
            },
            "links": {
                "self": "https://glue.mysprykershop.com/company-users/2816dcbd-855e-567e-b26f-4d57f3310bb8"
            }
        },
        {
            "type": "shared-carts",
            "id": "79e91e88-b83a-5095-aa64-b3914bdd4863",
            "attributes": {
                "idCompanyUser": "2816dcbd-855e-567e-b26f-4d57f3310bb8",
                "idCartPermissionGroup": 2
            },
            "links": {
                "self": "https://glue.mysprykershop.com/shared-carts/79e91e88-b83a-5095-aa64-b3914bdd4863"
            },
            "relationships": {
                "company-users": {
                    "data": [
                        {
                            "type": "company-users",
                            "id": "2816dcbd-855e-567e-b26f-4d57f3310bb8"
                        }
                    ]
                }
            }
        }
    ]
}
Response sample with cart rules
{
    "data": [
        {
            "type": "carts",
            "id": "59743e37-0182-5153-9935-77106741a9d2",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Purchases",
                "isDefault": true,
                "totals": {
                    "expenseTotal": null,
                    "discountTotal": null,
                    "taxTotal": null,
                    "subtotal": null,
                    "grandTotal": null
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/59743e37-0182-5153-9935-77106741a9d2"
            }
        },
        {
            "type": "carts",
            "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "My Cart",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 2965,
                    "taxTotal": 4261,
                    "subtotal": 29651,
                    "grandTotal": 26686
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 2965,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
            },
            "relationships": {
                "cart-rules": {
                    "data": [
                        {
                            "type": "cart-rules",
                            "id": "1"
                        }
                    ]
                }
            }
        },
        {
            "type": "carts",
            "id": "2b72635a-9363-56f5-9ba7-55631b8ad71e",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "New",
                "isDefault": false,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 10206,
                    "taxTotal": 14666,
                    "subtotal": 102063,
                    "grandTotal": 91857
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 10206,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2b72635a-9363-56f5-9ba7-55631b8ad71e"
            },
            "relationships": {
                "cart-rules": {
                    "data": [
                        {
                            "type": "cart-rules",
                            "id": "1"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=cart-rules"
    },
    "included": [
        {
            "type": "cart-rules",
            "id": "1",
            "attributes": {
                "amount": 10206,
                "code": null,
                "discountType": "cart_rule",
                "displayName": "10% Discount for all orders above",
                "isExclusive": false,
                "expirationDateTime": "2020-12-31 00:00:00.000000",
                "discountPromotionAbstractSku": null,
                "discountPromotionQuantity": null
            },
            "links": {
                "self": "https://glue.mysprykershop.com/cart-rules/1"
            }
        }
    ]
}
Response sample with vouchers
{
    "data": [
        {
            "type": "carts",
            "id": "976af32f-80f6-5f69-878f-4ea549ee0830",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 1663,
                    "taxTotal": 5046,
                    "subtotal": 33265,
                    "grandTotal": 31602,
                    "priceToPay": 31602
                },
                "discounts": [
                    {
                        "displayName": "5% discount on all white products",
                        "amount": 1663,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/976af32f-80f6-5f69-878f-4ea549ee0830?include=vouchers"
            },
            "relationships": {
                "vouchers": {
                    "data": [
                        {
                            "type": "vouchers",
                            "id": "sprykerya1y"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=vouchers"
    },
    "included": [
        {
            "type": "vouchers",
            "id": "sprykerya1y",
            "attributes": {
                "amount": 1663,
                "code": "sprykerya1y",
                "discountType": "voucher",
                "displayName": "5% discount on all white products",
                "isExclusive": false,
                "expirationDateTime": "2021-02-28 00:00:00.000000",
                "discountPromotionAbstractSku": null,
                "discountPromotionQuantity": null
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/976af32f-80f6-5f69-878f-4ea549ee0830/cart-codes/sprykerya1y"
            }
        }
    ]
}
Response sample with a promotional item
{
    "data": [
        {
            "type": "carts",
            "id": "e877356a-5d8f-575e-aacc-c790eeb20a27",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Everyday purchases",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 17352,
                    "taxTotal": 19408,
                    "subtotal": 173517,
                    "grandTotal": 156165,
                    "priceToPay": 56165
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 17352,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27"
            },
            "relationships": {
                "promotional-items": {
                    "data": [
                        {
                            "type": "promotional-items",
                            "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=promotional-items"
    },
    "included": [
        {
            "type": "promotional-items",
            "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a",
            "attributes": {
                "sku": "112",
                "quantity": 2
            },
            "links": {
                "self": "https://glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a"
            }
        }
    ]
}
Response sample with gift cards applied
{
    "data": [
        {
            "type": "carts",
            "id": "e877356a-5d8f-575e-aacc-c790eeb20a27",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Everyday purchases",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 17145,
                    "taxTotal": 19408,
                    "subtotal": 171447,
                    "grandTotal": 154302,
                    "priceToPay": 54302
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 17145,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27"
            },
            "relationships": {
                "gift-cards": {
                    "data": [
                        {
                            "type": "gift-cards",
                            "id": "GC-23RLC8H1-20"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=vouchers,gift-cards"
    },
    "included": [
        {
            "type": "gift-cards",
            "id": "GC-23RLC8H1-20",
            "attributes": {
                "code": "GC-23RLC8H1-20",
                "name": "Gift Card 1000",
                "value": 100000,
                "currencyIsoCode": "EUR",
                "actualValue": 100000,
                "isActive": true
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/e877356a-5d8f-575e-aacc-c790eeb20a27/cart-codes/GC-23RLC8H1-20"
            }
        }
    ]
}
Response sample with items, concrete products, and product options
{
    "data": [
        {
            "type": "carts",
            "id": "8fc45eda-cddf-5fec-8291-e2e5f8014398",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "EUR",
                "store": "DE",
                "name": "Christmas presents",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 19952,
                    "taxTotal": 31065,
                    "subtotal": 214518,
                    "grandTotal": 194566,
                    "priceToPay": 194566
                },
                "discounts": [
                    {
                        "displayName": "10% Discount for all orders above",
                        "amount": 19952,
                        "code": null
                    }
                ],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8fc45eda-cddf-5fec-8291-e2e5f8014398?include=items,concrete-products,product-options"
            },
            "relationships": {
                "items": {
                    "data": [
                        {
                            "type": "items",
                            "id": "181_31995510-3-5"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=items,concrete-products,product-options"
    },
    "included": [
        {
            "type": "product-options",
            "id": "OP_1_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_1_year_waranty",
                "optionName": "One (1) year limited warranty",
                "price": 0,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_1_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_2_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_2_year_waranty",
                "optionName": "Two (2) year limited warranty",
                "price": 1000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_2_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_3_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_3_year_waranty",
                "optionName": "Three (3) year limited warranty",
                "price": 2000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_3_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_insurance",
            "attributes": {
                "optionGroupName": "Insurance",
                "sku": "OP_insurance",
                "optionName": "Two (2) year insurance coverage",
                "price": 10000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_insurance"
            }
        },
        {
            "type": "product-options",
            "id": "OP_gift_wrapping",
            "attributes": {
                "optionGroupName": "Gift wrapping",
                "sku": "OP_gift_wrapping",
                "optionName": "Gift wrapping",
                "price": 500,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_gift_wrapping"
            }
        },
        {
            "type": "concrete-products",
            "id": "181_31995510",
            "attributes": {
                "sku": "181_31995510",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": null,
                "reviewCount": 0,
                "name": "Samsung Galaxy Tab S2 SM-T813",
                "description": "Enjoy greater flexibility  ...than ever before with the Galaxy Tab S2. Remarkably slim and ultra-lightweight, use this device to take your e-books, photos, videos and work-related files with you wherever you need to go. The Galaxy Tab S2's 4:3 ratio display is optimised for magazine reading and web use. Switch to Reading Mode to adjust screen brightness and change wallpaper - create an ideal eBook reading environment designed to reduce the strain on your eyes. Get greater security with convenient and accurate fingerprint functionality. Activate fingerprint lock by pressing the home button. Use fingerprint verification to restrict / allow access to your web browser, screen lock mode and your Samsung account.",
                "attributes": {
                    "internal_memory": "3 GB",
                    "processor_model": "APQ8076",
                    "digital_zoom": "4 x",
                    "storage_media": "flash",
                    "brand": "Samsung",
                    "color": "Pink"
                },
                "superAttributesDefinition": [
                    "internal_memory",
                    "storage_media",
                    "color"
                ],
                "metaTitle": "Samsung Galaxy Tab S2 SM-T813",
                "metaKeywords": "Samsung,Communication Electronics",
                "metaDescription": "Enjoy greater flexibility  ...than ever before with the Galaxy Tab S2. Remarkably slim and ultra-lightweight, use this device to take your e-books, photos,",
                "attributeNames": {
                    "internal_memory": "Max internal memory",
                    "processor_model": "Processor model",
                    "digital_zoom": "Digital zoom",
                    "storage_media": "Storage media",
                    "brand": "Brand",
                    "color": "Color"
                }
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510"
            },
            "relationships": {
                "product-options": {
                    "data": [
                        {
                            "type": "product-options",
                            "id": "OP_1_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_2_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_3_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_insurance"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_gift_wrapping"
                        }
                    ]
                }
            }
        },
        {
            "type": "items",
            "id": "181_31995510-3-5",
            "attributes": {
                "sku": "181_31995510",
                "quantity": 6,
                "groupKey": "181_31995510-3-5",
                "abstractSku": "181",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": null,
                "calculations": {
                    "unitPrice": 33253,
                    "sumPrice": 199518,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 33253,
                    "sumGrossPrice": 199518,
                    "unitTaxAmountFullAggregation": 5177,
                    "sumTaxAmountFullAggregation": 31065,
                    "sumSubtotalAggregation": 214518,
                    "unitSubtotalAggregation": 35753,
                    "unitProductOptionPriceAggregation": 2500,
                    "sumProductOptionPriceAggregation": 15000,
                    "unitDiscountAmountAggregation": 3325,
                    "sumDiscountAmountAggregation": 19952,
                    "unitDiscountAmountFullAggregation": 3325,
                    "sumDiscountAmountFullAggregation": 19952,
                    "unitPriceToPayAggregation": 32428,
                    "sumPriceToPayAggregation": 194566
                },
                "salesUnit": null,
                "selectedProductOptions": [
                    {
                        "optionGroupName": "Gift wrapping",
                        "sku": "OP_gift_wrapping",
                        "optionName": "Gift wrapping",
                        "price": 3000
                    },
                    {
                        "optionGroupName": "Warranty",
                        "sku": "OP_3_year_waranty",
                        "optionName": "Three (3) year limited warranty",
                        "price": 12000
                    }
                ]
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8fc45eda-cddf-5fec-8291-e2e5f8014398/items/181_31995510-3-5"
            },
            "relationships": {
                "concrete-products": {
                    "data": [
                        {
                            "type": "concrete-products",
                            "id": "181_31995510"
                        }
                    ]
                }
            }
        }
    ]
}
Response sample with product labels
{
    "data": [
        {
            "type": "carts",
            "id": "0c3ec260-694a-5cec-b78c-d37d32f92ee9",
            "attributes": {
                "priceMode": "GROSS_MODE",
                "currency": "CHF",
                "store": "DE",
                "name": "Weekly office",
                "isDefault": true,
                "totals": {
                    "expenseTotal": 0,
                    "discountTotal": 0,
                    "taxTotal": 538,
                    "subtotal": 3369,
                    "grandTotal": 3369,
                    "priceToPay": 3369
                },
                "discounts": [],
                "thresholds": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9?include=items,concrete-products,product-labels"
            },
            "relationships": {
                "items": {
                    "data": [
                        {
                            "type": "items",
                            "id": "421511"
                        }
                    ]
                }
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/carts?include=items,concrete-products,product-labels"
    },
    "included": [
        {
            "type": "product-labels",
            "id": "5",
            "attributes": {
                "name": "SALE %",
                "isExclusive": false,
                "position": 3,
                "frontEndReference": "sale"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/product-labels/5"
            }
        },
        {
            "type": "concrete-products",
            "id": "421511",
            "attributes": {
                "sku": "421511",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": 4.3,
                "reviewCount": 4,
                "name": "Parker ballpoint pen URBAN Premium S0911450 M refill, blue",
                "description": "In transparent color tones with lightly curved body.<p>* Line width: 0.5 mm * type designation of the refill: Slider 774 * refill exchangeable * printing mechanism * waterproof * design of the grip zone: round * tip material: stainless steel",
                "attributes": {
                    "material": "metal",
                    "wischfest": "No",
                    "abwischbar": "No",
                    "wasserfest": "No",
                    "nachfuellbar": "No",
                    "schreibfarbe": "blue",
                    "brand": "Parker"
                },
                "superAttributesDefinition": [
                    "material"
                ],
                "metaTitle": "",
                "metaKeywords": "Schreibgeräte,Schreibgeräte,Kugelschreiber,Kugelschreiber,Kulis,Kulis,Kulischreiber,Kulischreiber",
                "metaDescription": "",
                "attributeNames": {
                    "material": "Material",
                    "wischfest": "Smudge-resistant",
                    "abwischbar": "Wipeable",
                    "wasserfest": "Watertight",
                    "nachfuellbar": "Refillable",
                    "schreibfarbe": "Writing color",
                    "brand": "Brand"
                }
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/421511"
            },
            "relationships": {
                "product-labels": {
                    "data": [
                        {
                            "type": "product-labels",
                            "id": "5"
                        }
                    ]
                }
            }
        },
        {
            "type": "items",
            "id": "421511",
            "attributes": {
                "sku": "421511",
                "quantity": "1",
                "groupKey": "421511",
                "abstractSku": "M21759",
                "amount": null,
                "calculations": {
                    "unitPrice": 3369,
                    "sumPrice": 3369,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 3369,
                    "sumGrossPrice": 3369,
                    "unitTaxAmountFullAggregation": 538,
                    "sumTaxAmountFullAggregation": 538,
                    "sumSubtotalAggregation": 3369,
                    "unitSubtotalAggregation": 3369,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 0,
                    "sumDiscountAmountAggregation": 0,
                    "unitDiscountAmountFullAggregation": 0,
                    "sumDiscountAmountFullAggregation": 0,
                    "unitPriceToPayAggregation": 3369,
                    "sumPriceToPayAggregation": 3369
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9/items/421511"
            },
            "relationships": {
                "concrete-products": {
                    "data": [
                        {
                            "type": "concrete-products",
                            "id": "421511"
                        }
                    ]
                }
            }
        }
    ]
}

General cart information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts currency String Currency that was selected when the cart was created.
carts isDefault Boolean Specifies whether the cart is the default one for the customer. The field is available in multi-cart environments only.
carts name String Specifies a cart name. The field is available in multi-cart environments only.
carts priceMode String Price mode that was active when the cart was created.
carts store String Store for which the cart was created.

Discount information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts displayName String Discount name.
carts amount Integer Discount amount applied to the cart.
carts code String Discount code applied to the cart.

Totals

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts expenseTotal String Total amount of expenses (including, e.g., shipping costs).
carts discountTotal Integer Total amount of discounts applied to the cart.
carts taxTotal Integer Total amount of taxes to be paid.
carts subTotal Integer Subtotal of the cart.
carts grandTotal Integer Grand total of the cart.
carts priceToPay Integer Total price of the cart to pay after discounts.
carts selectedProductOptions array List of attributes describing the product options that were added to cart with the product.

Thresholds

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts threshold Array Thresholds applied.
carts type String Threshold type.
carts threshold Integer Threshold monetary amount.
carts fee Integer Fee to be paid if the threshold is not reached.
carts deltaWithSubtotal Integer Displays the remaining amount that needs to be added to pass the threshold.
carts message String Message shown to the customer if the threshold is not fulfilled.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
items sku String Product SKU.
items quantity Integer Quantity of the given product in the cart.
items groupKey String Unique item identifier. The value is generated based on product properties.
items abstractSku String Unique identifier of the abstract product owning this concrete product.
items amount Integer Amount of the products in the cart.
items unitPrice Integer Single item price without assuming if it is net or gross. This value should be used everywhere the price is displayed. It allows switching tax mode without side effects.
items sumPrice Integer Sum of all items prices calculated.
items taxRate Integer Current tax rate in per cent.
items unitNetPrice Integer Single item net price.
items sumNetPrice Integer Sum of prices of all items.
items unitGrossPrice Integer Single item gross price.
items sumGrossPrice Integer Sum of items gross price.
items unitTaxAmountFullAggregation Integer Total tax amount for a given item with additions.
items sumTaxAmountFullAggregation Integer Total tax amount for a given sum of items with additions.
items sumSubtotalAggregation Integer Sum of subtotals of the items.
items unitSubtotalAggregation Integer Subtotal for the given item.
items unitProductOptionPriceAggregation Integer Item total product option price.
items sumProductOptionPriceAggregation Integer Item total of product options for the given sum of items.
items unitDiscountAmountAggregation Integer Item total discount amount.
items sumDiscountAmountAggregation Integer Sum of Item total discount amount.
items unitDiscountAmountFullAggregation Integer Sum total discount amount with additions.
items sumDiscountAmountFullAggregation Integer Item total discount amount with additions.
items unitPriceToPayAggregation Integer Item total price to pay after discounts with additions.
items sumPriceToPayAggregation Integer Sum of the prices to pay (after discounts).
items salesUnit Object List of attributes defining the sales unit to be used for item amount calculation.
items salesUnit.id Integer Numeric value the defines the sales units to calculate the item amount in.
items salesUnit.amount Integer Amount of product in the defined sales units.
items selectedProductOptions array List of attributes describing the product options that were added to cart with the product.
items selectedProductOptions.optionGroupName String Name of the group to which the option belongs.
items selectedProductOptions.sku String SKU of the product option.
items selectedProductOptions.optionName String Product option name.
items selectedProductOptions.price Integer Product option price in cents.
items selectedProductOptions.currencyIsoCode String ISO 4217 code of the currency in which the product option price is specified.
items threshold Array Thresholds applied.
items type String Threshold type.
items threshold Integer Threshold monetary amount.
items fee Integer Fee to be paid if the threshold is not reached.
items deltaWithSubtotal Integer Displays the remaining amount that needs to be added to pass the threshold.
items message String Message shown to the customer if the threshold is not fulfilled.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
product-options sku String Specifies the SKU of the product option.
product-options optionName String Specifies the option name.
product-options optionGroupName String Specifies the name of the group to which the option belongs.
product-options price Integer Specifies the option price in cents.
product-options currencyIsoCode String Specifies the ISO 4217 code of the currency in which the product option price is specified.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
concrete-products sku String SKU of the concrete product.
concrete-products isDiscontinued Boolean Specifies whether a product is discontinued:
true - the product is discontinued and requires a replacement item;
false—the product is not discontinued.
concrete-products discontinuedNote String Optional note that was specified when marking a product as discontinued.
concrete-products averageRating String Average rating of the product based on customer rating.
concrete-products reviewCount Integer Number of reviews left by customer for this product.
concrete-products name String Name of the concrete product.
concrete-products description String Description of the concrete product.
concrete-products attributes Object List of attribute keys and their values for the product.
concrete-products superAttributeDefinition String List of attributes that are flagged as super attributes.
concrete-products metaTitle String Meta title of the product.
concrete-products metaKeywords String Meta keywords of the product.
concrete-products metaDescription String Meta description of the product.
concrete-products attributeNames String List of attribute keys and their translations.
concrete-products productAbstractSku String Unique identifier of the abstract product owning this concrete product.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
vouchers, cart-rules displayName String Discount name displayed on the Storefront.
vouchers, cart-rules amount Integer Amount of the provided discount.
vouchers, cart-rules code String Discount code.
vouchers, cart-rules discountType String Discount type.
vouchers, cart-rules isExclusive Boolean Discount exclusivity.
vouchers, cart-rules expirationDateTime DateTimeUtc Date and time on which the discount expires.
vouchers, cart-rules discountPromotionAbstractSku String SKU of the products to which the discount applies. If the discount can be applied to any product, the value is null.
vouchers, cart-rules discountPromotionQuantity Integer Specifies the amount of the product required to be able to apply the discount. If the minimum number is 0, the value is null.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
product-labels name String Specifies the label name.
product-labels isExclusive Boolean Indicates whether the label is exclusive.
If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden.
product-labels position Integer Indicates the label priority.
Labels should be indicated on the frontend according to their priority, from the highest (1) to the lowest, unless a product has a label with the isExclusive attribute set.
product-labels frontEndReference String Specifies the label custom label type (CSS class).
If the attribute is an empty string, the label should be displayed using the default CSS style.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
cart-permission-groups id String A unique ID that is used to define permissions with this permission group.
cart-permission-groups name String The permission group’s name. For example, READ_ONLY or FULL_ACCESS.
cart-permission-groups isDefault Boolean If true, the permission group is applied to shared carts by default.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
gift-cards code String Code of the gift card sent to the specified email address after the gift card was purchased.
gift-cards name String Name of the gift card.
gift-cards value Integer Amount applied to the card when the gift card code is redeemed.
gift-cards currencyIsoCode String Currency to which the code is applied.
gift-cards actualValue Integer Actual value of the gift card code.
gift-cards isActive Boolean Specifies whether the gift card code is redeemed or not.
INCLUDED RESOURCE ATTRIBUTE TYPE DESCRIPTION
promotional-items id String The unique ID of the promotional item. The ID can be used to apply the promotion to the given purchase.
promotional-items sku String The SKU of the promoted abstract product.
promotional-items quantity Integer Specifies how many promotions can be applied to the given purchase.
shared-carts idCompanyUser String The unique ID of the company user with whom the cart is shared.
shared-carts idCartPermissionGroup Integer The unique ID of the cart permission group that describes the permissions granted to the user with whom the cart is shared.
company-users id String The unique ID of the company user with whom the cart is shared.
company-users isActive Boolean If true, the company user is active.
company-users isDefault Boolean If true, the company user is default for the customer.

Retrieve a registered user’s cart

To retrieve a particular cart, send the request:


GET /carts/{{cart_uuid}}


PATH PARAMETER DESCRIPTION
{{cart_uuid}} The unique ID of a cart. Create a cart or Retrieve a registered user’s carts to get it.

Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string The alphanumeric string that authorizes the customer or company user to send requests to protected resources. Get it by authenticating as a customer or authenticating as a company user.
QUERY PARAMETER DESCRIPTION EXEMPLARY VALUES
include Adds resource relationships to the request.
  • items
  • cart-permission-groups
  • shared-carts
  • company-users
  • cart-rules
  • promotional-items
  • vouchers
  • gift-cards
  • concrete-products
  • product-options
  • product-labels
Included resources
  • To retrieve all the product options of the item in a cart, include items, concrete-products, and product-options.
  • To retrieve product labels of the products in a cart, include items, concrete-products, and product-labels.
REQUEST USAGE
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4 Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart.
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4?include=items Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart with its items, related concrete products and cart permission groups included.
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4?include=cart-permission-groups Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart with its cart permissions included.
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4?include=shared-carts Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart with details on the shared cart.
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4?include=shared-carts,company-users Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart with information about shared carts and the company uses they are shared with.
GET https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4?include=cart-rules Retrieve the 2fd32609-b6b0-5993-9254-8d2f271941e4 cart with cart rules.
GET https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2?include=promotional-items Retrieve the 1ce91011-8d60-59ef-9fe0-4493ef3628b2 cart with its promotional items.
GET https://glue.mysprykershop.com/carts/8ef901fe-fe47-5569-9668-2db890dbee6d?include=gift-cards Retrieve the 8ef901fe-fe47-5569-9668-2db890dbee6 cart with detailed information on its gift cards.
GET https://glue.mysprykershop.com/carts/8fc45eda-cddf-5fec-8291-e2e5f8014398?include=items,concrete-products,product-options Retrieve the 8fc45eda-cddf-5fec-8291-e2e5f8014398 cart with items, respective concrete product, and their product options.
GET https://glue.mysprykershop.com/carts/976af32f-80f6-5f69-878f-4ea549ee0830?include=vouchers Retrieve the 976af32f-80f6-5f69-878f-4ea549ee0830 cart with detailed information on its vouchers.
GET https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9?include=items,concrete-products,product-labels Retrieve the 0c3ec260-694a-5cec-b78c-d37d32f92ee9 cart with information about the product labels assigned to the products in the cart.
GET https://glue.mysprykershop.com/carts/308b51f4-2491-5bce-8cf2-436273b44f9b Retrieve the 308b51f4-2491-5bce-8cf2-436273b44f9b cart with the unfulfilled hard and soft minimum thresholds.
GET https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2 Retrieve the 1ce91011-8d60-59ef-9fe0-4493ef3628b2 cart with the unfulfilled hard maximum threshold.

Response

Response sample
{
    "data": {
        "type": "carts",
        "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "discountTotal": 2965,
                "taxTotal": 4261,
                "subtotal": 29651,
                "grandTotal": 26686
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 2965,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
        }
    }
}
Response sample with items
{
    "data": {
        "type": "carts",
        "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 2965,
                "taxTotal": 4261,
                "subtotal": 29651,
                "grandTotal": 26686
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 2965,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
        },
        "relationships": {
            "items": {
                "data": [
                    {
                        "type": "items",
                        "id": "421479"
                    },
                    {
                        "type": "items",
                        "id": "575260"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "items",
            "id": "421479",
            "attributes": {
                "sku": "421479",
                "quantity": 2,
                "groupKey": "421479",
                "abstractSku": "M21744",
                "amount": null,
                "calculations": {
                    "unitPrice": 442,
                    "sumPrice": 884,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 442,
                    "sumGrossPrice": 884,
                    "unitTaxAmountFullAggregation": 64,
                    "sumTaxAmountFullAggregation": 127,
                    "sumSubtotalAggregation": 884,
                    "unitSubtotalAggregation": 442,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 44,
                    "sumDiscountAmountAggregation": 88,
                    "unitDiscountAmountFullAggregation": 44,
                    "sumDiscountAmountFullAggregation": 88,
                    "unitPriceToPayAggregation": 398,
                    "sumPriceToPayAggregation": 796
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4/items/421479"
            }
        },
        {
            "type": "items",
            "id": "575260",
            "attributes": {
                "sku": "575260",
                "quantity": 1,
                "groupKey": "575260",
                "abstractSku": "M1028062",
                "amount": null,
                "calculations": {
                    "unitPrice": 28767,
                    "sumPrice": 28767,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 28767,
                    "sumGrossPrice": 28767,
                    "unitTaxAmountFullAggregation": 4133,
                    "sumTaxAmountFullAggregation": 4134,
                    "sumSubtotalAggregation": 28767,
                    "unitSubtotalAggregation": 28767,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 2877,
                    "sumDiscountAmountAggregation": 2877,
                    "unitDiscountAmountFullAggregation": 2877,
                    "sumDiscountAmountFullAggregation": 2877,
                    "unitPriceToPayAggregation": 25890,
                    "sumPriceToPayAggregation": 25890
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4/items/575260"
            }
        }
    ]
}
Response sample with cart permission groups
{
    "data": {
        "type": "carts",
        "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 2965,
                "taxTotal": 4261,
                "subtotal": 29651,
                "grandTotal": 26686
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 2965,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
        },
        "relationships": {
            "cart-permission-groups": {
                "data": [
                    {
                        "type": "cart-permission-groups",
                        "id": "1"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "cart-permission-groups",
            "id": "1",
            "attributes": {
                "name": "READ_ONLY",
                "isDefault": true
            },
            "links": {
                "self": "https://glue.mysprykershop.com/cart-permission-groups/1"
            }
        }
    ]
}
Sample response with details on shared carts
{
    "data": {
        "type": "carts",
        "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 2965,
                "taxTotal": 4261,
                "subtotal": 29651,
                "grandTotal": 26686
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 2965,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
        },
        "relationships": {
            "shared-carts": {
                "data": [
                    {
                        "type": "shared-carts",
                        "id": "8ceae991-0b8d-5c85-9f40-06c4c04fc7f4"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "shared-carts",
            "id": "8ceae991-0b8d-5c85-9f40-06c4c04fc7f4",
            "attributes": {
                "idCompanyUser": "72778771-2020-574f-bbaf-05da5889e79e",
                "idCartPermissionGroup": 1
            },
            "links": {
                "self": "https://glue.mysprykershop.com/shared-carts/8ceae991-0b8d-5c85-9f40-06c4c04fc7f4"
            }
        }
    ]
}
Response sample with shared carts and company users they are shared with
{
    "data": {
        "type": "carts",
        "id": "0c3ec260-694a-5cec-b78c-d37d32f92ee9",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "CHF",
            "store": "DE",
            "name": "Weekly office",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 0,
                "taxTotal": 1999,
                "subtotal": 12522,
                "grandTotal": 12522,
                "priceToPay": 12522
            },
            "discounts": [],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9?include=shared-carts,company-users"
        },
        "relationships": {
            "shared-carts": {
                "data": [
                    {
                        "type": "shared-carts",
                        "id": "79e91e88-b83a-5095-aa64-b3914bdd4863"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "company-users",
            "id": "2816dcbd-855e-567e-b26f-4d57f3310bb8",
            "attributes": {
                "isActive": true,
                "isDefault": false
            },
            "links": {
                "self": "https://glue.mysprykershop.com/company-users/2816dcbd-855e-567e-b26f-4d57f3310bb8"
            }
        },
        {
            "type": "shared-carts",
            "id": "79e91e88-b83a-5095-aa64-b3914bdd4863",
            "attributes": {
                "idCompanyUser": "2816dcbd-855e-567e-b26f-4d57f3310bb8",
                "idCartPermissionGroup": 2
            },
            "links": {
                "self": "https://glue.mysprykershop.com/shared-carts/79e91e88-b83a-5095-aa64-b3914bdd4863"
            },
            "relationships": {
                "company-users": {
                    "data": [
                        {
                            "type": "company-users",
                            "id": "2816dcbd-855e-567e-b26f-4d57f3310bb8"
                        }
                    ]
                }
            }
        }
    ]
}
Response sample with cart rules
{
    "data": {
        "type": "carts",
        "id": "2fd32609-b6b0-5993-9254-8d2f271941e4",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 2965,
                "taxTotal": 4261,
                "subtotal": 29651,
                "grandTotal": 26686
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 2965,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/2fd32609-b6b0-5993-9254-8d2f271941e4"
        },
        "relationships": {
            "cart-rules": {
                "data": [
                    {
                        "type": "cart-rules",
                        "id": "1"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "cart-rules",
            "id": "1",
            "attributes": {
                "amount": 2965,
                "code": null,
                "discountType": "cart_rule",
                "displayName": "10% Discount for all orders above",
                "isExclusive": false,
                "expirationDateTime": "2020-12-31 00:00:00.000000",
                "discountPromotionAbstractSku": null,
                "discountPromotionQuantity": null
            },
            "links": {
                "self": "https://glue.mysprykershop.com/cart-rules/1"
            }
        }
    ]
}
Response sample with a promotional item
{
    "data": {
        "type": "carts",
        "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 11113,
                "taxTotal": 15107,
                "subtotal": 111128,
                "grandTotal": 100015
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 11113,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2"
        },
        "relationships": {
            "promotional-items": {
                "data": [
                    {
                        "type": "promotional-items",
                        "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "promotional-items",
            "id": "bfc600e1-5bf1-50eb-a9f5-a37deb796f8a",
            "attributes": {
                "sku": "112",
                "quantity": 2
            },
            "links": {
                "self": "https://glue.mysprykershop.com/promotional-items/bfc600e1-5bf1-50eb-a9f5-a37deb796f8a"
            }
        }
    ]
}
Response sample with details on gift cards
{
    "data": {
        "type": "carts",
        "id": "8ef901fe-fe47-5569-9668-2db890dbee6d",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "Shopping cart",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 4200,
                "taxTotal": 6035,
                "subtotal": 42000,
                "grandTotal": 37800,
                "priceToPay": 17800
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 4200,
                    "code": null
                }
            ]
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/8ef901fe-fe47-5569-9668-2db890dbee6d"
        },
        "relationships": {
            "gift-cards": {
                "data": [
                    {
                        "type": "gift-cards",
                        "id": "GC-I6UB6O56-20"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "gift-cards",
            "id": "GC-I6UB6O56-20",
            "attributes": {
                "code": "GC-I6UB6O56-20",
                "name": "Gift Card 200",
                "value": 20000,
                "currencyIsoCode": "EUR",
                "actualValue": 20000,
                "isActive": true
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8ef901fe-fe47-5569-9668-2db890dbee6d/cart-codes/GC-I6UB6O56-20"
            }
        }
    ]
}
Response sample with items, respective concrete products, and their product options
{
    "data": {
        "type": "carts",
        "id": "8fc45eda-cddf-5fec-8291-e2e5f8014398",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "Christmas presents",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 19952,
                "taxTotal": 31065,
                "subtotal": 214518,
                "grandTotal": 194566,
                "priceToPay": 194566
            },
            "discounts": [
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 19952,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/8fc45eda-cddf-5fec-8291-e2e5f8014398?include=items,concrete-products,product-options"
        },
        "relationships": {
            "items": {
                "data": [
                    {
                        "type": "items",
                        "id": "181_31995510-3-5"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "product-options",
            "id": "OP_1_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_1_year_waranty",
                "optionName": "One (1) year limited warranty",
                "price": 0,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_1_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_2_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_2_year_waranty",
                "optionName": "Two (2) year limited warranty",
                "price": 1000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_2_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_3_year_waranty",
            "attributes": {
                "optionGroupName": "Warranty",
                "sku": "OP_3_year_waranty",
                "optionName": "Three (3) year limited warranty",
                "price": 2000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_3_year_waranty"
            }
        },
        {
            "type": "product-options",
            "id": "OP_insurance",
            "attributes": {
                "optionGroupName": "Insurance",
                "sku": "OP_insurance",
                "optionName": "Two (2) year insurance coverage",
                "price": 10000,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_insurance"
            }
        },
        {
            "type": "product-options",
            "id": "OP_gift_wrapping",
            "attributes": {
                "optionGroupName": "Gift wrapping",
                "sku": "OP_gift_wrapping",
                "optionName": "Gift wrapping",
                "price": 500,
                "currencyIsoCode": "EUR"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510/product-options/OP_gift_wrapping"
            }
        },
        {
            "type": "concrete-products",
            "id": "181_31995510",
            "attributes": {
                "sku": "181_31995510",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": null,
                "reviewCount": 0,
                "name": "Samsung Galaxy Tab S2 SM-T813",
                "description": "Enjoy greater flexibility  ...than ever before with the Galaxy Tab S2. Remarkably slim and ultra-lightweight, use this device to take your e-books, photos, videos and work-related files with you wherever you need to go. The Galaxy Tab S2’s 4:3 ratio display is optimised for magazine reading and web use. Switch to Reading Mode to adjust screen brightness and change wallpaper - create an ideal eBook reading environment designed to reduce the strain on your eyes. Get greater security with convenient and accurate fingerprint functionality. Activate fingerprint lock by pressing the home button. Use fingerprint verification to restrict / allow access to your web browser, screen lock mode and your Samsung account.",
                "attributes": {
                    "internal_memory": "3 GB",
                    "processor_model": "APQ8076",
                    "digital_zoom": "4 x",
                    "storage_media": "flash",
                    "brand": "Samsung",
                    "color": "Pink"
                },
                "superAttributesDefinition": [
                    "internal_memory",
                    "storage_media",
                    "color"
                ],
                "metaTitle": "Samsung Galaxy Tab S2 SM-T813",
                "metaKeywords": "Samsung,Communication Electronics",
                "metaDescription": "Enjoy greater flexibility  ...than ever before with the Galaxy Tab S2. Remarkably slim and ultra-lightweight, use this device to take your e-books, photos,",
                "attributeNames": {
                    "internal_memory": "Max internal memory",
                    "processor_model": "Processor model",
                    "digital_zoom": "Digital zoom",
                    "storage_media": "Storage media",
                    "brand": "Brand",
                    "color": "Color"
                }
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/181_31995510"
            },
            "relationships": {
                "product-options": {
                    "data": [
                        {
                            "type": "product-options",
                            "id": "OP_1_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_2_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_3_year_waranty"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_insurance"
                        },
                        {
                            "type": "product-options",
                            "id": "OP_gift_wrapping"
                        }
                    ]
                }
            }
        },
        {
            "type": "items",
            "id": "181_31995510-3-5",
            "attributes": {
                "sku": "181_31995510",
                "quantity": 6,
                "groupKey": "181_31995510-3-5",
                "abstractSku": "181",
                "amount": null,
                "productOfferReference": null,
                "merchantReference": null,
                "calculations": {
                    "unitPrice": 33253,
                    "sumPrice": 199518,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 33253,
                    "sumGrossPrice": 199518,
                    "unitTaxAmountFullAggregation": 5177,
                    "sumTaxAmountFullAggregation": 31065,
                    "sumSubtotalAggregation": 214518,
                    "unitSubtotalAggregation": 35753,
                    "unitProductOptionPriceAggregation": 2500,
                    "sumProductOptionPriceAggregation": 15000,
                    "unitDiscountAmountAggregation": 3325,
                    "sumDiscountAmountAggregation": 19952,
                    "unitDiscountAmountFullAggregation": 3325,
                    "sumDiscountAmountFullAggregation": 19952,
                    "unitPriceToPayAggregation": 32428,
                    "sumPriceToPayAggregation": 194566
                },
                "salesUnit": null,
                "selectedProductOptions": [
                    {
                        "optionGroupName": "Gift wrapping",
                        "sku": "OP_gift_wrapping",
                        "optionName": "Gift wrapping",
                        "price": 3000
                    },
                    {
                        "optionGroupName": "Warranty",
                        "sku": "OP_3_year_waranty",
                        "optionName": "Three (3) year limited warranty",
                        "price": 12000
                    }
                ]
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/8fc45eda-cddf-5fec-8291-e2e5f8014398/items/181_31995510-3-5"
            },
            "relationships": {
                "concrete-products": {
                    "data": [
                        {
                            "type": "concrete-products",
                            "id": "181_31995510"
                        }
                    ]
                }
            }
        }
    ]
}
Response sample with vouchers
{
    "data": {
        "type": "carts",
        "id": "976af32f-80f6-5f69-878f-4ea549ee0830",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 25766,
                "taxTotal": 25407,
                "subtotal": 184893,
                "grandTotal": 159127,
                "priceToPay": 159127
            },
            "discounts": [
                {
                    "displayName": "5% discount on all white products",
                    "amount": 7277,
                    "code": null
                },
                {
                    "displayName": "10% Discount for all orders above",
                    "amount": 18489,
                    "code": null
                }
            ],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/976af32f-80f6-5f69-878f-4ea549ee0830?include=vouchers"
        },
        "relationships": {
            "vouchers": {
                "data": [
                    {
                        "type": "vouchers",
                        "id": "sprykercu2d"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "vouchers",
            "id": "sprykercu2d",
            "attributes": {
                "amount": 7277,
                "code": "sprykercu2d",
                "discountType": "voucher",
                "displayName": "5% discount on all white products",
                "isExclusive": false,
                "expirationDateTime": "2021-02-27 00:00:00.000000",
                "discountPromotionAbstractSku": null,
                "discountPromotionQuantity": null
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/976af32f-80f6-5f69-878f-4ea549ee0830/cart-codes/sprykercu2d"
            }
        }
    ]
}
Response sample with product labels
{
    "data": {
        "type": "carts",
        "id": "0c3ec260-694a-5cec-b78c-d37d32f92ee9",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "CHF",
            "store": "DE",
            "name": "Weekly office",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 0,
                "taxTotal": 538,
                "subtotal": 3369,
                "grandTotal": 3369,
                "priceToPay": 3369
            },
            "discounts": [],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9?include=items,concrete-products,product-labels"
        },
        "relationships": {
            "items": {
                "data": [
                    {
                        "type": "items",
                        "id": "421511"
                    }
                ]
            }
        }
    },
    "included": [
        {
            "type": "product-labels",
            "id": "5",
            "attributes": {
                "name": "SALE %",
                "isExclusive": false,
                "position": 3,
                "frontEndReference": "sale"
            },
            "links": {
                "self": "https://glue.mysprykershop.com/product-labels/5"
            }
        },
        {
            "type": "concrete-products",
            "id": "421511",
            "attributes": {
                "sku": "421511",
                "isDiscontinued": false,
                "discontinuedNote": null,
                "averageRating": 4.3,
                "reviewCount": 4,
                "name": "Parker ballpoint pen URBAN Premium S0911450 M refill, blue",
                "description": "In transparent color tones with lightly curved body.<p>* Line width: 0.5 mm * type designation of the refill: Slider 774 * refill exchangeable * printing mechanism * waterproof * design of the grip zone: round * tip material: stainless steel",
                "attributes": {
                    "material": "metal",
                    "wischfest": "No",
                    "abwischbar": "No",
                    "wasserfest": "No",
                    "nachfuellbar": "No",
                    "schreibfarbe": "blue",
                    "brand": "Parker"
                },
                "superAttributesDefinition": [
                    "material"
                ],
                "metaTitle": "",
                "metaKeywords": "Schreibgeräte,Schreibgeräte,Kugelschreiber,Kugelschreiber,Kulis,Kulis,Kulischreiber,Kulischreiber",
                "metaDescription": "",
                "attributeNames": {
                    "material": "Material",
                    "wischfest": "Smudge-resistant",
                    "abwischbar": "Wipeable",
                    "wasserfest": "Watertight",
                    "nachfuellbar": "Refillable",
                    "schreibfarbe": "Writing color",
                    "brand": "Brand"
                }
            },
            "links": {
                "self": "https://glue.mysprykershop.com/concrete-products/421511"
            },
            "relationships": {
                "product-labels": {
                    "data": [
                        {
                            "type": "product-labels",
                            "id": "5"
                        }
                    ]
                }
            }
        },
        {
            "type": "items",
            "id": "421511",
            "attributes": {
                "sku": "421511",
                "quantity": "1",
                "groupKey": "421511",
                "abstractSku": "M21759",
                "amount": null,
                "calculations": {
                    "unitPrice": 3369,
                    "sumPrice": 3369,
                    "taxRate": 19,
                    "unitNetPrice": 0,
                    "sumNetPrice": 0,
                    "unitGrossPrice": 3369,
                    "sumGrossPrice": 3369,
                    "unitTaxAmountFullAggregation": 538,
                    "sumTaxAmountFullAggregation": 538,
                    "sumSubtotalAggregation": 3369,
                    "unitSubtotalAggregation": 3369,
                    "unitProductOptionPriceAggregation": 0,
                    "sumProductOptionPriceAggregation": 0,
                    "unitDiscountAmountAggregation": 0,
                    "sumDiscountAmountAggregation": 0,
                    "unitDiscountAmountFullAggregation": 0,
                    "sumDiscountAmountFullAggregation": 0,
                    "unitPriceToPayAggregation": 3369,
                    "sumPriceToPayAggregation": 3369
                },
                "salesUnit": null,
                "selectedProductOptions": []
            },
            "links": {
                "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9/items/421511"
            },
            "relationships": {
                "concrete-products": {
                    "data": [
                        {
                            "type": "concrete-products",
                            "id": "421511"
                        }
                    ]
                }
            }
        }
    ]
}
Response sample with the unfulfilled hard and soft minimum thresholds
{
    "data": {
        "type": "carts",
        "id": "308b51f4-2491-5bce-8cf2-436273b44f9b",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "New Year presents",
            "isDefault": true,
            "totals": {
                "expenseTotal": 5000,
                "discountTotal": 0,
                "taxTotal": 1350,
                "subtotal": 9454,
                "grandTotal": 14454,
                "priceToPay": 14454
            },
            "discounts": [],
            "thresholds": [
                {
                    "type": "hard-minimum-threshold",
                    "threshold": 20000,
                    "fee": null,
                    "deltaWithSubtotal": 10546,
                    "message": "You need to add items for €200.00 to pass a recommended threshold. Otherwise, €50 fee will be added."
                },
                {
                    "type": "soft-minimum-threshold-fixed-fee",
                    "threshold": 100000,
                    "fee": 5000,
                    "deltaWithSubtotal": 90546,
                    "message": "You need to add items for €1,000.00 to pass a recommended threshold. Otherwise, €50.00 fee will be added."
                },
            ]
        },
        "links": {
            "self": "https://glue.de.69-new.demo-spryker.com/carts/308b51f4-2491-5bce-8cf2-436273b44f9b"
        }
    }
}
Response sample with the unfulfilled hard maximum threshold
{
    "data": {
        "type": "carts",
        "id": "1ce91011-8d60-59ef-9fe0-4493ef3628b2",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart",
            "isDefault": false,
            "totals": {
                "expenseTotal": 5000,
                "discountTotal": 0,
                "taxTotal": 11976,
                "subtotal": 70007,
                "grandTotal": 75007,
                "priceToPay": 75007
            },
            "discounts": [],
            "thresholds": [
                {
                    "type": "hard-maximum-threshold",
                    "threshold": 5000,
                    "fee": null,
                    "deltaWithSubtotal": 65007,
                    "message": "You need to add items for €50 or less to pass a recommended threshold."
                }
            ]
        },
        "links": {
            "self": "https://glue.de.69-new.demo-spryker.com/carts/1ce91011-8d60-59ef-9fe0-4493ef3628b2"
        }
    }
}

General cart information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts currency String Currency that was selected when the cart was created.
carts isDefault Boolean Specifies whether the cart is the default one for the customer. The field is available in multi-cart environments only.
carts name String Specifies a cart name. The field is available in multi-cart environments only.
carts priceMode String Price mode that was active when the cart was created.
carts store String Store for which the cart was created.

Discount information

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts displayName String Discount name.
carts amount Integer Discount amount applied to the cart.
carts code String Discount code applied to the cart.

Totals

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts expenseTotal String Total amount of expenses (including, e.g., shipping costs).
carts discountTotal Integer Total amount of discounts applied to the cart.
carts taxTotal Integer Total amount of taxes to be paid.
carts subTotal Integer Subtotal of the cart.
carts grandTotal Integer Grand total of the cart.
carts priceToPay Integer Total price of the cart to pay after discounts.
carts selectedProductOptions array List of attributes describing the product options that were added to cart with the product.

Thresholds

RESOURCE ATTRIBUTE TYPE DESCRIPTION
carts threshold Array Thresholds applied.
carts type String Threshold type.
carts threshold Integer Threshold monetary amount.
carts fee Integer Fee to be paid if the threshold is not reached.
carts deltaWithSubtotal Integer Displays the remaining amount that needs to be added to pass the threshold.
carts message String Message shown to the customer if the threshold is not fulfilled.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
items sku String Product SKU.
items quantity Integer Quantity of the given product in the cart.
items groupKey String Unique item identifier. The value is generated based on product properties.
items abstractSku String Unique identifier of the abstract product owning this concrete product.
items amount Integer Amount of the products in the cart.
items unitPrice Integer Single item price without assuming if it is net or gross. This value should be used everywhere the price is displayed. It allows switching tax mode without side effects.
items sumPrice Integer Sum of all items prices calculated.
items taxRate Integer Current tax rate in per cent.
items unitNetPrice Integer Single item net price.
items sumNetPrice Integer Sum of prices of all items.
items unitGrossPrice Integer Single item gross price.
items sumGrossPrice Integer Sum of items gross price.
items unitTaxAmountFullAggregation Integer Total tax amount for a given item with additions.
items sumTaxAmountFullAggregation Integer Total tax amount for a given sum of items with additions.
items sumSubtotalAggregation Integer Sum of subtotals of the items.
items unitSubtotalAggregation Integer Subtotal for the given item.
items unitProductOptionPriceAggregation Integer Item total product option price.
items sumProductOptionPriceAggregation Integer Item total of product options for the given sum of items.
items unitDiscountAmountAggregation Integer Item total discount amount.
items sumDiscountAmountAggregation Integer Sum of Item total discount amount.
items unitDiscountAmountFullAggregation Integer Sum total discount amount with additions.
items sumDiscountAmountFullAggregation Integer Item total discount amount with additions.
items unitPriceToPayAggregation Integer Item total price to pay after discounts with additions.
items sumPriceToPayAggregation Integer Sum of the prices to pay (after discounts).
items salesUnit Object List of attributes defining the sales unit to be used for item amount calculation.
items salesUnit.id Integer Numeric value the defines the sales units to calculate the item amount in.
items salesUnit.amount Integer Amount of product in the defined sales units.
items selectedProductOptions array List of attributes describing the product options that were added to cart with the product.
items selectedProductOptions.optionGroupName String Name of the group to which the option belongs.
items selectedProductOptions.sku String SKU of the product option.
items selectedProductOptions.optionName String Product option name.
items selectedProductOptions.price Integer Product option price in cents.
items selectedProductOptions.currencyIsoCode String ISO 4217 code of the currency in which the product option price is specified.
items threshold Array Thresholds applied.
items type String Threshold type.
items threshold Integer Threshold monetary amount.
items fee Integer Fee to be paid if the threshold is not reached.
items deltaWithSubtotal Integer Displays the remaining amount that needs to be added to pass the threshold.
items message String Message shown to the customer if the threshold is not fulfilled.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
concrete-products sku String SKU of the concrete product.
concrete-products isDiscontinued Boolean Specifies whether a product is discontinued:
true - the product is discontinued and requires a replacement item;
false—the product is not discontinued.
concrete-products discontinuedNote String Optional note that was specified when marking a product as discontinued.
concrete-products averageRating String Average rating of the product based on customer rating.
concrete-products reviewCount Integer Number of reviews left by customer for this product.
concrete-products name String Name of the concrete product.
concrete-products description String Description of the concrete product.
concrete-products attributes Object List of attribute keys and their values for the product.
concrete-products superAttributeDefinition String List of attributes that are flagged as super attributes.
concrete-products metaTitle String Meta title of the product.
concrete-products metaKeywords String Meta keywords of the product.
concrete-products metaDescription String Meta description of the product.
concrete-products attributeNames String List of attribute keys and their translations.
concrete-products productAbstractSku String Unique identifier of the abstract product owning this concrete product.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
product-labels name String Specifies the label name.
product-labels isExclusive Boolean Indicates whether the label is exclusive.
If the attribute is set to true, the current label takes precedence over other labels the product might have. This means that only the current label should be displayed for the product, and all other possible labels should be hidden.
product-labels position Integer Indicates the label priority.
Labels should be indicated on the frontend according to their priority, from the highest (1) to the lowest, unless a product has a label with the isExclusive attribute set.
product-labels frontEndReference String Specifies the label custom label type (CSS class).
If the attribute is an empty string, the label should be displayed using the default CSS style.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
gift-cards code String Code of the gift card sent to the specified email address after the gift card was purchased.
gift-cards name String Name of the gift card.
gift-cards value Integer Amount applied to the card when the gift card code is redeemed.
gift-cards currencyIsoCode String Currency to which the code is applied.
gift-cards actualValue Integer Actual value of the gift card code.
gift-cards isActive Boolean Specifies whether the gift card code is redeemed or not.
RESOURCE ATTRIBUTE TYPE DESCRIPTION
cart-permission-groups id String A unique ID that is used to define permissions with this permission group.
cart-permission-groups name String The permission group’s name. For example, READ_ONLY or FULL_ACCESS.
cart-permission-groups isDefault Boolean If true, the permission group is applied to shared carts by default.

Edit a cart

You can edit the name of the cart, change the currency and price mode. To do that, send the request:


PATCH /carts/{{cart_uuid}}


PATH PARAMETER DESCRIPTION
cart_uuid Unique identifier of a cart. Create a cart or Retrieve a registered user’s carts to get it.
Info
  • You can change the price mode of an empty cart but not the one that has items in it.
  • Currency and store can be changed for an empty cart and for a cart with items anytime.

Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string The alphanumeric string that authorizes the customer or company user to send requests to protected resources. Get it by authenticating as a customer or authenticating as a company user.
If-Match 075d700b908d7e41f751c5d2d4392407 Makes the request conditional. It matches the listed conditional ETags from the headers when retrieving the cart. The patch is applied only if the tag value matches.

Request sample: https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9

{
   "data":{
      "type":"carts",
      "attributes":{
         "name":"My Cart with awesome name",
         "priceMode":"GROSS_MODE",
         "currency":"EUR",
         "store":"DE"
      }
   }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
name String Sets the cart name. This field can be set only if you are using the multiple carts feature. If you are operating in a single-cart environment, an attempt to set the value will result in an error with the 422 Unprocessable Entry status code. Cart name should be unique and should not be longer than 30 characters.
priceMode Enum &check Sets the price mode to be used for the cart. Possible values:
  • GROSS_MODE - prices after tax;
  • NET_MODE - prices before tax.
For details, see Net & Gross Prices.
currency String Sets the cart currency.
store String Sets the name of the store where to create the cart.

Response

Response sample:

{
    "data": {
        "type": "carts",
        "id": "0c3ec260-694a-5cec-b78c-d37d32f92ee9",
        "attributes": {
            "priceMode": "GROSS_MODE",
            "currency": "EUR",
            "store": "DE",
            "name": "My Cart with awesome name",
            "isDefault": true,
            "totals": {
                "expenseTotal": 0,
                "discountTotal": 63538,
                "taxTotal": 79689,
                "subtotal": 635381,
                "grandTotal": 571843,
                "priceToPay": 571843
            },
            "discounts": [],
            "thresholds": []
        },
        "links": {
            "self": "https://glue.mysprykershop.com/carts/0c3ec260-694a-5cec-b78c-d37d32f92ee9"
        }
    }
}

Delete a cart

To delete a cart, send the request:


DELETE /carts/{{cart_uuid}}


PATH PARAMETER DESCRIPTION
cart_uuid The unique ID of a cart. Create a cart or Retrieve a registered user’s carts to get it.
Deleting carts

You cannot delete a cart if it is the customer’s only cart. If you attempt to delete a customer’s last cart, the endpoint responds with the 422 Unprocessable Entry status code. If you delete the default cart of a customer, another cart will be assigned as default automatically.

Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string Alphanumeric string that authorizes the customer or company user to send requests to protected resources. Get it by authenticating as a customer or authenticating as a company user.

Request sample: DELETE https://glue.mysprykershop.com/carts/4741fc84-2b9b-59da-bb8d-f4afab5be054

Response

If the cart is deleted successfully, the endpoint returns the 204 No Content status code.

Possible errors

CODE REASON
001 Access token is incorrect.
002 Access token is missing.
003 Failed to log in the user.
101 Cart with given uuid not found.
102 Failed to add an item to cart.
103 Item with the given group key not found in the cart.
104 Cart uuid is missing.
105 Cart cannot be deleted.
106 Cart item cannot be deleted.
107 Failed to create a cart.
110 Customer already has a cart.
111 Can’t switch price mode when there are items in the cart.
112 Store data is invalid.
113 Cart item cannot be added.
114 Cart item cannot be updated.
115 Unauthorized cart action.
116 Currency is missing.
117 Currency is incorrect.
118 Price mode is missing.
119 Price mode is incorrect.

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