Protected
Readonly
argsReturns a Cart for a given id
. Returns a 200 OK
status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Cart exists for a given `id`.
- If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
Optional
methodArgs: {Checks if a Cart exists for a given id
. Returns a 200 OK
status if the Cart exists.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Cart exists for a given `id`.
- If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
Optional
methodArgs: { headers?: { [key: string]: string | string[] } }Updates the Cart for a given id
. Returns a 200 OK
status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Cart exists for a given `id`.
- If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
Deletes the Cart for a given
id
. Returns a200 OK
status if successful.