commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Store Shipping Method → Check if matching ShippingMethod exists for a Cart in Store

AI-generated

Summary

Check if a matching ShippingMethod exists for a specified Cart in a given Store within commercetools by performing a HEAD request to the corresponding API endpoint.

Inputs

  • Store Shipping Method Key (required) — The unique key identifying the Store Shipping Method to check.
  • Store Key (required) — The key identifying the Store in which to look for the matching ShippingMethod.
  • Cart Id (required) — The ID of the Cart for which to check if a matching ShippingMethod exists in the specified Store.

Output shape

a JSON object indicating existence with properties 'exists' (boolean), 'statusCode' (number), and 'url' (string).

Returns { exists: true, statusCode: 200, url } if a matching ShippingMethod exists; returns { exists: false, statusCode: 404, url } if none found. Other HTTP errors trigger an exception.

Examples

Example 1: Check if a ShippingMethod matches a specific Cart in a Store

Provide the Store Shipping Method Key, Store Key, and Cart Id parameters to verify presence of a matching ShippingMethod. The operation returns a JSON object with a boolean 'exists' field and HTTP status code.

Links

Discussion