Carts

Manage Carts

Retrieving cart details by criteria

get

Retrieves cart details based on the store's site code and criteria such as session ID or customer ID.

As a response only one cart is returned, so all required criteria needs to be provided to fetch the unique cart. Uniqueness of the cart is defined by combination of siteCode, type, legalEntityId and (sessionId or customerId)


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
sessionIdstringOptional

Customer's unique session identifier.

Note: The sessionId is only required if you want to retrieve an anonymous customer's cart.

customerIdstringOptional

Customer’s unique identifier generated when a customer’s account is created.

Note: The customerId is only required if you want to create a cart for a logged in customer.

siteCodestringRequired

Site’s unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

legalEntityIdstringOptional

Id of the legal entity to which customer is assigned. Should not be provided for B2C business model.

Note: The query param is optional, but if not provided, the cart without legalEntity assigned is returned.

createbooleanOptional

If set to true and no cart exists for the specified criteria, a new cart will be created.

typestringOptional

Type of the cart.

Note: The query param is optional, but if not provided then only cart without type is returned.

zipCodestring · min: 1 · max: 9Optional

Zip code for cart filtering

countryCodestring · min: 2 · max: 2Optional

Country code for cart filtering

Responses
200
The request was successful. Cart details are returned.
application/json
Responseall of

Cart details.

