Application

Events categorised under application/sales channel level will be triggered when any action performed for sales channel. e.g. If new Coupon is created for sales channel.

Offer

This event will be generated where there is any action done on offer

Events
application/offer/create/v1
# This event is triggered when offer is created
application/offer/update/v1
# This event is triggered when offer is updated
application/offer/redeem/v1
# This event is triggered when offer is utilised by the customer

Offer/offer/create/v1

This event is triggered when offer is created

Payload
Hide
This event is triggered when offer is created
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
Company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
Show
payload
object
Required
The payload data of event.
Show
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when offer is created",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "Company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "Category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "Event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "Internal trace_id for Fynd Commerce services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "offer"
81 ],
82 "properties": {
83 "offer": {
84 "type": "object",
85 "description": "The offer data",
86 "required": [
87 "_id",
88 "mode",
89 "application_id",
90 "display_meta",
91 "author",
92 "date_meta",
93 "type",
94 "calculate_on",
95 "published",
96 "status"
97 ],
98 "properties": {
99 "_id": {
100 "type": "string",
101 "description": "Unique identifier of offer"
102 },
103 "mode": {
104 "type": "string",
105 "description": "Offer mode, like coupon or promotion",
106 "enum": [
107 "promotion",
108 "coupon"
109 ]
110 },
111 "status": {
112 "type": "string",
113 "description": "Status of the offer",
114 "enum": [
115 "draft",
116 "approved",
117 "rejected",
118 "scheduled"
119 ]
120 },
121 "published": {
122 "type": "boolean",
123 "description": "Determines whether the offer is published to customers or marked inactive"
124 },
125 "coupon_config": {
126 "type": "object",
127 "description": "Bulk configuration for the offer",
128 "properties": {
129 "coupon_count": {
130 "type": "integer",
131 "description": "Total number of coupons to be generated when coupon type is bulk"
132 },
133 "coupon_prefix": {
134 "type": "string",
135 "description": "Bulk coupon code prefix string. All coupons will be generated with this prefix."
136 },
137 "coupon_type": {
138 "type": "string",
139 "description": "The type of coupon like bulk or single.",
140 "enum": [
141 "bulk",
142 "single"
143 ]
144 }
145 }
146 },
147 "auto_apply": {
148 "type": "boolean",
149 "description": "Indicates whether the offer is automatically applied. This flag is false for coupons and true for promotions. For free-gift promotions, a false value means manual gift selection is required."
150 },
151 "application_id": {
152 "type": "string",
153 "description": "Application id through which offer was created"
154 },
155 "company_id": {
156 "type": "string",
157 "description": "Company id through which offer was created"
158 },
159 "discount_rules": {
160 "type": "array",
161 "description": "Discount rules based on which offer will be applied",
162 "maxItems": 10,
163 "items": {
164 "type": "object",
165 "properties": {
166 "discount_type": {
167 "type": "string",
168 "description": "The type of discount in offer",
169 "enum": [
170 "percentage",
171 "amount",
172 "fixed_price",
173 "fixed_unit_price",
174 "bogo",
175 "shipping_price",
176 "cashback",
177 "coupon_code",
178 "free_items",
179 "free_gift_items",
180 "free_non_sellable_items",
181 "item_based_discount",
182 "bundle"
183 ]
184 },
185 "buy_condition": {
186 "type": "string",
187 "description": "Offer buy rules in offer level"
188 },
189 "item_criteria": {
190 "type": "object",
191 "description": "Filter offer applicability",
192 "properties": {
193 "category_id": {
194 "type": "array",
195 "description": "List of category id available for offer",
196 "items": {
197 "type": "integer",
198 "format": "int32"
199 }
200 },
201 "collection_id": {
202 "type": "array",
203 "description": "List of collection id available for offer",
204 "items": {
205 "type": "string"
206 }
207 },
208 "all_items": {
209 "description": "Boolean flag determining if offer is applicable on all offers",
210 "type": "boolean"
211 },
212 "item_brand": {
213 "type": "array",
214 "description": "List of all brand ids on which promotion is applicable",
215 "items": {
216 "type": "integer",
217 "format": "int32"
218 }
219 },
220 "article_ids": {
221 "type": "array",
222 "description": "List of unique identifier of articles on which offer will be applicable",
223 "items": {
224 "type": "string"
225 }
226 },
227 "item_sku": {
228 "type": "array",
229 "description": "List of all item sku on which promotion is applicable",
230 "items": {
231 "type": "string"
232 }
233 },
234 "item_id": {
235 "type": "array",
236 "description": "List of all item ids on which offer is applicable",
237 "items": {
238 "type": "integer",
239 "format": "int32"
240 }
241 },
242 "item_l1_category": {
243 "type": "array",
244 "description": "List of all L1 category on which offer is applicable",
245 "items": {
246 "type": "integer",
247 "format": "int32",
248 "x-not-enum": true
249 }
250 },
251 "item_l2_category": {
252 "type": "array",
253 "description": "List of all L2 category on which offer is applicable",
254 "items": {
255 "type": "integer",
256 "format": "int32",
257 "x-not-enum": true
258 }
259 },
260 "item_category": {
261 "type": "array",
262 "description": "List of all L3 category on which offer is applicable",
263 "items": {
264 "type": "integer",
265 "format": "int32",
266 "x-not-enum": true
267 }
268 },
269 "item_department": {
270 "type": "array",
271 "description": "List of all departments ids on which offer is applicable",
272 "items": {
273 "type": "integer",
274 "format": "int32"
275 }
276 },
277 "item_store": {
278 "type": "array",
279 "description": "List of all item store ids on which offer is applicable",
280 "items": {
281 "type": "integer",
282 "format": "int32"
283 }
284 },
285 "item_size": {
286 "type": "array",
287 "description": "List of all item sizes on which offer is applicable",
288 "items": {
289 "type": "string"
290 }
291 },
292 "item_company": {
293 "type": "array",
294 "description": "List of all company ids on which offer is applicable",
295 "items": {
296 "type": "integer",
297 "format": "int32"
298 }
299 },
300 "item_tags": {
301 "type": "array",
302 "description": "List of all product tags on which offer is applicable",
303 "items": {
304 "type": "string"
305 }
306 },
307 "cart_quantity": {
308 "type": "object",
309 "description": "Manage operator and their value for cart rules in promotion",
310 "properties": {
311 "equals": {
312 "type": [
313 "number",
314 null
315 ],
316 "format": "float",
317 "nullable": true,
318 "description": "Nummeric value must be equal to cart level rules"
319 },
320 "greater_than": {
321 "type": [
322 "number",
323 null
324 ],
325 "format": "float",
326 "nullable": true,
327 "description": "Nummeric value must be greater than cart level rules"
328 },
329 "less_than_equals": {
330 "type": [
331 "number",
332 null
333 ],
334 "format": "float",
335 "nullable": true,
336 "description": "Nummeric value must be less than or equal to cart level rules"
337 },
338 "less_than": {
339 "type": [
340 "number",
341 null
342 ],
343 "format": "float",
344 "nullable": true,
345 "description": "Nummeric value must be less than cart level rules"
346 },
347 "greater_than_equals": {
348 "type": [
349 "number",
350 null
351 ],
352 "format": "float",
353 "nullable": true,
354 "description": "Nummeric value must be greater than or equal to cart level rules"
355 }
356 }
357 },
358 "cart_total": {
359 "type": "object",
360 "description": "Manage operator and their value for cart rules in promotion",
361 "properties": {
362 "equals": {
363 "type": [
364 "number",
365 null
366 ],
367 "format": "float",
368 "nullable": true,
369 "description": "Nummeric value must be equal to cart level rules"
370 },
371 "greater_than": {
372 "type": [
373 "number",
374 null
375 ],
376 "format": "float",
377 "nullable": true,
378 "description": "Nummeric value must be greater than cart level rules"
379 },
380 "less_than_equals": {
381 "type": [
382 "number",
383 null
384 ],
385 "format": "float",
386 "nullable": true,
387 "description": "Nummeric value must be less than or equal to cart level rules"
388 },
389 "less_than": {
390 "type": [
391 "number",
392 null
393 ],
394 "format": "float",
395 "nullable": true,
396 "description": "Nummeric value must be less than cart level rules"
397 },
398 "greater_than_equals": {
399 "type": [
400 "number",
401 null
402 ],
403 "format": "float",
404 "nullable": true,
405 "description": "Nummeric value must be greater than or equal to cart level rules"
406 }
407 }
408 },
409 "item_exclude_l1_category": {
410 "type": "array",
411 "description": "List of all L1 categories on which offer is not applicable",
412 "items": {
413 "type": "integer",
414 "format": "int32",
415 "x-not-enum": true
416 }
417 },
418 "item_exclude_l2_category": {
419 "type": "array",
420 "description": "List of all L2 categories on which offer is not applicable",
421 "items": {
422 "type": "integer",
423 "format": "int32",
424 "x-not-enum": true
425 }
426 },
427 "item_exclude_category": {
428 "type": "array",
429 "description": "List of all L3 categories on which offer is not applicable",
430 "items": {
431 "type": "integer",
432 "format": "int32",
433 "x-not-enum": true
434 }
435 },
436 "cart_unique_item_quantity": {
437 "type": "object",
438 "description": "Manage operator and their value for cart rules in promotion",
439 "properties": {
440 "equals": {
441 "type": [
442 "number",
443 null
444 ],
445 "format": "float",
446 "nullable": true,
447 "description": "Nummeric value must be equal to cart level rules"
448 },
449 "greater_than": {
450 "type": [
451 "number",
452 null
453 ],
454 "format": "float",
455 "nullable": true,
456 "description": "Nummeric value must be greater than cart level rules"
457 },
458 "less_than_equals": {
459 "type": [
460 "number",
461 null
462 ],
463 "format": "float",
464 "nullable": true,
465 "description": "Nummeric value must be less than or equal to cart level rules"
466 },
467 "less_than": {
468 "type": [
469 "number",
470 null
471 ],
472 "format": "float",
473 "nullable": true,
474 "description": "Nummeric value must be less than cart level rules"
475 },
476 "greater_than_equals": {
477 "type": [
478 "number",
479 null
480 ],
481 "format": "float",
482 "nullable": true,
483 "description": "Nummeric value must be greater than or equal to cart level rules"
484 }
485 }
486 },
487 "cart_unique_item_amount": {
488 "type": "object",
489 "description": "Manage operator and their value for cart rules in promotion",
490 "properties": {
491 "equals": {
492 "type": [
493 "number",
494 null
495 ],
496 "format": "float",
497 "nullable": true,
498 "description": "Nummeric value must be equal to cart level rules"
499 },
500 "greater_than": {
501 "type": [
502 "number",
503 null
504 ],
505 "format": "float",
506 "nullable": true,
507 "description": "Nummeric value must be greater than cart level rules"
508 },
509 "less_than_equals": {
510 "type": [
511 "number",
512 null
513 ],
514 "format": "float",
515 "nullable": true,
516 "description": "Nummeric value must be less than or equal to cart level rules"
517 },
518 "less_than": {
519 "type": [
520 "number",
521 null
522 ],
523 "format": "float",
524 "nullable": true,
525 "description": "Nummeric value must be less than cart level rules"
526 },
527 "greater_than_equals": {
528 "type": [
529 "number",
530 null
531 ],
532 "format": "float",
533 "nullable": true,
534 "description": "Nummeric value must be greater than or equal to cart level rules"
535 }
536 }
537 },
538 "item_exclude_department": {
539 "type": "array",
540 "description": "List of all department ids on which offer is not applicable",
541 "items": {
542 "type": "integer",
543 "format": "int32"
544 }
545 },
546 "item_exclude_store": {
547 "type": "array",
548 "description": "List of all item store ids on which offer is not applicable",
549 "items": {
550 "type": "integer",
551 "format": "int32"
552 }
553 },
554 "item_exclude_brand": {
555 "type": "array",
556 "description": "List of all brand ids on which offer is not applicable",
557 "items": {
558 "type": "integer",
559 "format": "int32"
560 }
561 },
562 "item_exclude_sku": {
563 "type": "array",
564 "description": "List of all item sku on which offer is not applicable",
565 "items": {
566 "type": "string"
567 }
568 },
569 "item_exclude_company": {
570 "type": "array",
571 "description": "List of all company id on which offer is not applicable",
572 "items": {
573 "type": "integer",
574 "format": "int32"
575 }
576 },
577 "available_zones": {
578 "type": "array",
579 "description": "List of all zones on which offer is applicable",
580 "items": {
581 "type": "string"
582 }
583 },
584 "item_exclude_id": {
585 "type": "array",
586 "description": "List of all item ids on which offer is not applicable",
587 "items": {
588 "type": "integer",
589 "format": "int32"
590 }
591 },
592 "buy_rules": {
593 "type": "array",
594 "description": "List of buy rules that is applicable for this offer",
595 "items": {
596 "type": "string"
597 }
598 },
599 "item_size_mapping": {
600 "type": "object",
601 "description": "Map size with product in promotion",
602 "properties": {
603 "item_size_mapping": {
604 "type": "object",
605 "description": "Item size mapping in promotion",
606 "additionalProperties": true
607 }
608 }
609 }
610 }
611 },
612 "offer": {
613 "type": "object",
614 "description": "Defines the discount details for the offer. The required fields vary dynamically based on the discount type. For example, for a percentage-based discount, the `discount_percentage` field is mandatory. For quantity-based discounts, fields such as `max_offer_quantity` or `min_offer_quantity` become mandatory.\n",
615 "properties": {
616 "max_discount_amount": {
617 "type": "number",
618 "format": "float",
619 "description": "Maximum discount amount in offer"
620 },
621 "discount_price": {
622 "type": "number",
623 "format": "float",
624 "description": "Discount price in offer"
625 },
626 "apportion_discount": {
627 "type": "boolean",
628 "description": "Flag to distribute discount for each article"
629 },
630 "partial_can_ret": {
631 "type": "boolean",
632 "description": "Flag indicated return the product partially"
633 },
634 "max_usage_per_transaction": {
635 "type": [
636 "integer",
637 null
638 ],
639 "format": "int32",
640 "nullable": true,
641 "description": "Maximum usage per transaction in offer"
642 },
643 "min_offer_quantity": {
644 "type": [
645 "integer",
646 null
647 ],
648 "format": "int32",
649 "description": "Minimum quantity of offer in offer"
650 },
651 "discount_amount": {
652 "type": "number",
653 "format": "float",
654 "description": "Discount amount in offer"
655 },
656 "discount_percentage": {
657 "type": [
658 "number",
659 null
660 ],
661 "format": "float",
662 "nullable": true,
663 "description": "Discount percentage in offer"
664 },
665 "max_offer_quantity": {
666 "type": "integer",
667 "format": "int32",
668 "description": "Maximum quantity of product in offer"
669 }
670 }
671 },
672 "is_exact": {
673 "type": "boolean",
674 "description": "Flag is true then use coupon applicable articles for calculation"
675 }
676 }
677 }
678 },
679 "buy_rules": {
680 "type": "object",
681 "description": "Contains the individual buy rules associated with the offer. The keys in this object are dynamic (e.g., 'rule#1', 'rule#2', etc.), and each key must correspond to a buy condition referenced within `discount_rules`. For example, if a discount rule includes a buy_condition '(rule#1)', then 'rule#1' must be defined in this object. Each rule key value must follow the format of OfferItemCriteria schema.\n",
682 "maxProperties": 10,
683 "additionalProperties": {
684 "type": "object",
685 "description": "Filter offer applicability",
686 "properties": {
687 "category_id": {
688 "type": "array",
689 "description": "List of category id available for offer",
690 "items": {
691 "type": "integer",
692 "format": "int32"
693 }
694 },
695 "collection_id": {
696 "type": "array",
697 "description": "List of collection id available for offer",
698 "items": {
699 "type": "string"
700 }
701 },
702 "all_items": {
703 "description": "Boolean flag determining if offer is applicable on all offers",
704 "type": "boolean"
705 },
706 "item_brand": {
707 "type": "array",
708 "description": "List of all brand ids on which promotion is applicable",
709 "items": {
710 "type": "integer",
711 "format": "int32"
712 }
713 },
714 "article_ids": {
715 "type": "array",
716 "description": "List of unique identifier of articles on which offer will be applicable",
717 "items": {
718 "type": "string"
719 }
720 },
721 "item_sku": {
722 "type": "array",
723 "description": "List of all item sku on which promotion is applicable",
724 "items": {
725 "type": "string"
726 }
727 },
728 "item_id": {
729 "type": "array",
730 "description": "List of all item ids on which offer is applicable",
731 "items": {
732 "type": "integer",
733 "format": "int32"
734 }
735 },
736 "item_l1_category": {
737 "type": "array",
738 "description": "List of all L1 category on which offer is applicable",
739 "items": {
740 "type": "integer",
741 "format": "int32",
742 "x-not-enum": true
743 }
744 },
745 "item_l2_category": {
746 "type": "array",
747 "description": "List of all L2 category on which offer is applicable",
748 "items": {
749 "type": "integer",
750 "format": "int32",
751 "x-not-enum": true
752 }
753 },
754 "item_category": {
755 "type": "array",
756 "description": "List of all L3 category on which offer is applicable",
757 "items": {
758 "type": "integer",
759 "format": "int32",
760 "x-not-enum": true
761 }
762 },
763 "item_department": {
764 "type": "array",
765 "description": "List of all departments ids on which offer is applicable",
766 "items": {
767 "type": "integer",
768 "format": "int32"
769 }
770 },
771 "item_store": {
772 "type": "array",
773 "description": "List of all item store ids on which offer is applicable",
774 "items": {
775 "type": "integer",
776 "format": "int32"
777 }
778 },
779 "item_size": {
780 "type": "array",
781 "description": "List of all item sizes on which offer is applicable",
782 "items": {
783 "type": "string"
784 }
785 },
786 "item_company": {
787 "type": "array",
788 "description": "List of all company ids on which offer is applicable",
789 "items": {
790 "type": "integer",
791 "format": "int32"
792 }
793 },
794 "item_tags": {
795 "type": "array",
796 "description": "List of all product tags on which offer is applicable",
797 "items": {
798 "type": "string"
799 }
800 },
801 "cart_quantity": {
802 "type": "object",
803 "description": "Manage operator and their value for cart rules in promotion",
804 "properties": {
805 "equals": {
806 "type": [
807 "number",
808 null
809 ],
810 "format": "float",
811 "nullable": true,
812 "description": "Nummeric value must be equal to cart level rules"
813 },
814 "greater_than": {
815 "type": [
816 "number",
817 null
818 ],
819 "format": "float",
820 "nullable": true,
821 "description": "Nummeric value must be greater than cart level rules"
822 },
823 "less_than_equals": {
824 "type": [
825 "number",
826 null
827 ],
828 "format": "float",
829 "nullable": true,
830 "description": "Nummeric value must be less than or equal to cart level rules"
831 },
832 "less_than": {
833 "type": [
834 "number",
835 null
836 ],
837 "format": "float",
838 "nullable": true,
839 "description": "Nummeric value must be less than cart level rules"
840 },
841 "greater_than_equals": {
842 "type": [
843 "number",
844 null
845 ],
846 "format": "float",
847 "nullable": true,
848 "description": "Nummeric value must be greater than or equal to cart level rules"
849 }
850 }
851 },
852 "cart_total": {
853 "type": "object",
854 "description": "Manage operator and their value for cart rules in promotion",
855 "properties": {
856 "equals": {
857 "type": [
858 "number",
859 null
860 ],
861 "format": "float",
862 "nullable": true,
863 "description": "Nummeric value must be equal to cart level rules"
864 },
865 "greater_than": {
866 "type": [
867 "number",
868 null
869 ],
870 "format": "float",
871 "nullable": true,
872 "description": "Nummeric value must be greater than cart level rules"
873 },
874 "less_than_equals": {
875 "type": [
876 "number",
877 null
878 ],
879 "format": "float",
880 "nullable": true,
881 "description": "Nummeric value must be less than or equal to cart level rules"
882 },
883 "less_than": {
884 "type": [
885 "number",
886 null
887 ],
888 "format": "float",
889 "nullable": true,
890 "description": "Nummeric value must be less than cart level rules"
891 },
892 "greater_than_equals": {
893 "type": [
894 "number",
895 null
896 ],
897 "format": "float",
898 "nullable": true,
899 "description": "Nummeric value must be greater than or equal to cart level rules"
900 }
901 }
902 },
903 "item_exclude_l1_category": {
904 "type": "array",
905 "description": "List of all L1 categories on which offer is not applicable",
906 "items": {
907 "type": "integer",
908 "format": "int32",
909 "x-not-enum": true
910 }
911 },
912 "item_exclude_l2_category": {
913 "type": "array",
914 "description": "List of all L2 categories on which offer is not applicable",
915 "items": {
916 "type": "integer",
917 "format": "int32",
918 "x-not-enum": true
919 }
920 },
921 "item_exclude_category": {
922 "type": "array",
923 "description": "List of all L3 categories on which offer is not applicable",
924 "items": {
925 "type": "integer",
926 "format": "int32",
927 "x-not-enum": true
928 }
929 },
930 "cart_unique_item_quantity": {
931 "type": "object",
932 "description": "Manage operator and their value for cart rules in promotion",
933 "properties": {
934 "equals": {
935 "type": [
936 "number",
937 null
938 ],
939 "format": "float",
940 "nullable": true,
941 "description": "Nummeric value must be equal to cart level rules"
942 },
943 "greater_than": {
944 "type": [
945 "number",
946 null
947 ],
948 "format": "float",
949 "nullable": true,
950 "description": "Nummeric value must be greater than cart level rules"
951 },
952 "less_than_equals": {
953 "type": [
954 "number",
955 null
956 ],
957 "format": "float",
958 "nullable": true,
959 "description": "Nummeric value must be less than or equal to cart level rules"
960 },
961 "less_than": {
962 "type": [
963 "number",
964 null
965 ],
966 "format": "float",
967 "nullable": true,
968 "description": "Nummeric value must be less than cart level rules"
969 },
970 "greater_than_equals": {
971 "type": [
972 "number",
973 null
974 ],
975 "format": "float",
976 "nullable": true,
977 "description": "Nummeric value must be greater than or equal to cart level rules"
978 }
979 }
980 },
981 "cart_unique_item_amount": {
982 "type": "object",
983 "description": "Manage operator and their value for cart rules in promotion",
984 "properties": {
985 "equals": {
986 "type": [
987 "number",
988 null
989 ],
990 "format": "float",
991 "nullable": true,
992 "description": "Nummeric value must be equal to cart level rules"
993 },
994 "greater_than": {
995 "type": [
996 "number",
997 null
998 ],
999 "format": "float",
1000 "nullable": true,
1001 "description": "Nummeric value must be greater than cart level rules"
1002 },
1003 "less_than_equals": {
1004 "type": [
1005 "number",
1006 null
1007 ],
1008 "format": "float",
1009 "nullable": true,
1010 "description": "Nummeric value must be less than or equal to cart level rules"
1011 },
1012 "less_than": {
1013 "type": [
1014 "number",
1015 null
1016 ],
1017 "format": "float",
1018 "nullable": true,
1019 "description": "Nummeric value must be less than cart level rules"
1020 },
1021 "greater_than_equals": {
1022 "type": [
1023 "number",
1024 null
1025 ],
1026 "format": "float",
1027 "nullable": true,
1028 "description": "Nummeric value must be greater than or equal to cart level rules"
1029 }
1030 }
1031 },
1032 "item_exclude_department": {
1033 "type": "array",
1034 "description": "List of all department ids on which offer is not applicable",
1035 "items": {
1036 "type": "integer",
1037 "format": "int32"
1038 }
1039 },
1040 "item_exclude_store": {
1041 "type": "array",
1042 "description": "List of all item store ids on which offer is not applicable",
1043 "items": {
1044 "type": "integer",
1045 "format": "int32"
1046 }
1047 },
1048 "item_exclude_brand": {
1049 "type": "array",
1050 "description": "List of all brand ids on which offer is not applicable",
1051 "items": {
1052 "type": "integer",
1053 "format": "int32"
1054 }
1055 },
1056 "item_exclude_sku": {
1057 "type": "array",
1058 "description": "List of all item sku on which offer is not applicable",
1059 "items": {
1060 "type": "string"
1061 }
1062 },
1063 "item_exclude_company": {
1064 "type": "array",
1065 "description": "List of all company id on which offer is not applicable",
1066 "items": {
1067 "type": "integer",
1068 "format": "int32"
1069 }
1070 },
1071 "available_zones": {
1072 "type": "array",
1073 "description": "List of all zones on which offer is applicable",
1074 "items": {
1075 "type": "string"
1076 }
1077 },
1078 "item_exclude_id": {
1079 "type": "array",
1080 "description": "List of all item ids on which offer is not applicable",
1081 "items": {
1082 "type": "integer",
1083 "format": "int32"
1084 }
1085 },
1086 "buy_rules": {
1087 "type": "array",
1088 "description": "List of buy rules that is applicable for this offer",
1089 "items": {
1090 "type": "string"
1091 }
1092 },
1093 "item_size_mapping": {
1094 "type": "object",
1095 "description": "Map size with product in promotion",
1096 "properties": {
1097 "item_size_mapping": {
1098 "type": "object",
1099 "description": "Item size mapping in promotion",
1100 "additionalProperties": true
1101 }
1102 }
1103 }
1104 }
1105 }
1106 },
1107 "restrictions": {
1108 "type": "object",
1109 "description": "Restrictions for offers to be applied",
1110 "properties": {
1111 "uses": {
1112 "type": "object",
1113 "description": "Usage restrictions",
1114 "properties": {
1115 "maximum": {
1116 "type": "object",
1117 "description": "Determines the maximum usage count of offer.",
1118 "properties": {
1119 "user": {
1120 "type": "integer",
1121 "default": 0,
1122 "description": "Determines the maximum usage count of offer per user.",
1123 "format": "int32"
1124 },
1125 "total": {
1126 "type": "integer",
1127 "default": 0,
1128 "description": "Determines the overall offer usage count.",
1129 "format": "int32"
1130 },
1131 "app": {
1132 "type": "integer",
1133 "default": 0,
1134 "description": "Determines the offer usage count associated with application id.",
1135 "format": "int32"
1136 }
1137 }
1138 },
1139 "remaining": {
1140 "type": "object",
1141 "description": "Determines the remaining usage count of offer",
1142 "properties": {
1143 "user": {
1144 "type": "integer",
1145 "default": 0,
1146 "description": "Determines the remaining usage count of offer per user.",
1147 "format": "int32"
1148 },
1149 "total": {
1150 "type": "integer",
1151 "default": 0,
1152 "description": "Determines the overall remaining offer usage count.",
1153 "format": "int32"
1154 },
1155 "app": {
1156 "type": "integer",
1157 "default": 0,
1158 "description": "Determines the remaining offer usage count associated with application id.",
1159 "format": "int32"
1160 }
1161 }
1162 }
1163 }
1164 },
1165 "post_order": {
1166 "type": "object",
1167 "description": "Post order restrictions",
1168 "properties": {
1169 "return_allowed": {
1170 "type": "boolean",
1171 "description": "Allow returns"
1172 },
1173 "cancellation_allowed": {
1174 "type": "boolean",
1175 "description": "Allow cancellations"
1176 }
1177 }
1178 },
1179 "platforms": {
1180 "type": "array",
1181 "default": [
1182 "web",
1183 "android",
1184 "ios"
1185 ],
1186 "description": "List of platform on which offer allowed like web, android",
1187 "items": {
1188 "type": "string"
1189 }
1190 },
1191 "user": {
1192 "type": "object",
1193 "description": "Filter offer user criteria",
1194 "properties": {
1195 "groups": {
1196 "type": "array",
1197 "description": "List of user group on which offer is allowed",
1198 "items": {
1199 "type": "integer",
1200 "format": "int32"
1201 }
1202 },
1203 "exclude_groups": {
1204 "type": "array",
1205 "description": "List of user groups on which offer is not allowed",
1206 "items": {
1207 "type": "integer",
1208 "format": "int32"
1209 }
1210 },
1211 "type": {
1212 "type": "string",
1213 "description": "User type of the cart user who places the order",
1214 "enum": [
1215 "all_user",
1216 "guest",
1217 "registered",
1218 "user_group"
1219 ]
1220 },
1221 "anonymous": {
1222 "type": "boolean",
1223 "description": "Set true, if offer is applicable for guest user"
1224 },
1225 "id": {
1226 "type": "array",
1227 "description": "List of user id on which offer is applicable",
1228 "items": {
1229 "type": "string"
1230 }
1231 },
1232 "email_domain": {
1233 "type": "array",
1234 "description": "List of email domain available for offer",
1235 "items": {
1236 "type": "string"
1237 }
1238 }
1239 }
1240 },
1241 "multi_store_allowed": {
1242 "type": "boolean",
1243 "default": false,
1244 "description": "Allow offer to be applied on multiple stores"
1245 },
1246 "fulfillment_options": {
1247 "type": "array",
1248 "description": "List of fulfillment options on which offer is applicable.",
1249 "items": {
1250 "type": "object",
1251 "properties": {
1252 "fulfillment_slug": {
1253 "type": "string",
1254 "description": "Fulfillment option id"
1255 },
1256 "zones": {
1257 "type": "array",
1258 "description": "List of zones ids on which offer is applicable.",
1259 "items": {
1260 "type": "string"
1261 }
1262 }
1263 }
1264 }
1265 }
1266 }
1267 },
1268 "display_meta": {
1269 "type": "object",
1270 "description": "Display meta information regarding the offer",
1271 "properties": {
1272 "description": {
1273 "description": "Detail about the offers",
1274 "type": [
1275 "string",
1276 null
1277 ],
1278 "nullable": true
1279 },
1280 "is_display": {
1281 "type": "boolean",
1282 "default": true,
1283 "description": "Coupon offer will be displayed or hidden on UI based on this flag"
1284 },
1285 "is_public": {
1286 "type": "boolean",
1287 "default": true,
1288 "description": "Determines if coupon offer is publicaly available or not"
1289 },
1290 "name": {
1291 "type": [
1292 "string",
1293 null
1294 ],
1295 "nullable": true,
1296 "description": "Name of offer that needs to display"
1297 },
1298 "offer_text": {
1299 "type": [
1300 "string",
1301 null
1302 ],
1303 "nullable": true,
1304 "description": "Promotion offer text used to display"
1305 },
1306 "offer_label": {
1307 "type": [
1308 "string",
1309 null
1310 ],
1311 "description": "Offer label of promotion that needs to display",
1312 "nullable": true
1313 },
1314 "reason": {
1315 "type": [
1316 "string",
1317 null
1318 ],
1319 "nullable": true,
1320 "description": "Reason for offer rejection"
1321 }
1322 }
1323 },
1324 "ownership": {
1325 "type": "object",
1326 "description": "Ownership details of the offer",
1327 "properties": {
1328 "payable_category": {
1329 "type": "string",
1330 "description": "Promotion amount payable category",
1331 "enum": [
1332 "fynd",
1333 "seller",
1334 "marketplace"
1335 ]
1336 },
1337 "payable_by": {
1338 "type": [
1339 "string",
1340 null
1341 ],
1342 "description": "Promotion amount bearable party",
1343 "enum": [
1344 "fynd",
1345 "seller",
1346 "marketplace",
1347 null
1348 ],
1349 "nullable": true
1350 }
1351 }
1352 },
1353 "author": {
1354 "type": "object",
1355 "description": "Author information of the offer",
1356 "properties": {
1357 "modified_by": {
1358 "type": "string",
1359 "description": "User who last modified the offer"
1360 },
1361 "rejected_by": {
1362 "type": [
1363 "string",
1364 null
1365 ],
1366 "nullable": true,
1367 "description": "User who rejected the offer"
1368 },
1369 "approved_by": {
1370 "type": [
1371 "string",
1372 null
1373 ],
1374 "nullable": true,
1375 "description": "User who approved the offer"
1376 },
1377 "created_by": {
1378 "type": "string",
1379 "description": "User who created the offer"
1380 }
1381 }
1382 },
1383 "date_meta": {
1384 "type": "object",
1385 "description": "Date metadata of the offer",
1386 "properties": {
1387 "rejected_on": {
1388 "type": [
1389 "string",
1390 null
1391 ],
1392 "format": "date-time",
1393 "nullable": true,
1394 "description": "Date when offer was rejected"
1395 },
1396 "created_on": {
1397 "type": "string",
1398 "format": "date-time",
1399 "description": "Date when offer was created"
1400 },
1401 "approved_on": {
1402 "type": [
1403 "string",
1404 null
1405 ],
1406 "format": "date-time",
1407 "nullable": true,
1408 "description": "Date when offer was approved"
1409 },
1410 "modified_on": {
1411 "type": "string",
1412 "format": "date-time",
1413 "description": "Date when offer was last modified"
1414 }
1415 }
1416 },
1417 "_schedule": {
1418 "type": "object",
1419 "description": "Schedule information of the offer",
1420 "properties": {
1421 "cron": {
1422 "type": [
1423 "string",
1424 null
1425 ],
1426 "description": "Cron expression for scheduling"
1427 },
1428 "start": {
1429 "type": "string",
1430 "format": "date-time",
1431 "description": "Start date of the offer"
1432 },
1433 "end": {
1434 "type": "string",
1435 "format": "date-time",
1436 "description": "End date of the offer"
1437 },
1438 "duration": {
1439 "type": [
1440 "integer",
1441 null
1442 ],
1443 "format": "int32",
1444 "description": "Duration of the offer in seconds"
1445 }
1446 }
1447 },
1448 "_custom_json": {
1449 "type": "object",
1450 "description": "Set extra properties in offer",
1451 "additionalProperties": true
1452 },
1453 "stackable": {
1454 "type": "boolean",
1455 "default": true,
1456 "description": "Boolean value set true to apply other promotions as well."
1457 },
1458 "type": {
1459 "type": "string",
1460 "description": "Specifies the type of offer in the system, which determines how the discount is calculated. Some types are mode-specific, for example, free_item_discount_absolute is only applicable for coupon mode and contract_price, shipping_price, free_gift_items, cashback, free_items, free_non_sellable_items, external_price_adjustment_discount are only applicable for promotion mode.",
1461 "enum": [
1462 "percentage",
1463 "amount",
1464 "bundle_price_percentage",
1465 "bundle_price_amount",
1466 "bundle_amount_percentage",
1467 "bogo",
1468 "fixed_price",
1469 "shipping_price",
1470 "free_gift_items",
1471 "free_item_discount_absolute",
1472 "bundle_discount_quantity_percentage",
1473 "item_based_discount",
1474 "ladder_price",
1475 "contract_price",
1476 "custom"
1477 ]
1478 },
1479 "priority": {
1480 "type": "integer",
1481 "format": "int32",
1482 "maximum": 100000,
1483 "default": 1,
1484 "description": "Defines the priority of the offer. Its behavior varies based on the offer type. For coupons, a higher priority value means the coupon will appear higher in the listing order. For promotions, this value determines the sequence in which promotions are evaluated and applied.\n"
1485 },
1486 "is_exclusive_coupon": {
1487 "type": "boolean",
1488 "default": false,
1489 "description": "Flag to determine if coupon is exclusive"
1490 },
1491 "apply_exclusive": {
1492 "type": [
1493 "string",
1494 null
1495 ],
1496 "description": "Offer should apply on either article or cart.",
1497 "default": "cart",
1498 "enum": [
1499 "cart",
1500 "article",
1501 null
1502 ],
1503 "nullable": true
1504 },
1505 "apply_all_discount": {
1506 "type": "boolean",
1507 "default": false,
1508 "description": "Apply all discount offers if true"
1509 },
1510 "calculate_on": {
1511 "type": "string",
1512 "description": "Article Price on which offer is calculated, like effective price or marked price. Only available for few supported types lile Contract pricing and Ladder pricing.",
1513 "default": "esp",
1514 "enum": [
1515 "mrp",
1516 "esp"
1517 ]
1518 },
1519 "promo_group": {
1520 "type": "string",
1521 "description": "The type of promotion group",
1522 "default": "product",
1523 "enum": [
1524 "cart",
1525 "product",
1526 "contract",
1527 "ladder_price",
1528 "limited_timer"
1529 ]
1530 },
1531 "currency": {
1532 "description": "Offer Currency code like INR",
1533 "type": "string"
1534 },
1535 "code": {
1536 "description": "Offer unique code",
1537 "type": "string"
1538 },
1539 "is_processed": {
1540 "type": "boolean",
1541 "description": "Flag to verify if promotion is ready to be applied on cart and ready to update promotion"
1542 },
1543 "is_bank_offer": {
1544 "type": "boolean",
1545 "default": false,
1546 "description": "Flag to determine if any bank offer is applicable"
1547 },
1548 "filter_tags": {
1549 "type": "array",
1550 "default": [],
1551 "description": "Tags used to filter offers in list APIs",
1552 "items": {
1553 "type": "string"
1554 }
1555 },
1556 "_source": {
1557 "type": "object",
1558 "description": "Source of the offer",
1559 "properties": {
1560 "type": {
1561 "type": "string",
1562 "description": "Type of the source i.e extension"
1563 },
1564 "id": {
1565 "type": "string",
1566 "description": "ID of the source i.e extension id"
1567 }
1568 }
1569 }
1570 }
1571 }
1572 }
1573 }
1574 }
1575}
Payload Example
1

