commercetools icon

commercetools

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

Actions671

Discount Code → Get DiscountCode by ID

AI-generated

Summary

Retrieve a DiscountCode entity by its unique ID from the commercetools platform.

Inputs

  • Discount Code ID (required) — The unique identifier of the DiscountCode to retrieve.
  • Filters — Optional filters to customize the response, such as the 'expand' parameter to expand references in the returned DiscountCode.

Output shape

a single record containing the DiscountCode JSON object as returned by the commercetools API

Returns full DiscountCode details for the specified ID. Optional 'expand' query parameter may include expanded references. Errors return node operation errors; if 'continueOnFail' is enabled, errors will be returned as JSON with an 'error' field for the respective item.

Examples

Example 1: Fetch a DiscountCode by its ID without expansions

Set the 'Discount Code ID' parameter with the desired DiscountCode's ID.

Example 2: Fetch a DiscountCode by its ID with expanded references

Set the 'Discount Code ID' parameter and specify the 'expand' filter parameter to control which references to expand in the returned data.

Links

Discussion