> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Discount

> Delete a discount code

# Delete Discount

Permanently deletes a discount code. This action cannot be undone.

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.launchmystore.io/api/v1/discounts/disc_abc123.json" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.launchmystore.io/api/v1/discounts/disc_abc123.json', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });
  ```
</CodeGroup>

## Path Parameters

<ParamField path="id" type="string" required>
  The unique discount ID to delete
</ParamField>

## Response

Returns the standard response envelope confirming deletion.

<ResponseField name="status" type="integer">
  HTTP status code
</ResponseField>

<ResponseField name="state" type="string">
  Result state, e.g. `success`
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation message
</ResponseField>

<ResponseField name="data" type="object">
  Not populated for this endpoint
</ResponseField>

## Example Response

```json theme={null}
{
  "status": 200,
  "state": "success",
  "message": "Discount deleted successfully",
  "data": null
}
```

## Notes

* Historical order records will retain the discount information for completed orders
* Consider setting the discount status to `Inactive` instead if you need to preserve discount history
* Customer carts with this discount code will no longer apply the discount at checkout

## Errors

On failure the same envelope is returned with `state: "error"` and a `message`:

```json theme={null}
{
  "status": 404,
  "state": "error",
  "message": "Discount not found",
  "data": null
}
```

| Status | Condition                                     |
| ------ | --------------------------------------------- |
| `401`  | Invalid or missing access token               |
| `403`  | App doesn't have `write_discounts` scope      |
| `404`  | Discount with the specified ID does not exist |