Offer/offer/update/v1

This event is triggered when offer is updated

Payload
Hide
This event is triggered when offer is updated
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
Company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
Show
payload
object
Required
The payload data of event.
Show
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when offer is updated",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "Company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "Category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "Event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "Internal trace_id for Fynd Commerce services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "offer"
81 ],
82 "properties": {
83 "offer": {
84 "type": "object",
85 "description": "The offer data",
86 "required": [
87 "_id",
88 "mode",
89 "application_id",
90 "display_meta",
91 "author",
92 "date_meta",
93 "type",
94 "calculate_on",
95 "published",
96 "status"
97 ],
98 "properties": {
99 "_id": {
100 "type": "string",
101 "description": "Unique identifier of offer"
102 },
103 "mode": {
104 "type": "string",
105 "description": "Offer mode, like coupon or promotion",
106 "enum": [
107 "promotion",
108 "coupon"
109 ]
110 },
111 "status": {
112 "type": "string",
113 "description": "Status of the offer",
114 "enum": [
115 "draft",
116 "approved",
117 "rejected",
118 "scheduled"
119 ]
120 },
121 "published": {
122 "type": "boolean",
123 "description": "Determines whether the offer is published to customers or marked inactive"
124 },
125 "coupon_config": {
126 "type": "object",
127 "description": "Bulk configuration for the offer",
128 "properties": {
129 "coupon_count": {
130 "type": "integer",
131 "description": "Total number of coupons to be generated when coupon type is bulk"
132 },
133 "coupon_prefix": {
134 "type": "string",
135 "description": "Bulk coupon code prefix string. All coupons will be generated with this prefix."
136 },
137 "coupon_type": {
138 "type": "string",
139 "description": "The type of coupon like bulk or single.",
140 "enum": [
141 "bulk",
142 "single"
143 ]
144 }
145 }
146 },
147 "auto_apply": {
148 "type": "boolean",
149 "description": "Indicates whether the offer is automatically applied. This flag is false for coupons and true for promotions. For free-gift promotions, a false value means manual gift selection is required."
150 },
151 "application_id": {
152 "type": "string",
153 "description": "Application id through which offer was created"
154 },
155 "company_id": {
156 "type": "string",
157 "description": "Company id through which offer was created"
158 },
159 "discount_rules": {
160 "type": "array",
161 "description": "Discount rules based on which offer will be applied",
162 "maxItems": 10,
163 "items": {
164 "type": "object",
165 "properties": {
166 "discount_type": {
167 "type": "string",
168 "description": "The type of discount in offer",
169 "enum": [
170 "percentage",
171 "amount",
172 "fixed_price",
173 "fixed_unit_price",
174 "bogo",
175 "shipping_price",
176 "cashback",
177 "coupon_code",
178 "free_items",
179 "free_gift_items",
180 "free_non_sellable_items",
181 "item_based_discount",
182 "bundle"
183 ]
184 },
185 "buy_condition": {
186 "type": "string",
187 "description": "Offer buy rules in offer level"
188 },
189 "item_criteria": {
190 "type": "object",
191 "description": "Filter offer applicability",
192 "properties": {
193 "category_id": {
194 "type": "array",
195 "description": "List of category id available for offer",
196 "items": {
197 "type": "integer",
198 "format": "int32"
199 }
200 },
201 "collection_id": {
202 "type": "array",
203 "description": "List of collection id available for offer",
204 "items": {
205 "type": "string"
206 }
207 },
208 "all_items": {
209 "description": "Boolean flag determining if offer is applicable on all offers",
210 "type": "boolean"
211 },
212 "item_brand": {
213 "type": "array",
214 "description": "List of all brand ids on which promotion is applicable",
215 "items": {
216 "type": "integer",
217 "format": "int32"
218 }
219 },
220 "article_ids": {
221 "type": "array",
222 "description": "List of unique identifier of articles on which offer will be applicable",
223 "items": {
224 "type": "string"
225 }
226 },
227 "item_sku": {
228 "type": "array",
229 "description": "List of all item sku on which promotion is applicable",
230 "items": {
231 "type": "string"
232 }
233 },
234 "item_id": {
235 "type": "array",
236 "description": "List of all item ids on which offer is applicable",
237 "items": {
238 "type": "integer",
239 "format": "int32"
240 }
241 },
242 "item_l1_category": {
243 "type": "array",
244 "description": "List of all L1 category on which offer is applicable",
245 "items": {
246 "type": "integer",
247 "format": "int32",
248 "x-not-enum": true
249 }
250 },
251 "item_l2_category": {
252 "type": "array",
253 "description": "List of all L2 category on which offer is applicable",
254 "items": {
255 "type": "integer",
256 "format": "int32",
257 "x-not-enum": true
258 }
259 },
260 "item_category": {
261 "type": "array",
262 "description": "List of all L3 category on which offer is applicable",
263 "items": {
264 "type": "integer",
265 "format": "int32",
266 "x-not-enum": true
267 }
268 },
269 "item_department": {
270 "type": "array",
271 "description": "List of all departments ids on which offer is applicable",
272 "items": {
273 "type": "integer",
274 "format": "int32"
275 }
276 },
277 "item_store": {
278 "type": "array",
279 "description": "List of all item store ids on which offer is applicable",
280 "items": {
281 "type": "integer",
282 "format": "int32"
283 }
284 },
285 "item_size": {
286 "type": "array",
287 "description": "List of all item sizes on which offer is applicable",
288 "items": {
289 "type": "string"
290 }
291 },
292 "item_company": {
293 "type": "array",
294 "description": "List of all company ids on which offer is applicable",
295 "items": {
296 "type": "integer",
297 "format": "int32"
298 }
299 },
300 "item_tags": {
301 "type": "array",
302 "description": "List of all product tags on which offer is applicable",
303 "items": {
304 "type": "string"
305 }
306 },
307 "cart_quantity": {
308 "type": "object",
309 "description": "Manage operator and their value for cart rules in promotion",
310 "properties": {
311 "equals": {
312 "type": [
313 "number",
314 null
315 ],
316 "format": "float",
317 "nullable": true,
318 "description": "Nummeric value must be equal to cart level rules"
319 },
320 "greater_than": {
321 "type": [
322 "number",
323 null
324 ],
325 "format": "float",
326 "nullable": true,
327 "description": "Nummeric value must be greater than cart level rules"
328 },
329 "less_than_equals": {
330 "type": [
331 "number",
332 null
333 ],
334 "format": "float",
335 "nullable": true,
336 "description": "Nummeric value must be less than or equal to cart level rules"
337 },
338 "less_than": {
339 "type": [
340 "number",
341 null
342 ],
343 "format": "float",
344 "nullable": true,
345 "description": "Nummeric value must be less than cart level rules"
346 },
347 "greater_than_equals": {
348 "type": [
349 "number",
350 null
351 ],
352 "format": "float",
353 "nullable": true,
354 "description": "Nummeric value must be greater than or equal to cart level rules"
355 }
356 }
357 },
358 "cart_total": {
359 "type": "object",
360 "description": "Manage operator and their value for cart rules in promotion",
361 "properties": {
362 "equals": {
363 "type": [
364 "number",
365 null
366 ],
367 "format": "float",
368 "nullable": true,
369 "description": "Nummeric value must be equal to cart level rules"
370 },
371 "greater_than": {
372 "type": [
373 "number",
374 null
375 ],
376 "format": "float",
377 "nullable": true,
378 "description": "Nummeric value must be greater than cart level rules"
379 },
380 "less_than_equals": {
381 "type": [
382 "number",
383 null
384 ],
385 "format": "float",
386 "nullable": true,
387 "description": "Nummeric value must be less than or equal to cart level rules"
388 },
389 "less_than": {
390 "type": [
391 "number",
392 null
393 ],
394 "format": "float",
395 "nullable": true,
396 "description": "Nummeric value must be less than cart level rules"
397 },
398 "greater_than_equals": {
399 "type": [
400 "number",
401 null
402 ],
403 "format": "float",
404 "nullable": true,
405 "description": "Nummeric value must be greater than or equal to cart level rules"
406 }
407 }
408 },
409 "item_exclude_l1_category": {
410 "type": "array",
411 "description": "List of all L1 categories on which offer is not applicable",
412 "items": {
413 "type": "integer",
414 "format": "int32",
415 "x-not-enum": true
416 }
417 },
418 "item_exclude_l2_category": {
419 "type": "array",
420 "description": "List of all L2 categories on which offer is not applicable",
421 "items": {
422 "type": "integer",
423 "format": "int32",
424 "x-not-enum": true
425 }
426 },
427 "item_exclude_category": {
428 "type": "array",
429 "description": "List of all L3 categories on which offer is not applicable",
430 "items": {
431 "type": "integer",
432 "format": "int32",
433 "x-not-enum": true
434 }
435 },
436 "cart_unique_item_quantity": {
437 "type": "object",
438 "description": "Manage operator and their value for cart rules in promotion",
439 "properties": {
440 "equals": {
441 "type": [
442 "number",
443 null
444 ],
445 "format": "float",
446 "nullable": true,
447 "description": "Nummeric value must be equal to cart level rules"
448 },
449 "greater_than": {
450 "type": [
451 "number",
452 null
453 ],
454 "format": "float",
455 "nullable": true,
456 "description": "Nummeric value must be greater than cart level rules"
457 },
458 "less_than_equals": {
459 "type": [
460 "number",
461 null
462 ],
463 "format": "float",
464 "nullable": true,
465 "description": "Nummeric value must be less than or equal to cart level rules"
466 },
467 "less_than": {
468 "type": [
469 "number",
470 null
471 ],
472 "format": "float",
473 "nullable": true,
474 "description": "Nummeric value must be less than cart level rules"
475 },
476 "greater_than_equals": {
477 "type": [
478 "number",
479 null
480 ],
481 "format": "float",
482 "nullable": true,
483 "description": "Nummeric value must be greater than or equal to cart level rules"
484 }
485 }
486 },
487 "cart_unique_item_amount": {
488 "type": "object",
489 "description": "Manage operator and their value for cart rules in promotion",
490 "properties": {
491 "equals": {
492 "type": [
493 "number",
494 null
495 ],
496 "format": "float",
497 "nullable": true,
498 "description": "Nummeric value must be equal to cart level rules"
499 },
500 "greater_than": {
501 "type": [
502 "number",
503 null
504 ],
505 "format": "float",
506 "nullable": true,
507 "description": "Nummeric value must be greater than cart level rules"
508 },
509 "less_than_equals": {
510 "type": [
511 "number",
512 null
513 ],
514 "format": "float",
515 "nullable": true,
516 "description": "Nummeric value must be less than or equal to cart level rules"
517 },
518 "less_than": {
519 "type": [
520 "number",
521 null
522 ],
523 "format": "float",
524 "nullable": true,
525 "description": "Nummeric value must be less than cart level rules"
526 },
527 "greater_than_equals": {
528 "type": [
529 "number",
530 null
531 ],
532 "format": "float",
533 "nullable": true,
534 "description": "Nummeric value must be greater than or equal to cart level rules"
535 }
536 }
537 },
538 "item_exclude_department": {
539 "type": "array",
540 "description": "List of all department ids on which offer is not applicable",
541 "items": {
542 "type": "integer",
543 "format": "int32"
544 }
545 },
546 "item_exclude_store": {
547 "type": "array",
548 "description": "List of all item store ids on which offer is not applicable",
549 "items": {
550 "type": "integer",
551 "format": "int32"
552 }
553 },
554 "item_exclude_brand": {
555 "type": "array",
556 "description": "List of all brand ids on which offer is not applicable",
557 "items": {
558 "type": "integer",
559 "format": "int32"
560 }
561 },
562 "item_exclude_sku": {
563 "type": "array",
564 "description": "List of all item sku on which offer is not applicable",
565 "items": {
566 "type": "string"
567 }
568 },
569 "item_exclude_company": {
570 "type": "array",
571 "description": "List of all company id on which offer is not applicable",
572 "items": {
573 "type": "integer",
574 "format": "int32"
575 }
576 },
577 "available_zones": {
578 "type": "array",
579 "description": "List of all zones on which offer is applicable",
580 "items": {
581 "type": "string"
582 }
583 },
584 "item_exclude_id": {
585 "type": "array",
586 "description": "List of all item ids on which offer is not applicable",
587 "items": {
588 "type": "integer",
589 "format": "int32"
590 }
591 },
592 "buy_rules": {
593 "type": "array",
594 "description": "List of buy rules that is applicable for this offer",
595 "items": {
596 "type": "string"
597 }
598 },
599 "item_size_mapping": {
600 "type": "object",
601 "description": "Map size with product in promotion",
602 "properties": {
603 "item_size_mapping": {
604 "type": "object",
605 "description": "Item size mapping in promotion",
606 "additionalProperties": true
607 }
608 }
609 }
610 }
611 },
612 "offer": {
613 "type": "object",
614 "description": "Defines the discount details for the offer. The required fields vary dynamically based on the discount type. For example, for a percentage-based discount, the `discount_percentage` field is mandatory. For quantity-based discounts, fields such as `max_offer_quantity` or `min_offer_quantity` become mandatory.\n",
615 "properties": {
616 "max_discount_amount": {
617 "type": "number",
618 "format": "float",
619 "description": "Maximum discount amount in offer"
620 },
621 "discount_price": {
622 "type": "number",
623 "format": "float",
624 "description": "Discount price in offer"
625 },
626 "apportion_discount": {
627 "type": "boolean",
628 "description": "Flag to distribute discount for each article"
629 },
630 "partial_can_ret": {
631 "type": "boolean",
632 "description": "Flag indicated return the product partially"
633 },
634 "max_usage_per_transaction": {
635 "type": [
636 "integer",
637 null
638 ],
639 "format": "int32",
640 "nullable": true,
641 "description": "Maximum usage per transaction in offer"
642 },
643 "min_offer_quantity": {
644 "type": [
645 "integer",
646 null
647 ],
648 "format": "int32",
649 "description": "Minimum quantity of offer in offer"
650 },
651 "discount_amount": {
652 "type": "number",
653 "format": "float",
654 "description": "Discount amount in offer"
655 },
656 "discount_percentage": {
657 "type": [
658 "number",
659 null
660 ],
661 "format": "float",
662 "nullable": true,
663 "description": "Discount percentage in offer"
664 },
665 "max_offer_quantity": {
666 "type": "integer",
667 "format": "int32",
668 "description": "Maximum quantity of product in offer"
669 }
670 }
671 },
672 "is_exact": {
673 "type": "boolean",
674 "description": "Flag is true then use coupon applicable articles for calculation"
675 }
676 }
677 }
678 },
679 "buy_rules": {
680 "type": "object",
681 "description": "Contains the individual buy rules associated with the offer. The keys in this object are dynamic (e.g., 'rule#1', 'rule#2', etc.), and each key must correspond to a buy condition referenced within `discount_rules`. For example, if a discount rule includes a buy_condition '(rule#1)', then 'rule#1' must be defined in this object. Each rule key value must follow the format of OfferItemCriteria schema.\n",
682 "maxProperties": 10,
683 "additionalProperties": {
684 "type": "object",
685 "description": "Filter offer applicability",
686 "properties": {
687 "category_id": {
688 "type": "array",
689 "description": "List of category id available for offer",
690 "items": {
691 "type": "integer",
692 "format": "int32"
693 }
694 },
695 "collection_id": {
696 "type": "array",
697 "description": "List of collection id available for offer",
698 "items": {
699 "type": "string"
700 }
701 },
702 "all_items": {
703 "description": "Boolean flag determining if offer is applicable on all offers",
704 "type": "boolean"
705 },
706 "item_brand": {
707 "type": "array",
708 "description": "List of all brand ids on which promotion is applicable",
709 "items": {
710 "type": "integer",
711 "format": "int32"
712 }
713 },
714 "article_ids": {
715 "type": "array",
716 "description": "List of unique identifier of articles on which offer will be applicable",
717 "items": {
718 "type": "string"
719 }
720 },
721 "item_sku": {
722 "type": "array",
723 "description": "List of all item sku on which promotion is applicable",
724 "items": {
725 "type": "string"
726 }
727 },
728 "item_id": {
729 "type": "array",
730 "description": "List of all item ids on which offer is applicable",
731 "items": {
732 "type": "integer",
733 "format": "int32"
734 }
735 },
736 "item_l1_category": {
737 "type": "array",
738 "description": "List of all L1 category on which offer is applicable",
739 "items": {
740 "type": "integer",
741 "format": "int32",
742 "x-not-enum": true
743 }
744 },
745 "item_l2_category": {
746 "type": "array",
747 "description": "List of all L2 category on which offer is applicable",
748 "items": {
749 "type": "integer",
750 "format": "int32",
751 "x-not-enum": true
752 }
753 },
754 "item_category": {
755 "type": "array",
756 "description": "List of all L3 category on which offer is applicable",
757 "items": {
758 "type": "integer",
759 "format": "int32",
760 "x-not-enum": true
761 }
762 },
763 "item_department": {
764 "type": "array",
765 "description": "List of all departments ids on which offer is applicable",
766 "items": {
767 "type": "integer",
768 "format": "int32"
769 }
770 },
771 "item_store": {
772 "type": "array",
773 "description": "List of all item store ids on which offer is applicable",
774 "items": {
775 "type": "integer",
776 "format": "int32"
777 }
778 },
779 "item_size": {
780 "type": "array",
781 "description": "List of all item sizes on which offer is applicable",
782 "items": {
783 "type": "string"
784 }
785 },
786 "item_company": {
787 "type": "array",
788 "description": "List of all company ids on which offer is applicable",
789 "items": {
790 "type": "integer",
791 "format": "int32"
792 }
793 },
794 "item_tags": {
795 "type": "array",
796 "description": "List of all product tags on which offer is applicable",
797 "items": {
798 "type": "string"
799 }
800 },
801 "cart_quantity": {
802 "type": "object",
803 "description": "Manage operator and their value for cart rules in promotion",
804 "properties": {
805 "equals": {
806 "type": [
807 "number",
808 null
809 ],
810 "format": "float",
811 "nullable": true,
812 "description": "Nummeric value must be equal to cart level rules"
813 },
814 "greater_than": {
815 "type": [
816 "number",
817 null
818 ],
819 "format": "float",
820 "nullable": true,
821 "description": "Nummeric value must be greater than cart level rules"
822 },
823 "less_than_equals": {
824 "type": [
825 "number",
826 null
827 ],
828 "format": "float",
829 "nullable": true,
830 "description": "Nummeric value must be less than or equal to cart level rules"
831 },
832 "less_than": {
833 "type": [
834 "number",
835 null
836 ],
837 "format": "float",
838 "nullable": true,
839 "description": "Nummeric value must be less than cart level rules"
840 },
841 "greater_than_equals": {
842 "type": [
843 "number",
844 null
845 ],
846 "format": "float",
847 "nullable": true,
848 "description": "Nummeric value must be greater than or equal to cart level rules"
849 }
850 }
851 },
852 "cart_total": {
853 "type": "object",
854 "description": "Manage operator and their value for cart rules in promotion",
855 "properties": {
856 "equals": {
857 "type": [
858 "number",
859 null
860 ],
861 "format": "float",
862 "nullable": true,
863 "description": "Nummeric value must be equal to cart level rules"
864 },
865 "greater_than": {
866 "type": [
867 "number",
868 null
869 ],
870 "format": "float",
871 "nullable": true,
872 "description": "Nummeric value must be greater than cart level rules"
873 },
874 "less_than_equals": {
875 "type": [
876 "number",
877 null
878 ],
879 "format": "float",
880 "nullable": true,
881 "description": "Nummeric value must be less than or equal to cart level rules"
882 },
883 "less_than": {
884 "type": [
885 "number",
886 null
887 ],
888 "format": "float",
889 "nullable": true,
890 "description": "Nummeric value must be less than cart level rules"
891 },
892 "greater_than_equals": {
893 "type": [
894 "number",
895 null
896 ],
897 "format": "float",
898 "nullable": true,
899 "description": "Nummeric value must be greater than or equal to cart level rules"
900 }
901 }
902 },
903 "item_exclude_l1_category": {
904 "type": "array",
905 "description": "List of all L1 categories on which offer is not applicable",
906 "items": {
907 "type": "integer",
908 "format": "int32",
909 "x-not-enum": true
910 }
911 },
912 "item_exclude_l2_category": {
913 "type": "array",
914 "description": "List of all L2 categories on which offer is not applicable",
915 "items": {
916 "type": "integer",
917 "format": "int32",
918 "x-not-enum": true
919 }
920 },
921 "item_exclude_category": {
922 "type": "array",
923 "description": "List of all L3 categories on which offer is not applicable",
924 "items": {
925 "type": "integer",
926 "format": "int32",
927 "x-not-enum": true
928 }
929 },
930 "cart_unique_item_quantity": {
931 "type": "object",
932 "description": "Manage operator and their value for cart rules in promotion",
933 "properties": {
934 "equals": {
935 "type": [
936 "number",
937 null
938 ],
939 "format": "float",
940 "nullable": true,
941 "description": "Nummeric value must be equal to cart level rules"
942 },
943 "greater_than": {
944 "type": [
945 "number",
946 null
947 ],
948 "format": "float",
949 "nullable": true,
950 "description": "Nummeric value must be greater than cart level rules"
951 },
952 "less_than_equals": {
953 "type": [
954 "number",
955 null
956 ],
957 "format": "float",
958 "nullable": true,
959 "description": "Nummeric value must be less than or equal to cart level rules"
960 },
961 "less_than": {
962 "type": [
963 "number",
964 null
965 ],
966 "format": "float",
967 "nullable": true,
968 "description": "Nummeric value must be less than cart level rules"
969 },
970 "greater_than_equals": {
971 "type": [
972 "number",
973 null
974 ],
975 "format": "float",
976 "nullable": true,
977 "description": "Nummeric value must be greater than or equal to cart level rules"
978 }
979 }
980 },
981 "cart_unique_item_amount": {
982 "type": "object",
983 "description": "Manage operator and their value for cart rules in promotion",
984 "properties": {
985 "equals": {
986 "type": [
987 "number",
988 null
989 ],
990 "format": "float",
991 "nullable": true,
992 "description": "Nummeric value must be equal to cart level rules"
993 },
994 "greater_than": {
995 "type": [
996 "number",
997 null
998 ],
999 "format": "float",
1000 "nullable": true,
1001 "description": "Nummeric value must be greater than cart level rules"
1002 },
1003 "less_than_equals": {
1004 "type": [
1005 "number",
1006 null
1007 ],
1008 "format": "float",
1009 "nullable": true,
1010 "description": "Nummeric value must be less than or equal to cart level rules"
1011 },
1012 "less_than": {
1013 "type": [
1014 "number",
1015 null
1016 ],
1017 "format": "float",
1018 "nullable": true,
1019 "description": "Nummeric value must be less than cart level rules"
1020 },
1021 "greater_than_equals": {
1022 "type": [
1023 "number",
1024 null
1025 ],
1026 "format": "float",
1027 "nullable": true,
1028 "description": "Nummeric value must be greater than or equal to cart level rules"
1029 }
1030 }
1031 },
1032 "item_exclude_department": {
1033 "type": "array",
1034 "description": "List of all department ids on which offer is not applicable",
1035 "items": {
1036 "type": "integer",
1037 "format": "int32"
1038 }
1039 },
1040 "item_exclude_store": {
1041 "type": "array",
1042 "description": "List of all item store ids on which offer is not applicable",
1043 "items": {
1044 "type": "integer",
1045 "format": "int32"
1046 }
1047 },
1048 "item_exclude_brand": {
1049 "type": "array",
1050 "description": "List of all brand ids on which offer is not applicable",
1051 "items": {
1052 "type": "integer",
1053 "format": "int32"
1054 }
1055 },
1056 "item_exclude_sku": {
1057 "type": "array",
1058 "description": "List of all item sku on which offer is not applicable",
1059 "items": {
1060 "type": "string"
1061 }
1062 },
1063 "item_exclude_company": {
1064 "type": "array",
1065 "description": "List of all company id on which offer is not applicable",
1066 "items": {
1067 "type": "integer",
1068 "format": "int32"
1069 }
1070 },
1071 "available_zones": {
1072 "type": "array",
1073 "description": "List of all zones on which offer is applicable",
1074 "items": {
1075 "type": "string"
1076 }
1077 },
1078 "item_exclude_id": {
1079 "type": "array",
1080 "description": "List of all item ids on which offer is not applicable",
1081 "items": {
1082 "type": "integer",
1083 "format": "int32"
1084 }
1085 },
1086 "buy_rules": {
1087 "type": "array",
1088 "description": "List of buy rules that is applicable for this offer",
1089 "items": {
1090 "type": "string"
1091 }
1092 },
1093 "item_size_mapping": {
1094 "type": "object",
1095 "description": "Map size with product in promotion",
1096 "properties": {
1097 "item_size_mapping": {
1098 "type": "object",
1099 "description": "Item size mapping in promotion",
1100 "additionalProperties": true
1101 }
1102 }
1103 }
1104 }
1105 }
1106 },
1107 "restrictions": {
1108 "type": "object",
1109 "description": "Restrictions for offers to be applied",
1110 "properties": {
1111 "uses": {
1112 "type": "object",
1113 "description": "Usage restrictions",
1114 "properties": {
1115 "maximum": {
1116 "type": "object",
1117 "description": "Determines the maximum usage count of offer.",
1118 "properties": {
1119 "user": {
1120 "type": "integer",
1121 "default": 0,
1122 "description": "Determines the maximum usage count of offer per user.",
1123 "format": "int32"
1124 },
1125 "total": {
1126 "type": "integer",
1127 "default": 0,
1128 "description": "Determines the overall offer usage count.",
1129 "format": "int32"
1130 },
1131 "app": {
1132 "type": "integer",
1133 "default": 0,
1134 "description": "Determines the offer usage count associated with application id.",
1135 "format": "int32"
1136 }
1137 }
1138 },
1139 "remaining": {
1140 "type": "object",
1141 "description": "Determines the remaining usage count of offer",
1142 "properties": {
1143 "user": {
1144 "type": "integer",
1145 "default": 0,
1146 "description": "Determines the remaining usage count of offer per user.",
1147 "format": "int32"
1148 },
1149 "total": {
1150 "type": "integer",
1151 "default": 0,
1152 "description": "Determines the overall remaining offer usage count.",
1153 "format": "int32"
1154 },
1155 "app": {
1156 "type": "integer",
1157 "default": 0,
1158 "description": "Determines the remaining offer usage count associated with application id.",
1159 "format": "int32"
1160 }
1161 }
1162 }
1163 }
1164 },
1165 "post_order": {
1166 "type": "object",
1167 "description": "Post order restrictions",
1168 "properties": {
1169 "return_allowed": {
1170 "type": "boolean",
1171 "description": "Allow returns"
1172 },
1173 "cancellation_allowed": {
1174 "type": "boolean",
1175 "description": "Allow cancellations"
1176 }
1177 }
1178 },
1179 "platforms": {
1180 "type": "array",
1181 "default": [
1182 "web",
1183 "android",
1184 "ios"
1185 ],
1186 "description": "List of platform on which offer allowed like web, android",
1187 "items": {
1188 "type": "string"
1189 }
1190 },
1191 "user": {
1192 "type": "object",
1193 "description": "Filter offer user criteria",
1194 "properties": {
1195 "groups": {
1196 "type": "array",
1197 "description": "List of user group on which offer is allowed",
1198 "items": {
1199 "type": "integer",
1200 "format": "int32"
1201 }
1202 },
1203 "exclude_groups": {
1204 "type": "array",
1205 "description": "List of user groups on which offer is not allowed",
1206 "items": {
1207 "type": "integer",
1208 "format": "int32"
1209 }
1210 },
1211 "type": {
1212 "type": "string",
1213 "description": "User type of the cart user who places the order",
1214 "enum": [
1215 "all_user",
1216 "guest",
1217 "registered",
1218 "user_group"
1219 ]
1220 },
1221 "anonymous": {
1222 "type": "boolean",
1223 "description": "Set true, if offer is applicable for guest user"
1224 },
1225 "id": {
1226 "type": "array",
1227 "description": "List of user id on which offer is applicable",
1228 "items": {
1229 "type": "string"
1230 }
1231 },
1232 "email_domain": {
1233 "type": "array",
1234 "description": "List of email domain available for offer",
1235 "items": {
1236 "type": "string"
1237 }
1238 }
1239 }
1240 },
1241 "multi_store_allowed": {
1242 "type": "boolean",
1243 "default": false,
1244 "description": "Allow offer to be applied on multiple stores"
1245 },
1246 "fulfillment_options": {
1247 "type": "array",
1248 "description": "List of fulfillment options on which offer is applicable.",
1249 "items": {
1250 "type": "object",
1251 "properties": {
1252 "fulfillment_slug": {
1253 "type": "string",
1254 "description": "Fulfillment option id"
1255 },
1256 "zones": {
1257 "type": "array",
1258 "description": "List of zones ids on which offer is applicable.",
1259 "items": {
1260 "type": "string"
1261 }
1262 }
1263 }
1264 }
1265 }
1266 }
1267 },
1268 "display_meta": {
1269 "type": "object",
1270 "description": "Display meta information regarding the offer",
1271 "properties": {
1272 "description": {
1273 "description": "Detail about the offers",
1274 "type": [
1275 "string",
1276 null
1277 ],
1278 "nullable": true
1279 },
1280 "is_display": {
1281 "type": "boolean",
1282 "default": true,
1283 "description": "Coupon offer will be displayed or hidden on UI based on this flag"
1284 },
1285 "is_public": {
1286 "type": "boolean",
1287 "default": true,
1288 "description": "Determines if coupon offer is publicaly available or not"
1289 },
1290 "name": {
1291 "type": [
1292 "string",
1293 null
1294 ],
1295 "nullable": true,
1296 "description": "Name of offer that needs to display"
1297 },
1298 "offer_text": {
1299 "type": [
1300 "string",
1301 null
1302 ],
1303 "nullable": true,
1304 "description": "Promotion offer text used to display"
1305 },
1306 "offer_label": {
1307 "type": [
1308 "string",
1309 null
1310 ],
1311 "description": "Offer label of promotion that needs to display",
1312 "nullable": true
1313 },
1314 "reason": {
1315 "type": [
1316 "string",
1317 null
1318 ],
1319 "nullable": true,
1320 "description": "Reason for offer rejection"
1321 }
1322 }
1323 },
1324 "ownership": {
1325 "type": "object",
1326 "description": "Ownership details of the offer",
1327 "properties": {
1328 "payable_category": {
1329 "type": "string",
1330 "description": "Promotion amount payable category",
1331 "enum": [
1332 "fynd",
1333 "seller",
1334 "marketplace"
1335 ]
1336 },
1337 "payable_by": {
1338 "type": [
1339 "string",
1340 null
1341 ],
1342 "description": "Promotion amount bearable party",
1343 "enum": [
1344 "fynd",
1345 "seller",
1346 "marketplace",
1347 null
1348 ],
1349 "nullable": true
1350 }
1351 }
1352 },
1353 "author": {
1354 "type": "object",
1355 "description": "Author information of the offer",
1356 "properties": {
1357 "modified_by": {
1358 "type": "string",
1359 "description": "User who last modified the offer"
1360 },
1361 "rejected_by": {
1362 "type": [
1363 "string",
1364 null
1365 ],
1366 "nullable": true,
1367 "description": "User who rejected the offer"
1368 },
1369 "approved_by": {
1370 "type": [
1371 "string",
1372 null
1373 ],
1374 "nullable": true,
1375 "description": "User who approved the offer"
1376 },
1377 "created_by": {
1378 "type": "string",
1379 "description": "User who created the offer"
1380 }
1381 }
1382 },
1383 "date_meta": {
1384 "type": "object",
1385 "description": "Date metadata of the offer",
1386 "properties": {
1387 "rejected_on": {
1388 "type": [
1389 "string",
1390 null
1391 ],
1392 "format": "date-time",
1393 "nullable": true,
1394 "description": "Date when offer was rejected"
1395 },
1396 "created_on": {
1397 "type": "string",
1398 "format": "date-time",
1399 "description": "Date when offer was created"
1400 },
1401 "approved_on": {
1402 "type": [
1403 "string",
1404 null
1405 ],
1406 "format": "date-time",
1407 "nullable": true,
1408 "description": "Date when offer was approved"
1409 },
1410 "modified_on": {
1411 "type": "string",
1412 "format": "date-time",
1413 "description": "Date when offer was last modified"
1414 }
1415 }
1416 },
1417 "_schedule": {
1418 "type": "object",
1419 "description": "Schedule information of the offer",
1420 "properties": {
1421 "cron": {
1422 "type": [
1423 "string",
1424 null
1425 ],
1426 "description": "Cron expression for scheduling"
1427 },
1428 "start": {
1429 "type": "string",
1430 "format": "date-time",
1431 "description": "Start date of the offer"
1432 },
1433 "end": {
1434 "type": "string",
1435 "format": "date-time",
1436 "description": "End date of the offer"
1437 },
1438 "duration": {
1439 "type": [
1440 "integer",
1441 null
1442 ],
1443 "format": "int32",
1444 "description": "Duration of the offer in seconds"
1445 }
1446 }
1447 },
1448 "_custom_json": {
1449 "type": "object",
1450 "description": "Set extra properties in offer",
1451 "additionalProperties": true
1452 },
1453 "stackable": {
1454 "type": "boolean",
1455 "default": true,
1456 "description": "Boolean value set true to apply other promotions as well."
1457 },
1458 "type": {
1459 "type": "string",
1460 "description": "Specifies the type of offer in the system, which determines how the discount is calculated. Some types are mode-specific, for example, free_item_discount_absolute is only applicable for coupon mode and contract_price, shipping_price, free_gift_items, cashback, free_items, free_non_sellable_items, external_price_adjustment_discount are only applicable for promotion mode.",
1461 "enum": [
1462 "percentage",
1463 "amount",
1464 "bundle_price_percentage",
1465 "bundle_price_amount",
1466 "bundle_amount_percentage",
1467 "bogo",
1468 "fixed_price",
1469 "shipping_price",
1470 "free_gift_items",
1471 "free_item_discount_absolute",
1472 "bundle_discount_quantity_percentage",
1473 "item_based_discount",
1474 "ladder_price",
1475 "contract_price",
1476 "custom"
1477 ]
1478 },
1479 "priority": {
1480 "type": "integer",
1481 "format": "int32",
1482 "maximum": 100000,
1483 "default": 1,
1484 "description": "Defines the priority of the offer. Its behavior varies based on the offer type. For coupons, a higher priority value means the coupon will appear higher in the listing order. For promotions, this value determines the sequence in which promotions are evaluated and applied.\n"
1485 },
1486 "is_exclusive_coupon": {
1487 "type": "boolean",
1488 "default": false,
1489 "description": "Flag to determine if coupon is exclusive"
1490 },
1491 "apply_exclusive": {
1492 "type": [
1493 "string",
1494 null
1495 ],
1496 "description": "Offer should apply on either article or cart.",
1497 "default": "cart",
1498 "enum": [
1499 "cart",
1500 "article",
1501 null
1502 ],
1503 "nullable": true
1504 },
1505 "apply_all_discount": {
1506 "type": "boolean",
1507 "default": false,
1508 "description": "Apply all discount offers if true"
1509 },
1510 "calculate_on": {
1511 "type": "string",
1512 "description": "Article Price on which offer is calculated, like effective price or marked price. Only available for few supported types lile Contract pricing and Ladder pricing.",
1513 "default": "esp",
1514 "enum": [
1515 "mrp",
1516 "esp"
1517 ]
1518 },
1519 "promo_group": {
1520 "type": "string",
1521 "description": "The type of promotion group",
1522 "default": "product",
1523 "enum": [
1524 "cart",
1525 "product",
1526 "contract",
1527 "ladder_price",
1528 "limited_timer"
1529 ]
1530 },
1531 "currency": {
1532 "description": "Offer Currency code like INR",
1533 "type": "string"
1534 },
1535 "code": {
1536 "description": "Offer unique code",
1537 "type": "string"
1538 },
1539 "is_processed": {
1540 "type": "boolean",
1541 "description": "Flag to verify if promotion is ready to be applied on cart and ready to update promotion"
1542 },
1543 "is_bank_offer": {
1544 "type": "boolean",
1545 "default": false,
1546 "description": "Flag to determine if any bank offer is applicable"
1547 },
1548 "filter_tags": {
1549 "type": "array",
1550 "default": [],
1551 "description": "Tags used to filter offers in list APIs",
1552 "items": {
1553 "type": "string"
1554 }
1555 },
1556 "_source": {
1557 "type": "object",
1558 "description": "Source of the offer",
1559 "properties": {
1560 "type": {
1561 "type": "string",
1562 "description": "Type of the source i.e extension"
1563 },
1564 "id": {
1565 "type": "string",
1566 "description": "ID of the source i.e extension id"
1567 }
1568 }
1569 }
1570 }
1571 }
1572 }
1573 }
1574 }
1575}
Payload Example
1

