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

Get reward information

GET
https://api.brevo.com/v3/loyalty/offer/programs/:pid/rewards/:rid
GET
/v3/loyalty/offer/programs/:pid/rewards/:rid
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.getRewardInformation("pid", "rid", {});
8}
9main();
1{
2 "attributionPerConsumer": 1,
3 "balanceDefinitionId": "string",
4 "code": "string",
5 "codeCount": 1,
6 "codeGeneratorId": "string",
7 "codePoolId": "string",
8 "config": "string",
9 "createdAt": "2024-01-15T09:30:00Z",
10 "disabledAt": "2024-01-15T09:30:00Z",
11 "endDate": "2024-01-15T09:30:00Z",
12 "expirationDate": "2024-01-15T09:30:00Z",
13 "expirationModifier": "noModification",
14 "expirationUnit": "string",
15 "expirationValue": 1,
16 "generator": {
17 "createdAt": "string",
18 "description": "string",
19 "id": "string",
20 "name": "string",
21 "pattern": "string",
22 "updatedAt": "2024-01-15T09:30:00Z"
23 },
24 "id": "string",
25 "limits": [
26 {
27 "createdAt": "2024-01-15T09:30:00Z",
28 "durationUnit": "string",
29 "durationValue": 1,
30 "limitValue": 1,
31 "rewardLimitId": "string",
32 "slidingSchedule": true,
33 "type": "string",
34 "updatedAt": "2024-01-15T09:30:00Z"
35 }
36 ],
37 "loyaltyProgramId": "string",
38 "meta": {},
39 "name": "string",
40 "products": [
41 {
42 "createdAt": "string",
43 "imageRef": "string",
44 "productId": "string",
45 "value": "string"
46 }
47 ],
48 "publicDescription": "string",
49 "publicImage": "string",
50 "publicName": "string",
51 "redeemPerConsumer": 1,
52 "redeemRules": [
53 "string"
54 ],
55 "rewardConfigs": {
56 "attribution": "string",
57 "code": "string",
58 "value": "string"
59 },
60 "rule": {
61 "condition": {
62 "and": [
63 {
64 "and": [
65 null
66 ],
67 "lhs": {
68 "array": [
69 {
70 "array": [
71 null
72 ],
73 "boolean": true,
74 "contactProperty": "string",
75 "date": "string",
76 "eventProperty": "string",
77 "expression": {
78 "args": [
79 {
80 "args": [
81 null
82 ],
83 "array": [
84 null
85 ],
86 "boolean": true,
87 "description": "string",
88 "float": 1.1,
89 "int": 1,
90 "op": "string",
91 "string": "string"
92 }
93 ],
94 "array": [
95 {
96 "args": [
97 null
98 ],
99 "array": [
100 null
101 ],
102 "boolean": true,
103 "description": "string",
104 "float": 1.1,
105 "int": 1,
106 "op": "string",
107 "string": "string"
108 }
109 ],
110 "boolean": true,
111 "description": "string",
112 "float": 1.1,
113 "int": 1,
114 "op": "string",
115 "string": "string"
116 },
117 "number": 1.1,
118 "string": "string"
119 }
120 ],
121 "boolean": true,
122 "contactProperty": "string",
123 "date": "string",
124 "eventProperty": "string",
125 "expression": {
126 "args": [
127 {
128 "args": [
129 null
130 ],
131 "array": [
132 null
133 ],
134 "boolean": true,
135 "description": "string",
136 "float": 1.1,
137 "int": 1,
138 "op": "string",
139 "string": "string"
140 }
141 ],
142 "array": [
143 {
144 "args": [
145 null
146 ],
147 "array": [
148 null
149 ],
150 "boolean": true,
151 "description": "string",
152 "float": 1.1,
153 "int": 1,
154 "op": "string",
155 "string": "string"
156 }
157 ],
158 "boolean": true,
159 "description": "string",
160 "float": 1.1,
161 "int": 1,
162 "op": "string",
163 "string": "string"
164 },
165 "number": 1.1,
166 "string": "string"
167 },
168 "op": "string",
169 "or": [
170 null
171 ],
172 "rhs": {
173 "array": [
174 {
175 "array": [
176 null
177 ],
178 "boolean": true,
179 "contactProperty": "string",
180 "date": "string",
181 "eventProperty": "string",
182 "expression": {
183 "args": [
184 {
185 "args": [
186 null
187 ],
188 "array": [
189 null
190 ],
191 "boolean": true,
192 "description": "string",
193 "float": 1.1,
194 "int": 1,
195 "op": "string",
196 "string": "string"
197 }
198 ],
199 "array": [
200 {
201 "args": [
202 null
203 ],
204 "array": [
205 null
206 ],
207 "boolean": true,
208 "description": "string",
209 "float": 1.1,
210 "int": 1,
211 "op": "string",
212 "string": "string"
213 }
214 ],
215 "boolean": true,
216 "description": "string",
217 "float": 1.1,
218 "int": 1,
219 "op": "string",
220 "string": "string"
221 },
222 "number": 1.1,
223 "string": "string"
224 }
225 ],
226 "boolean": true,
227 "contactProperty": "string",
228 "date": "string",
229 "eventProperty": "string",
230 "expression": {
231 "args": [
232 {
233 "args": [
234 null
235 ],
236 "array": [
237 null
238 ],
239 "boolean": true,
240 "description": "string",
241 "float": 1.1,
242 "int": 1,
243 "op": "string",
244 "string": "string"
245 }
246 ],
247 "array": [
248 {
249 "args": [
250 null
251 ],
252 "array": [
253 null
254 ],
255 "boolean": true,
256 "description": "string",
257 "float": 1.1,
258 "int": 1,
259 "op": "string",
260 "string": "string"
261 }
262 ],
263 "boolean": true,
264 "description": "string",
265 "float": 1.1,
266 "int": 1,
267 "op": "string",
268 "string": "string"
269 },
270 "number": 1.1,
271 "string": "string"
272 }
273 }
274 ],
275 "lhs": {
276 "array": [
277 {
278 "array": [
279 null
280 ],
281 "boolean": true,
282 "contactProperty": "string",
283 "date": "string",
284 "eventProperty": "string",
285 "expression": {
286 "args": [
287 {
288 "args": [
289 null
290 ],
291 "array": [
292 null
293 ],
294 "boolean": true,
295 "description": "string",
296 "float": 1.1,
297 "int": 1,
298 "op": "string",
299 "string": "string"
300 }
301 ],
302 "array": [
303 {
304 "args": [
305 null
306 ],
307 "array": [
308 null
309 ],
310 "boolean": true,
311 "description": "string",
312 "float": 1.1,
313 "int": 1,
314 "op": "string",
315 "string": "string"
316 }
317 ],
318 "boolean": true,
319 "description": "string",
320 "float": 1.1,
321 "int": 1,
322 "op": "string",
323 "string": "string"
324 },
325 "number": 1.1,
326 "string": "string"
327 }
328 ],
329 "boolean": true,
330 "contactProperty": "string",
331 "date": "string",
332 "eventProperty": "string",
333 "expression": {
334 "args": [
335 {
336 "args": [
337 null
338 ],
339 "array": [
340 null
341 ],
342 "boolean": true,
343 "description": "string",
344 "float": 1.1,
345 "int": 1,
346 "op": "string",
347 "string": "string"
348 }
349 ],
350 "array": [
351 {
352 "args": [
353 null
354 ],
355 "array": [
356 null
357 ],
358 "boolean": true,
359 "description": "string",
360 "float": 1.1,
361 "int": 1,
362 "op": "string",
363 "string": "string"
364 }
365 ],
366 "boolean": true,
367 "description": "string",
368 "float": 1.1,
369 "int": 1,
370 "op": "string",
371 "string": "string"
372 },
373 "number": 1.1,
374 "string": "string"
375 },
376 "op": "string",
377 "or": [
378 {
379 "and": [
380 null
381 ],
382 "lhs": {
383 "array": [
384 {
385 "array": [
386 null
387 ],
388 "boolean": true,
389 "contactProperty": "string",
390 "date": "string",
391 "eventProperty": "string",
392 "expression": {
393 "args": [
394 {
395 "args": [
396 null
397 ],
398 "array": [
399 null
400 ],
401 "boolean": true,
402 "description": "string",
403 "float": 1.1,
404 "int": 1,
405 "op": "string",
406 "string": "string"
407 }
408 ],
409 "array": [
410 {
411 "args": [
412 null
413 ],
414 "array": [
415 null
416 ],
417 "boolean": true,
418 "description": "string",
419 "float": 1.1,
420 "int": 1,
421 "op": "string",
422 "string": "string"
423 }
424 ],
425 "boolean": true,
426 "description": "string",
427 "float": 1.1,
428 "int": 1,
429 "op": "string",
430 "string": "string"
431 },
432 "number": 1.1,
433 "string": "string"
434 }
435 ],
436 "boolean": true,
437 "contactProperty": "string",
438 "date": "string",
439 "eventProperty": "string",
440 "expression": {
441 "args": [
442 {
443 "args": [
444 null
445 ],
446 "array": [
447 null
448 ],
449 "boolean": true,
450 "description": "string",
451 "float": 1.1,
452 "int": 1,
453 "op": "string",
454 "string": "string"
455 }
456 ],
457 "array": [
458 {
459 "args": [
460 null
461 ],
462 "array": [
463 null
464 ],
465 "boolean": true,
466 "description": "string",
467 "float": 1.1,
468 "int": 1,
469 "op": "string",
470 "string": "string"
471 }
472 ],
473 "boolean": true,
474 "description": "string",
475 "float": 1.1,
476 "int": 1,
477 "op": "string",
478 "string": "string"
479 },
480 "number": 1.1,
481 "string": "string"
482 },
483 "op": "string",
484 "or": [
485 null
486 ],
487 "rhs": {
488 "array": [
489 {
490 "array": [
491 null
492 ],
493 "boolean": true,
494 "contactProperty": "string",
495 "date": "string",
496 "eventProperty": "string",
497 "expression": {
498 "args": [
499 {
500 "args": [
501 null
502 ],
503 "array": [
504 null
505 ],
506 "boolean": true,
507 "description": "string",
508 "float": 1.1,
509 "int": 1,
510 "op": "string",
511 "string": "string"
512 }
513 ],
514 "array": [
515 {
516 "args": [
517 null
518 ],
519 "array": [
520 null
521 ],
522 "boolean": true,
523 "description": "string",
524 "float": 1.1,
525 "int": 1,
526 "op": "string",
527 "string": "string"
528 }
529 ],
530 "boolean": true,
531 "description": "string",
532 "float": 1.1,
533 "int": 1,
534 "op": "string",
535 "string": "string"
536 },
537 "number": 1.1,
538 "string": "string"
539 }
540 ],
541 "boolean": true,
542 "contactProperty": "string",
543 "date": "string",
544 "eventProperty": "string",
545 "expression": {
546 "args": [
547 {
548 "args": [
549 null
550 ],
551 "array": [
552 null
553 ],
554 "boolean": true,
555 "description": "string",
556 "float": 1.1,
557 "int": 1,
558 "op": "string",
559 "string": "string"
560 }
561 ],
562 "array": [
563 {
564 "args": [
565 null
566 ],
567 "array": [
568 null
569 ],
570 "boolean": true,
571 "description": "string",
572 "float": 1.1,
573 "int": 1,
574 "op": "string",
575 "string": "string"
576 }
577 ],
578 "boolean": true,
579 "description": "string",
580 "float": 1.1,
581 "int": 1,
582 "op": "string",
583 "string": "string"
584 },
585 "number": 1.1,
586 "string": "string"
587 }
588 }
589 ],
590 "rhs": {
591 "array": [
592 {
593 "array": [
594 null
595 ],
596 "boolean": true,
597 "contactProperty": "string",
598 "date": "string",
599 "eventProperty": "string",
600 "expression": {
601 "args": [
602 {
603 "args": [
604 null
605 ],
606 "array": [
607 null
608 ],
609 "boolean": true,
610 "description": "string",
611 "float": 1.1,
612 "int": 1,
613 "op": "string",
614 "string": "string"
615 }
616 ],
617 "array": [
618 {
619 "args": [
620 null
621 ],
622 "array": [
623 null
624 ],
625 "boolean": true,
626 "description": "string",
627 "float": 1.1,
628 "int": 1,
629 "op": "string",
630 "string": "string"
631 }
632 ],
633 "boolean": true,
634 "description": "string",
635 "float": 1.1,
636 "int": 1,
637 "op": "string",
638 "string": "string"
639 },
640 "number": 1.1,
641 "string": "string"
642 }
643 ],
644 "boolean": true,
645 "contactProperty": "string",
646 "date": "string",
647 "eventProperty": "string",
648 "expression": {
649 "args": [
650 {
651 "args": [
652 null
653 ],
654 "array": [
655 null
656 ],
657 "boolean": true,
658 "description": "string",
659 "float": 1.1,
660 "int": 1,
661 "op": "string",
662 "string": "string"
663 }
664 ],
665 "array": [
666 {
667 "args": [
668 null
669 ],
670 "array": [
671 null
672 ],
673 "boolean": true,
674 "description": "string",
675 "float": 1.1,
676 "int": 1,
677 "op": "string",
678 "string": "string"
679 }
680 ],
681 "boolean": true,
682 "description": "string",
683 "float": 1.1,
684 "int": 1,
685 "op": "string",
686 "string": "string"
687 },
688 "number": 1.1,
689 "string": "string"
690 }
691 },
692 "createdAt": "string",
693 "description": "string",
694 "event": {
695 "name": "string",
696 "source": "string"
697 },
698 "isInternal": true,
699 "loyaltyProgramId": "string",
700 "loyaltyVersionId": 1,
701 "meta": {},
702 "name": "string",
703 "results": [
704 {
705 "action": "string",
706 "parameters": [
707 {
708 "name": "string",
709 "value": {
710 "array": [
711 {
712 "array": [
713 null
714 ],
715 "boolean": true,
716 "contactProperty": "string",
717 "date": "string",
718 "eventProperty": "string",
719 "expression": {
720 "args": [
721 {
722 "args": [
723 null
724 ],
725 "array": [
726 null
727 ],
728 "boolean": true,
729 "description": "string",
730 "float": 1.1,
731 "int": 1,
732 "op": "string",
733 "string": "string"
734 }
735 ],
736 "array": [
737 {
738 "args": [
739 null
740 ],
741 "array": [
742 null
743 ],
744 "boolean": true,
745 "description": "string",
746 "float": 1.1,
747 "int": 1,
748 "op": "string",
749 "string": "string"
750 }
751 ],
752 "boolean": true,
753 "description": "string",
754 "float": 1.1,
755 "int": 1,
756 "op": "string",
757 "string": "string"
758 },
759 "number": 1.1,
760 "string": "string"
761 }
762 ],
763 "boolean": true,
764 "contactProperty": "string",
765 "date": "string",
766 "eventProperty": "string",
767 "expression": {
768 "args": [
769 {
770 "args": [
771 null
772 ],
773 "array": [
774 null
775 ],
776 "boolean": true,
777 "description": "string",
778 "float": 1.1,
779 "int": 1,
780 "op": "string",
781 "string": "string"
782 }
783 ],
784 "array": [
785 {
786 "args": [
787 null
788 ],
789 "array": [
790 null
791 ],
792 "boolean": true,
793 "description": "string",
794 "float": 1.1,
795 "int": 1,
796 "op": "string",
797 "string": "string"
798 }
799 ],
800 "boolean": true,
801 "description": "string",
802 "float": 1.1,
803 "int": 1,
804 "op": "string",
805 "string": "string"
806 },
807 "number": 1.1,
808 "string": "string"
809 }
810 }
811 ],
812 "service": "string"
813 }
814 ],
815 "ruleId": "string",
816 "ruleType": "string",
817 "updatedAt": "string"
818 },
819 "startDate": "2024-01-15T09:30:00Z",
820 "subtractBalanceDefinitionId": "string",
821 "subtractBalanceStrategy": "string",
822 "subtractBalanceValue": 1,
823 "subtractTotalBalance": true,
824 "totalAttribution": 1,
825 "totalRedeem": 1,
826 "triggerId": "string",
827 "unit": "string",
828 "updatedAt": "string",
829 "value": 1.1,
830 "valueType": "string"
831}
Returns reward information.
Was this page helpful?
Previous

