commercetools icon

commercetools

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

Actions671

Payment-method → Check if PaymentMethod exists by ID

AI-generated

Summary

Check if a Payment-method exists in commercetools by making a HEAD request to the Payment-method endpoint using the specified Payment-method ID.

Inputs

  • Payment-method ID (required) — The unique identifier of the Payment-method to check existence for.

Output shape

A JSON object containing the keys 'exists' (boolean), 'statusCode' (HTTP status code), and 'url' (the called API URL).

Returns 'exists' as true if the Payment-method exists, false if it does not (HTTP 404). Throws an error for other HTTP statuses.

Examples

Example 1: Check if a Payment-method exists

Set the resource to 'paymentmethods', operation to 'Check if PaymentMethod exists by ID', and specify the Payment-method ID to verify existence.

Links

Discussion