Offer/offer/redeem/v1

This event is triggered when offer is utilised by the customer

Payload
Hide
This event is triggered when offer is used
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
Company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
Show
payload
object
Required
The payload data of event.
Show
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when offer is used",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "Company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "Category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "Event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "Internal trace_id for Fynd Commerce services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "offer",
81 "cart_id",
82 "offer_value"
83 ],
84 "properties": {
85 "offer": {
86 "type": "object",
87 "description": "The offer data",
88 "required": [
89 "_id",
90 "mode",
91 "application_id",
92 "display_meta",
93 "author",
94 "date_meta",
95 "type",
96 "calculate_on",
97 "published",
98 "status"
99 ],
100 "properties": {
101 "_id": {
102 "type": "string",
103 "description": "Unique identifier of offer"
104 },
105 "mode": {
106 "type": "string",
107 "description": "Offer mode, like coupon or promotion",
108 "enum": [
109 "promotion",
110 "coupon"
111 ]
112 },
113 "status": {
114 "type": "string",
115 "description": "Status of the offer",
116 "enum": [
117 "draft",
118 "approved",
119 "rejected",
120 "scheduled"
121 ]
122 },
123 "published": {
124 "type": "boolean",
125 "description": "Determines whether the offer is published to customers or marked inactive"
126 },
127 "coupon_config": {
128 "type": "object",
129 "description": "Bulk configuration for the offer",
130 "properties": {
131 "coupon_count": {
132 "type": "integer",
133 "description": "Total number of coupons to be generated when coupon type is bulk"
134 },
135 "coupon_prefix": {
136 "type": "string",
137 "description": "Bulk coupon code prefix string. All coupons will be generated with this prefix."
138 },
139 "coupon_type": {
140 "type": "string",
141 "description": "The type of coupon like bulk or single.",
142 "enum": [
143 "bulk",
144 "single"
145 ]
146 }
147 }
148 },
149 "auto_apply": {
150 "type": "boolean",
151 "description": "Indicates whether the offer is automatically applied. This flag is false for coupons and true for promotions. For free-gift promotions, a false value means manual gift selection is required."
152 },
153 "application_id": {
154 "type": "string",
155 "description": "Application id through which offer was created"
156 },
157 "company_id": {
158 "type": "string",
159 "description": "Company id through which offer was created"
160 },
161 "discount_rules": {
162 "type": "array",
163 "description": "Discount rules based on which offer will be applied",
164 "maxItems": 10,
165 "items": {
166 "type": "object",
167 "properties": {
168 "discount_type": {
169 "type": "string",
170 "description": "The type of discount in offer",
171 "enum": [
172 "percentage",
173 "amount",
174 "fixed_price",
175 "fixed_unit_price",
176 "bogo",
177 "shipping_price",
178 "cashback",
179 "coupon_code",
180 "free_items",
181 "free_gift_items",
182 "free_non_sellable_items",
183 "item_based_discount",
184 "bundle"
185 ]
186 },
187 "buy_condition": {
188 "type": "string",
189 "description": "Offer buy rules in offer level"
190 },
191 "item_criteria": {
192 "type": "object",
193 "description": "Filter offer applicability",
194 "properties": {
195 "category_id": {
196 "type": "array",
197 "description": "List of category id available for offer",
198 "items": {
199 "type": "integer",
200 "format": "int32"
201 }
202 },
203 "collection_id": {
204 "type": "array",
205 "description": "List of collection id available for offer",
206 "items": {
207 "type": "string"
208 }
209 },
210 "all_items": {
211 "description": "Boolean flag determining if offer is applicable on all offers",
212 "type": "boolean"
213 },
214 "item_brand": {
215 "type": "array",
216 "description": "List of all brand ids on which promotion is applicable",
217 "items": {
218 "type": "integer",
219 "format": "int32"
220 }
221 },
222 "article_ids": {
223 "type": "array",
224 "description": "List of unique identifier of articles on which offer will be applicable",
225 "items": {
226 "type": "string"
227 }
228 },
229 "item_sku": {
230 "type": "array",
231 "description": "List of all item sku on which promotion is applicable",
232 "items": {
233 "type": "string"
234 }
235 },
236 "item_id": {
237 "type": "array",
238 "description": "List of all item ids on which offer is applicable",
239 "items": {
240 "type": "integer",
241 "format": "int32"
242 }
243 },
244 "item_l1_category": {
245 "type": "array",
246 "description": "List of all L1 category on which offer is applicable",
247 "items": {
248 "type": "integer",
249 "format": "int32",
250 "x-not-enum": true
251 }
252 },
253 "item_l2_category": {
254 "type": "array",
255 "description": "List of all L2 category on which offer is applicable",
256 "items": {
257 "type": "integer",
258 "format": "int32",
259 "x-not-enum": true
260 }
261 },
262 "item_category": {
263 "type": "array",
264 "description": "List of all L3 category on which offer is applicable",
265 "items": {
266 "type": "integer",
267 "format": "int32",
268 "x-not-enum": true
269 }
270 },
271 "item_department": {
272 "type": "array",
273 "description": "List of all departments ids on which offer is applicable",
274 "items": {
275 "type": "integer",
276 "format": "int32"
277 }
278 },
279 "item_store": {
280 "type": "array",
281 "description": "List of all item store ids on which offer is applicable",
282 "items": {
283 "type": "integer",
284 "format": "int32"
285 }
286 },
287 "item_size": {
288 "type": "array",
289 "description": "List of all item sizes on which offer is applicable",
290 "items": {
291 "type": "string"
292 }
293 },
294 "item_company": {
295 "type": "array",
296 "description": "List of all company ids on which offer is applicable",
297 "items": {
298 "type": "integer",
299 "format": "int32"
300 }
301 },
302 "item_tags": {
303 "type": "array",
304 "description": "List of all product tags on which offer is applicable",
305 "items": {
306 "type": "string"
307 }
308 },
309 "cart_quantity": {
310 "type": "object",
311 "description": "Manage operator and their value for cart rules in promotion",
312 "properties": {
313 "equals": {
314 "type": [
315 "number",
316 null
317 ],
318 "format": "float",
319 "nullable": true,
320 "description": "Nummeric value must be equal to cart level rules"
321 },
322 "greater_than": {
323 "type": [
324 "number",
325 null
326 ],
327 "format": "float",
328 "nullable": true,
329 "description": "Nummeric value must be greater than cart level rules"
330 },
331 "less_than_equals": {
332 "type": [
333 "number",
334 null
335 ],
336 "format": "float",
337 "nullable": true,
338 "description": "Nummeric value must be less than or equal to cart level rules"
339 },
340 "less_than": {
341 "type": [
342 "number",
343 null
344 ],
345 "format": "float",
346 "nullable": true,
347 "description": "Nummeric value must be less than cart level rules"
348 },
349 "greater_than_equals": {
350 "type": [
351 "number",
352 null
353 ],
354 "format": "float",
355 "nullable": true,
356 "description": "Nummeric value must be greater than or equal to cart level rules"
357 }
358 }
359 },
360 "cart_total": {
361 "type": "object",
362 "description": "Manage operator and their value for cart rules in promotion",
363 "properties": {
364 "equals": {
365 "type": [
366 "number",
367 null
368 ],
369 "format": "float",
370 "nullable": true,
371 "description": "Nummeric value must be equal to cart level rules"
372 },
373 "greater_than": {
374 "type": [
375 "number",
376 null
377 ],
378 "format": "float",
379 "nullable": true,
380 "description": "Nummeric value must be greater than cart level rules"
381 },
382 "less_than_equals": {
383 "type": [
384 "number",
385 null
386 ],
387 "format": "float",
388 "nullable": true,
389 "description": "Nummeric value must be less than or equal to cart level rules"
390 },
391 "less_than": {
392 "type": [
393 "number",
394 null
395 ],
396 "format": "float",
397 "nullable": true,
398 "description": "Nummeric value must be less than cart level rules"
399 },
400 "greater_than_equals": {
401 "type": [
402 "number",
403 null
404 ],
405 "format": "float",
406 "nullable": true,
407 "description": "Nummeric value must be greater than or equal to cart level rules"
408 }
409 }
410 },
411 "item_exclude_l1_category": {
412 "type": "array",
413 "description": "List of all L1 categories on which offer is not applicable",
414 "items": {
415 "type": "integer",
416 "format": "int32",
417 "x-not-enum": true
418 }
419 },
420 "item_exclude_l2_category": {
421 "type": "array",
422 "description": "List of all L2 categories on which offer is not applicable",
423 "items": {
424 "type": "integer",
425 "format": "int32",
426 "x-not-enum": true
427 }
428 },
429 "item_exclude_category": {
430 "type": "array",
431 "description": "List of all L3 categories on which offer is not applicable",
432 "items": {
433 "type": "integer",
434 "format": "int32",
435 "x-not-enum": true
436 }
437 },
438 "cart_unique_item_quantity": {
439 "type": "object",
440 "description": "Manage operator and their value for cart rules in promotion",
441 "properties": {
442 "equals": {
443 "type": [
444 "number",
445 null
446 ],
447 "format": "float",
448 "nullable": true,
449 "description": "Nummeric value must be equal to cart level rules"
450 },
451 "greater_than": {
452 "type": [
453 "number",
454 null
455 ],
456 "format": "float",
457 "nullable": true,
458 "description": "Nummeric value must be greater than cart level rules"
459 },
460 "less_than_equals": {
461 "type": [
462 "number",
463 null
464 ],
465 "format": "float",
466 "nullable": true,
467 "description": "Nummeric value must be less than or equal to cart level rules"
468 },
469 "less_than": {
470 "type": [
471 "number",
472 null
473 ],
474 "format": "float",
475 "nullable": true,
476 "description": "Nummeric value must be less than cart level rules"
477 },
478 "greater_than_equals": {
479 "type": [
480 "number",
481 null
482 ],
483 "format": "float",
484 "nullable": true,
485 "description": "Nummeric value must be greater than or equal to cart level rules"
486 }
487 }
488 },
489 "cart_unique_item_amount": {
490 "type": "object",
491 "description": "Manage operator and their value for cart rules in promotion",
492 "properties": {
493 "equals": {
494 "type": [
495 "number",
496 null
497 ],
498 "format": "float",
499 "nullable": true,
500 "description": "Nummeric value must be equal to cart level rules"
501 },
502 "greater_than": {
503 "type": [
504 "number",
505 null
506 ],
507 "format": "float",
508 "nullable": true,
509 "description": "Nummeric value must be greater than cart level rules"
510 },
511 "less_than_equals": {
512 "type": [
513 "number",
514 null
515 ],
516 "format": "float",
517 "nullable": true,
518 "description": "Nummeric value must be less than or equal to cart level rules"
519 },
520 "less_than": {
521 "type": [
522 "number",
523 null
524 ],
525 "format": "float",
526 "nullable": true,
527 "description": "Nummeric value must be less than cart level rules"
528 },
529 "greater_than_equals": {
530 "type": [
531 "number",
532 null
533 ],
534 "format": "float",
535 "nullable": true,
536 "description": "Nummeric value must be greater than or equal to cart level rules"
537 }
538 }
539 },
540 "item_exclude_department": {
541 "type": "array",
542 "description": "List of all department ids on which offer is not applicable",
543 "items": {
544 "type": "integer",
545 "format": "int32"
546 }
547 },
548 "item_exclude_store": {
549 "type": "array",
550 "description": "List of all item store ids on which offer is not applicable",
551 "items": {
552 "type": "integer",
553 "format": "int32"
554 }
555 },
556 "item_exclude_brand": {
557 "type": "array",
558 "description": "List of all brand ids on which offer is not applicable",
559 "items": {
560 "type": "integer",
561 "format": "int32"
562 }
563 },
564 "item_exclude_sku": {
565 "type": "array",
566 "description": "List of all item sku on which offer is not applicable",
567 "items": {
568 "type": "string"
569 }
570 },
571 "item_exclude_company": {
572 "type": "array",
573 "description": "List of all company id on which offer is not applicable",
574 "items": {
575 "type": "integer",
576 "format": "int32"
577 }
578 },
579 "available_zones": {
580 "type": "array",
581 "description": "List of all zones on which offer is applicable",
582 "items": {
583 "type": "string"
584 }
585 },
586 "item_exclude_id": {
587 "type": "array",
588 "description": "List of all item ids on which offer is not applicable",
589 "items": {
590 "type": "integer",
591 "format": "int32"
592 }
593 },
594 "buy_rules": {
595 "type": "array",
596 "description": "List of buy rules that is applicable for this offer",
597 "items": {
598 "type": "string"
599 }
600 },
601 "item_size_mapping": {
602 "type": "object",
603 "description": "Map size with product in promotion",
604 "properties": {
605 "item_size_mapping": {
606 "type": "object",
607 "description": "Item size mapping in promotion",
608 "additionalProperties": true
609 }
610 }
611 }
612 }
613 },
614 "offer": {
615 "type": "object",
616 "description": "Defines the discount details for the offer. The required fields vary dynamically based on the discount type. For example, for a percentage-based discount, the `discount_percentage` field is mandatory. For quantity-based discounts, fields such as `max_offer_quantity` or `min_offer_quantity` become mandatory.\n",
617 "properties": {
618 "max_discount_amount": {
619 "type": "number",
620 "format": "float",
621 "description": "Maximum discount amount in offer"
622 },
623 "discount_price": {
624 "type": "number",
625 "format": "float",
626 "description": "Discount price in offer"
627 },
628 "apportion_discount": {
629 "type": "boolean",
630 "description": "Flag to distribute discount for each article"
631 },
632 "partial_can_ret": {
633 "type": "boolean",
634 "description": "Flag indicated return the product partially"
635 },
636 "max_usage_per_transaction": {
637 "type": [
638 "integer",
639 null
640 ],
641 "format": "int32",
642 "nullable": true,
643 "description": "Maximum usage per transaction in offer"
644 },
645 "min_offer_quantity": {
646 "type": [
647 "integer",
648 null
649 ],
650 "format": "int32",
651 "description": "Minimum quantity of offer in offer"
652 },
653 "discount_amount": {
654 "type": "number",
655 "format": "float",
656 "description": "Discount amount in offer"
657 },
658 "discount_percentage": {
659 "type": [
660 "number",
661 null
662 ],
663 "format": "float",
664 "nullable": true,
665 "description": "Discount percentage in offer"
666 },
667 "max_offer_quantity": {
668 "type": "integer",
669 "format": "int32",
670 "description": "Maximum quantity of product in offer"
671 }
672 }
673 },
674 "is_exact": {
675 "type": "boolean",
676 "description": "Flag is true then use coupon applicable articles for calculation"
677 }
678 }
679 }
680 },
681 "buy_rules": {
682 "type": "object",
683 "description": "Contains the individual buy rules associated with the offer. The keys in this object are dynamic (e.g., 'rule#1', 'rule#2', etc.), and each key must correspond to a buy condition referenced within `discount_rules`. For example, if a discount rule includes a buy_condition '(rule#1)', then 'rule#1' must be defined in this object. Each rule key value must follow the format of OfferItemCriteria schema.\n",
684 "maxProperties": 10,
685 "additionalProperties": {
686 "type": "object",
687 "description": "Filter offer applicability",
688 "properties": {
689 "category_id": {
690 "type": "array",
691 "description": "List of category id available for offer",
692 "items": {
693 "type": "integer",
694 "format": "int32"
695 }
696 },
697 "collection_id": {
698 "type": "array",
699 "description": "List of collection id available for offer",
700 "items": {
701 "type": "string"
702 }
703 },
704 "all_items": {
705 "description": "Boolean flag determining if offer is applicable on all offers",
706 "type": "boolean"
707 },
708 "item_brand": {
709 "type": "array",
710 "description": "List of all brand ids on which promotion is applicable",
711 "items": {
712 "type": "integer",
713 "format": "int32"
714 }
715 },
716 "article_ids": {
717 "type": "array",
718 "description": "List of unique identifier of articles on which offer will be applicable",
719 "items": {
720 "type": "string"
721 }
722 },
723 "item_sku": {
724 "type": "array",
725 "description": "List of all item sku on which promotion is applicable",
726 "items": {
727 "type": "string"
728 }
729 },
730 "item_id": {
731 "type": "array",
732 "description": "List of all item ids on which offer is applicable",
733 "items": {
734 "type": "integer",
735 "format": "int32"
736 }
737 },
738 "item_l1_category": {
739 "type": "array",
740 "description": "List of all L1 category on which offer is applicable",
741 "items": {
742 "type": "integer",
743 "format": "int32",
744 "x-not-enum": true
745 }
746 },
747 "item_l2_category": {
748 "type": "array",
749 "description": "List of all L2 category on which offer is applicable",
750 "items": {
751 "type": "integer",
752 "format": "int32",
753 "x-not-enum": true
754 }
755 },
756 "item_category": {
757 "type": "array",
758 "description": "List of all L3 category on which offer is applicable",
759 "items": {
760 "type": "integer",
761 "format": "int32",
762 "x-not-enum": true
763 }
764 },
765 "item_department": {
766 "type": "array",
767 "description": "List of all departments ids on which offer is applicable",
768 "items": {
769 "type": "integer",
770 "format": "int32"
771 }
772 },
773 "item_store": {
774 "type": "array",
775 "description": "List of all item store ids on which offer is applicable",
776 "items": {
777 "type": "integer",
778 "format": "int32"
779 }
780 },
781 "item_size": {
782 "type": "array",
783 "description": "List of all item sizes on which offer is applicable",
784 "items": {
785 "type": "string"
786 }
787 },
788 "item_company": {
789 "type": "array",
790 "description": "List of all company ids on which offer is applicable",
791 "items": {
792 "type": "integer",
793 "format": "int32"
794 }
795 },
796 "item_tags": {
797 "type": "array",
798 "description": "List of all product tags on which offer is applicable",
799 "items": {
800 "type": "string"
801 }
802 },
803 "cart_quantity": {
804 "type": "object",
805 "description": "Manage operator and their value for cart rules in promotion",
806 "properties": {
807 "equals": {
808 "type": [
809 "number",
810 null
811 ],
812 "format": "float",
813 "nullable": true,
814 "description": "Nummeric value must be equal to cart level rules"
815 },
816 "greater_than": {
817 "type": [
818 "number",
819 null
820 ],
821 "format": "float",
822 "nullable": true,
823 "description": "Nummeric value must be greater than cart level rules"
824 },
825 "less_than_equals": {
826 "type": [
827 "number",
828 null
829 ],
830 "format": "float",
831 "nullable": true,
832 "description": "Nummeric value must be less than or equal to cart level rules"
833 },
834 "less_than": {
835 "type": [
836 "number",
837 null
838 ],
839 "format": "float",
840 "nullable": true,
841 "description": "Nummeric value must be less than cart level rules"
842 },
843 "greater_than_equals": {
844 "type": [
845 "number",
846 null
847 ],
848 "format": "float",
849 "nullable": true,
850 "description": "Nummeric value must be greater than or equal to cart level rules"
851 }
852 }
853 },
854 "cart_total": {
855 "type": "object",
856 "description": "Manage operator and their value for cart rules in promotion",
857 "properties": {
858 "equals": {
859 "type": [
860 "number",
861 null
862 ],
863 "format": "float",
864 "nullable": true,
865 "description": "Nummeric value must be equal to cart level rules"
866 },
867 "greater_than": {
868 "type": [
869 "number",
870 null
871 ],
872 "format": "float",
873 "nullable": true,
874 "description": "Nummeric value must be greater than cart level rules"
875 },
876 "less_than_equals": {
877 "type": [
878 "number",
879 null
880 ],
881 "format": "float",
882 "nullable": true,
883 "description": "Nummeric value must be less than or equal to cart level rules"
884 },
885 "less_than": {
886 "type": [
887 "number",
888 null
889 ],
890 "format": "float",
891 "nullable": true,
892 "description": "Nummeric value must be less than cart level rules"
893 },
894 "greater_than_equals": {
895 "type": [
896 "number",
897 null
898 ],
899 "format": "float",
900 "nullable": true,
901 "description": "Nummeric value must be greater than or equal to cart level rules"
902 }
903 }
904 },
905 "item_exclude_l1_category": {
906 "type": "array",
907 "description": "List of all L1 categories on which offer is not applicable",
908 "items": {
909 "type": "integer",
910 "format": "int32",
911 "x-not-enum": true
912 }
913 },
914 "item_exclude_l2_category": {
915 "type": "array",
916 "description": "List of all L2 categories on which offer is not applicable",
917 "items": {
918 "type": "integer",
919 "format": "int32",
920 "x-not-enum": true
921 }
922 },
923 "item_exclude_category": {
924 "type": "array",
925 "description": "List of all L3 categories on which offer is not applicable",
926 "items": {
927 "type": "integer",
928 "format": "int32",
929 "x-not-enum": true
930 }
931 },
932 "cart_unique_item_quantity": {
933 "type": "object",
934 "description": "Manage operator and their value for cart rules in promotion",
935 "properties": {
936 "equals": {
937 "type": [
938 "number",
939 null
940 ],
941 "format": "float",
942 "nullable": true,
943 "description": "Nummeric value must be equal to cart level rules"
944 },
945 "greater_than": {
946 "type": [
947 "number",
948 null
949 ],
950 "format": "float",
951 "nullable": true,
952 "description": "Nummeric value must be greater than cart level rules"
953 },
954 "less_than_equals": {
955 "type": [
956 "number",
957 null
958 ],
959 "format": "float",
960 "nullable": true,
961 "description": "Nummeric value must be less than or equal to cart level rules"
962 },
963 "less_than": {
964 "type": [
965 "number",
966 null
967 ],
968 "format": "float",
969 "nullable": true,
970 "description": "Nummeric value must be less than cart level rules"
971 },
972 "greater_than_equals": {
973 "type": [
974 "number",
975 null
976 ],
977 "format": "float",
978 "nullable": true,
979 "description": "Nummeric value must be greater than or equal to cart level rules"
980 }
981 }
982 },
983 "cart_unique_item_amount": {
984 "type": "object",
985 "description": "Manage operator and their value for cart rules in promotion",
986 "properties": {
987 "equals": {
988 "type": [
989 "number",
990 null
991 ],
992 "format": "float",
993 "nullable": true,
994 "description": "Nummeric value must be equal to cart level rules"
995 },
996 "greater_than": {
997 "type": [
998 "number",
999 null
1000 ],
1001 "format": "float",
1002 "nullable": true,
1003 "description": "Nummeric value must be greater than cart level rules"
1004 },
1005 "less_than_equals": {
1006 "type": [
1007 "number",
1008 null
1009 ],
1010 "format": "float",
1011 "nullable": true,
1012 "description": "Nummeric value must be less than or equal to cart level rules"
1013 },
1014 "less_than": {
1015 "type": [
1016 "number",
1017 null
1018 ],
1019 "format": "float",
1020 "nullable": true,
1021 "description": "Nummeric value must be less than cart level rules"
1022 },
1023 "greater_than_equals": {
1024 "type": [
1025 "number",
1026 null
1027 ],
1028 "format": "float",
1029 "nullable": true,
1030 "description": "Nummeric value must be greater than or equal to cart level rules"
1031 }
1032 }
1033 },
1034 "item_exclude_department": {
1035 "type": "array",
1036 "description": "List of all department ids on which offer is not applicable",
1037 "items": {
1038 "type": "integer",
1039 "format": "int32"
1040 }
1041 },
1042 "item_exclude_store": {
1043 "type": "array",
1044 "description": "List of all item store ids on which offer is not applicable",
1045 "items": {
1046 "type": "integer",
1047 "format": "int32"
1048 }
1049 },
1050 "item_exclude_brand": {
1051 "type": "array",
1052 "description": "List of all brand ids on which offer is not applicable",
1053 "items": {
1054 "type": "integer",
1055 "format": "int32"
1056 }
1057 },
1058 "item_exclude_sku": {
1059 "type": "array",
1060 "description": "List of all item sku on which offer is not applicable",
1061 "items": {
1062 "type": "string"
1063 }
1064 },
1065 "item_exclude_company": {
1066 "type": "array",
1067 "description": "List of all company id on which offer is not applicable",
1068 "items": {
1069 "type": "integer",
1070 "format": "int32"
1071 }
1072 },
1073 "available_zones": {
1074 "type": "array",
1075 "description": "List of all zones on which offer is applicable",
1076 "items": {
1077 "type": "string"
1078 }
1079 },
1080 "item_exclude_id": {
1081 "type": "array",
1082 "description": "List of all item ids on which offer is not applicable",
1083 "items": {
1084 "type": "integer",
1085 "format": "int32"
1086 }
1087 },
1088 "buy_rules": {
1089 "type": "array",
1090 "description": "List of buy rules that is applicable for this offer",
1091 "items": {
1092 "type": "string"
1093 }
1094 },
1095 "item_size_mapping": {
1096 "type": "object",
1097 "description": "Map size with product in promotion",
1098 "properties": {
1099 "item_size_mapping": {
1100 "type": "object",
1101 "description": "Item size mapping in promotion",
1102 "additionalProperties": true
1103 }
1104 }
1105 }
1106 }
1107 }
1108 },
1109 "restrictions": {
1110 "type": "object",
1111 "description": "Restrictions for offers to be applied",
1112 "properties": {
1113 "uses": {
1114 "type": "object",
1115 "description": "Usage restrictions",
1116 "properties": {
1117 "maximum": {
1118 "type": "object",
1119 "description": "Determines the maximum usage count of offer.",
1120 "properties": {
1121 "user": {
1122 "type": "integer",
1123 "default": 0,
1124 "description": "Determines the maximum usage count of offer per user.",
1125 "format": "int32"
1126 },
1127 "total": {
1128 "type": "integer",
1129 "default": 0,
1130 "description": "Determines the overall offer usage count.",
1131 "format": "int32"
1132 },
1133 "app": {
1134 "type": "integer",
1135 "default": 0,
1136 "description": "Determines the offer usage count associated with application id.",
1137 "format": "int32"
1138 }
1139 }
1140 },
1141 "remaining": {
1142 "type": "object",
1143 "description": "Determines the remaining usage count of offer",
1144 "properties": {
1145 "user": {
1146 "type": "integer",
1147 "default": 0,
1148 "description": "Determines the remaining usage count of offer per user.",
1149 "format": "int32"
1150 },
1151 "total": {
1152 "type": "integer",
1153 "default": 0,
1154 "description": "Determines the overall remaining offer usage count.",
1155 "format": "int32"
1156 },
1157 "app": {
1158 "type": "integer",
1159 "default": 0,
1160 "description": "Determines the remaining offer usage count associated with application id.",
1161 "format": "int32"
1162 }
1163 }
1164 }
1165 }
1166 },
1167 "post_order": {
1168 "type": "object",
1169 "description": "Post order restrictions",
1170 "properties": {
1171 "return_allowed": {
1172 "type": "boolean",
1173 "description": "Allow returns"
1174 },
1175 "cancellation_allowed": {
1176 "type": "boolean",
1177 "description": "Allow cancellations"
1178 }
1179 }
1180 },
1181 "platforms": {
1182 "type": "array",
1183 "default": [
1184 "web",
1185 "android",
1186 "ios"
1187 ],
1188 "description": "List of platform on which offer allowed like web, android",
1189 "items": {
1190 "type": "string"
1191 }
1192 },
1193 "user": {
1194 "type": "object",
1195 "description": "Filter offer user criteria",
1196 "properties": {
1197 "groups": {
1198 "type": "array",
1199 "description": "List of user group on which offer is allowed",
1200 "items": {
1201 "type": "integer",
1202 "format": "int32"
1203 }
1204 },
1205 "exclude_groups": {
1206 "type": "array",
1207 "description": "List of user groups on which offer is not allowed",
1208 "items": {
1209 "type": "integer",
1210 "format": "int32"
1211 }
1212 },
1213 "type": {
1214 "type": "string",
1215 "description": "User type of the cart user who places the order",
1216 "enum": [
1217 "all_user",
1218 "guest",
1219 "registered",
1220 "user_group"
1221 ]
1222 },
1223 "anonymous": {
1224 "type": "boolean",
1225 "description": "Set true, if offer is applicable for guest user"
1226 },
1227 "id": {
1228 "type": "array",
1229 "description": "List of user id on which offer is applicable",
1230 "items": {
1231 "type": "string"
1232 }
1233 },
1234 "email_domain": {
1235 "type": "array",
1236 "description": "List of email domain available for offer",
1237 "items": {
1238 "type": "string"
1239 }
1240 }
1241 }
1242 },
1243 "multi_store_allowed": {
1244 "type": "boolean",
1245 "default": false,
1246 "description": "Allow offer to be applied on multiple stores"
1247 },
1248 "fulfillment_options": {
1249 "type": "array",
1250 "description": "List of fulfillment options on which offer is applicable.",
1251 "items": {
1252 "type": "object",
1253 "properties": {
1254 "fulfillment_slug": {
1255 "type": "string",
1256 "description": "Fulfillment option id"
1257 },
1258 "zones": {
1259 "type": "array",
1260 "description": "List of zones ids on which offer is applicable.",
1261 "items": {
1262 "type": "string"
1263 }
1264 }
1265 }
1266 }
1267 }
1268 }
1269 },
1270 "display_meta": {
1271 "type": "object",
1272 "description": "Display meta information regarding the offer",
1273 "properties": {
1274 "description": {
1275 "description": "Detail about the offers",
1276 "type": [
1277 "string",
1278 null
1279 ],
1280 "nullable": true
1281 },
1282 "is_display": {
1283 "type": "boolean",
1284 "default": true,
1285 "description": "Coupon offer will be displayed or hidden on UI based on this flag"
1286 },
1287 "is_public": {
1288 "type": "boolean",
1289 "default": true,
1290 "description": "Determines if coupon offer is publicaly available or not"
1291 },
1292 "name": {
1293 "type": [
1294 "string",
1295 null
1296 ],
1297 "nullable": true,
1298 "description": "Name of offer that needs to display"
1299 },
1300 "offer_text": {
1301 "type": [
1302 "string",
1303 null
1304 ],
1305 "nullable": true,
1306 "description": "Promotion offer text used to display"
1307 },
1308 "offer_label": {
1309 "type": [
1310 "string",
1311 null
1312 ],
1313 "description": "Offer label of promotion that needs to display",
1314 "nullable": true
1315 },
1316 "reason": {
1317 "type": [
1318 "string",
1319 null
1320 ],
1321 "nullable": true,
1322 "description": "Reason for offer rejection"
1323 }
1324 }
1325 },
1326 "ownership": {
1327 "type": "object",
1328 "description": "Ownership details of the offer",
1329 "properties": {
1330 "payable_category": {
1331 "type": "string",
1332 "description": "Promotion amount payable category",
1333 "enum": [
1334 "fynd",
1335 "seller",
1336 "marketplace"
1337 ]
1338 },
1339 "payable_by": {
1340 "type": [
1341 "string",
1342 null
1343 ],
1344 "description": "Promotion amount bearable party",
1345 "enum": [
1346 "fynd",
1347 "seller",
1348 "marketplace",
1349 null
1350 ],
1351 "nullable": true
1352 }
1353 }
1354 },
1355 "author": {
1356 "type": "object",
1357 "description": "Author information of the offer",
1358 "properties": {
1359 "modified_by": {
1360 "type": "string",
1361 "description": "User who last modified the offer"
1362 },
1363 "rejected_by": {
1364 "type": [
1365 "string",
1366 null
1367 ],
1368 "nullable": true,
1369 "description": "User who rejected the offer"
1370 },
1371 "approved_by": {
1372 "type": [
1373 "string",
1374 null
1375 ],
1376 "nullable": true,
1377 "description": "User who approved the offer"
1378 },
1379 "created_by": {
1380 "type": "string",
1381 "description": "User who created the offer"
1382 }
1383 }
1384 },
1385 "date_meta": {
1386 "type": "object",
1387 "description": "Date metadata of the offer",
1388 "properties": {
1389 "rejected_on": {
1390 "type": [
1391 "string",
1392 null
1393 ],
1394 "format": "date-time",
1395 "nullable": true,
1396 "description": "Date when offer was rejected"
1397 },
1398 "created_on": {
1399 "type": "string",
1400 "format": "date-time",
1401 "description": "Date when offer was created"
1402 },
1403 "approved_on": {
1404 "type": [
1405 "string",
1406 null
1407 ],
1408 "format": "date-time",
1409 "nullable": true,
1410 "description": "Date when offer was approved"
1411 },
1412 "modified_on": {
1413 "type": "string",
1414 "format": "date-time",
1415 "description": "Date when offer was last modified"
1416 }
1417 }
1418 },
1419 "_schedule": {
1420 "type": "object",
1421 "description": "Schedule information of the offer",
1422 "properties": {
1423 "cron": {
1424 "type": [
1425 "string",
1426 null
1427 ],
1428 "description": "Cron expression for scheduling"
1429 },
1430 "start": {
1431 "type": "string",
1432 "format": "date-time",
1433 "description": "Start date of the offer"
1434 },
1435 "end": {
1436 "type": "string",
1437 "format": "date-time",
1438 "description": "End date of the offer"
1439 },
1440 "duration": {
1441 "type": [
1442 "integer",
1443 null
1444 ],
1445 "format": "int32",
1446 "description": "Duration of the offer in seconds"
1447 }
1448 }
1449 },
1450 "_custom_json": {
1451 "type": "object",
1452 "description": "Set extra properties in offer",
1453 "additionalProperties": true
1454 },
1455 "stackable": {
1456 "type": "boolean",
1457 "default": true,
1458 "description": "Boolean value set true to apply other promotions as well."
1459 },
1460 "type": {
1461 "type": "string",
1462 "description": "Specifies the type of offer in the system, which determines how the discount is calculated. Some types are mode-specific, for example, free_item_discount_absolute is only applicable for coupon mode and contract_price, shipping_price, free_gift_items, cashback, free_items, free_non_sellable_items, external_price_adjustment_discount are only applicable for promotion mode.",
1463 "enum": [
1464 "percentage",
1465 "amount",
1466 "bundle_price_percentage",
1467 "bundle_price_amount",
1468 "bundle_amount_percentage",
1469 "bogo",
1470 "fixed_price",
1471 "shipping_price",
1472 "free_gift_items",
1473 "free_item_discount_absolute",
1474 "bundle_discount_quantity_percentage",
1475 "item_based_discount",
1476 "ladder_price",
1477 "contract_price",
1478 "custom"
1479 ]
1480 },
1481 "priority": {
1482 "type": "integer",
1483 "format": "int32",
1484 "maximum": 100000,
1485 "default": 1,
1486 "description": "Defines the priority of the offer. Its behavior varies based on the offer type. For coupons, a higher priority value means the coupon will appear higher in the listing order. For promotions, this value determines the sequence in which promotions are evaluated and applied.\n"
1487 },
1488 "is_exclusive_coupon": {
1489 "type": "boolean",
1490 "default": false,
1491 "description": "Flag to determine if coupon is exclusive"
1492 },
1493 "apply_exclusive": {
1494 "type": [
1495 "string",
1496 null
1497 ],
1498 "description": "Offer should apply on either article or cart.",
1499 "default": "cart",
1500 "enum": [
1501 "cart",
1502 "article",
1503 null
1504 ],
1505 "nullable": true
1506 },
1507 "apply_all_discount": {
1508 "type": "boolean",
1509 "default": false,
1510 "description": "Apply all discount offers if true"
1511 },
1512 "calculate_on": {
1513 "type": "string",
1514 "description": "Article Price on which offer is calculated, like effective price or marked price. Only available for few supported types lile Contract pricing and Ladder pricing.",
1515 "default": "esp",
1516 "enum": [
1517 "mrp",
1518 "esp"
1519 ]
1520 },
1521 "promo_group": {
1522 "type": "string",
1523 "description": "The type of promotion group",
1524 "default": "product",
1525 "enum": [
1526 "cart",
1527 "product",
1528 "contract",
1529 "ladder_price",
1530 "limited_timer"
1531 ]
1532 },
1533 "currency": {
1534 "description": "Offer Currency code like INR",
1535 "type": "string"
1536 },
1537 "code": {
1538 "description": "Offer unique code",
1539 "type": "string"
1540 },
1541 "is_processed": {
1542 "type": "boolean",
1543 "description": "Flag to verify if promotion is ready to be applied on cart and ready to update promotion"
1544 },
1545 "is_bank_offer": {
1546 "type": "boolean",
1547 "default": false,
1548 "description": "Flag to determine if any bank offer is applicable"
1549 },
1550 "filter_tags": {
1551 "type": "array",
1552 "default": [],
1553 "description": "Tags used to filter offers in list APIs",
1554 "items": {
1555 "type": "string"
1556 }
1557 },
1558 "_source": {
1559 "type": "object",
1560 "description": "Source of the offer",
1561 "properties": {
1562 "type": {
1563 "type": "string",
1564 "description": "Type of the source i.e extension"
1565 },
1566 "id": {
1567 "type": "string",
1568 "description": "ID of the source i.e extension id"
1569 }
1570 }
1571 }
1572 }
1573 },
1574 "cart_id": {
1575 "type": "string",
1576 "description": "Cart id on which the offer is redeemed"
1577 },
1578 "offer_value": {
1579 "type": "number",
1580 "description": "Offer value applied on cart"
1581 }
1582 }
1583 }
1584 }
1585}
Payload Example
1