commercetools icon

commercetools

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

Actions671

Store Order → Check if Order exists in Store by OrderNumber

AI-generated

Summary

Check if an order exists in a specified commercetools store by providing the store key and the store order key (order number).

Inputs

  • Store Order Key (required) — The unique key (order number) of the order in the store to check for existence.
  • Store Key (required) — The key identifying the commercetools store where the order existence will be checked.

Output shape

A JSON object containing an 'exists' boolean indicating if the order exists, the HTTP status code, and the URL used for the check.

The operation performs a HEAD HTTP request to the commercetools API; if the order is found, 'exists' is true with status 200; if not found, 'exists' is false with status 404. Any other HTTP error will raise an error.

Examples

Example 1: Confirm whether an order with a specific order number exists in a store before attempting an update.

Provide the 'Store Key' to specify the store and 'Store Order Key' containing the order number you want to check.

Links

Discussion