commercetools icon

commercetools

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

Actions671

State → Get State by Key

AI-generated

Summary

Retrieve a specific commercetools State resource by its unique state key within your project.

Inputs

  • State Key (required) — The unique key identifying the State resource to retrieve.
  • Filters — Optional query parameters to modify the retrieval, such as 'expand' to include related references.

Output shape

a single State resource object represented as JSON.

Returns the full JSON representation of the State resource if found. Supports optional query parameters to expand references in the response. Errors on missing State or request issues.

Examples

Example 1: Retrieve a State by key without any additional filters.

Provide the exact State Key string to fetch the corresponding State resource.

Example 2: Retrieve a State by key including expanded related resources.

Specify the State Key along with an 'expand' query parameter to fetch related references inline.

Links

Discussion