> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/discounts-and-tips/customize-discounts/set-up-start-and-end-dates-for-discounts.md).

# Set up start and end dates for discounts

You can set up start and end dates for both discount coupons and promotions for creating timed offers, such as a **Black Friday** discount.

{% hint style="info" %}
If you don't yet have an app for Ecwid API access, start with the following [instructions](https://docs.ecwid.com/discounts-and-tips/customize-discounts/spaces/uOzT5egoVTAjMJwRuMQT/pages/IhHAmacGKQdbD0Fe0IUw#step-2.-get-your-first-application).
{% endhint %}

### Start and end dates for promotion

If you have an existing promotion, you can change its start and end dates with the following API call:

```http
PUT /api/v3/STOREID/promotions/PROMOTIONID
Host: app.ecwid.com
Content-Type: application/json
Authorization: Bearer secret_token

{
    "triggers": {
        "startDate": "2025-03-06 00:00:00 +0000",
        "endDate": "2025-03-30 23:00:00 +0000"
    }
}
```

Change `STOREID` with your store ID, `PROMOTIONID` with the promotion ID ([find promotion ID](/api-reference/rest-api/discounts/promotions/search-promotions.md)), and the `secret_token` with the secret access token of your app.

### Start and end dates for discount coupon

If you have an existing discount coupon, you can change its start and end dates with the following API call:

```http
PUT /api/v3/STOREID/discount_coupons/DISCOUNTCOUPONID
Host: app.ecwid.com
Content-Type: application/json
Authorization: Bearer secret_token

{
    "launchDate": "2025-03-06 00:00:00 +0000",
    "expirationDate": "2025-03-30 12:00:00 +0000"
}
```

Change `STOREID` with your store ID, `DISCOUNTCOUPONID` with the discount coupon ID ([find discount coupon ID](/api-reference/rest-api/discounts/discount-coupons/search-discount-coupons.md)), and the `secret_token` with the secret access token of your app.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ecwid.com/discounts-and-tips/customize-discounts/set-up-start-and-end-dates-for-discounts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
