Protected
Readonly
argsOptional
methodArgs: {Checks if a Cart exists for a Store that matches the given Query Predicate, and contains a matching customerId
or anonymousId
. Returns a 200 OK
status if any Carts match these conditions, or a ResourceNotFound error otherwise.
Optional
methodArgs: {Creates a Cart in a Store for the Customer or anonymous user. The customerId
or anonymousId
field on the Cart is automatically set based on the customer:{id} or anonymous_id:{id} scope.
The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter.
Specific Error Codes:
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
- [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
- [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
- [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
Returns all Carts that match a given Query Predicate and contain either a matching
customerId
oranonymousId
in a Store.