For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
      • GETGet all your coupon collections
      • POSTCreate а coupon collection
      • GETGet a coupon collection by id
      • PATCHUpdate a coupon collection by id
      • POSTCreate coupons for a coupon collection
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceCoupons

Update a coupon collection by id

PATCH
https://api.brevo.com/v3/couponCollections/:id
PATCH
/v3/couponCollections/:id
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.coupons.updateCouponCollection("id", {});
8}
9main();
1{
2 "defaultCoupon": "10 OFF",
3 "id": "23befbae-1505-47a8-bd27-e30ef739f32c",
4 "name": "SummerPromotions"
5}

Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass null to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged.

Was this page helpful?
Previous

Create coupons for a coupon collection

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

idstringRequiredformat: "uuidv4"
Id of the collection to update

Request

Values to update the coupon collection
defaultCouponstringOptional
A default coupon to be used in case there are no coupons left
expirationDatedatetimeOptional
Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date.
remainingCouponsAlertintegerOptional

Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts.

remainingDaysAlertintegerOptional

Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts.

Response

Coupon collection updated
defaultCouponstring
The default coupon of the collection
idstringformat: "uuidv4"
The id of the collection
namestring
The name of the collection

Errors

400
Bad Request Error
401
Unauthorized Error