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
      • GETGet balance definition list
      • POSTCreate balance definition
      • GETGet balance definition
      • PUTUpdate balance definition
      • DELDelete balance definition
      • POSTCreate balance limits
      • GETGet balance limits
      • DELDelete balance limit
      • PUTUpdates balance limit
      • GETGet subscription balances
      • POSTCreate subscription balances
      • GETGet balance list
      • POSTCreate new transaction
      • POSTComplete transaction
      • POSTCancel transaction
      • POSTCreate balance order
      • GETGet Active Balances API
      • GETGet Transaction History API
LogoLogo
Help CenterAPI KeysStatusSign In
LoyaltyBalance

Get balance definition

GET
https://api.brevo.com/v3/loyalty/balance/programs/:pid/balance-definitions/:bdid
GET
/v3/loyalty/balance/programs/:pid/balance-definitions/:bdid
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.balance.getBalanceDefinition("pid", "bdid", {});
8}
9main();
1{
2 "id": "string",
3 "name": "string",
4 "description": "string",
5 "imageRef": "string",
6 "meta": {},
7 "unit": "POINTS",
8 "minAmount": 1.1,
9 "maxAmount": 1.1,
10 "maxCreditAmountLimit": 1.1,
11 "maxDebitAmountLimit": 1.1,
12 "balanceOptionAmountOvertakingStrategy": "strict",
13 "balanceOptionCreditRounding": "lower",
14 "balanceOptionDebitRounding": "lower",
15 "balanceAvailabilityDurationValue": 1,
16 "balanceAvailabilityDurationUnit": "day",
17 "balanceAvailabilityDurationModifier": "noModification",
18 "balanceExpirationDate": "string",
19 "createdAt": "2024-01-15T09:30:00Z",
20 "updatedAt": "2024-01-15T09:30:00Z",
21 "deletedAt": "2024-01-15T09:30:00Z"
22}
Returns balance definition
Was this page helpful?
Previous

Update balance definition

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
bdidstringRequiredformat: "uuid"
Balance Definition Id

Query parameters

versionenumOptionalDefaults to draft
Version
Allowed values:

Response

Successful retrieval of balance definition
idstringformat: "uuid"
Unique identifier for the balance definition.
namestring
Name of the balance definition.
descriptionstring
Short description of the balance definition.
imageRefstringformat: "uri"
Optional image reference URL.
metamap from strings to any
Additional metadata for the balance definition.
unitenum
Unit of balance measurement.
minAmountdouble
Minimum allowable balance.
maxAmountdouble
Maximum allowable balance.
maxCreditAmountLimitdouble
Maximum credit allowed per operation.
maxDebitAmountLimitdouble
Maximum debit allowed per operation.
balanceOptionAmountOvertakingStrategyenum
Partial enables partial credit of balance if maximum balance limit is reached. Strict enables rejection of a transaction if it will breach the max balance limit.
Allowed values:
balanceOptionCreditRoundingenum
Rounding strategy for credit transactions.
Allowed values:
balanceOptionDebitRoundingenum
Rounding strategy for debit transactions.
Allowed values:
balanceAvailabilityDurationValueinteger
Number of time units before the balance expires.
balanceAvailabilityDurationUnitenum
Unit of time for the balance availability duration.
Allowed values:
balanceAvailabilityDurationModifierenum
Modifier for balance availability duration. startOfPeriod causes expiry at the start of the period, endOfPeriod at the end. noModification uses the exact duration from the credit date.
Allowed values:
balanceExpirationDatestring

Fixed expiration date in dd/mm format. The balance expires when this date next appears in the calendar. Only one of balanceExpirationDate or balance availability duration fields can be used.

createdAtdatetime
Timestamp of balance definition creation.
updatedAtdatetime
Timestamp of the last update.
deletedAtdatetime

Timestamp of balance definition deletion (nullable).

Errors

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