put https://api.getblueshift.com/api/v1/promotions//overwrite
Use this endpoint to replace all existing promo codes in a promotion with a new set of codes.
Try the endpoint
- Add the User API key as the Username and leave the Password field blank.
- Click the Base URL dropdown and select the API endpoint URL for your Blueshift region.
- Click Try It.
You can also try the API using Blueshift's API collection in Postman.
Number of promo codes in one request
The API can update a maximum of 1000 promo codes per request. If an API call includes more than 1000 promo codes, a 400 error will be returned. To update more than 1000 promo codes, we recommend dividing them into multiple API calls.
Note:
To locate the Promotion ID in the Blueshift UI:
- List view: In the Promotions section, find the UUID (promotion ID) in the UUID column next to each promotion’s name.
- Detailed view and URL: Click on a promotion to open the Edit Promotion screen to copy the Promotion ID. It also appears in the URL.