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
  • Loyalty
      • POSTCreate a tier group
      • GETList tier groups
      • PUTUpdate tier group
      • DELDelete tier group
      • GETGet tier group
      • GETList tiers
      • POSTCreate a tier
      • DELDelete tier
      • PUTUpdate tier
      • POSTAssign a tier
LogoLogo
Help CenterAPI KeysStatusSign In
LoyaltyTier

Update tier group

PUT
https://api.brevo.com/v3/loyalty/tier/programs/:pid/tier-groups/:gid
PUT
/v3/loyalty/tier/programs/:pid/tier-groups/:gid
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.tier.updateTierGroup("pid", "gid", {
8 downgradeStrategy: "real_time",
9 name: "string",
10 tierOrder: [],
11 upgradeStrategy: "real_time",
12 });
13}
14main();
1{
2 "createdAt": "2024-01-15T09:30:00Z",
3 "downgradeStrategy": "real_time",
4 "id": "string",
5 "loyaltyProgramId": "string",
6 "name": "string",
7 "tierOrder": [],
8 "updatedAt": "2024-01-15T09:30:00Z",
9 "upgradeStrategy": "real_time",
10 "upgradeSchedule": {
11 "strategy": "string",
12 "durationValue": 1,
13 "durationUnit": "day",
14 "durationModifier": "start_of_period",
15 "scheduledDate": "string"
16 },
17 "downgradeSchedule": {
18 "strategy": "string",
19 "durationValue": 1,
20 "durationUnit": "day",
21 "durationModifier": "start_of_period",
22 "scheduledDate": "string"
23 }
24}

Updates a tier group from a loyalty program. (The changes will take effect with the next publication of the loyalty program)

Was this page helpful?
Previous

Delete tier group

Next
Built with

Authentication

api-keystring

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

Path parameters

pidstringRequiredformat: "uuid"
Loyalty Program ID
gidstringRequiredformat: "uuid"
Tier group ID

Request

Tier group update payload
downgradeStrategyenumRequiredDefaults to real_time

Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary.

Allowed values:
namestringRequired
Name of the tier group
tierOrderlist of stringsRequired
Order of the tiers in the group in ascending order
upgradeStrategyenumRequiredDefaults to real_time

Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.

Allowed values:
metaobjectOptional
Additional metadata for the tier group.

Response

Tier group successfully updated
createdAtdatetime
Timestamp when the tier group was created
downgradeStrategyenumDefaults to real_time

Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary.

Allowed values:
idstringformat: "uuid"
Tier group unique identifier
loyaltyProgramIdstringformat: "uuid"
Associated loyalty program Id
namestring
Tier group name
tierOrderlist of strings
Order of the tiers in the group in ascending order
updatedAtdatetime
Timestamp when the tier group was last updated
upgradeStrategyenumDefaults to real_time

Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.

Allowed values:
upgradeScheduleobject
Schedule configuration for tier upgrades.
downgradeScheduleobject
Schedule configuration for tier downgrades.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error