Create a voucher

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
ridstringRequiredformat: "uuid"
Reward ID

Query parameters

versionenumOptionalDefaults to draft
Version
Allowed values:

Response

Successful retrieval of reward data
attributionPerConsumerinteger
Maximum number of times a consumer can be attributed this reward
balanceDefinitionIdstringformat: "uuid"
Unique identifier for the balance definition
codestring
Unique code for the reward
codeCountlong
Total number of codes generated
codeGeneratorIdstringformat: "uuid"
Unique identifier for the code generator
codePoolIdstringformat: "uuid"
Unique identifier for the code pool
configstring
Configuration settings for the reward
createdAtdatetime
Timestamp when the reward was created
disabledAtdatetime
Disabled date of the reward
endDatedatetime
End date of the reward validity
expirationDatedatetime
Expiration date of the reward
expirationModifierenumDefaults to noModification

Select startOfPeriod to configure rewards expiry on start of day/week/month/year. Select endOfPeriod to configure reward expiry on end of day/week/month/year, else select noModification

Allowed values:
expirationUnitstring

Unit of time for the rewards’s availability (e.g., day/week/month/year).

expirationValueinteger

Number of days/weeks/month/year for reward expiry

generatorobject
object
idstringformat: "uuid"
Unique identifier for the reward
limitslist of objects

