Delete Discount Code

🔒

Requires price_rules access scope. More access scope

The Delete Discount Code API allows you to remove a discount code from a specified price rule.

This API is especially useful for:

  1. Removing obsolete discount codes.
  2. Managing discount codes dynamically.
  3. Ensuring that invalid or expired discount codes do not remain active.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

FieldTypeRequiredExampleDescription
price_rule_idstringYes588fea0b-f15d-4c1d-9390-23661f0194faID of the price rule associated with the discount codes.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
404Not FoundThe ID provided is not existed.Not Found

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!