Glue API: Retrieve customer carts
Edit on GitHubThis endpoint allows retrieving a customer’s carts.
Installation
For details on the modules that provide the API functionality and how to install them, see Install the Cart Glue API.
Retrieve customer’s carts
To retrieve a customer’s carts, send the following request:
GET
/customers/{{customerId}}/carts
Alternatively, you can retrieve all carts belonging to a customer through the /carts endpoint. For details, see Manage carts of registered users.
PATH PARAMETER | DESCRIPTION |
---|---|
{{customerId}} | Customer unique identifier to retrieve orders of. To get it, retrieve a customer or create a customer. |
Request
HEADER KEY | HEADER VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
Authorization | string | ✓ | Alphanumeric string that authorizes the customer to send requests to protected resources. Get it by authenticating as a customer. |
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 |
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/customers/DE--1/carts |
Retrieve all carts of a user. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=items |
Retrieve all carts of a user with the items in them included. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=cart-permission-groups |
Retrieve all carts of a user with cart permission groups included. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=shared-carts |
Retrieve all carts of a user with shared carts. |
GET https://glue.mysprykershop.com/customers/DE--1/?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/customers/DE--1/?include=cart-rules |
Retrieve all carts of a user with cart rules. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=vouchers |
Retrieve all carts of a user with information about applied vouchers. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=promotional-items |
Retrieve information about promotional items for the cart. |
GET https://glue.mysprykershop.com/customers/DE--1/?include=gift-cards |
Retrieve all carts of a user with applied gift cards. |
GET https://glue.mysprykershop.com/customers/DE--1/?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/customers/DE--1/?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 are found
{
"data": [],
"links": {
"self": "https://glue.mysprykershop.com/carts"
}
}
Response sample: retrieve multiple customer's 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
}
]
},
"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": []
},
"links": {
"self": "https://glue.mysprykershop.com/carts/482bdbd6-137f-5b58-bd1c-37f3fa735a16"
}
}
],
"links": {
"self": "https://glue.mysprykershop.com/carts"
}
}
Response sample: retrieve customer's carts with their items included
{
"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
}
]
},
"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
}
]
},
"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
}
]
},
"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: retrieve customer's carts with cart permission groups included
{
"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": []
},
"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
}
]
},
"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
}
]
},
"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: retrieve customer's carts with the information on shared carts included
{
"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": []
},
"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
}
]
},
"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
}
]
},
"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: retrieve customer's carts with shared carts and include information about 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": []
},
"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": []
},
"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: retrieve customer's carts with the cart rules included
{
"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": []
},
"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
}
]
},
"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
}
]
},
"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: retrieve customer's carts with the information on vouchers included
{
"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
}
]
},
"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: retrieve customer's carts withe the information on promotional items included
{
"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
}
]
},
"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: retrieve customer's carts with the information on the 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
}
]
},
"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: retrieve customer's carts and include information on 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
}
]
},
"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: retrieve customer's carts with the information on product labels included
{
"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": []
},
"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 |
---|---|---|---|
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 |
---|---|---|---|
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. |
| 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
. |
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. |
cart-permission-groups | name | String | The permission group’s name. |
cart-permission-groups | isDefault | Boolean | If true, the permission group is applied to shared carts by default. |
company-users | id | String | Unique identifier of the company user with whom the cart is shared. |
company-users | isActive | Boolean | If true, the company useris active. |
company-users | isDefault | Boolean | If true, the company user is default for the customer. |
For the attributes of the included resources, see:
Possible errors
CODE | REASON |
---|---|
001 | Access token is invalid. |
002 | Access token is missing. |
402 | Customer with the specified ID was not found. |
802 | Request is unauthorized. |
To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.
Thank you!
For submitting the form