Attribution / Redeem Limits for the reward

loyaltyProgramIdstringformat: "uuid"
Id of the loyalty program to which the current reward belongs to
metamap from strings to any
Additional data for reward definition
namestring
Name of the reward
productslist of objects
Selected products for reward definition
publicDescriptionstring
Public description for the reward
publicImagestring
Public Image for the reward
publicNamestring
Public name for the reward
redeemPerConsumerinteger
Defines the redeem limit for the consumer
redeemRuleslist of strings
Rules defined to redeem a reward
rewardConfigsobject
object
ruleobject
Rule to define the reward
startDatedatetime
Start date of attribution of the reward
subtractBalanceDefinitionIdstring

Id of the selected balance while redeeming / attributing a reward

subtractBalanceStrategystring

Strategy of the Balance while redeeming / attributing a reward

subtractBalanceValueinteger

Amount of balance to be selected while redeeming / attributing a reward

subtractTotalBalanceboolean
Value to indicate to subtract full balance or not
totalAttributioninteger
Defines the limit to which a consumer can attribute a reward
totalRedeeminteger
Defines the limit to which a consumer can redeem a reward
triggerIdstring
Id of the Rule to be updated for that reward
unitstring
Selected unit of the balance
updatedAtstring
Timestamp for when this reward was last updated.
valuedouble
Value of metric in selected config for reward definition
valueTypestring
Type of config selected for reward definition

Errors

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