# Applying Discounts / Creator Codes

If offered by your store, you can apply coupons, gift cards, and creator codes via Headless API once a basket has been created and the user's desired packages have been added.

{% hint style="warning" %}
Depending on the store's configuration, multiple gift cards or coupons may be applied. To remove a gift card or coupon, use the relevant **/remove** endpoint.&#x20;
{% endhint %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/creator-codes" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/creator-codes/remove" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/giftcards" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/giftcards/remove" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/coupons" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}

{% openapi src="/files/X1niLsQ1ey5yLrTYmMs5" path="/accounts/{token}/baskets/{basketIdent}/coupons/remove" method="post" %}
[headless-api.yaml](https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F7Z5I0T5QbbgoGzyObgml%2Fheadless-api.yaml?alt=media\&token=62e71089-ed13-428f-828e-d0f3eeee20b9)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tebex.io/developers/headless-api/applying-discounts-creator-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
