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 code count
      • GETGet voucher for a contact
      • GETGet Reward Page API
      • POSTCreate a reward
      • GETGet reward information
      • POSTCreate a voucher
      • POSTCreate redeem voucher request
      • POSTComplete redeem voucher request
      • DELRevoke vouchers
      • POSTValidate a reward
LogoLogo
Help CenterAPI KeysStatusSign In
LoyaltyReward

Complete redeem voucher request

POST
https://api.brevo.com/v3/loyalty/offer/programs/:pid/rewards/redeem/:tid/complete
POST
/v3/loyalty/offer/programs/:pid/rewards/redeem/:tid/complete
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.reward.completeRedeemTransaction("pid", "tid");
8}
9main();
1{
2 "cancelledAt": "2024-01-15T09:30:00Z",
3 "completedAt": "2024-01-15T09:30:00Z",
4 "contactId": 1,
5 "createdAt": "2024-01-15T09:30:00Z",
6 "debitTransactionId": "string",
7 "expiresAt": "2024-01-15T09:30:00Z",
8 "id": "string",
9 "loyaltyProgramId": "string",
10 "meta": {},
11 "rejectReason": "string",
12 "rejectedAt": "2024-01-15T09:30:00Z",
13 "rewardAttributionId": "string",
14 "status": "string",
15 "updatedAt": "2024-01-15T09:30:00Z"
16}
Completes voucher redeem request.
Was this page helpful?
Previous

Revoke vouchers

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
tidstringRequired
Redeem transaction ID

Response

Voucher Redeem completed
cancelledAtdatetime
Timestamp when the redemption was cancelled
completedAtdatetime
Timestamp when the redemption was completed
contactIdlong
Unique identifier for the contact
createdAtdatetime
Timestamp when the redemption was created
debitTransactionIdstringformat: "uuid"
Unique identifier for the debit transaction
expiresAtdatetime
Timestamp when the redemption expires
idstringformat: "uuid"
Unique identifier for the redemption
loyaltyProgramIdstringformat: "uuid"
Unique identifier for the loyalty program
metamap from strings to any
Additional metadata associated with the redemption
rejectReasonstring
Reason for rejection if the redemption was rejected
rejectedAtdatetime
Timestamp when the redemption was rejected
rewardAttributionIdstringformat: "uuid"
Unique identifier for the reward attribution
statusstring
Current status of the redemption
updatedAtdatetime
Timestamp when the redemption was last updated

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
412
Precondition Failed Error
417
Expectation Failed Error
422
Unprocessable Entity Error
500
Internal Server Error