get
GET /cart/{tenant}/carts HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "68481e9e8bf22744fc578572",
  "yrn": "urn:yaas:hybris:cart:cart:b2b2cstage;68481e9e8bf22744fc578572",
  "customerId": "45620894",
  "currency": "EUR",
  "siteCode": "GrossSite",
  "type": "shopping",
  "channel": {
    "name": "storefront",
    "source": "https://your-storefront.com/"
  },
  "items": [
    {
      "id": "0",
      "keepAsSeparateLineItem": true,
      "type": "INTERNAL",
      "product": {
        "id": "samsung-galaxy-s24-gross",
        "sku": "Samsung Galaxy s24 gross",
        "code": "Samsung Galaxy s24 gross",
        "name": "Samsung Galaxy s24 gross",
        "localizedName": {
          "en": "Samsung Galaxy s24 gross"
        },
        "images": [
          {
            "id": "67169928ceaab717e17f3734",
            "url": "http://res.cloudinary.com/saas-ag/image/upload/v1729534248/b2b2cstage/media/67169928ceaab717e17f3734"
          }
        ]
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s24-gross",
      "quantity": 2,
      "effectiveQuantity": 2,
      "price": {
        "priceId": "679ca63dbcdefe5b380c98bc",
        "priceListId": "abc123",
        "originalAmount": 350,
        "effectiveAmount": 350,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 294.118,
        "grossValue": 350,
        "taxValue": 55.882,
        "taxCode": "STANDARD",
        "taxRate": 19
      },
      "itemPrice": {
        "amount": 700,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "STANDARD",
          "value": {
            "amount": 111.76
          },
          "rate": 19,
          "grossValue": 700,
          "netValue": 588.24
        }
      ],
      "fees": {
        "elements": [
          {
            "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
            "taxCode": "REDUCED",
            "total": {
              "subTotal": 3.5,
              "totalTax": 0,
              "total": 3.08,
              "discount": 0.42
            },
            "name": {
              "de": "Apple Picking Fee",
              "en": "Apple Picking Fee"
            }
          }
        ],
        "total": {
          "subTotal": 3.5,
          "totalTax": 0,
          "total": 3.08,
          "discount": 0.42
        }
      },
      "authorizedAmount": {
        "amount": 700,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 84.32,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 84.32
        }
      ],
      "externalDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "discountType": "PERCENT",
          "value": 40,
          "sequence": 1
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 588.235,
          "grossValue": 700,
          "taxValue": 111.765,
          "taxCode": "STANDARD",
          "taxRate": 19
        },
        "discountedPrice": {
          "netValue": 282.511,
          "grossValue": 336.188,
          "taxValue": 53.677,
          "taxCode": "STANDARD",
          "taxRate": 19,
          "appliedDiscounts": [
            {
              "id": "buy-2-get-1-free",
              "value": 280,
              "price": {
                "netValue": 235.294,
                "grossValue": 280,
                "taxValue": 44.706,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "PERCENT",
              "origin": "EXTERNAL"
            },
            {
              "id": "LS100EUROTOTAL",
              "value": 83.812,
              "price": {
                "netValue": 70.43,
                "grossValue": 83.812,
                "taxValue": 13.382,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "fees": [
          {
            "id": "677d49ca3a421b451eab23f2",
            "type": "ABSOLUTE",
            "origin": "INTERNAL",
            "name": {
              "de": "Apple Picking Fee",
              "en": "Apple Picking Fee"
            },
            "price": {
              "netValue": 3.5,
              "grossValue": 3.745,
              "taxValue": 0.245,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountedPrice": {
              "netValue": 3.081,
              "grossValue": 3.297,
              "taxValue": 0.216,
              "taxCode": "REDUCED",
              "taxRate": 7,
              "appliedDiscounts": [
                {
                  "id": "LS100EUROTOTAL",
                  "value": 0.448,
                  "price": {
                    "netValue": 0.419,
                    "grossValue": 0.448,
                    "taxValue": 0.029,
                    "taxCode": "REDUCED",
                    "taxRate": 7
                  },
                  "discountType": "ABSOLUTE",
                  "origin": "INTERNAL"
                }
              ]
            }
          }
        ],
        "totalFee": {
          "netValue": 3.081,
          "grossValue": 3.297,
          "taxValue": 0.216,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 0.448,
              "price": {
                "netValue": 0.419,
                "grossValue": 0.448,
                "taxValue": 0.029,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 364.26,
          "price": {
            "netValue": 306.143,
            "grossValue": 364.26,
            "taxValue": 58.117
          },
          "appliedDiscounts": [
            {
              "id": "buy-2-get-1-free",
              "value": 280,
              "price": {
                "netValue": 235.294,
                "grossValue": 280,
                "taxValue": 44.706,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "PERCENT",
              "origin": "EXTERNAL"
            },
            {
              "id": "LS100EUROTOTAL",
              "value": 84.26,
              "price": {
                "netValue": 70.849,
                "grossValue": 84.26,
                "taxValue": 13.411
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 285.592,
          "grossValue": 339.485,
          "taxValue": 53.893
        }
      }
    },
    {
      "id": "1",
      "keepAsSeparateLineItem": false,
      "type": "INTERNAL",
      "product": {
        "id": "shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
        "sku": "shirt--red",
        "code": "shirt--red",
        "name": "shirt",
        "localizedName": {
          "en": "shirt"
        },
        "description": ""
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
      "quantity": 1,
      "effectiveQuantity": 1,
      "price": {
        "priceId": "6818c032524d1c16623037e2",
        "originalAmount": 10,
        "effectiveAmount": 10,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 9.346,
        "grossValue": 10,
        "taxValue": 0.654,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "itemPrice": {
        "amount": 10,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "REDUCED",
          "value": {
            "amount": 0.65
          },
          "rate": 7,
          "grossValue": 10,
          "netValue": 9.35
        }
      ],
      "fees": {
        "total": {
          "subTotal": 0,
          "totalTax": 0,
          "total": 0,
          "discount": 0
        }
      },
      "authorizedAmount": {
        "amount": 10,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 1.2,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 1.2
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 9.346,
          "grossValue": 10,
          "taxValue": 0.654,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "discountedPrice": {
          "netValue": 8.227,
          "grossValue": 8.803,
          "taxValue": 0.576,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 1.197,
              "price": {
                "netValue": 1.119,
                "grossValue": 1.197,
                "taxValue": 0.078,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 1.197,
          "price": {
            "netValue": 1.119,
            "grossValue": 1.197,
            "taxValue": 0.078,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 1.197,
              "price": {
                "netValue": 1.119,
                "grossValue": 1.197,
                "taxValue": 0.078,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 8.227,
          "grossValue": 8.803,
          "taxValue": 0.576,
          "taxCode": "REDUCED",
          "taxRate": 7
        }
      }
    },
    {
      "id": "2",
      "keepAsSeparateLineItem": true,
      "type": "INTERNAL",
      "product": {
        "id": "samsung-galaxy-s27-gross",
        "sku": "samsung-galaxy-s27-gross",
        "code": "samsung-galaxy-s27-gross",
        "name": "samsung-galaxy-s27-gross",
        "localizedName": {
          "en": "samsung-galaxy-s27-gross"
        },
        "description": "samsung-galaxy-s27-gross"
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s27-gross",
      "quantity": 2,
      "effectiveQuantity": 2,
      "price": {
        "priceId": "6797da2f3537716a5a537ecf",
        "originalAmount": 55,
        "effectiveAmount": 55,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 51.402,
        "grossValue": 55,
        "taxValue": 3.598,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "itemPrice": {
        "amount": 110,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "REDUCED",
          "value": {
            "amount": 7.2
          },
          "rate": 7,
          "grossValue": 110,
          "netValue": 102.8
        }
      ],
      "fees": {
        "elements": [
          {
            "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
            "taxCode": "REDUCED",
            "total": {
              "subTotal": 3.5,
              "totalTax": 0,
              "total": 3.08,
              "discount": 0.42
            },
            "name": "Apple Picking Fee"
          }
        ],
        "total": {
          "subTotal": 3.5,
          "totalTax": 0,
          "total": 3.08,
          "discount": 0.42
        }
      },
      "authorizedAmount": {
        "amount": 143,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 13.61,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 13.61
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 102.804,
          "grossValue": 110,
          "taxValue": 7.196,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "upliftValue": {
          "netValue": 30.841,
          "grossValue": 33,
          "taxValue": 2.159,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "discountedPrice": {
          "netValue": 90.495,
          "grossValue": 96.83,
          "taxValue": 6.335,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 13.17,
              "price": {
                "netValue": 12.308,
                "grossValue": 13.17,
                "taxValue": 0.862,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "fees": [
          {
            "id": "677d49ca3a421b451eab23f2",
            "type": "ABSOLUTE",
            "origin": "INTERNAL",
            "name": "Apple Picking Fee",
            "price": {
              "netValue": 3.5,
              "grossValue": 3.745,
              "taxValue": 0.245,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountedPrice": {
              "netValue": 3.081,
              "grossValue": 3.297,
              "taxValue": 0.216,
              "taxCode": "REDUCED",
              "taxRate": 7,
              "appliedDiscounts": [
                {
                  "id": "LS100EUROTOTAL",
                  "value": 0.448,
                  "price": {
                    "netValue": 0.419,
                    "grossValue": 0.448,
                    "taxValue": 0.029,
                    "taxCode": "REDUCED",
                    "taxRate": 7
                  },
                  "discountType": "ABSOLUTE",
                  "origin": "INTERNAL"
                }
              ]
            }
          }
        ],
        "totalFee": {
          "netValue": 3.081,
          "grossValue": 3.297,
          "taxValue": 0.216,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 0.448,
              "price": {
                "netValue": 0.419,
                "grossValue": 0.448,
                "taxValue": 0.029,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 13.618,
          "price": {
            "netValue": 12.727,
            "grossValue": 13.618,
            "taxValue": 0.891,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 13.618,
              "price": {
                "netValue": 12.727,
                "grossValue": 13.618,
                "taxValue": 0.891,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 93.576,
          "grossValue": 100.127,
          "taxValue": 6.551,
          "taxCode": "REDUCED",
          "taxRate": 7
        }
      }
    }
  ],
  "discounts": [
    {
      "id": "0",
      "code": "LS100EUROTOTAL",
      "amount": 100,
      "currency": "EUR",
      "name": "LS100EUROTOTAL",
      "calculationType": "ApplyDiscountBeforeTax",
      "valid": true,
      "links": [
        {
          "rel": "validate",
          "title": "Coupon Validation",
          "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/validation",
          "type": "application/json"
        },
        {
          "rel": "redeem",
          "title": "Coupon Redemption",
          "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/redemptions",
          "type": "application/json"
        }
      ],
      "discountType": "ABSOLUTE",
      "discountCalculationType": "TOTAL",
      "categoryRestricted": false
    }
  ],
  "feeYrnAggregate": {
    "elements": [
      {
        "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
        "taxCode": "REDUCED",
        "total": {
          "subTotal": 7,
          "totalTax": 0,
          "total": 6.16,
          "discount": 0.84
        },
        "name": {
          "de": "Apple Picking Fee",
          "en": "Apple Picking Fee"
        }
      }
    ],
    "total": {
      "subTotal": 7,
      "totalTax": 0,
      "total": 6.16,
      "discount": 0.84
    }
  },
  "totalPrice": {
    "amount": 734.22,
    "currency": "EUR"
  },
  "subTotalPrice": {
    "amount": 820,
    "currency": "EUR"
  },
  "shipping": {
    "fee": {
      "amount": 7.22,
      "currency": "EUR"
    },
    "total": {
      "subTotal": 7.22,
      "totalTax": 0,
      "total": 6.35,
      "discount": 0.87
    }
  },
  "totalUnitsCount": 5,
  "metadata": {
    "createdAt": "2025-06-10T12:01:34.057Z",
    "modifiedAt": "2025-06-10T12:23:14.894Z",
    "calculatedAt": "2025-06-10T12:23:14.894Z",
    "version": 5
  },
  "totalTax": {
    "amount": 0,
    "currency": "EUR"
  },
  "taxAggregate": {
    "lines": [
      {
        "name": "REDUCED",
        "amount": 7.85,
        "rate": 7,
        "taxable": 120
      },
      {
        "name": "STANDARD",
        "amount": 111.77,
        "rate": 19,
        "taxable": 700.01
      }
    ]
  },
  "subtotalAggregate": {
    "currency": "EUR",
    "netValue": 700.39,
    "grossValue": 820.01,
    "taxValue": 119.62
  },
  "totalDiscount": {
    "amount": 100,
    "currency": "EUR"
  },
  "itemFeesTotal": {
    "subTotal": 7,
    "totalTax": 0,
    "total": 6.16,
    "discount": 0.84
  },
  "paymentFeesTotal": {
    "subTotal": 0,
    "totalTax": 0,
    "total": 0,
    "discount": 0
  },
  "leadTime": 0,
  "totalAuthorizedAmount": {
    "amount": 767.22,
    "currency": "EUR"
  },
  "calculatedPrice": {
    "price": {
      "netValue": 700.385,
      "grossValue": 820,
      "taxValue": 119.615
    },
    "upliftValue": {
      "netValue": 30.841,
      "grossValue": 33,
      "taxValue": 2.159,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "discountedPrice": {
      "netValue": 381.233,
      "grossValue": 441.821,
      "taxValue": 60.588,
      "appliedDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "value": 280,
          "price": {
            "netValue": 235.294,
            "grossValue": 280,
            "taxValue": 44.706,
            "taxCode": "STANDARD",
            "taxRate": 19
          },
          "discountType": "PERCENT",
          "origin": "EXTERNAL"
        },
        {
          "id": "LS100EUROTOTAL",
          "value": 98.179,
          "price": {
            "netValue": 83.857,
            "grossValue": 98.179,
            "taxValue": 14.322
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "fees": {
      "netValue": 7,
      "grossValue": 7.49,
      "taxValue": 0.49,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "totalFee": {
      "netValue": 6.162,
      "grossValue": 6.594,
      "taxValue": 0.432,
      "taxCode": "REDUCED",
      "taxRate": 7,
      "appliedDiscounts": [
        {
          "id": "LS100EUROTOTAL",
          "value": 0.896,
          "price": {
            "netValue": 0.838,
            "grossValue": 0.896,
            "taxValue": 0.058,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "shipping": {
      "netValue": 7.22,
      "grossValue": 7.725,
      "taxValue": 0.505,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "totalShipping": {
      "netValue": 6.355,
      "grossValue": 6.8,
      "taxValue": 0.445,
      "taxCode": "REDUCED",
      "taxRate": 7,
      "appliedDiscounts": [
        {
          "id": "LS100EUROTOTAL",
          "value": 0.925,
          "price": {
            "netValue": 0.864,
            "grossValue": 0.925,
            "taxValue": 0.061,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "totalDiscount": {
      "calculationType": "ApplyDiscountAfterTax",
      "value": 380,
      "price": {
        "netValue": 320.853,
        "grossValue": 380,
        "taxValue": 59.147
      },
      "appliedDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "value": 280,
          "price": {
            "netValue": 235.294,
            "grossValue": 280,
            "taxValue": 44.706,
            "taxCode": "STANDARD",
            "taxRate": 19
          },
          "discountType": "PERCENT",
          "origin": "EXTERNAL"
        },
        {
          "id": "LS100EUROTOTAL",
          "value": 100,
          "price": {
            "netValue": 85.559,
            "grossValue": 100,
            "taxValue": 14.441
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "finalPrice": {
      "netValue": 393.75,
      "grossValue": 455.215,
      "taxValue": 61.465,
      "taxAggregate": {
        "lines": [
          {
            "netValue": 111.239,
            "grossValue": 119.027,
            "taxValue": 7.788,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          {
            "netValue": 282.511,
            "grossValue": 336.188,
            "taxValue": 53.677,
            "taxCode": "STANDARD",
            "taxRate": 19
          }
        ]
      }
    }
  }
}

Creating a new cart

post

Creates a new cart. When a cart is created, its status is set to open.

Note: A customer can have multiple carts opened, but they have to be of a different type. The cart type is specified in the payload in the type property. It allows for different types of carts, such as shopping carts and wishlists.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token. Use when you want to create a cart for a logged in customer.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Header parameters
session-idstringOptional

Anonymous customer's unique session identifier.

Note: The session-id is only required if you want to create a cart for an anonymous customer.

saas-tokenstringOptional

Customer’s saasToken generated when the customer token is generated.

Note: The saas-token is only required if you want to create a cart for a logged in customer.

Body
customerIdstring · max: 200Optional

Customer’s unique identifier generated when a customer’s account is created through the Customer Service.

currencystring · min: 3 · max: 3Required

Three-letter currency code, compliant with the ISO 4217 standard.

Pattern: [A-Z]{3}
legalEntityIdstringOptional

Id of the legal entity to which customer is assigned.

deliveryWindowIdstringOptional

Delivery window's unique identifier, as defined in the Shipping Service.

siteCodestringOptional

Site’s unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Default: default
typestringOptional

Cart type. You can use this field if your store offers different types of carts, such as shopping carts and wishlists.

sessionValidatedbooleanOptional

If set to true, endpoints will validate whether the session-id used to create the cart matches the session-id passed in the request header.

Note: The sessionValidated parameter only applies to anonymous customers’ carts.

Default: false
Responses
201
The request was successful. Cart details are returned.
application/json
post
POST /cart/{tenant}/carts HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 150

{
  "siteCode": "main",
  "currency": "EUR",
  "type": "shopping",
  "channel": {
    "name": "storefront",
    "source": "https://your-storefront.com/"
  },
  "sessionValidated": true
}
{
  "cartId": "65141d687308095e25ca0671",
  "yrn": "urn:yaas:hybris:cart:cart-item:saastest2;65141d687308095e25ca0671"
}

Searching for carts

post

Returns all carts that match provided criteria.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Body
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard practises - Query parameter

Responses
200
The request was successful. Carts are returned.
application/json
post
POST /cart/{tenant}/carts/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "q": "status:OPEN"
}
[
  {
    "id": "68481e9e8bf22744fc578572",
    "yrn": "urn:yaas:hybris:cart:cart:b2b2cstage;68481e9e8bf22744fc578572",
    "customerId": "45620894",
    "currency": "EUR",
    "siteCode": "GrossSite",
    "type": "shopping",
    "channel": {
      "name": "storefront",
      "source": "https://your-storefront.com/"
    },
    "items": [
      {
        "id": "0",
        "keepAsSeparateLineItem": true,
        "type": "INTERNAL",
        "product": {
          "id": "samsung-galaxy-s24-gross",
          "sku": "Samsung Galaxy s24 gross",
          "code": "Samsung Galaxy s24 gross",
          "name": "Samsung Galaxy s24 gross",
          "localizedName": {
            "en": "Samsung Galaxy s24 gross"
          },
          "images": [
            {
              "id": "67169928ceaab717e17f3734",
              "url": "http://res.cloudinary.com/saas-ag/image/upload/v1729534248/b2b2cstage/media/67169928ceaab717e17f3734"
            }
          ]
        },
        "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s24-gross",
        "quantity": 2,
        "effectiveQuantity": 2,
        "price": {
          "priceId": "679ca63dbcdefe5b380c98bc",
          "priceListId": "abc123",
          "originalAmount": 350,
          "effectiveAmount": 350,
          "currency": "EUR"
        },
        "unitPrice": {
          "netValue": 294.118,
          "grossValue": 350,
          "taxValue": 55.882,
          "taxCode": "STANDARD",
          "taxRate": 19
        },
        "itemPrice": {
          "amount": 700,
          "currency": "EUR"
        },
        "itemTaxInfo": [
          {
            "name": "STANDARD",
            "value": {
              "amount": 111.76
            },
            "rate": 19,
            "grossValue": 700,
            "netValue": 588.24
          }
        ],
        "fees": {
          "elements": [
            {
              "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
              "taxCode": "REDUCED",
              "total": {
                "subTotal": 3.5,
                "totalTax": 0,
                "total": 3.08,
                "discount": 0.42
              },
              "name": {
                "de": "Apple Picking Fee",
                "en": "Apple Picking Fee"
              }
            }
          ],
          "total": {
            "subTotal": 3.5,
            "totalTax": 0,
            "total": 3.08,
            "discount": 0.42
          }
        },
        "authorizedAmount": {
          "amount": 700,
          "currency": "EUR"
        },
        "totalDiscount": {
          "amount": 84.32,
          "currency": "EUR"
        },
        "couponDiscounts": [
          {
            "couponId": "LS100EUROTOTAL",
            "value": 84.32
          }
        ],
        "externalDiscounts": [
          {
            "id": "buy-2-get-1-free",
            "discountType": "PERCENT",
            "value": 40,
            "sequence": 1
          }
        ],
        "calculatedPrice": {
          "price": {
            "netValue": 588.235,
            "grossValue": 700,
            "taxValue": 111.765,
            "taxCode": "STANDARD",
            "taxRate": 19
          },
          "discountedPrice": {
            "netValue": 282.511,
            "grossValue": 336.188,
            "taxValue": 53.677,
            "taxCode": "STANDARD",
            "taxRate": 19,
            "appliedDiscounts": [
              {
                "id": "buy-2-get-1-free",
                "value": 280,
                "price": {
                  "netValue": 235.294,
                  "grossValue": 280,
                  "taxValue": 44.706,
                  "taxCode": "STANDARD",
                  "taxRate": 19
                },
                "discountType": "PERCENT",
                "origin": "EXTERNAL"
              },
              {
                "id": "LS100EUROTOTAL",
                "value": 83.812,
                "price": {
                  "netValue": 70.43,
                  "grossValue": 83.812,
                  "taxValue": 13.382,
                  "taxCode": "STANDARD",
                  "taxRate": 19
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "fees": [
            {
              "id": "677d49ca3a421b451eab23f2",
              "type": "ABSOLUTE",
              "origin": "INTERNAL",
              "name": {
                "de": "Apple Picking Fee",
                "en": "Apple Picking Fee"
              },
              "price": {
                "netValue": 3.5,
                "grossValue": 3.745,
                "taxValue": 0.245,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountedPrice": {
                "netValue": 3.081,
                "grossValue": 3.297,
                "taxValue": 0.216,
                "taxCode": "REDUCED",
                "taxRate": 7,
                "appliedDiscounts": [
                  {
                    "id": "LS100EUROTOTAL",
                    "value": 0.448,
                    "price": {
                      "netValue": 0.419,
                      "grossValue": 0.448,
                      "taxValue": 0.029,
                      "taxCode": "REDUCED",
                      "taxRate": 7
                    },
                    "discountType": "ABSOLUTE",
                    "origin": "INTERNAL"
                  }
                ]
              }
            }
          ],
          "totalFee": {
            "netValue": 3.081,
            "grossValue": 3.297,
            "taxValue": 0.216,
            "taxCode": "REDUCED",
            "taxRate": 7,
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 0.448,
                "price": {
                  "netValue": 0.419,
                  "grossValue": 0.448,
                  "taxValue": 0.029,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "totalDiscount": {
            "calculationType": "ApplyDiscountAfterTax",
            "value": 364.26,
            "price": {
              "netValue": 306.143,
              "grossValue": 364.26,
              "taxValue": 58.117
            },
            "appliedDiscounts": [
              {
                "id": "buy-2-get-1-free",
                "value": 280,
                "price": {
                  "netValue": 235.294,
                  "grossValue": 280,
                  "taxValue": 44.706,
                  "taxCode": "STANDARD",
                  "taxRate": 19
                },
                "discountType": "PERCENT",
                "origin": "EXTERNAL"
              },
              {
                "id": "LS100EUROTOTAL",
                "value": 84.26,
                "price": {
                  "netValue": 70.849,
                  "grossValue": 84.26,
                  "taxValue": 13.411
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "finalPrice": {
            "netValue": 285.592,
            "grossValue": 339.485,
            "taxValue": 53.893
          }
        }
      },
      {
        "id": "1",
        "keepAsSeparateLineItem": false,
        "type": "INTERNAL",
        "product": {
          "id": "shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
          "sku": "shirt--red",
          "code": "shirt--red",
          "name": "shirt",
          "localizedName": {
            "en": "shirt"
          },
          "description": ""
        },
        "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
        "quantity": 1,
        "effectiveQuantity": 1,
        "price": {
          "priceId": "6818c032524d1c16623037e2",
          "originalAmount": 10,
          "effectiveAmount": 10,
          "currency": "EUR"
        },
        "unitPrice": {
          "netValue": 9.346,
          "grossValue": 10,
          "taxValue": 0.654,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "itemPrice": {
          "amount": 10,
          "currency": "EUR"
        },
        "itemTaxInfo": [
          {
            "name": "REDUCED",
            "value": {
              "amount": 0.65
            },
            "rate": 7,
            "grossValue": 10,
            "netValue": 9.35
          }
        ],
        "fees": {
          "total": {
            "subTotal": 0,
            "totalTax": 0,
            "total": 0,
            "discount": 0
          }
        },
        "authorizedAmount": {
          "amount": 10,
          "currency": "EUR"
        },
        "totalDiscount": {
          "amount": 1.2,
          "currency": "EUR"
        },
        "couponDiscounts": [
          {
            "couponId": "LS100EUROTOTAL",
            "value": 1.2
          }
        ],
        "calculatedPrice": {
          "price": {
            "netValue": 9.346,
            "grossValue": 10,
            "taxValue": 0.654,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountedPrice": {
            "netValue": 8.227,
            "grossValue": 8.803,
            "taxValue": 0.576,
            "taxCode": "REDUCED",
            "taxRate": 7,
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 1.197,
                "price": {
                  "netValue": 1.119,
                  "grossValue": 1.197,
                  "taxValue": 0.078,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "totalDiscount": {
            "calculationType": "ApplyDiscountAfterTax",
            "value": 1.197,
            "price": {
              "netValue": 1.119,
              "grossValue": 1.197,
              "taxValue": 0.078,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 1.197,
                "price": {
                  "netValue": 1.119,
                  "grossValue": 1.197,
                  "taxValue": 0.078,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "finalPrice": {
            "netValue": 8.227,
            "grossValue": 8.803,
            "taxValue": 0.576,
            "taxCode": "REDUCED",
            "taxRate": 7
          }
        }
      },
      {
        "id": "2",
        "keepAsSeparateLineItem": true,
        "type": "INTERNAL",
        "product": {
          "id": "samsung-galaxy-s27-gross",
          "sku": "samsung-galaxy-s27-gross",
          "code": "samsung-galaxy-s27-gross",
          "name": "samsung-galaxy-s27-gross",
          "localizedName": {
            "en": "samsung-galaxy-s27-gross"
          },
          "description": "samsung-galaxy-s27-gross"
        },
        "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s27-gross",
        "quantity": 2,
        "effectiveQuantity": 2,
        "price": {
          "priceId": "6797da2f3537716a5a537ecf",
          "originalAmount": 55,
          "effectiveAmount": 55,
          "currency": "EUR"
        },
        "unitPrice": {
          "netValue": 51.402,
          "grossValue": 55,
          "taxValue": 3.598,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "itemPrice": {
          "amount": 110,
          "currency": "EUR"
        },
        "itemTaxInfo": [
          {
            "name": "REDUCED",
            "value": {
              "amount": 7.2
            },
            "rate": 7,
            "grossValue": 110,
            "netValue": 102.8
          }
        ],
        "fees": {
          "elements": [
            {
              "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
              "taxCode": "REDUCED",
              "total": {
                "subTotal": 3.5,
                "totalTax": 0,
                "total": 3.08,
                "discount": 0.42
              },
              "name": "Apple Picking Fee"
            }
          ],
          "total": {
            "subTotal": 3.5,
            "totalTax": 0,
            "total": 3.08,
            "discount": 0.42
          }
        },
        "authorizedAmount": {
          "amount": 143,
          "currency": "EUR"
        },
        "totalDiscount": {
          "amount": 13.61,
          "currency": "EUR"
        },
        "couponDiscounts": [
          {
            "couponId": "LS100EUROTOTAL",
            "value": 13.61
          }
        ],
        "calculatedPrice": {
          "price": {
            "netValue": 102.804,
            "grossValue": 110,
            "taxValue": 7.196,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "upliftValue": {
            "netValue": 30.841,
            "grossValue": 33,
            "taxValue": 2.159,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountedPrice": {
            "netValue": 90.495,
            "grossValue": 96.83,
            "taxValue": 6.335,
            "taxCode": "REDUCED",
            "taxRate": 7,
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 13.17,
                "price": {
                  "netValue": 12.308,
                  "grossValue": 13.17,
                  "taxValue": 0.862,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "fees": [
            {
              "id": "677d49ca3a421b451eab23f2",
              "type": "ABSOLUTE",
              "origin": "INTERNAL",
              "name": "Apple Picking Fee",
              "price": {
                "netValue": 3.5,
                "grossValue": 3.745,
                "taxValue": 0.245,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountedPrice": {
                "netValue": 3.081,
                "grossValue": 3.297,
                "taxValue": 0.216,
                "taxCode": "REDUCED",
                "taxRate": 7,
                "appliedDiscounts": [
                  {
                    "id": "LS100EUROTOTAL",
                    "value": 0.448,
                    "price": {
                      "netValue": 0.419,
                      "grossValue": 0.448,
                      "taxValue": 0.029,
                      "taxCode": "REDUCED",
                      "taxRate": 7
                    },
                    "discountType": "ABSOLUTE",
                    "origin": "INTERNAL"
                  }
                ]
              }
            }
          ],
          "totalFee": {
            "netValue": 3.081,
            "grossValue": 3.297,
            "taxValue": 0.216,
            "taxCode": "REDUCED",
            "taxRate": 7,
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 0.448,
                "price": {
                  "netValue": 0.419,
                  "grossValue": 0.448,
                  "taxValue": 0.029,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "totalDiscount": {
            "calculationType": "ApplyDiscountAfterTax",
            "value": 13.618,
            "price": {
              "netValue": 12.727,
              "grossValue": 13.618,
              "taxValue": 0.891,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "appliedDiscounts": [
              {
                "id": "LS100EUROTOTAL",
                "value": 13.618,
                "price": {
                  "netValue": 12.727,
                  "grossValue": 13.618,
                  "taxValue": 0.891,
                  "taxCode": "REDUCED",
                  "taxRate": 7
                },
                "discountType": "ABSOLUTE",
                "origin": "INTERNAL"
              }
            ]
          },
          "finalPrice": {
            "netValue": 93.576,
            "grossValue": 100.127,
            "taxValue": 6.551,
            "taxCode": "REDUCED",
            "taxRate": 7
          }
        }
      }
    ],
    "discounts": [
      {
        "id": "0",
        "code": "LS100EUROTOTAL",
        "amount": 100,
        "currency": "EUR",
        "name": "LS100EUROTOTAL",
        "calculationType": "ApplyDiscountBeforeTax",
        "valid": true,
        "links": [
          {
            "rel": "validate",
            "title": "Coupon Validation",
            "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/validation",
            "type": "application/json"
          },
          {
            "rel": "redeem",
            "title": "Coupon Redemption",
            "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/redemptions",
            "type": "application/json"
          }
        ],
        "discountType": "ABSOLUTE",
        "discountCalculationType": "TOTAL",
        "categoryRestricted": false
      }
    ],
    "feeYrnAggregate": {
      "elements": [
        {
          "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
          "taxCode": "REDUCED",
          "total": {
            "subTotal": 7,
            "totalTax": 0,
            "total": 6.16,
            "discount": 0.84
          },
          "name": {
            "de": "Apple Picking Fee",
            "en": "Apple Picking Fee"
          }
        }
      ],
      "total": {
        "subTotal": 7,
        "totalTax": 0,
        "total": 6.16,
        "discount": 0.84
      }
    },
    "totalPrice": {
      "amount": 734.22,
      "currency": "EUR"
    },
    "subTotalPrice": {
      "amount": 820,
      "currency": "EUR"
    },
    "shipping": {
      "fee": {
        "amount": 7.22,
        "currency": "EUR"
      },
      "total": {
        "subTotal": 7.22,
        "totalTax": 0,
        "total": 6.35,
        "discount": 0.87
      }
    },
    "totalUnitsCount": 5,
    "metadata": {
      "createdAt": "2025-06-10T12:01:34.057Z",
      "modifiedAt": "2025-06-10T12:23:14.894Z",
      "calculatedAt": "2025-06-10T12:23:14.894Z",
      "version": 5
    },
    "totalTax": {
      "amount": 0,
      "currency": "EUR"
    },
    "taxAggregate": {
      "lines": [
        {
          "name": "REDUCED",
          "amount": 7.85,
          "rate": 7,
          "taxable": 120
        },
        {
          "name": "STANDARD",
          "amount": 111.77,
          "rate": 19,
          "taxable": 700.01
        }
      ]
    },
    "subtotalAggregate": {
      "currency": "EUR",
      "netValue": 700.39,
      "grossValue": 820.01,
      "taxValue": 119.62
    },
    "totalDiscount": {
      "amount": 100,
      "currency": "EUR"
    },
    "itemFeesTotal": {
      "subTotal": 7,
      "totalTax": 0,
      "total": 6.16,
      "discount": 0.84
    },
    "paymentFeesTotal": {
      "subTotal": 0,
      "totalTax": 0,
      "total": 0,
      "discount": 0
    },
    "leadTime": 0,
    "totalAuthorizedAmount": {
      "amount": 767.22,
      "currency": "EUR"
    },
    "calculatedPrice": {
      "price": {
        "netValue": 700.385,
        "grossValue": 820,
        "taxValue": 119.615
      },
      "upliftValue": {
        "netValue": 30.841,
        "grossValue": 33,
        "taxValue": 2.159,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "discountedPrice": {
        "netValue": 381.233,
        "grossValue": 441.821,
        "taxValue": 60.588,
        "appliedDiscounts": [
          {
            "id": "buy-2-get-1-free",
            "value": 280,
            "price": {
              "netValue": 235.294,
              "grossValue": 280,
              "taxValue": 44.706,
              "taxCode": "STANDARD",
              "taxRate": 19
            },
            "discountType": "PERCENT",
            "origin": "EXTERNAL"
          },
          {
            "id": "LS100EUROTOTAL",
            "value": 98.179,
            "price": {
              "netValue": 83.857,
              "grossValue": 98.179,
              "taxValue": 14.322
            },
            "discountType": "ABSOLUTE",
            "origin": "INTERNAL"
          }
        ]
      },
      "fees": {
        "netValue": 7,
        "grossValue": 7.49,
        "taxValue": 0.49,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "totalFee": {
        "netValue": 6.162,
        "grossValue": 6.594,
        "taxValue": 0.432,
        "taxCode": "REDUCED",
        "taxRate": 7,
        "appliedDiscounts": [
          {
            "id": "LS100EUROTOTAL",
            "value": 0.896,
            "price": {
              "netValue": 0.838,
              "grossValue": 0.896,
              "taxValue": 0.058,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountType": "ABSOLUTE",
            "origin": "INTERNAL"
          }
        ]
      },
      "shipping": {
        "netValue": 7.22,
        "grossValue": 7.725,
        "taxValue": 0.505,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "totalShipping": {
        "netValue": 6.355,
        "grossValue": 6.8,
        "taxValue": 0.445,
        "taxCode": "REDUCED",
        "taxRate": 7,
        "appliedDiscounts": [
          {
            "id": "LS100EUROTOTAL",
            "value": 0.925,
            "price": {
              "netValue": 0.864,
              "grossValue": 0.925,
              "taxValue": 0.061,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountType": "ABSOLUTE",
            "origin": "INTERNAL"
          }
        ]
      },
      "totalDiscount": {
        "calculationType": "ApplyDiscountAfterTax",
        "value": 380,
        "price": {
          "netValue": 320.853,
          "grossValue": 380,
          "taxValue": 59.147
        },
        "appliedDiscounts": [
          {
            "id": "buy-2-get-1-free",
            "value": 280,
            "price": {
              "netValue": 235.294,
              "grossValue": 280,
              "taxValue": 44.706,
              "taxCode": "STANDARD",
              "taxRate": 19
            },
            "discountType": "PERCENT",
            "origin": "EXTERNAL"
          },
          {
            "id": "LS100EUROTOTAL",
            "value": 100,
            "price": {
              "netValue": 85.559,
              "grossValue": 100,
              "taxValue": 14.441
            },
            "discountType": "ABSOLUTE",
            "origin": "INTERNAL"
          }
        ]
      },
      "finalPrice": {
        "netValue": 393.75,
        "grossValue": 455.215,
        "taxValue": 61.465,
        "taxAggregate": {
          "lines": [
            {
              "netValue": 111.239,
              "grossValue": 119.027,
              "taxValue": 7.788,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            {
              "netValue": 282.511,
              "grossValue": 336.188,
              "taxValue": 53.677,
              "taxCode": "STANDARD",
              "taxRate": 19
            }
          ]
        }
      }
    }
  }
]

Retrieving cart details by ID

get

Retrieves specified cart details.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
expandCalculationbooleanOptional

If set to true, a fully calculated cart is returned.

Default: true
zipCodestring · min: 1 · max: 9Optional

Zip code for cart filtering

countryCodestring · min: 2 · max: 2Optional

Country code for cart filtering

Responses
200
The request was successful. Cart details are returned.
application/json
Responseall of

Cart details.

get
GET /cart/{tenant}/carts/{cartId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "68481e9e8bf22744fc578572",
  "yrn": "urn:yaas:hybris:cart:cart:b2b2cstage;68481e9e8bf22744fc578572",
  "customerId": "45620894",
  "currency": "EUR",
  "siteCode": "GrossSite",
  "type": "shopping",
  "channel": {
    "name": "storefront",
    "source": "https://your-storefront.com/"
  },
  "items": [
    {
      "id": "0",
      "keepAsSeparateLineItem": true,
      "type": "INTERNAL",
      "product": {
        "id": "samsung-galaxy-s24-gross",
        "sku": "Samsung Galaxy s24 gross",
        "code": "Samsung Galaxy s24 gross",
        "name": "Samsung Galaxy s24 gross",
        "localizedName": {
          "en": "Samsung Galaxy s24 gross"
        },
        "images": [
          {
            "id": "67169928ceaab717e17f3734",
            "url": "http://res.cloudinary.com/saas-ag/image/upload/v1729534248/b2b2cstage/media/67169928ceaab717e17f3734"
          }
        ]
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s24-gross",
      "quantity": 2,
      "effectiveQuantity": 2,
      "price": {
        "priceId": "679ca63dbcdefe5b380c98bc",
        "priceListId": "abc123",
        "originalAmount": 350,
        "effectiveAmount": 350,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 294.118,
        "grossValue": 350,
        "taxValue": 55.882,
        "taxCode": "STANDARD",
        "taxRate": 19
      },
      "itemPrice": {
        "amount": 700,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "STANDARD",
          "value": {
            "amount": 111.76
          },
          "rate": 19,
          "grossValue": 700,
          "netValue": 588.24
        }
      ],
      "fees": {
        "elements": [
          {
            "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
            "taxCode": "REDUCED",
            "total": {
              "subTotal": 3.5,
              "totalTax": 0,
              "total": 3.08,
              "discount": 0.42
            },
            "name": {
              "de": "Apple Picking Fee",
              "en": "Apple Picking Fee"
            }
          }
        ],
        "total": {
          "subTotal": 3.5,
          "totalTax": 0,
          "total": 3.08,
          "discount": 0.42
        }
      },
      "authorizedAmount": {
        "amount": 700,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 84.32,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 84.32
        }
      ],
      "externalDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "discountType": "PERCENT",
          "value": 40,
          "sequence": 1
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 588.235,
          "grossValue": 700,
          "taxValue": 111.765,
          "taxCode": "STANDARD",
          "taxRate": 19
        },
        "discountedPrice": {
          "netValue": 282.511,
          "grossValue": 336.188,
          "taxValue": 53.677,
          "taxCode": "STANDARD",
          "taxRate": 19,
          "appliedDiscounts": [
            {
              "id": "buy-2-get-1-free",
              "value": 280,
              "price": {
                "netValue": 235.294,
                "grossValue": 280,
                "taxValue": 44.706,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "PERCENT",
              "origin": "EXTERNAL"
            },
            {
              "id": "LS100EUROTOTAL",
              "value": 83.812,
              "price": {
                "netValue": 70.43,
                "grossValue": 83.812,
                "taxValue": 13.382,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "fees": [
          {
            "id": "677d49ca3a421b451eab23f2",
            "type": "ABSOLUTE",
            "origin": "INTERNAL",
            "name": {
              "de": "Apple Picking Fee",
              "en": "Apple Picking Fee"
            },
            "price": {
              "netValue": 3.5,
              "grossValue": 3.745,
              "taxValue": 0.245,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountedPrice": {
              "netValue": 3.081,
              "grossValue": 3.297,
              "taxValue": 0.216,
              "taxCode": "REDUCED",
              "taxRate": 7,
              "appliedDiscounts": [
                {
                  "id": "LS100EUROTOTAL",
                  "value": 0.448,
                  "price": {
                    "netValue": 0.419,
                    "grossValue": 0.448,
                    "taxValue": 0.029,
                    "taxCode": "REDUCED",
                    "taxRate": 7
                  },
                  "discountType": "ABSOLUTE",
                  "origin": "INTERNAL"
                }
              ]
            }
          }
        ],
        "totalFee": {
          "netValue": 3.081,
          "grossValue": 3.297,
          "taxValue": 0.216,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 0.448,
              "price": {
                "netValue": 0.419,
                "grossValue": 0.448,
                "taxValue": 0.029,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 364.26,
          "price": {
            "netValue": 306.143,
            "grossValue": 364.26,
            "taxValue": 58.117
          },
          "appliedDiscounts": [
            {
              "id": "buy-2-get-1-free",
              "value": 280,
              "price": {
                "netValue": 235.294,
                "grossValue": 280,
                "taxValue": 44.706,
                "taxCode": "STANDARD",
                "taxRate": 19
              },
              "discountType": "PERCENT",
              "origin": "EXTERNAL"
            },
            {
              "id": "LS100EUROTOTAL",
              "value": 84.26,
              "price": {
                "netValue": 70.849,
                "grossValue": 84.26,
                "taxValue": 13.411
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 285.592,
          "grossValue": 339.485,
          "taxValue": 53.893
        }
      }
    },
    {
      "id": "1",
      "keepAsSeparateLineItem": false,
      "type": "INTERNAL",
      "product": {
        "id": "shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
        "sku": "shirt--red",
        "code": "shirt--red",
        "name": "shirt",
        "localizedName": {
          "en": "shirt"
        },
        "description": ""
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;shirt--301722c1-23e8-42b4-a4d8-1a5480fe3ea5",
      "quantity": 1,
      "effectiveQuantity": 1,
      "price": {
        "priceId": "6818c032524d1c16623037e2",
        "originalAmount": 10,
        "effectiveAmount": 10,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 9.346,
        "grossValue": 10,
        "taxValue": 0.654,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "itemPrice": {
        "amount": 10,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "REDUCED",
          "value": {
            "amount": 0.65
          },
          "rate": 7,
          "grossValue": 10,
          "netValue": 9.35
        }
      ],
      "fees": {
        "total": {
          "subTotal": 0,
          "totalTax": 0,
          "total": 0,
          "discount": 0
        }
      },
      "authorizedAmount": {
        "amount": 10,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 1.2,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 1.2
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 9.346,
          "grossValue": 10,
          "taxValue": 0.654,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "discountedPrice": {
          "netValue": 8.227,
          "grossValue": 8.803,
          "taxValue": 0.576,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 1.197,
              "price": {
                "netValue": 1.119,
                "grossValue": 1.197,
                "taxValue": 0.078,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 1.197,
          "price": {
            "netValue": 1.119,
            "grossValue": 1.197,
            "taxValue": 0.078,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 1.197,
              "price": {
                "netValue": 1.119,
                "grossValue": 1.197,
                "taxValue": 0.078,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 8.227,
          "grossValue": 8.803,
          "taxValue": 0.576,
          "taxCode": "REDUCED",
          "taxRate": 7
        }
      }
    },
    {
      "id": "2",
      "keepAsSeparateLineItem": true,
      "type": "INTERNAL",
      "product": {
        "id": "samsung-galaxy-s27-gross",
        "sku": "samsung-galaxy-s27-gross",
        "code": "samsung-galaxy-s27-gross",
        "name": "samsung-galaxy-s27-gross",
        "localizedName": {
          "en": "samsung-galaxy-s27-gross"
        },
        "description": "samsung-galaxy-s27-gross"
      },
      "itemYrn": "urn:yaas:saasag:caasproduct:product:b2b2cstage;samsung-galaxy-s27-gross",
      "quantity": 2,
      "effectiveQuantity": 2,
      "price": {
        "priceId": "6797da2f3537716a5a537ecf",
        "originalAmount": 55,
        "effectiveAmount": 55,
        "currency": "EUR"
      },
      "unitPrice": {
        "netValue": 51.402,
        "grossValue": 55,
        "taxValue": 3.598,
        "taxCode": "REDUCED",
        "taxRate": 7
      },
      "itemPrice": {
        "amount": 110,
        "currency": "EUR"
      },
      "itemTaxInfo": [
        {
          "name": "REDUCED",
          "value": {
            "amount": 7.2
          },
          "rate": 7,
          "grossValue": 110,
          "netValue": 102.8
        }
      ],
      "fees": {
        "elements": [
          {
            "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
            "taxCode": "REDUCED",
            "total": {
              "subTotal": 3.5,
              "totalTax": 0,
              "total": 3.08,
              "discount": 0.42
            },
            "name": "Apple Picking Fee"
          }
        ],
        "total": {
          "subTotal": 3.5,
          "totalTax": 0,
          "total": 3.08,
          "discount": 0.42
        }
      },
      "authorizedAmount": {
        "amount": 143,
        "currency": "EUR"
      },
      "totalDiscount": {
        "amount": 13.61,
        "currency": "EUR"
      },
      "couponDiscounts": [
        {
          "couponId": "LS100EUROTOTAL",
          "value": 13.61
        }
      ],
      "calculatedPrice": {
        "price": {
          "netValue": 102.804,
          "grossValue": 110,
          "taxValue": 7.196,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "upliftValue": {
          "netValue": 30.841,
          "grossValue": 33,
          "taxValue": 2.159,
          "taxCode": "REDUCED",
          "taxRate": 7
        },
        "discountedPrice": {
          "netValue": 90.495,
          "grossValue": 96.83,
          "taxValue": 6.335,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 13.17,
              "price": {
                "netValue": 12.308,
                "grossValue": 13.17,
                "taxValue": 0.862,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "fees": [
          {
            "id": "677d49ca3a421b451eab23f2",
            "type": "ABSOLUTE",
            "origin": "INTERNAL",
            "name": "Apple Picking Fee",
            "price": {
              "netValue": 3.5,
              "grossValue": 3.745,
              "taxValue": 0.245,
              "taxCode": "REDUCED",
              "taxRate": 7
            },
            "discountedPrice": {
              "netValue": 3.081,
              "grossValue": 3.297,
              "taxValue": 0.216,
              "taxCode": "REDUCED",
              "taxRate": 7,
              "appliedDiscounts": [
                {
                  "id": "LS100EUROTOTAL",
                  "value": 0.448,
                  "price": {
                    "netValue": 0.419,
                    "grossValue": 0.448,
                    "taxValue": 0.029,
                    "taxCode": "REDUCED",
                    "taxRate": 7
                  },
                  "discountType": "ABSOLUTE",
                  "origin": "INTERNAL"
                }
              ]
            }
          }
        ],
        "totalFee": {
          "netValue": 3.081,
          "grossValue": 3.297,
          "taxValue": 0.216,
          "taxCode": "REDUCED",
          "taxRate": 7,
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 0.448,
              "price": {
                "netValue": 0.419,
                "grossValue": 0.448,
                "taxValue": 0.029,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "totalDiscount": {
          "calculationType": "ApplyDiscountAfterTax",
          "value": 13.618,
          "price": {
            "netValue": 12.727,
            "grossValue": 13.618,
            "taxValue": 0.891,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "appliedDiscounts": [
            {
              "id": "LS100EUROTOTAL",
              "value": 13.618,
              "price": {
                "netValue": 12.727,
                "grossValue": 13.618,
                "taxValue": 0.891,
                "taxCode": "REDUCED",
                "taxRate": 7
              },
              "discountType": "ABSOLUTE",
              "origin": "INTERNAL"
            }
          ]
        },
        "finalPrice": {
          "netValue": 93.576,
          "grossValue": 100.127,
          "taxValue": 6.551,
          "taxCode": "REDUCED",
          "taxRate": 7
        }
      }
    }
  ],
  "discounts": [
    {
      "id": "0",
      "code": "LS100EUROTOTAL",
      "amount": 100,
      "currency": "EUR",
      "name": "LS100EUROTOTAL",
      "calculationType": "ApplyDiscountBeforeTax",
      "valid": true,
      "links": [
        {
          "rel": "validate",
          "title": "Coupon Validation",
          "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/validation",
          "type": "application/json"
        },
        {
          "rel": "redeem",
          "title": "Coupon Redemption",
          "href": "https://api-stage.emporix.io/coupon/b2b2cstage/coupons/LS100EUROTOTAL/redemptions",
          "type": "application/json"
        }
      ],
      "discountType": "ABSOLUTE",
      "discountCalculationType": "TOTAL",
      "categoryRestricted": false
    }
  ],
  "feeYrnAggregate": {
    "elements": [
      {
        "yrn": "urn:yaas:saasag:fee:fee:b2b2cstage;677d49ca3a421b451eab23f2",
        "taxCode": "REDUCED",
        "total": {
          "subTotal": 7,
          "totalTax": 0,
          "total": 6.16,
          "discount": 0.84
        },
        "name": {
          "de": "Apple Picking Fee",
          "en": "Apple Picking Fee"
        }
      }
    ],
    "total": {
      "subTotal": 7,
      "totalTax": 0,
      "total": 6.16,
      "discount": 0.84
    }
  },
  "totalPrice": {
    "amount": 734.22,
    "currency": "EUR"
  },
  "subTotalPrice": {
    "amount": 820,
    "currency": "EUR"
  },
  "shipping": {
    "fee": {
      "amount": 7.22,
      "currency": "EUR"
    },
    "total": {
      "subTotal": 7.22,
      "totalTax": 0,
      "total": 6.35,
      "discount": 0.87
    }
  },
  "totalUnitsCount": 5,
  "metadata": {
    "createdAt": "2025-06-10T12:01:34.057Z",
    "modifiedAt": "2025-06-10T12:23:14.894Z",
    "calculatedAt": "2025-06-10T12:23:14.894Z",
    "version": 5
  },
  "totalTax": {
    "amount": 0,
    "currency": "EUR"
  },
  "taxAggregate": {
    "lines": [
      {
        "name": "REDUCED",
        "amount": 7.85,
        "rate": 7,
        "taxable": 120
      },
      {
        "name": "STANDARD",
        "amount": 111.77,
        "rate": 19,
        "taxable": 700.01
      }
    ]
  },
  "subtotalAggregate": {
    "currency": "EUR",
    "netValue": 700.39,
    "grossValue": 820.01,
    "taxValue": 119.62
  },
  "totalDiscount": {
    "amount": 100,
    "currency": "EUR"
  },
  "itemFeesTotal": {
    "subTotal": 7,
    "totalTax": 0,
    "total": 6.16,
    "discount": 0.84
  },
  "paymentFeesTotal": {
    "subTotal": 0,
    "totalTax": 0,
    "total": 0,
    "discount": 0
  },
  "leadTime": 0,
  "totalAuthorizedAmount": {
    "amount": 767.22,
    "currency": "EUR"
  },
  "calculatedPrice": {
    "price": {
      "netValue": 700.385,
      "grossValue": 820,
      "taxValue": 119.615
    },
    "upliftValue": {
      "netValue": 30.841,
      "grossValue": 33,
      "taxValue": 2.159,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "discountedPrice": {
      "netValue": 381.233,
      "grossValue": 441.821,
      "taxValue": 60.588,
      "appliedDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "value": 280,
          "price": {
            "netValue": 235.294,
            "grossValue": 280,
            "taxValue": 44.706,
            "taxCode": "STANDARD",
            "taxRate": 19
          },
          "discountType": "PERCENT",
          "origin": "EXTERNAL"
        },
        {
          "id": "LS100EUROTOTAL",
          "value": 98.179,
          "price": {
            "netValue": 83.857,
            "grossValue": 98.179,
            "taxValue": 14.322
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "fees": {
      "netValue": 7,
      "grossValue": 7.49,
      "taxValue": 0.49,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "totalFee": {
      "netValue": 6.162,
      "grossValue": 6.594,
      "taxValue": 0.432,
      "taxCode": "REDUCED",
      "taxRate": 7,
      "appliedDiscounts": [
        {
          "id": "LS100EUROTOTAL",
          "value": 0.896,
          "price": {
            "netValue": 0.838,
            "grossValue": 0.896,
            "taxValue": 0.058,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "shipping": {
      "netValue": 7.22,
      "grossValue": 7.725,
      "taxValue": 0.505,
      "taxCode": "REDUCED",
      "taxRate": 7
    },
    "totalShipping": {
      "netValue": 6.355,
      "grossValue": 6.8,
      "taxValue": 0.445,
      "taxCode": "REDUCED",
      "taxRate": 7,
      "appliedDiscounts": [
        {
          "id": "LS100EUROTOTAL",
          "value": 0.925,
          "price": {
            "netValue": 0.864,
            "grossValue": 0.925,
            "taxValue": 0.061,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "totalDiscount": {
      "calculationType": "ApplyDiscountAfterTax",
      "value": 380,
      "price": {
        "netValue": 320.853,
        "grossValue": 380,
        "taxValue": 59.147
      },
      "appliedDiscounts": [
        {
          "id": "buy-2-get-1-free",
          "value": 280,
          "price": {
            "netValue": 235.294,
            "grossValue": 280,
            "taxValue": 44.706,
            "taxCode": "STANDARD",
            "taxRate": 19
          },
          "discountType": "PERCENT",
          "origin": "EXTERNAL"
        },
        {
          "id": "LS100EUROTOTAL",
          "value": 100,
          "price": {
            "netValue": 85.559,
            "grossValue": 100,
            "taxValue": 14.441
          },
          "discountType": "ABSOLUTE",
          "origin": "INTERNAL"
        }
      ]
    },
    "finalPrice": {
      "netValue": 393.75,
      "grossValue": 455.215,
      "taxValue": 61.465,
      "taxAggregate": {
        "lines": [
          {
            "netValue": 111.239,
            "grossValue": 119.027,
            "taxValue": 7.788,
            "taxCode": "REDUCED",
            "taxRate": 7
          },
          {
            "netValue": 282.511,
            "grossValue": 336.188,
            "taxValue": 53.677,
            "taxCode": "STANDARD",
            "taxRate": 19
          }
        ]
      }
    }
  }
}

Updating a cart

put

Updates specified cart details.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
customerIdstringOptional

Customer’s unique identifier generated when a customer’s account is created through the Customer Service.

currencystring · min: 3 · max: 3Optional

Three-letter currency code, compliant with the ISO 4217 standard.

Pattern: [A-Z]{3}
legalEntityIdstringOptional

Id of the legal entity to which customer is assigned.

deliveryWindowIdstringOptional

Delivery window''s unique identifier, as defined in the Shipping Service.

typestringOptional

Cart type. You can use this field if your store offers different types of carts, such as shopping carts and wishlists.

zipCodestring · max: 9Optional

Customer's address - zip code.

countryCodestring · min: 2 · max: 2Optional

Two-letter country code, compliant with the ISO 3166 standard.

Pattern: [a-zA-Z]{2}
orderIdstringOptional

Order’s unique identifier generated when a checkout is triggered through the Checkout Service.

statusstring · enumOptional

Cart status.

Possible values:
Responses
204
The request was successful. The cart has been updated.
put
PUT /cart/{tenant}/carts/{cartId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 704

{
  "customerId": "87413250",
  "currency": "EUR",
  "deliveryWindowId": "60006da77ec20a807cd6f065",
  "type": "wishlist",
  "zipCode": "10115",
  "countryCode": "DE",
  "status": "OPEN",
  "deliveryWindow": {
    "id": "5b5572a61cf31a000f31eee4",
    "deliveryDate": "2023-06-06T12:00:00.000Z",
    "slotId": "5678-8756-3321-1234"
  },
  "channel": {
    "name": "storefront",
    "source": "https://your-storefront.com/"
  },
  "metadata": {
    "mixins": {
      "generalAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/orderGeneralAttributesMixIn.v9.json",
      "deliveryTime": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/deliveryTimeMixIn.v2.json"
    }
  },
  "mixins": {
    "deliveryTime": {
      "deliveryDate": "2021-06-08T12:00:00.000Z",
      "deliveryTimeId": "5f5a3da02d48b9000d39798c"
    }
  }
}

No content

Deleting a cart

delete

Deletes a specified cart.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
204
The request was successful. The cart has been deleted.
delete
DELETE /cart/{tenant}/carts/{cartId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Refreshing a cart

put

Refreshes a specified cart and their items. In case the prices assigned to cart's items have been changed then these changes are recognized and reassigned to the cart.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
204
The request was successful. The cart has been refreshed.
put
PUT /cart/{tenant}/carts/{cartId}/refresh HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Changing a cart site

post

Changes a specified cart site. The following cart settings are changed according to the new site:

  • Language

  • Currency

  • Shipment

  • Tax

  • Payment

In case the new site uses a different currency, the endpoint sends a price match request to the Price Service. This ensures that items in cart display correct prices in the new site's currency.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Header parameters
Accept-LanguagestringOptional

List of natural languages acceptable for the response.

Content-LanguagestringOptional

List of acceptable natural languages of the customers.

languagesstringOptional

You can use the languages header to apply the request to carts for which a particular localization attribute (language) has been specified.

You can specify multiple languages by separating them with commas.

Body
siteCodestringRequired

Site’s unique identifier. A site is a specific shop.

Responses
200
All item's currencies are updated.
post
POST /cart/{tenant}/carts/{cartId}/changeSite HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "siteCode": "USA"
}

No content

Changing a cart currency

post

Changes a specified cart currency. The endpoint sends a price match request to the Price Service. This ensures that items in cart display correct prices in the new currency.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Header parameters
Accept-LanguagestringOptional

List of natural languages acceptable for the response.

Content-LanguagestringOptional

List of acceptable natural languages of the customers.

languagesstringOptional

You can use the languages header to apply the request to carts for which a particular localization attribute (language) has been specified.

You can specify multiple languages by separating them with commas.

Body
currencystringOptional
Responses
200
All item's currencies are updated.
post
POST /cart/{tenant}/carts/{cartId}/changeCurrency HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "currency": "USD"
}

No content

Merging carts

post

Merges a list of anonymous carts with the specified customer cart.

Note: The cart specified in the path parameter must belong to a logged in customer. Carts listed in the request body must belong to anonymous customers.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Header parameters
Accept-LanguagestringOptional

List of natural languages acceptable for the response.

Content-LanguagestringOptional

List of acceptable natural languages of the customers.

languagesstringOptional

You can use the languages header to apply the request to carts for which a particular localization attribute (language) has been specified.

You can specify multiple languages by separating them with commas.

Body
cartsstring[] · min: 1Required

List of anonymous carts to merge with the customer cart.

Responses
200
The request was successful. Carts have been merged.
post
POST /cart/{tenant}/carts/{cartId}/merge HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "carts": [
    "60effb93e5545f246574fde2"
  ]
}

No content

Retrieving lead time and non-delivery times for a cart

get

Retrieves the lead time and non-delivery times for a specified cart.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200
The request was successful. Cart lead time and non delivery times are returned.
application/json
get
GET /cart/{tenant}/carts/{cartId}/dtRestrictions HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "leadTime": 10,
  "nonDelivery": [
    "1",
    "3",
    "5"
  ]
}

Validating cart items

get

Validates the cart items, checking for pricing issues and other potential problems.

The endpoint checks for two specific validation issues:

  1. CART-ITEM-UNIT-PRICE-100001 - Returns this error when a cart contains a price that is no longer valid or not found in the price match.

  2. CART-ITEM-UNIT-PRICE-100002 - Returns this error when there are duplicated prices for the same product in the cart.


Required scopes

  • cart.cart_manage

    Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token.

Authorizations
Path parameters
cartIdstringRequired

Cart’s unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200
The request was successful. Returns the validation status of the cart.
application/json
get
GET /cart/{tenant}/carts/{cartId}/validate HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "isValid": true
}

Was this helpful?