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.

Promotion

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

Events
application/promotion/create/v1
# this event is triggered when promotion is created
application/promotion/update/v1
# this event is triggered when promotion is updated

Promotion/promotion/create/v1

this event is triggered when promotion is created

Payload
Hide
application_id
array|string
Required
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
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "required": [
77 "promotion"
78 ],
79 "properties": {
80 "promotion": {
81 "type": "object",
82 "required": [
83 "display_meta",
84 "date_meta",
85 "application_id",
86 "discount_rules",
87 "currency",
88 "_schedule",
89 "restrictions",
90 "promotion_type",
91 "auto_apply",
92 "_id",
93 "buy_rules",
94 "author",
95 "promo_group"
96 ],
97 "properties": {
98 "_id": {
99 "type": "string",
100 "description": "ID of the promotion"
101 },
102 "mode": {
103 "type": "string",
104 "description": "Type of promotion. Possible values: promotion, coupon"
105 },
106 "code": {
107 "type": "string",
108 "description": "Promotion unique code"
109 },
110 "is_processed": {
111 "type": "boolean",
112 "description": "Flag to verify if promotion is ready to be applied on cart. False value denotes promotion creation is in progress, while True value denotes promotion has been created successfully"
113 },
114 "calculate_on": {
115 "type": "string",
116 "description": "Article Price on which promotion calculated like effective price or marked price. Only available for Contract pricing and Ladder pricing promotion type",
117 "enum": [
118 "mrp",
119 "esp"
120 ]
121 },
122 "author": {
123 "type": "object",
124 "required": [
125 "modified_by",
126 "created_by"
127 ],
128 "properties": {
129 "created_by": {
130 "type": "string",
131 "description": "ID of the user who created the promotion"
132 },
133 "modified_by": {
134 "type": "string",
135 "description": "ID of the user who last modified the promotion"
136 },
137 "approved_by": {
138 "type": [
139 "string",
140 "null"
141 ],
142 "description": "ID of the user who approved the promotion"
143 },
144 "rejected_by": {
145 "type": [
146 "string",
147 "null"
148 ],
149 "description": "ID of the user who rejected the promotion"
150 },
151 "reviewed_by": {
152 "type": [
153 "string",
154 "null"
155 ],
156 "description": "ID of the user who reviewed the promotion"
157 }
158 }
159 },
160 "currency": {
161 "type": "string",
162 "description": "ISO code of the currency"
163 },
164 "_schedule": {
165 "type": "object",
166 "properties": {
167 "status": {
168 "type": "string",
169 "enum": [
170 "draft",
171 "review",
172 "rejected",
173 "approved"
174 ],
175 "description": "Status of the promotion"
176 },
177 "end": {
178 "type": [
179 "string",
180 "null"
181 ],
182 "description": "Promotion validity end date"
183 },
184 "cron": {
185 "type": [
186 "string",
187 "null"
188 ]
189 },
190 "start": {
191 "type": [
192 "string",
193 "null"
194 ],
195 "description": "Promotion validity start date"
196 },
197 "duration": {
198 "type": [
199 "integer",
200 "null"
201 ]
202 },
203 "published": {
204 "type": "boolean",
205 "description": "If promotion is published or marked inactive"
206 },
207 "next_schedule": {
208 "type": "array",
209 "description": "next schedule of the promotion",
210 "items": {
211 "type": "object",
212 "required": [
213 "start"
214 ],
215 "properties": {
216 "end": {
217 "type": [
218 "string",
219 "null"
220 ],
221 "description": "end timestamp of the promotion"
222 },
223 "start": {
224 "type": [
225 "string",
226 "null"
227 ],
228 "description": "start timestamp of the promotion"
229 }
230 }
231 }
232 }
233 }
234 },
235 "buy_rules": {
236 "type": "object",
237 "description": "Rules for purchases required to apply the promotion",
238 "properties": {},
239 "additionalProperties": true
240 },
241 "date_meta": {
242 "type": "object",
243 "required": [
244 "created_on",
245 "modified_on"
246 ],
247 "description": "Date details of promotion",
248 "properties": {
249 "created_on": {
250 "type": "string",
251 "description": "Promotion creation ISOdate"
252 },
253 "modified_on": {
254 "type": "string",
255 "description": "Promotion last modified ISOdate"
256 },
257 "approved_on": {
258 "type": [
259 "string",
260 "null"
261 ],
262 "description": "Promotion approved ISOdate"
263 },
264 "rejected_on": {
265 "type": [
266 "string",
267 "null"
268 ],
269 "description": "Promotion rejected ISOdate"
270 },
271 "reviewed_on": {
272 "type": [
273 "string",
274 "null"
275 ],
276 "description": "Promotion reviewed on ISOdate"
277 }
278 }
279 },
280 "ownership": {
281 "type": "object",
282 "description": "ownership details of the promotion",
283 "required": [
284 "payable_by",
285 "payable_category"
286 ],
287 "properties": {
288 "payable_by": {
289 "type": [
290 "string",
291 "null"
292 ],
293 "description": "who pays the promotion amount"
294 },
295 "payable_category": {
296 "type": "string",
297 "description": "category of the payer amount of promotion"
298 }
299 }
300 },
301 "stackable": {
302 "type": "boolean",
303 "description": "Indicates if promotion can be applied along with another promotion"
304 },
305 "promo_group": {
306 "type": "string",
307 "description": "Promotion group. Possible values: product, cart, contract, ladder_price"
308 },
309 "visiblility": {
310 "type": "object",
311 "required": [
312 "pdp",
313 "coupon_list"
314 ],
315 "description": "visibility details of promotion",
316 "properties": {
317 "pdp": {
318 "type": "boolean",
319 "description": "Show promotion on PDP page"
320 },
321 "coupon_list": {
322 "type": "boolean",
323 "description": "Show promotions under coupon list. Used when promotion mode is coupon"
324 }
325 }
326 },
327 "display_meta": {
328 "type": "object",
329 "required": [
330 "offer_text",
331 "description",
332 "name"
333 ],
334 "description": "display details of promotion",
335 "properties": {
336 "name": {
337 "type": "string",
338 "description": "Name of promotion on Fynd Platform Panel"
339 },
340 "offer_text": {
341 "type": [
342 "string",
343 "null"
344 ],
345 "description": "Promotional offer text to be shown on PDP or Cart"
346 },
347 "description": {
348 "type": [
349 "string",
350 "null"
351 ],
352 "description": "Promotion T&C description"
353 },
354 "offer_label": {
355 "type": "string",
356 "description": "Lable of the promotion offer"
357 }
358 }
359 },
360 "restrictions": {
361 "type": "object",
362 "description": "restrictions of promotions",
363 "properties": {
364 "user_type": {
365 "type": "string",
366 "description": "User type based restriction on the promotion"
367 },
368 "email_domain": {
369 "type": "array",
370 "description": "List of email domains to restrict promotion"
371 },
372 "ordering_stores": {
373 "type": "array",
374 "description": "List of ordering stores to restrict promotion"
375 },
376 "order_quantity": {
377 "type": "integer",
378 "description": "Maximum total quantity of items a user can order using current promotion across all their orders"
379 },
380 "uses": {
381 "type": "object",
382 "required": [
383 "maximum",
384 "remaining"
385 ],
386 "properties": {
387 "maximum": {
388 "type": "object",
389 "required": [
390 "user"
391 ],
392 "properties": {
393 "user": {
394 "type": "integer",
395 "description": "Maximum usage of promotion per user"
396 },
397 "total": {
398 "type": "integer",
399 "description": "Maximum total usage of promotion"
400 }
401 },
402 "description": "Defines maximum usage of promotion"
403 },
404 "remaining": {
405 "type": "object",
406 "required": [
407 "user"
408 ],
409 "properties": {
410 "user": {
411 "type": "integer",
412 "description": "Remaining usage of promotion per user"
413 },
414 "total": {
415 "type": "integer",
416 "description": "Remaining total usage of promotion"
417 }
418 },
419 "description": "Defines total usage of promotion"
420 }
421 },
422 "description": "defines usage details of promotion"
423 },
424 "user_id": {
425 "type": "array",
426 "items": {},
427 "description": "List of only allowed user _ids for whom promotion should be applicable"
428 },
429 "payments": {
430 "type": "object",
431 "properties": {},
432 "additionalProperties": true,
433 "description": "Defines allowed payments for promotion, all if empty"
434 },
435 "platforms": {
436 "type": "array",
437 "items": [
438 {
439 "type": "string"
440 }
441 ],
442 "description": "List of device platforms on which promotion is allowed. Possible values: web, ios, android"
443 },
444 "post_order": {
445 "type": "object",
446 "required": [
447 "cancellation_allowed",
448 "return_allowed"
449 ],
450 "properties": {
451 "return_allowed": {
452 "type": "boolean",
453 "description": "Indicates whether customers can return an order purchased with promotion applied"
454 },
455 "cancellation_allowed": {
456 "type": "boolean",
457 "description": "Indicates whether customers can cancel an order purchased with promotion applied"
458 }
459 },
460 "description": "post order actions allowed after order created with promotion"
461 },
462 "user_groups": {
463 "type": "array",
464 "items": {},
465 "description": "List of user groups for whom promotion should be applicable"
466 },
467 "exclude_user_groups": {
468 "type": "array",
469 "items": {},
470 "description": "List of user groups for whom promotion should not be applicable"
471 },
472 "anonymous_users": {
473 "type": "boolean",
474 "description": "Allow anonymous users to avail this promotion"
475 },
476 "user_registered": {
477 "type": "object",
478 "properties": {
479 "end": {
480 "type": [
481 "string",
482 "null"
483 ],
484 "description": "end date of user registration"
485 },
486 "start": {
487 "type": [
488 "string",
489 "null"
490 ],
491 "description": "start date of user registration"
492 }
493 },
494 "description": "Allow promotion to be applied for users registered within specified dates"
495 }
496 }
497 },
498 "application_id": {
499 "type": "string",
500 "description": "ID of the application (sales channel) where promotion is applicable"
501 },
502 "apply_priority": {
503 "type": "integer",
504 "description": "Priority of applying a promotion. Higher value promotions are applied first"
505 },
506 "discount_rules": {
507 "type": "array",
508 "items": [
509 {
510 "type": "object",
511 "required": [
512 "discount_type",
513 "offer"
514 ],
515 "properties": {
516 "offer": {
517 "type": "object",
518 "properties": {
519 "discount_percentage": {
520 "type": "number",
521 "format": "float",
522 "description": "Percentage of the discount given"
523 },
524 "discount_amount": {
525 "type": "number",
526 "format": "float",
527 "description": "Amount of the given discount"
528 },
529 "max_offer_quantity": {
530 "nullable": true,
531 "type": [
532 "integer",
533 "null"
534 ],
535 "description": "Max offer for the given discount"
536 },
537 "min_offer_quantity": {
538 "type": "integer",
539 "description": "Min offer for the given discount"
540 },
541 "item_sequence_number": {
542 "type": "integer",
543 "description": "Cart sequence number of item for which offer is valid"
544 },
545 "discount_price": {
546 "type": "number",
547 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
548 },
549 "max_discount_amount": {
550 "type": "number",
551 "description": "Maximum discount amount in promotion"
552 },
553 "max_usage_per_transaction": {
554 "type": "integer",
555 "description": "Maximum usage per transaction in promotion"
556 },
557 "apportion_discount": {
558 "type": "boolean",
559 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
560 },
561 "partial_can_ret": {
562 "type": "boolean",
563 "description": "When true the promotion allows partial returns of items."
564 }
565 },
566 "description": "Offer given by promotion"
567 },
568 "buy_condition": {
569 "type": "string",
570 "description": "buy condition of rules for the promotion"
571 },
572 "discount_type": {
573 "type": "string",
574 "description": "type of discount by promotion"
575 },
576 "item_criteria": {
577 "type": "object",
578 "properties": {
579 "item_store": {
580 "type": "array",
581 "items": {
582 "type": "integer"
583 },
584 "description": "The unique identifier of the item store."
585 },
586 "item_id": {
587 "type": "array",
588 "items": {
589 "type": "integer"
590 },
591 "description": "The unique identifier of the item."
592 },
593 "all_items": {
594 "type": "boolean",
595 "description": "Used for attaching all products for the promotion"
596 },
597 "buy_rules": {
598 "type": "array",
599 "description": "Rules that define what a customer must buy for the promotion to apply.",
600 "items": {
601 "type": "string"
602 }
603 },
604 "item_brand": {
605 "type": "array",
606 "items": {
607 "type": "integer"
608 },
609 "description": "List of unique identifiers for brands, only items from these brands qualify for the promotion."
610 },
611 "item_company": {
612 "type": "array",
613 "items": {
614 "type": "integer"
615 },
616 "description": "List of unique identifiers for companies, only items from these companies are eligible for the promotion."
617 },
618 "item_category": {
619 "type": "array",
620 "items": {
621 "type": "integer"
622 },
623 "description": "List of unique identifiers for item categories, only items from these categories are eligible for the promotion."
624 },
625 "item_l1_category": {
626 "type": "array",
627 "items": {
628 "type": "integer"
629 },
630 "description": "List of unique identifiers for L1 categories, only items from these L1 categories are eligible for the promotion."
631 },
632 "item_l2_category": {
633 "type": "array",
634 "items": {
635 "type": "integer"
636 },
637 "description": "List of unique identifiers for L2 categories, only items from these L2 categories are eligible for the promotion."
638 },
639 "item_department": {
640 "type": "array",
641 "items": {
642 "type": "integer"
643 },
644 "description": "List of unique identifiers for department, only items from these departments are eligible for the promotion."
645 },
646 "available_zones": {
647 "type": "array",
648 "items": {
649 "type": "string"
650 },
651 "description": "List containing unique identifiers for promotion applicable zones."
652 },
653 "item_sku": {
654 "type": "array",
655 "items": {
656 "type": "string"
657 },
658 "description": "A list of all item SKUs eligible for this promotion."
659 },
660 "item_tags": {
661 "type": "array",
662 "items": {
663 "type": "string"
664 },
665 "description": "List of all product tags on which promotion is applicable"
666 },
667 "product_tags": {
668 "type": "array",
669 "items": {
670 "type": "string"
671 },
672 "description": "Product tags that qualify for the discount"
673 },
674 "item_exclude_category": {
675 "type": "array",
676 "items": {
677 "type": "integer"
678 },
679 "description": "List of all L3 category on which promotion is not applicable"
680 },
681 "item_exclude_l1_category": {
682 "type": "array",
683 "items": {
684 "type": "integer"
685 },
686 "description": "List of all item ids on which promotion is not applicable"
687 },
688 "item_exclude_l2_category": {
689 "type": "array",
690 "items": {
691 "type": "integer"
692 },
693 "description": "List of all L2 category on which promotion is not applicable"
694 },
695 "item_exclude_brand": {
696 "type": "array",
697 "items": {
698 "type": "integer"
699 },
700 "description": "List of all brands on which promotion is not applicable"
701 },
702 "item_exclude_store": {
703 "type": "array",
704 "items": {
705 "type": "integer"
706 },
707 "description": "List of all stores on which promotion is not applicable"
708 },
709 "item_exclude_sku": {
710 "type": "array",
711 "items": {
712 "type": "string"
713 },
714 "description": " List of all SKUs on which promotion is not applicable"
715 },
716 "item_exclude_company": {
717 "type": "array",
718 "items": {
719 "type": "integer"
720 },
721 "description": "List of all company id on which promotion is not applicable"
722 },
723 "item_exclude_id": {
724 "type": "array",
725 "items": {
726 "type": "integer"
727 },
728 "description": "List of all item ids on which promotion is not applicable"
729 },
730 "cart_quantity": {
731 "type": "object",
732 "properties": {
733 "equals": {
734 "type": "number",
735 "format": "float",
736 "description": "Numeric value must be equal to cart level rules"
737 },
738 "greater_than_equals": {
739 "type": "number",
740 "format": "float",
741 "description": "Numeric value must be greater than or equal to cart level rules"
742 },
743 "greater_than": {
744 "type": "number",
745 "format": "float",
746 "description": "Numeric value must be greater than to cart level rules"
747 },
748 "less_than_equals": {
749 "type": "number",
750 "format": "float",
751 "description": "Numeric value must be less than or equal to cart level rules"
752 },
753 "less_than": {
754 "type": "number",
755 "format": "float",
756 "description": "Numeric value must be less than cart level rules"
757 }
758 }
759 },
760 "cart_total": {
761 "type": "object",
762 "properties": {
763 "equals": {
764 "type": "number",
765 "format": "float",
766 "description": "Numeric value must be equal to cart level rules"
767 },
768 "greater_than_equals": {
769 "type": "number",
770 "format": "float",
771 "description": "Numeric value must be greater than or equal to cart level rules"
772 },
773 "greater_than": {
774 "type": "number",
775 "format": "float",
776 "description": "Numeric value must be greater than to cart level rules"
777 },
778 "less_than_equals": {
779 "type": "number",
780 "format": "float",
781 "description": "Numeric value must be less than or equal to cart level rules"
782 },
783 "less_than": {
784 "type": "number",
785 "format": "float",
786 "description": "Numeric value must be less than cart level rules"
787 }
788 }
789 },
790 "cart_unique_item_quantity": {
791 "type": "object",
792 "properties": {
793 "equals": {
794 "type": "number",
795 "format": "float",
796 "description": "Numeric value must be equal to cart level rules"
797 },
798 "greater_than_equals": {
799 "type": "number",
800 "format": "float",
801 "description": "Numeric value must be greater than or equal to cart level rules"
802 },
803 "greater_than": {
804 "type": "number",
805 "format": "float",
806 "description": "Numeric value must be greater than to cart level rules"
807 },
808 "less_than_equals": {
809 "type": "number",
810 "format": "float",
811 "description": "Numeric value must be less than or equal to cart level rules"
812 },
813 "less_than": {
814 "type": "number",
815 "format": "float",
816 "description": "Numeric value must be less than cart level rules"
817 }
818 }
819 },
820 "cart_unique_item_amount": {
821 "type": "object",
822 "properties": {
823 "equals": {
824 "type": "number",
825 "format": "float",
826 "description": "Numeric value must be equal to cart level rules"
827 },
828 "greater_than_equals": {
829 "type": "number",
830 "format": "float",
831 "description": "Numeric value must be greater than or equal to cart level rules"
832 },
833 "greater_than": {
834 "type": "number",
835 "format": "float",
836 "description": "Numeric value must be greater than to cart level rules"
837 },
838 "less_than_equals": {
839 "type": "number",
840 "format": "float",
841 "description": "Numeric value must be less than or equal to cart level rules"
842 },
843 "less_than": {
844 "type": "number",
845 "format": "float",
846 "description": "Numeric value must be less than cart level rules"
847 }
848 }
849 },
850 "meta": {
851 "type": "object",
852 "properties": {
853 "item_size_mapping": {
854 "type": "object",
855 "additionalProperties": {
856 "type": "array",
857 "items": {
858 "type": "string"
859 }
860 }
861 }
862 }
863 }
864 },
865 "description": "item criteria that should meet to apply the promotion"
866 },
867 "meta": {
868 "type": "object",
869 "properties": {},
870 "additionalProperties": true,
871 "description": "Meta data of the discount."
872 },
873 "max_discount_amount": {
874 "type": "number",
875 "format": "float"
876 },
877 "discount_price": {
878 "type": "number",
879 "format": "float",
880 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
881 },
882 "max_usage_per_transaction": {
883 "type": "integer",
884 "description": "Maximum usage per transaction in promotion"
885 },
886 "apportion_discount": {
887 "type": "boolean",
888 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
889 },
890 "partial_can_ret": {
891 "type": "boolean",
892 "description": "When true the promotion allows partial returns of items."
893 },
894 "code": {
895 "type": "string",
896 "description": "Unique code of promotion"
897 }
898 }
899 }
900 ],
901 "description": "Discount rules for the promotion"
902 },
903 "promotion_type": {
904 "type": "string",
905 "description": "Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom"
906 },
907 "auto_apply": {
908 "type": "boolean",
909 "description": "If promotion can be auto applied or not."
910 },
911 "apply_exclusive": {
912 "type": [
913 "string",
914 "null"
915 ],
916 "description": "If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null"
917 },
918 "post_order_action": {
919 "type": "object",
920 "properties": {
921 "action_date": {
922 "type": [
923 "string",
924 "null"
925 ],
926 "description": "action data to be used to perform "
927 },
928 "action_type": {
929 "type": [
930 "string",
931 "null"
932 ],
933 "description": "action type to be performed after order placed with promotion"
934 }
935 },
936 "description": "Details of post order action for the promotion"
937 },
938 "apply_all_discount": {
939 "type": "boolean",
940 "description": "Indicates whether multiple discount rules can be applied together or not"
941 },
942 "filter_tags": {
943 "type": "array",
944 "default": [],
945 "description": "Tags used to filter promotions in list APIs",
946 "items": {
947 "type": "string"
948 }
949 },
950 "indexed_criteria": {
951 "type": "array",
952 "items": {
953 "type": "object",
954 "description": "Internally generated key value criteria that help the system match eligible items faster."
955 }
956 },
957 "_custom_json": {
958 "type": "object"
959 },
960 "author_meta": {
961 "type": "object"
962 }
963 }
964 }
965 }
966 }
967 }
968}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "megatron.4cf2ac22-df27-446b-9110-6b4041e3c9e8"
5 ],
6 "name": "promotion",
7 "type": "create",
8 "version": "1",
9 "created_timestamp": 1711966792722,
10 "id": "mfNVsudzsKMZAWTWEncsgb8dpbemcI9OkCMBzI1ECek=",
11 "category": "application"
12 },
13 "company_id": 507,
14 "application_id": "64991b4e6d274c7422bbdf7c",
15 "contains": [
16 "promotion"
17 ],
18 "payload": {
19 "promotion": {
20 "buy_rules": {
21 "rule#1": {
22 "product_tags": [
23 "B140-50"
24 ],
25 "cart_quantity": {
26 "greater_than_equals": 2
27 },
28 "item_store": [
29 18268,
30 19641,
31 19643,
32 19644
33 ],
34 "item_brand": [
35 9
36 ]
37 }
38 },
39 "discount_rules": [
40 {
41 "item_criteria": {
42 "buy_rules": [
43 "rule#1"
44 ]
45 },
46 "discount_type": "percentage",
47 "buy_condition": "( rule#1 )",
48 "offer": {
49 "discount_percentage": 16.6666666667
50 }
51 }
52 ],
53 "ownership": {
54 "payable_by": "",
55 "payable_category": "seller"
56 },
57 "currency": "INR",
58 "mode": "promotion",
59 "is_processed": false,
60 "code": "example_code",
61 "visiblility": {
62 "coupon_list": false,
63 "pdp": true
64 },
65 "apply_all_discount": false,
66 "application_id": "64991b4e6d274c7422bbdf7c",
67 "restrictions": {
68 "uses": {
69 "remaining": {
70 "total": 0,
71 "user": 0
72 },
73 "maximum": {
74 "total": 0,
75 "user": 0
76 }
77 },
78 "email_domain": [],
79 "platforms": [
80 "web",
81 "android",
82 "ios"
83 ],
84 "user_id": [],
85 "ordering_stores": [],
86 "user_groups": [],
87 "payments": {},
88 "post_order": {
89 "return_allowed": true,
90 "cancellation_allowed": true
91 },
92 "user_registered": {
93 "start": null,
94 "end": null
95 },
96 "user_type": "all_user"
97 },
98 "display_meta": {
99 "offer_text": "Buy 1 40% Buy 2 50%",
100 "name": "Buy 1 40% Buy 2 50%",
101 "description": "<p>Buy 1 40% Buy 2 50%</p>",
102 "offer_label": "Buy 1 40% Buy 2 50%"
103 },
104 "_schedule": {
105 "published": true,
106 "next_schedule": [
107 {
108 "start": "2024-04-01T10:20:24+00:00",
109 "end": "2024-04-09T18:05:00+00:00"
110 }
111 ],
112 "end": "2024-04-09T18:05:00+00:00",
113 "cron": "",
114 "start": "2024-04-01T10:20:24+00:00",
115 "duration": 0
116 },
117 "stackable": true,
118 "promotion_type": "percentage",
119 "auto_apply": true,
120 "date_meta": {
121 "created_on": "2024-04-01T10:19:52.706137+00:00",
122 "modified_on": "2024-04-01T10:19:52.706137+00:00"
123 },
124 "apply_priority": 1,
125 "promo_group": "product",
126 "apply_exclusive": null,
127 "_id": "660a8a4841b576969e21b105",
128 "calculate_on": "esp",
129 "post_order_action": {
130 "action_type": "",
131 "action_date": null
132 },
133 "author": {
134 "created_by": "cdeebdaa330629fee38306fd",
135 "modified_by": "cdeebdaa330629fee38306fd"
136 }
137 }
138 }
139}

