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

Get all your coupon collections

GET
https://api.brevo.com/v3/couponCollections
GET
/v3/couponCollections
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.getCouponCollections({});
8}
9main();
1{
2 "createdAt": "2023-01-06T05:03:47.053000000Z",
3 "defaultCoupon": "10 OFF",
4 "id": "23befbae-1505-47a8-bd27-e30ef739f32c",
5 "name": "SummerPromotions",
6 "remainingCoupons": 5000,
7 "totalCoupons": 10000,
8 "collections": [
9 {
10 "createdAt": "2017-03-12T12:30:00Z",
11 "defaultCoupon": "10 OFF",
12 "id": "23befbae-1505-47a8-bd27-e30ef739f32c",
13 "name": "Summer",
14 "remainingCoupons": 5000,
15 "totalCoupons": 10000
16 }
17 ]
18}

Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100).

Was this page helpful?
Previous

Create а coupon collection

Next
Built with

Authentication

api-keystring

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

Query parameters

limitlongOptional0-100Defaults to 50
Number of documents returned per page
offsetlongOptional>=0Defaults to 0
Index of the first document on the page
sortenumOptionalDefaults to desc

Sort the results by creation time in ascending/descending order

Allowed values:
sortByenumOptionalDefaults to createdAt
The field used to sort coupon collections
Allowed values:

Response

Coupon collections
createdAtdatetime
Datetime on which the collection was created.
defaultCouponstring
The default coupon of the collection.
idstringformat: "uuidv4"
The id of the collection.
namestring
The name of the collection.
remainingCouponslong
Number of coupons that have not been sent yet.
totalCouponslong
Total number of coupons in the collection.
expirationDatedatetime
Expiration date for the coupon collection in RFC3339 format.
remainingCouponsAlertinteger
If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold.
remainingDaysAlertinteger
If present, an email notification is going to be sent the defined amount of days before to the expiration date.

Errors

400
Bad Request Error
401
Unauthorized Error