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 a coupon collection by id

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

Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a 404 error if no collection matches the provided ID.

Was this page helpful?
Previous

Update a coupon collection by id

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 return

Response

Coupon collection
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
404
Not Found Error