Promotion/promotion/update/v1

this event is triggered when promotion is updated

Payload
Hide
application_id
array|string
Required
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
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "required": [
77 "promotion"
78 ],
79 "properties": {
80 "promotion": {
81 "type": "object",
82 "required": [
83 "display_meta",
84 "date_meta",
85 "application_id",
86 "discount_rules",
87 "currency",
88 "_schedule",
89 "restrictions",
90 "promotion_type",
91 "auto_apply",
92 "_id",
93 "buy_rules",
94 "author",
95 "promo_group"
96 ],
97 "properties": {
98 "_id": {
99 "type": "string",
100 "description": "ID of the promotion"
101 },
102 "mode": {
103 "type": "string",
104 "description": "Type of promotion. Possible values: promotion, coupon"
105 },
106 "code": {
107 "type": "string",
108 "description": "Promotion unique code"
109 },
110 "is_processed": {
111 "type": "boolean",
112 "description": "Flag to verify if promotion is ready to be applied on cart. False value denotes promotion creation is in progress, while True value denotes promotion has been created successfully"
113 },
114 "calculate_on": {
115 "type": "string",
116 "description": "Article Price on which promotion calculated like effective price or marked price. Only available for Contract pricing and Ladder pricing promotion type",
117 "enum": [
118 "mrp",
119 "esp"
120 ]
121 },
122 "author": {
123 "type": "object",
124 "required": [
125 "modified_by",
126 "created_by"
127 ],
128 "properties": {
129 "created_by": {
130 "type": "string",
131 "description": "ID of the user who created the promotion"
132 },
133 "modified_by": {
134 "type": "string",
135 "description": "ID of the user who last modified the promotion"
136 },
137 "approved_by": {
138 "type": [
139 "string",
140 "null"
141 ],
142 "description": "ID of the user who approved the promotion"
143 },
144 "rejected_by": {
145 "type": [
146 "string",
147 "null"
148 ],
149 "description": "ID of the user who rejected the promotion"
150 },
151 "reviewed_by": {
152 "type": [
153 "string",
154 "null"
155 ],
156 "description": "ID of the user who reviewed the promotion"
157 }
158 }
159 },
160 "currency": {
161 "type": "string",
162 "description": "ISO code of the currency"
163 },
164 "_schedule": {
165 "type": "object",
166 "properties": {
167 "status": {
168 "type": "string",
169 "enum": [
170 "draft",
171 "review",
172 "rejected",
173 "approved"
174 ],
175 "description": "Status of the promotion"
176 },
177 "end": {
178 "type": [
179 "string",
180 "null"
181 ],
182 "description": "Promotion validity end date"
183 },
184 "cron": {
185 "type": [
186 "string",
187 "null"
188 ]
189 },
190 "start": {
191 "type": [
192 "string",
193 "null"
194 ],
195 "description": "Promotion validity start date"
196 },
197 "duration": {
198 "type": [
199 "integer",
200 "null"
201 ]
202 },
203 "published": {
204 "type": "boolean",
205 "description": "If promotion is published or marked inactive"
206 },
207 "next_schedule": {
208 "type": "array",
209 "description": "next schedule of the promotion",
210 "items": {
211 "type": "object",
212 "required": [
213 "start"
214 ],
215 "properties": {
216 "end": {
217 "type": [
218 "string",
219 "null"
220 ],
221 "description": "end timestamp of the promotion"
222 },
223 "start": {
224 "type": [
225 "string",
226 "null"
227 ],
228 "description": "start timestamp of the promotion"
229 }
230 }
231 }
232 }
233 }
234 },
235 "buy_rules": {
236 "type": "object",
237 "description": "Rules that define what a customer must buy for the promotion to apply.",
238 "properties": {},
239 "additionalProperties": true
240 },
241 "date_meta": {
242 "type": "object",
243 "required": [
244 "created_on",
245 "modified_on"
246 ],
247 "description": "Date details of promotion",
248 "properties": {
249 "created_on": {
250 "type": "string",
251 "description": "Promotion creation ISOdate"
252 },
253 "modified_on": {
254 "type": "string",
255 "description": "Promotion last modified ISOdate"
256 },
257 "approved_on": {
258 "type": [
259 "string",
260 "null"
261 ],
262 "description": "Promotion approved ISOdate"
263 },
264 "rejected_on": {
265 "type": [
266 "string",
267 "null"
268 ],
269 "description": "Promotion rejected ISOdate"
270 },
271 "reviewed_on": {
272 "type": [
273 "string",
274 "null"
275 ],
276 "description": "Promotion reviewed on ISOdate"
277 }
278 }
279 },
280 "ownership": {
281 "type": "object",
282 "description": "ownership details of the promotion",
283 "required": [
284 "payable_by",
285 "payable_category"
286 ],
287 "properties": {
288 "payable_by": {
289 "type": [
290 "string",
291 "null"
292 ],
293 "description": "who pays the promotion amount"
294 },
295 "payable_category": {
296 "type": "string",
297 "description": "category of the payer amount of promotion"
298 }
299 }
300 },
301 "stackable": {
302 "type": "boolean",
303 "description": "Indicates if promotion can be applied along with another promotion"
304 },
305 "promo_group": {
306 "type": "string",
307 "description": "Promotion group. Possible values: product, cart, contract, ladder_price"
308 },
309 "visiblility": {
310 "type": "object",
311 "required": [
312 "pdp",
313 "coupon_list"
314 ],
315 "description": "visibility details of promotion",
316 "properties": {
317 "pdp": {
318 "type": "boolean",
319 "description": "Show promotion on PDP page"
320 },
321 "coupon_list": {
322 "type": "boolean",
323 "description": "Show promotions under coupon list. Used when promotion mode is coupon"
324 }
325 }
326 },
327 "display_meta": {
328 "type": "object",
329 "required": [
330 "offer_text",
331 "description",
332 "name"
333 ],
334 "description": "display details of promotion",
335 "properties": {
336 "name": {
337 "type": "string",
338 "description": "Name of promotion on Fynd Platform Panel"
339 },
340 "offer_text": {
341 "type": [
342 "string",
343 "null"
344 ],
345 "description": "Promotional offer text to be shown on PDP or Cart"
346 },
347 "description": {
348 "type": [
349 "string",
350 "null"
351 ],
352 "description": "Promotion T&C description"
353 },
354 "offer_label": {
355 "type": "string",
356 "description": "Lable of the promotion offer"
357 }
358 }
359 },
360 "restrictions": {
361 "type": "object",
362 "description": "restrictions of promotions",
363 "properties": {
364 "user_type": {
365 "type": "string",
366 "description": "User type based restriction on the promotion"
367 },
368 "email_domain": {
369 "type": "array",
370 "description": "List of email domains to restrict promotion"
371 },
372 "ordering_stores": {
373 "type": "array",
374 "description": "List of ordering stores to restrict promotion"
375 },
376 "order_quantity": {
377 "type": "integer",
378 "description": "Maximum total quantity of items a user can order using current promotion across all their orders"
379 },
380 "uses": {
381 "type": "object",
382 "required": [
383 "maximum",
384 "remaining"
385 ],
386 "properties": {
387 "maximum": {
388 "type": "object",
389 "required": [
390 "user"
391 ],
392 "properties": {
393 "user": {
394 "type": "integer",
395 "description": "Maximum usage of promotion per user"
396 },
397 "total": {
398 "type": "integer",
399 "description": "Maximum total usage of promotion"
400 }
401 },
402 "description": "Defines maximum usage of promotion"
403 },
404 "remaining": {
405 "type": "object",
406 "required": [
407 "user"
408 ],
409 "properties": {
410 "user": {
411 "type": "integer",
412 "description": "Remaining usage of promotion per user"
413 },
414 "total": {
415 "type": "integer",
416 "description": "Remaining total usage of promotion"
417 }
418 },
419 "description": "Defines total usage of promotion"
420 }
421 },
422 "description": "defines usage details of promotion"
423 },
424 "user_id": {
425 "type": "array",
426 "items": {},
427 "description": "List of only allowed user _ids for whom promotion should be applicable"
428 },
429 "payments": {
430 "type": "object",
431 "properties": {},
432 "additionalProperties": true,
433 "description": "Defines allowed payments for promotion, all if empty"
434 },
435 "platforms": {
436 "type": "array",
437 "items": [
438 {
439 "type": "string"
440 }
441 ],
442 "description": "List of device platforms on which promotion is allowed. Possible values: web, ios, android"
443 },
444 "post_order": {
445 "type": "object",
446 "required": [
447 "cancellation_allowed",
448 "return_allowed"
449 ],
450 "properties": {
451 "return_allowed": {
452 "type": "boolean",
453 "description": "Indicates whether customers can return an order purchased with promotion applied"
454 },
455 "cancellation_allowed": {
456 "type": "boolean",
457 "description": "Indicates whether customers can cancel an order purchased with promotion applied"
458 }
459 },
460 "description": "post order actions allowed after order created with promotion"
461 },
462 "user_groups": {
463 "type": "array",
464 "items": {},
465 "description": "List of user groups for whom promotion should be applicable"
466 },
467 "exclude_user_groups": {
468 "type": "array",
469 "items": {},
470 "description": "List of user groups for whom promotion should not be applicable"
471 },
472 "anonymous_users": {
473 "type": "boolean",
474 "description": "Allow anonymous users to avail this promotion"
475 },
476 "user_registered": {
477 "type": "object",
478 "properties": {
479 "end": {
480 "type": [
481 "string",
482 "null"
483 ],
484 "description": "end date of user registration"
485 },
486 "start": {
487 "type": [
488 "string",
489 "null"
490 ],
491 "description": "start date of user registration"
492 }
493 },
494 "description": "Allow promotion to be applied for users registered within specified dates"
495 }
496 }
497 },
498 "application_id": {
499 "type": "string",
500 "description": "ID of the application (sales channel) where promotion is applicable"
501 },
502 "apply_priority": {
503 "type": "integer",
504 "description": "Priority of applying a promotion. Higher value promotions are applied first"
505 },
506 "discount_rules": {
507 "type": "array",
508 "items": [
509 {
510 "type": "object",
511 "required": [
512 "discount_type",
513 "offer"
514 ],
515 "properties": {
516 "offer": {
517 "type": "object",
518 "properties": {
519 "discount_percentage": {
520 "type": "number",
521 "format": "float",
522 "description": "Percentage of the discount given"
523 },
524 "discount_amount": {
525 "type": "number",
526 "format": "float",
527 "description": "Amount of the given discount"
528 },
529 "max_offer_quantity": {
530 "nullable": true,
531 "type": [
532 "integer",
533 "null"
534 ],
535 "description": "Max offer for the given discount"
536 },
537 "min_offer_quantity": {
538 "type": "integer",
539 "description": "Min offer for the given discount"
540 },
541 "item_sequence_number": {
542 "type": "integer",
543 "description": "Cart sequence number of item for which offer is valid"
544 },
545 "discount_price": {
546 "type": "number",
547 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions"
548 },
549 "max_discount_amount": {
550 "type": "number",
551 "description": "Maximum discount amount in promotion"
552 },
553 "max_usage_per_transaction": {
554 "type": "integer",
555 "description": "Maximum usage per transaction in promotion"
556 },
557 "apportion_discount": {
558 "type": "boolean",
559 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
560 },
561 "partial_can_ret": {
562 "type": "boolean",
563 "description": "When true the promotion allows partial returns of items."
564 }
565 },
566 "description": "Offer given by promotion"
567 },
568 "buy_condition": {
569 "type": "string",
570 "description": "buy condition of rules for the promotion"
571 },
572 "discount_type": {
573 "type": "string",
574 "description": "type of discount by promotion"
575 },
576 "item_criteria": {
577 "type": "object",
578 "properties": {
579 "item_store": {
580 "type": "array",
581 "items": {
582 "type": "integer"
583 },
584 "description": "The unique identifier of the item store."
585 },
586 "item_id": {
587 "type": "array",
588 "items": {
589 "type": "integer"
590 },
591 "description": "The unique identifier of the item."
592 },
593 "all_items": {
594 "type": "boolean",
595 "description": "Used for attaching all products for the promotion"
596 },
597 "buy_rules": {
598 "type": "array",
599 "description": "Rules for purchases required to apply the promotion",
600 "items": {
601 "type": "string"
602 }
603 },
604 "item_brand": {
605 "type": "array",
606 "items": {
607 "type": "integer"
608 },
609 "description": "List of unique identifiers for brands, only items from these brands qualify for the promotion."
610 },
611 "item_company": {
612 "type": "array",
613 "items": {
614 "type": "integer"
615 },
616 "description": "List of unique identifiers for companies, only items from these companies are eligible for the promotion."
617 },
618 "item_category": {
619 "type": "array",
620 "items": {
621 "type": "integer"
622 },
623 "description": "List of unique identifiers for item categories, only items from these categories are eligible for the promotion."
624 },
625 "item_l1_category": {
626 "type": "array",
627 "items": {
628 "type": "integer"
629 },
630 "description": "List of unique identifiers for L1 categories, only items from these L1 categories are eligible for the promotion."
631 },
632 "item_l2_category": {
633 "type": "array",
634 "items": {
635 "type": "integer"
636 },
637 "description": "List of unique identifiers for L2 categories, only items from these L2 categories are eligible for the promotion."
638 },
639 "item_department": {
640 "type": "array",
641 "items": {
642 "type": "integer"
643 },
644 "description": "List of unique identifiers for department, only items from these departments are eligible for the promotion."
645 },
646 "available_zones": {
647 "type": "array",
648 "items": {
649 "type": "string"
650 },
651 "description": "List containing unique identifiers for promotion applicable zones."
652 },
653 "item_sku": {
654 "type": "array",
655 "items": {
656 "type": "string"
657 },
658 "description": "A list of all item SKUs eligible for this promotion."
659 },
660 "item_tags": {
661 "type": "array",
662 "items": {
663 "type": "string"
664 },
665 "description": "List of item tags that must be present on the product for the promotion to apply."
666 },
667 "product_tags": {
668 "type": "array",
669 "items": {
670 "type": "string"
671 },
672 "description": "List of product tags used to decide if the promotion applies to the product."
673 },
674 "item_exclude_category": {
675 "type": "array",
676 "items": {
677 "type": "integer"
678 },
679 "description": "List of all L3 category on which promotion is not applicable"
680 },
681 "item_exclude_l1_category": {
682 "type": "array",
683 "items": {
684 "type": "integer"
685 },
686 "description": "List of all l1 category on which promotion is not applicable"
687 },
688 "item_exclude_l2_category": {
689 "type": "array",
690 "items": {
691 "type": "integer"
692 },
693 "description": "List of all L2 categoreis which promotion is not applicable"
694 },
695 "item_exclude_brand": {
696 "type": "array",
697 "items": {
698 "type": "integer"
699 },
700 "description": "List of all brands on which promotion is not applicable"
701 },
702 "item_exclude_store": {
703 "type": "array",
704 "items": {
705 "type": "integer"
706 },
707 "description": "List of all stores on which promotion is not applicable"
708 },
709 "item_exclude_sku": {
710 "type": "array",
711 "items": {
712 "type": "string"
713 },
714 "description": "List of all SKUs on which promotion is not applicable"
715 },
716 "item_exclude_company": {
717 "type": "array",
718 "items": {
719 "type": "integer"
720 },
721 "description": "List of all company id on which promotion is not applicable"
722 },
723 "item_exclude_id": {
724 "type": "array",
725 "items": {
726 "type": "integer"
727 },
728 "description": "List of all item ids on which promotion is not applicable"
729 },
730 "cart_quantity": {
731 "type": "object",
732 "properties": {
733 "equals": {
734 "type": "number",
735 "format": "float",
736 "description": "Numeric value must be equal to cart level rules"
737 },
738 "greater_than_equals": {
739 "type": "number",
740 "format": "float",
741 "description": "Numeric value must be greater than or equal to cart level rules"
742 },
743 "greater_than": {
744 "type": "number",
745 "format": "float",
746 "description": "Numeric value must be greater than to cart level rules"
747 },
748 "less_than_equals": {
749 "type": "number",
750 "format": "float",
751 "description": "Numeric value must be less than or equal to cart level rules"
752 },
753 "less_than": {
754 "type": "number",
755 "format": "float",
756 "description": "Numeric value must be less than cart level rules"
757 }
758 }
759 },
760 "cart_total": {
761 "type": "object",
762 "properties": {
763 "equals": {
764 "type": "number",
765 "format": "float",
766 "description": "Numeric value must be equal to cart level rules"
767 },
768 "greater_than_equals": {
769 "type": "number",
770 "format": "float",
771 "description": "Numeric value must be greater than or equal to cart level rules"
772 },
773 "greater_than": {
774 "type": "number",
775 "format": "float",
776 "description": "Numeric value must be greater than to cart level rules"
777 },
778 "less_than_equals": {
779 "type": "number",
780 "format": "float",
781 "description": "Numeric value must be less than or equal to cart level rules"
782 },
783 "less_than": {
784 "type": "number",
785 "format": "float",
786 "description": "Numeric value must be less than cart level rules"
787 }
788 }
789 },
790 "cart_unique_item_quantity": {
791 "type": "object",
792 "properties": {
793 "equals": {
794 "type": "number",
795 "format": "float",
796 "description": "Numeric value must be equal to cart level rules"
797 },
798 "greater_than_equals": {
799 "type": "number",
800 "format": "float",
801 "description": "Numeric value must be greater than or equal to cart level rules"
802 },
803 "greater_than": {
804 "type": "number",
805 "format": "float",
806 "description": "Numeric value must be greater than to cart level rules"
807 },
808 "less_than_equals": {
809 "type": "number",
810 "format": "float",
811 "description": "Numeric value must be less than or equal to cart level rules"
812 },
813 "less_than": {
814 "type": "number",
815 "format": "float",
816 "description": "Numeric value must be less than cart level rules"
817 }
818 }
819 },
820 "cart_unique_item_amount": {
821 "type": "object",
822 "properties": {
823 "equals": {
824 "type": "number",
825 "format": "float",
826 "description": "Numeric value must be equal to cart level rules"
827 },
828 "greater_than_equals": {
829 "type": "number",
830 "format": "float",
831 "description": "Numeric value must be greater than or equal to cart level rules"
832 },
833 "greater_than": {
834 "type": "number",
835 "format": "float",
836 "description": "Numeric value must be greater than to cart level rules"
837 },
838 "less_than_equals": {
839 "type": "number",
840 "format": "float",
841 "description": "Numeric value must be less than or equal to cart level rules"
842 },
843 "less_than": {
844 "type": "number",
845 "format": "float",
846 "description": "Numeric value must be less than cart level rules"
847 }
848 }
849 },
850 "meta": {
851 "type": "object",
852 "properties": {
853 "item_size_mapping": {
854 "type": "object",
855 "additionalProperties": {
856 "type": "array",
857 "items": {
858 "type": "string"
859 }
860 }
861 }
862 }
863 }
864 },
865 "description": "item criteria that should meet to apply the promotion"
866 },
867 "meta": {
868 "type": "object",
869 "properties": {},
870 "additionalProperties": true,
871 "description": "Meta data of the discount."
872 },
873 "max_discount_amount": {
874 "type": "number",
875 "format": "float",
876 "description": "Maximum discount amount in promotion"
877 },
878 "discount_price": {
879 "type": "number",
880 "format": "float",
881 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
882 },
883 "max_usage_per_transaction": {
884 "type": "integer",
885 "description": "Maximum usage per transaction in promotion."
886 },
887 "apportion_discount": {
888 "type": "boolean",
889 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
890 },
891 "partial_can_ret": {
892 "type": "boolean",
893 "description": "When true the promotion allows partial returns of items."
894 },
895 "code": {
896 "type": "string",
897 "description": "Unique code of promotion"
898 }
899 }
900 }
901 ],
902 "description": "Discount rules for the promotion"
903 },
904 "promotion_type": {
905 "type": "string",
906 "description": "Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom"
907 },
908 "auto_apply": {
909 "type": "boolean",
910 "description": "If promotion can be auto applied or not."
911 },
912 "apply_exclusive": {
913 "type": [
914 "string",
915 "null"
916 ],
917 "description": "If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null"
918 },
919 "post_order_action": {
920 "type": "object",
921 "properties": {
922 "action_date": {
923 "type": [
924 "string",
925 "null"
926 ],
927 "description": "action data to be used to perform "
928 },
929 "action_type": {
930 "type": [
931 "string",
932 "null"
933 ],
934 "description": "action type to be performed after order placed with promotion"
935 }
936 },
937 "description": "Details of post order action for the promotion"
938 },
939 "apply_all_discount": {
940 "type": "boolean",
941 "description": "Indicates whether multiple discount rules can be applied together or not"
942 },
943 "filter_tags": {
944 "type": "array",
945 "default": [],
946 "description": "Tags used to filter promotions in list APIs",
947 "items": {
948 "type": "string"
949 }
950 }
951 }
952 }
953 }
954 }
955 }
956}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "megatron.3285dc2a-49de-4bec-b86c-39918b2ed0f5"
5 ],
6 "name": "promotion",
7 "type": "update",
8 "version": "1",
9 "created_timestamp": 1711615911887,
10 "id": "7Fy18D99MxxCtbzaGBv4ATqlO+P7ujzPUDTGFIRt+aU=",
11 "category": "application"
12 },
13 "company_id": 6440,
14 "application_id": "657d3e74cc90c6a66842e990",
15 "contains": [
16 "promotion"
17 ],
18 "payload": {
19 "promotion": {
20 "calculate_on": "esp",
21 "is_processed": true,
22 "code": "example_code",
23 "date_meta": {
24 "modified_on": "2024-03-28T08:51:51.871778+00:00",
25 "created_on": "2024-03-28T08:50:54.397000+00:00"
26 },
27 "apply_exclusive": null,
28 "currency": "INR",
29 "restrictions": {
30 "user_registered": {
31 "start": null,
32 "end": null
33 },
34 "user_id": [],
35 "uses": {
36 "maximum": {
37 "total": 0,
38 "user": 0
39 },
40 "remaining": {
41 "total": 0,
42 "user": 0
43 }
44 },
45 "user_groups": [],
46 "user_type": "all_user",
47 "ordering_stores": [],
48 "post_order": {
49 "return_allowed": true,
50 "cancellation_allowed": true
51 },
52 "email_domain": [],
53 "platforms": [
54 "web",
55 "android",
56 "ios"
57 ],
58 "payments": {}
59 },
60 "application_id": "657d3e74cc90c6a66842e990",
61 "author": {
62 "modified_by": "c5c674ac6533f964a0b5948f",
63 "created_by": "c5c674ac6533f964a0b5948f"
64 },
65 "promotion_type": "percentage",
66 "auto_apply": true,
67 "display_meta": {
68 "name": "Test",
69 "description": "<p>Test 50</p>",
70 "offer_text": "50",
71 "offer_label": ""
72 },
73 "discount_rules": [
74 {
75 "offer": {
76 "discount_percentage": 50
77 },
78 "buy_condition": "( rule#1 )",
79 "discount_type": "percentage",
80 "item_criteria": {
81 "item_store": [
82 22754
83 ]
84 }
85 }
86 ],
87 "apply_priority": 1,
88 "_schedule": {
89 "duration": 0,
90 "next_schedule": [
91 {
92 "start": "2024-03-28T08:49:37+00:00",
93 "end": "2024-03-29T18:30:00+00:00"
94 }
95 ],
96 "start": "2024-03-28T08:49:37+00:00",
97 "end": "2024-03-29T18:30:00+00:00",
98 "cron": "",
99 "published": true
100 },
101 "promo_group": "product",
102 "mode": "promotion",
103 "ownership": {
104 "payable_category": "seller",
105 "payable_by": ""
106 },
107 "stackable": true,
108 "visiblility": {
109 "pdp": true,
110 "coupon_list": false
111 },
112 "post_order_action": {
113 "action_date": null,
114 "action_type": ""
115 },
116 "apply_all_discount": false,
117 "_id": "66052f6e59001f59ae1bec27",
118 "buy_rules": {
119 "rule#1": {
120 "cart_quantity": {
121 "greater_than": 10,
122 "equals": 10
123 }
124 },
125 "rule#2": {
126 "item_brand": [
127 7594
128 ]
129 }
130 }
131 }
132 }
133}