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 Transaction History API

GET
https://api.brevo.com/v3/loyalty/balance/programs/:pid/transaction-history
GET
/v3/loyalty/balance/programs/:pid/transaction-history
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.getTransactionHistoryApi("pid", {
8 contactId: 1,
9 balanceDefinitionId: "balanceDefinitionId",
10 });
11}
12main();
1{
2 "balanceDefinitionId": "string",
3 "contactId": 1,
4 "count": 1,
5 "loyaltyProgramId": "string",
6 "transactionHistory": [
7 {
8 "amount": 1.1,
9 "transactionType": "credit",
10 "balanceExpirationDate": "string",
11 "cancelledAt": "string",
12 "completedAt": "string",
13 "createdAt": "string",
14 "id": "string",
15 "meta": {},
16 "rejectReason": "string",
17 "rejectedAt": "string",
18 "status": "string"
19 }
20 ]
21}
Returns transaction history
Was this page helpful?
Previous

Create a 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

Query parameters

limitintegerOptional1-500
Limit the number of records returned
offsetintegerOptional>=0
Page number to retrieve
sortFieldenumOptionalDefaults to createdAt
Field to sort by
Allowed values:
sortenumOptional
Sort order
Allowed values:
contactIdlongRequired>=1
Contact ID
balanceDefinitionIdstringRequiredformat: "uuid"
Balance Definition ID
statusenumOptional
Transaction status filter
Allowed values:
transactionTypeenumOptional
Transaction type filter
Allowed values:
loyaltySubscriptionIdstringOptional
Loyalty Subscription ID filter

Response

Successful retrieval of transaction history
balanceDefinitionIdstring
Unique identifier of the associated balance definition.
contactIdinteger
Unique identifier of the contact related to the transactions.
countinteger
Total number of transactions in the history.
loyaltyProgramIdstring
Unique identifier of the associated loyalty program.
transactionHistorylist of objects
List of past transactions associated with the balance.

Errors

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