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
Properties
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
Properties
category
string
Required
category of the event. If it is at sales channel level or company level
created_timestamp
integer
Required
event generation timestamp in epoch milliseconds
id
string
Required
Unique ID for an event. This id can be used to verifiy if event is already processed by receiver
name
string
Required
Name of the event
trace_id
array of string
Required
internal trace_id for Fynd Platform services
type
string
Required
Type/Action of the event. e.g. create/update/delete
version
string
Required
Version of the event.
payload
object
Required
Properties
promotion
object
Required
Properties
_id
string
Required
ID of the promotion
mode
string
Type of promotion. Possible values: promotion, coupon
code
string
Promotion unique code
is_processed
boolean
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
calculate_on
string
Article Price on which promotion calculated like effective price or marked price. Only available for Contract pricing and Ladder pricing promotion type
Enum
author
object
Required
Properties
created_by
string
Required
ID of the user who created the promotion
modified_by
string
Required
ID of the user who last modified the promotion
approved_by
string|null
ID of the user who approved the promotion
rejected_by
string|null
ID of the user who rejected the promotion
reviewed_by
string|null
ID of the user who reviewed the promotion
currency
string
Required
ISO code of the currency
_schedule
object
Required
Properties
status
string
Status of the promotion
Enum
end
string|null
Promotion validity end date
cron
string|null
start
string|null
Promotion validity start date
duration
integer|null
published
boolean
If promotion is published or marked inactive
next_schedule
array of object
next schedule of the promotion
Array of Properties
end
string|null
end timestamp of the promotion
start
string|null
Required
start timestamp of the promotion
buy_rules
object
Required
Rules for purchases required to apply the promotion
date_meta
object
Required
Date details of promotion
Properties
created_on
string
Required
Promotion creation ISOdate
modified_on
string
Required
Promotion last modified ISOdate
approved_on
string|null
Promotion approved ISOdate
rejected_on
string|null
Promotion rejected ISOdate
reviewed_on
string|null
Promotion reviewed on ISOdate
ownership
object
ownership details of the promotion
Properties
payable_by
string|null
Required
who pays the promotion amount
payable_category
string
Required
category of the payer amount of promotion
stackable
boolean
Indicates if promotion can be applied along with another promotion
promo_group
string
Required
Promotion group. Possible values: product, cart, contract, ladder_price
visiblility
object
visibility details of promotion
Properties
pdp
boolean
Required
Show promotion on PDP page
coupon_list
boolean
Required
Show promotions under coupon list. Used when promotion mode is coupon
display_meta
object
Required
display details of promotion
Properties
name
string
Required
Name of promotion on Fynd Platform Panel
offer_text
string|null
Required
Promotional offer text to be shown on PDP or Cart
description
string|null
Required
Promotion T&C description
offer_label
string
Lable of the promotion offer
restrictions
object
Required
restrictions of promotions
Properties
user_type
string
User type based restriction on the promotion
email_domain
array of
List of email domains to restrict promotion
ordering_stores
array of
List of ordering stores to restrict promotion
order_quantity
integer
Maximum total quantity of items a user can order using current promotion across all their orders
uses
object
defines usage details of promotion
Properties
maximum
object
Required
Defines maximum usage of promotion
Properties
user
integer
Required
Maximum usage of promotion per user
total
integer
Maximum total usage of promotion
remaining
object
Required
Defines total usage of promotion
Properties
user
integer
Required
Remaining usage of promotion per user
total
integer
Remaining total usage of promotion
user_id
array of Undefined Type
List of only allowed user _ids for whom promotion should be applicable
payments
object
Defines allowed payments for promotion, all if empty
platforms
array of Undefined Type
List of device platforms on which promotion is allowed. Possible values: web, ios, android
post_order
object
post order actions allowed after order created with promotion
Properties
return_allowed
boolean
Required
Indicates whether customers can return an order purchased with promotion applied
cancellation_allowed
boolean
Required
Indicates whether customers can cancel an order purchased with promotion applied
user_groups
array of Undefined Type
List of user groups for whom promotion should be applicable
anonymous_users
boolean
Allow anonymous users to avail this promotion
user_registered
object
Allow promotion to be applied for users registered within specified dates
Properties
end
string|null
end date of user registration
start
string|null
start date of user registration
application_id
string
Required
ID of the application (sales channel) where promotion is applicable
apply_priority
integer
Priority of applying a promotion. Higher value promotions are applied first
discount_rules
array of Undefined Type
Required
Discount rules for the promotion
promotion_type
string
Required
Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom
auto_apply
boolean
Required
If promotion can be auto applied or not.
apply_exclusive
string|null
If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null
post_order_action
object
Details of post order action for the promotion
Properties
action_date
string|null
action data to be used to perform
action_type
string|null
action type to be performed after order placed with promotion
apply_all_discount
boolean
Indicates whether multiple discount rules can be applied together or not
indexed_criteria
array of object
_custom_json
object
author_meta
object
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 "anonymous_users": {
468 "type": "boolean",
469 "description": "Allow anonymous users to avail this promotion"
470 },
471 "user_registered": {
472 "type": "object",
473 "properties": {
474 "end": {
475 "type": [
476 "string",
477 "null"
478 ],
479 "description": "end date of user registration"
480 },
481 "start": {
482 "type": [
483 "string",
484 "null"
485 ],
486 "description": "start date of user registration"
487 }
488 },
489 "description": "Allow promotion to be applied for users registered within specified dates"
490 }
491 }
492 },
493 "application_id": {
494 "type": "string",
495 "description": "ID of the application (sales channel) where promotion is applicable"
496 },
497 "apply_priority": {
498 "type": "integer",
499 "description": "Priority of applying a promotion. Higher value promotions are applied first"
500 },
501 "discount_rules": {
502 "type": "array",
503 "items": [
504 {
505 "type": "object",
506 "required": [
507 "discount_type",
508 "offer"
509 ],
510 "properties": {
511 "offer": {
512 "type": "object",
513 "properties": {
514 "discount_percentage": {
515 "type": "number",
516 "format": "float",
517 "description": "Percentage of the discount given"
518 },
519 "discount_amount": {
520 "type": "number",
521 "format": "float",
522 "description": "Amount of the given discount"
523 },
524 "max_offer_quantity": {
525 "nullable": true,
526 "type": [
527 "integer",
528 "null"
529 ],
530 "description": "Max offer for the given discount"
531 },
532 "min_offer_quantity": {
533 "type": "integer",
534 "description": "Min offer for the given discount"
535 },
536 "item_sequence_number": {
537 "type": "integer",
538 "description": "Cart sequence number of item for which offer is valid"
539 },
540 "discount_price": {
541 "type": "number",
542 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
543 },
544 "max_discount_amount": {
545 "type": "number",
546 "description": "Maximum discount amount in promotion"
547 },
548 "max_usage_per_transaction": {
549 "type": "integer",
550 "description": "Maximum usage per transaction in promotion"
551 },
552 "apportion_discount": {
553 "type": "boolean",
554 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
555 },
556 "partial_can_ret": {
557 "type": "boolean",
558 "description": "When true the promotion allows partial returns of items."
559 }
560 },
561 "description": "Offer given by promotion"
562 },
563 "buy_condition": {
564 "type": "string",
565 "description": "buy condition of rules for the promotion"
566 },
567 "discount_type": {
568 "type": "string",
569 "description": "type of discount by promotion"
570 },
571 "item_criteria": {
572 "type": "object",
573 "properties": {
574 "item_store": {
575 "type": "array",
576 "items": {
577 "type": "integer"
578 },
579 "description": "The unique identifier of the item store."
580 },
581 "item_id": {
582 "type": "array",
583 "items": {
584 "type": "integer"
585 },
586 "description": "The unique identifier of the item."
587 },
588 "all_items": {
589 "type": "boolean",
590 "description": "Used for attaching all products for the promotion"
591 },
592 "buy_rules": {
593 "type": "array",
594 "description": "Rules that define what a customer must buy for the promotion to apply.",
595 "items": {
596 "type": "string"
597 }
598 },
599 "item_brand": {
600 "type": "array",
601 "items": {
602 "type": "integer"
603 },
604 "description": "List of unique identifiers for brands, only items from these brands qualify for the promotion."
605 },
606 "item_company": {
607 "type": "array",
608 "items": {
609 "type": "integer"
610 },
611 "description": "List of unique identifiers for companies, only items from these companies are eligible for the promotion."
612 },
613 "item_category": {
614 "type": "array",
615 "items": {
616 "type": "integer"
617 },
618 "description": "List of unique identifiers for item categories, only items from these categories are eligible for the promotion."
619 },
620 "item_l1_category": {
621 "type": "array",
622 "items": {
623 "type": "integer"
624 },
625 "description": "List of unique identifiers for L1 categories, only items from these L1 categories are eligible for the promotion."
626 },
627 "item_l2_category": {
628 "type": "array",
629 "items": {
630 "type": "integer"
631 },
632 "description": "List of unique identifiers for L2 categories, only items from these L2 categories are eligible for the promotion."
633 },
634 "item_department": {
635 "type": "array",
636 "items": {
637 "type": "integer"
638 },
639 "description": "List of unique identifiers for department, only items from these departments are eligible for the promotion."
640 },
641 "available_zones": {
642 "type": "array",
643 "items": {
644 "type": "string"
645 },
646 "description": "List containing unique identifiers for promotion applicable zones."
647 },
648 "item_sku": {
649 "type": "array",
650 "items": {
651 "type": "string"
652 },
653 "description": "A list of all item SKUs eligible for this promotion."
654 },
655 "item_tags": {
656 "type": "array",
657 "items": {
658 "type": "string"
659 },
660 "description": "List of all product tags on which promotion is applicable"
661 },
662 "product_tags": {
663 "type": "array",
664 "items": {
665 "type": "string"
666 },
667 "description": "Product tags that qualify for the discount"
668 },
669 "item_exclude_category": {
670 "type": "array",
671 "items": {
672 "type": "integer"
673 },
674 "description": "List of all L3 category on which promotion is not applicable"
675 },
676 "item_exclude_l1_category": {
677 "type": "array",
678 "items": {
679 "type": "integer"
680 },
681 "description": "List of all item ids on which promotion is not applicable"
682 },
683 "item_exclude_l2_category": {
684 "type": "array",
685 "items": {
686 "type": "integer"
687 },
688 "description": "List of all L2 category on which promotion is not applicable"
689 },
690 "item_exclude_brand": {
691 "type": "array",
692 "items": {
693 "type": "integer"
694 },
695 "description": "List of all brands on which promotion is not applicable"
696 },
697 "item_exclude_store": {
698 "type": "array",
699 "items": {
700 "type": "integer"
701 },
702 "description": "List of all stores on which promotion is not applicable"
703 },
704 "item_exclude_sku": {
705 "type": "array",
706 "items": {
707 "type": "string"
708 },
709 "description": " List of all SKUs on which promotion is not applicable"
710 },
711 "item_exclude_company": {
712 "type": "array",
713 "items": {
714 "type": "integer"
715 },
716 "description": "List of all company id on which promotion is not applicable"
717 },
718 "item_exclude_id": {
719 "type": "array",
720 "items": {
721 "type": "integer"
722 },
723 "description": "List of all item ids on which promotion is not applicable"
724 },
725 "cart_quantity": {
726 "type": "object",
727 "properties": {
728 "equals": {
729 "type": "number",
730 "format": "float",
731 "description": "Numeric value must be equal to cart level rules"
732 },
733 "greater_than_equals": {
734 "type": "number",
735 "format": "float",
736 "description": "Numeric value must be greater than or equal to cart level rules"
737 },
738 "greater_than": {
739 "type": "number",
740 "format": "float",
741 "description": "Numeric value must be greater than to cart level rules"
742 },
743 "less_than_equals": {
744 "type": "number",
745 "format": "float",
746 "description": "Numeric value must be less than or equal to cart level rules"
747 },
748 "less_than": {
749 "type": "number",
750 "format": "float",
751 "description": "Numeric value must be less than cart level rules"
752 }
753 }
754 },
755 "cart_total": {
756 "type": "object",
757 "properties": {
758 "equals": {
759 "type": "number",
760 "format": "float",
761 "description": "Numeric value must be equal to cart level rules"
762 },
763 "greater_than_equals": {
764 "type": "number",
765 "format": "float",
766 "description": "Numeric value must be greater than or equal to cart level rules"
767 },
768 "greater_than": {
769 "type": "number",
770 "format": "float",
771 "description": "Numeric value must be greater than to cart level rules"
772 },
773 "less_than_equals": {
774 "type": "number",
775 "format": "float",
776 "description": "Numeric value must be less than or equal to cart level rules"
777 },
778 "less_than": {
779 "type": "number",
780 "format": "float",
781 "description": "Numeric value must be less than cart level rules"
782 }
783 }
784 },
785 "cart_unique_item_quantity": {
786 "type": "object",
787 "properties": {
788 "equals": {
789 "type": "number",
790 "format": "float",
791 "description": "Numeric value must be equal to cart level rules"
792 },
793 "greater_than_equals": {
794 "type": "number",
795 "format": "float",
796 "description": "Numeric value must be greater than or equal to cart level rules"
797 },
798 "greater_than": {
799 "type": "number",
800 "format": "float",
801 "description": "Numeric value must be greater than to cart level rules"
802 },
803 "less_than_equals": {
804 "type": "number",
805 "format": "float",
806 "description": "Numeric value must be less than or equal to cart level rules"
807 },
808 "less_than": {
809 "type": "number",
810 "format": "float",
811 "description": "Numeric value must be less than cart level rules"
812 }
813 }
814 },
815 "cart_unique_item_amount": {
816 "type": "object",
817 "properties": {
818 "equals": {
819 "type": "number",
820 "format": "float",
821 "description": "Numeric value must be equal to cart level rules"
822 },
823 "greater_than_equals": {
824 "type": "number",
825 "format": "float",
826 "description": "Numeric value must be greater than or equal to cart level rules"
827 },
828 "greater_than": {
829 "type": "number",
830 "format": "float",
831 "description": "Numeric value must be greater than to cart level rules"
832 },
833 "less_than_equals": {
834 "type": "number",
835 "format": "float",
836 "description": "Numeric value must be less than or equal to cart level rules"
837 },
838 "less_than": {
839 "type": "number",
840 "format": "float",
841 "description": "Numeric value must be less than cart level rules"
842 }
843 }
844 },
845 "meta": {
846 "type": "object",
847 "properties": {
848 "item_size_mapping": {
849 "type": "object",
850 "additionalProperties": {
851 "type": "array",
852 "items": {
853 "type": "string"
854 }
855 }
856 }
857 }
858 }
859 },
860 "description": "item criteria that should meet to apply the promotion"
861 },
862 "meta": {
863 "type": "object",
864 "properties": {},
865 "additionalProperties": true,
866 "description": "Meta data of the discount."
867 },
868 "max_discount_amount": {
869 "type": "number",
870 "format": "float"
871 },
872 "discount_price": {
873 "type": "number",
874 "format": "float",
875 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
876 },
877 "max_usage_per_transaction": {
878 "type": "integer",
879 "description": "Maximum usage per transaction in promotion"
880 },
881 "apportion_discount": {
882 "type": "boolean",
883 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
884 },
885 "partial_can_ret": {
886 "type": "boolean",
887 "description": "When true the promotion allows partial returns of items."
888 },
889 "code": {
890 "type": "string",
891 "description": "Unique code of promotion"
892 }
893 }
894 }
895 ],
896 "description": "Discount rules for the promotion"
897 },
898 "promotion_type": {
899 "type": "string",
900 "description": "Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom"
901 },
902 "auto_apply": {
903 "type": "boolean",
904 "description": "If promotion can be auto applied or not."
905 },
906 "apply_exclusive": {
907 "type": [
908 "string",
909 "null"
910 ],
911 "description": "If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null"
912 },
913 "post_order_action": {
914 "type": "object",
915 "properties": {
916 "action_date": {
917 "type": [
918 "string",
919 "null"
920 ],
921 "description": "action data to be used to perform "
922 },
923 "action_type": {
924 "type": [
925 "string",
926 "null"
927 ],
928 "description": "action type to be performed after order placed with promotion"
929 }
930 },
931 "description": "Details of post order action for the promotion"
932 },
933 "apply_all_discount": {
934 "type": "boolean",
935 "description": "Indicates whether multiple discount rules can be applied together or not"
936 },
937 "indexed_criteria": {
938 "type": "array",
939 "items": {
940 "type": "object",
941 "description": "Internally generated key value criteria that help the system match eligible items faster."
942 }
943 },
944 "_custom_json": {
945 "type": "object"
946 },
947 "author_meta": {
948 "type": "object"
949 }
950 }
951 }
952 }
953 }
954 }
955}
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
Properties
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
Properties
category
string
Required
category of the event. If it is at sales channel level or company level
created_timestamp
integer
Required
event generation timestamp in epoch milliseconds
id
string
Required
Unique ID for an event. This id can be used to verifiy if event is already processed by receiver
name
string
Required
Name of the event
trace_id
array of string
Required
internal trace_id for Fynd Platform services
type
string
Required
Type/Action of the event. e.g. create/update/delete
version
string
Required
Version of the event.
payload
object
Required
Properties
promotion
object
Required
Properties
_id
string
Required
ID of the promotion
mode
string
Type of promotion. Possible values: promotion, coupon
code
string
Promotion unique code
is_processed
boolean
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
calculate_on
string
Article Price on which promotion calculated like effective price or marked price. Only available for Contract pricing and Ladder pricing promotion type
Enum
author
object
Required
Properties
created_by
string
Required
ID of the user who created the promotion
modified_by
string
Required
ID of the user who last modified the promotion
approved_by
string|null
ID of the user who approved the promotion
rejected_by
string|null
ID of the user who rejected the promotion
reviewed_by
string|null
ID of the user who reviewed the promotion
currency
string
Required
ISO code of the currency
_schedule
object
Required
Properties
status
string
Status of the promotion
Enum
end
string|null
Promotion validity end date
cron
string|null
start
string|null
Promotion validity start date
duration
integer|null
published
boolean
If promotion is published or marked inactive
next_schedule
array of object
next schedule of the promotion
Array of Properties
end
string|null
end timestamp of the promotion
start
string|null
Required
start timestamp of the promotion
buy_rules
object
Required
Rules that define what a customer must buy for the promotion to apply.
date_meta
object
Required
Date details of promotion
Properties
created_on
string
Required
Promotion creation ISOdate
modified_on
string
Required
Promotion last modified ISOdate
approved_on
string|null
Promotion approved ISOdate
rejected_on
string|null
Promotion rejected ISOdate
reviewed_on
string|null
Promotion reviewed on ISOdate
ownership
object
ownership details of the promotion
Properties
payable_by
string|null
Required
who pays the promotion amount
payable_category
string
Required
category of the payer amount of promotion
stackable
boolean
Indicates if promotion can be applied along with another promotion
promo_group
string
Required
Promotion group. Possible values: product, cart, contract, ladder_price
visiblility
object
visibility details of promotion
Properties
pdp
boolean
Required
Show promotion on PDP page
coupon_list
boolean
Required
Show promotions under coupon list. Used when promotion mode is coupon
display_meta
object
Required
display details of promotion
Properties
name
string
Required
Name of promotion on Fynd Platform Panel
offer_text
string|null
Required
Promotional offer text to be shown on PDP or Cart
description
string|null
Required
Promotion T&C description
offer_label
string
Lable of the promotion offer
restrictions
object
Required
restrictions of promotions
Properties
user_type
string
User type based restriction on the promotion
email_domain
array of
List of email domains to restrict promotion
ordering_stores
array of
List of ordering stores to restrict promotion
order_quantity
integer
Maximum total quantity of items a user can order using current promotion across all their orders
uses
object
defines usage details of promotion
Properties
maximum
object
Required
Defines maximum usage of promotion
Properties
user
integer
Required
Maximum usage of promotion per user
total
integer
Maximum total usage of promotion
remaining
object
Required
Defines total usage of promotion
Properties
user
integer
Required
Remaining usage of promotion per user
total
integer
Remaining total usage of promotion
user_id
array of Undefined Type
List of only allowed user _ids for whom promotion should be applicable
payments
object
Defines allowed payments for promotion, all if empty
platforms
array of Undefined Type
List of device platforms on which promotion is allowed. Possible values: web, ios, android
post_order
object
post order actions allowed after order created with promotion
Properties
return_allowed
boolean
Required
Indicates whether customers can return an order purchased with promotion applied
cancellation_allowed
boolean
Required
Indicates whether customers can cancel an order purchased with promotion applied
user_groups
array of Undefined Type
List of user groups for whom promotion should be applicable
anonymous_users
boolean
Allow anonymous users to avail this promotion
user_registered
object
Allow promotion to be applied for users registered within specified dates
Properties
end
string|null
end date of user registration
start
string|null
start date of user registration
application_id
string
Required
ID of the application (sales channel) where promotion is applicable
apply_priority
integer
Priority of applying a promotion. Higher value promotions are applied first
discount_rules
array of Undefined Type
Required
Discount rules for the promotion
promotion_type
string
Required
Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom
auto_apply
boolean
Required
If promotion can be auto applied or not.
apply_exclusive
string|null
If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null
post_order_action
object
Details of post order action for the promotion
Properties
action_date
string|null
action data to be used to perform
action_type
string|null
action type to be performed after order placed with promotion
apply_all_discount
boolean
Indicates whether multiple discount rules can be applied together or not
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 "anonymous_users": {
468 "type": "boolean",
469 "description": "Allow anonymous users to avail this promotion"
470 },
471 "user_registered": {
472 "type": "object",
473 "properties": {
474 "end": {
475 "type": [
476 "string",
477 "null"
478 ],
479 "description": "end date of user registration"
480 },
481 "start": {
482 "type": [
483 "string",
484 "null"
485 ],
486 "description": "start date of user registration"
487 }
488 },
489 "description": "Allow promotion to be applied for users registered within specified dates"
490 }
491 }
492 },
493 "application_id": {
494 "type": "string",
495 "description": "ID of the application (sales channel) where promotion is applicable"
496 },
497 "apply_priority": {
498 "type": "integer",
499 "description": "Priority of applying a promotion. Higher value promotions are applied first"
500 },
501 "discount_rules": {
502 "type": "array",
503 "items": [
504 {
505 "type": "object",
506 "required": [
507 "discount_type",
508 "offer"
509 ],
510 "properties": {
511 "offer": {
512 "type": "object",
513 "properties": {
514 "discount_percentage": {
515 "type": "number",
516 "format": "float",
517 "description": "Percentage of the discount given"
518 },
519 "discount_amount": {
520 "type": "number",
521 "format": "float",
522 "description": "Amount of the given discount"
523 },
524 "max_offer_quantity": {
525 "nullable": true,
526 "type": [
527 "integer",
528 "null"
529 ],
530 "description": "Max offer for the given discount"
531 },
532 "min_offer_quantity": {
533 "type": "integer",
534 "description": "Min offer for the given discount"
535 },
536 "item_sequence_number": {
537 "type": "integer",
538 "description": "Cart sequence number of item for which offer is valid"
539 },
540 "discount_price": {
541 "type": "number",
542 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions"
543 },
544 "max_discount_amount": {
545 "type": "number",
546 "description": "Maximum discount amount in promotion"
547 },
548 "max_usage_per_transaction": {
549 "type": "integer",
550 "description": "Maximum usage per transaction in promotion"
551 },
552 "apportion_discount": {
553 "type": "boolean",
554 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
555 },
556 "partial_can_ret": {
557 "type": "boolean",
558 "description": "When true the promotion allows partial returns of items."
559 }
560 },
561 "description": "Offer given by promotion"
562 },
563 "buy_condition": {
564 "type": "string",
565 "description": "buy condition of rules for the promotion"
566 },
567 "discount_type": {
568 "type": "string",
569 "description": "type of discount by promotion"
570 },
571 "item_criteria": {
572 "type": "object",
573 "properties": {
574 "item_store": {
575 "type": "array",
576 "items": {
577 "type": "integer"
578 },
579 "description": "The unique identifier of the item store."
580 },
581 "item_id": {
582 "type": "array",
583 "items": {
584 "type": "integer"
585 },
586 "description": "The unique identifier of the item."
587 },
588 "all_items": {
589 "type": "boolean",
590 "description": "Used for attaching all products for the promotion"
591 },
592 "buy_rules": {
593 "type": "array",
594 "description": "Rules for purchases required to apply the promotion",
595 "items": {
596 "type": "string"
597 }
598 },
599 "item_brand": {
600 "type": "array",
601 "items": {
602 "type": "integer"
603 },
604 "description": "List of unique identifiers for brands, only items from these brands qualify for the promotion."
605 },
606 "item_company": {
607 "type": "array",
608 "items": {
609 "type": "integer"
610 },
611 "description": "List of unique identifiers for companies, only items from these companies are eligible for the promotion."
612 },
613 "item_category": {
614 "type": "array",
615 "items": {
616 "type": "integer"
617 },
618 "description": "List of unique identifiers for item categories, only items from these categories are eligible for the promotion."
619 },
620 "item_l1_category": {
621 "type": "array",
622 "items": {
623 "type": "integer"
624 },
625 "description": "List of unique identifiers for L1 categories, only items from these L1 categories are eligible for the promotion."
626 },
627 "item_l2_category": {
628 "type": "array",
629 "items": {
630 "type": "integer"
631 },
632 "description": "List of unique identifiers for L2 categories, only items from these L2 categories are eligible for the promotion."
633 },
634 "item_department": {
635 "type": "array",
636 "items": {
637 "type": "integer"
638 },
639 "description": "List of unique identifiers for department, only items from these departments are eligible for the promotion."
640 },
641 "available_zones": {
642 "type": "array",
643 "items": {
644 "type": "string"
645 },
646 "description": "List containing unique identifiers for promotion applicable zones."
647 },
648 "item_sku": {
649 "type": "array",
650 "items": {
651 "type": "string"
652 },
653 "description": "A list of all item SKUs eligible for this promotion."
654 },
655 "item_tags": {
656 "type": "array",
657 "items": {
658 "type": "string"
659 },
660 "description": "List of item tags that must be present on the product for the promotion to apply."
661 },
662 "product_tags": {
663 "type": "array",
664 "items": {
665 "type": "string"
666 },
667 "description": "List of product tags used to decide if the promotion applies to the product."
668 },
669 "item_exclude_category": {
670 "type": "array",
671 "items": {
672 "type": "integer"
673 },
674 "description": "List of all L3 category on which promotion is not applicable"
675 },
676 "item_exclude_l1_category": {
677 "type": "array",
678 "items": {
679 "type": "integer"
680 },
681 "description": "List of all l1 category on which promotion is not applicable"
682 },
683 "item_exclude_l2_category": {
684 "type": "array",
685 "items": {
686 "type": "integer"
687 },
688 "description": "List of all L2 categoreis which promotion is not applicable"
689 },
690 "item_exclude_brand": {
691 "type": "array",
692 "items": {
693 "type": "integer"
694 },
695 "description": "List of all brands on which promotion is not applicable"
696 },
697 "item_exclude_store": {
698 "type": "array",
699 "items": {
700 "type": "integer"
701 },
702 "description": "List of all stores on which promotion is not applicable"
703 },
704 "item_exclude_sku": {
705 "type": "array",
706 "items": {
707 "type": "string"
708 },
709 "description": "List of all SKUs on which promotion is not applicable"
710 },
711 "item_exclude_company": {
712 "type": "array",
713 "items": {
714 "type": "integer"
715 },
716 "description": "List of all company id on which promotion is not applicable"
717 },
718 "item_exclude_id": {
719 "type": "array",
720 "items": {
721 "type": "integer"
722 },
723 "description": "List of all item ids on which promotion is not applicable"
724 },
725 "cart_quantity": {
726 "type": "object",
727 "properties": {
728 "equals": {
729 "type": "number",
730 "format": "float",
731 "description": "Numeric value must be equal to cart level rules"
732 },
733 "greater_than_equals": {
734 "type": "number",
735 "format": "float",
736 "description": "Numeric value must be greater than or equal to cart level rules"
737 },
738 "greater_than": {
739 "type": "number",
740 "format": "float",
741 "description": "Numeric value must be greater than to cart level rules"
742 },
743 "less_than_equals": {
744 "type": "number",
745 "format": "float",
746 "description": "Numeric value must be less than or equal to cart level rules"
747 },
748 "less_than": {
749 "type": "number",
750 "format": "float",
751 "description": "Numeric value must be less than cart level rules"
752 }
753 }
754 },
755 "cart_total": {
756 "type": "object",
757 "properties": {
758 "equals": {
759 "type": "number",
760 "format": "float",
761 "description": "Numeric value must be equal to cart level rules"
762 },
763 "greater_than_equals": {
764 "type": "number",
765 "format": "float",
766 "description": "Numeric value must be greater than or equal to cart level rules"
767 },
768 "greater_than": {
769 "type": "number",
770 "format": "float",
771 "description": "Numeric value must be greater than to cart level rules"
772 },
773 "less_than_equals": {
774 "type": "number",
775 "format": "float",
776 "description": "Numeric value must be less than or equal to cart level rules"
777 },
778 "less_than": {
779 "type": "number",
780 "format": "float",
781 "description": "Numeric value must be less than cart level rules"
782 }
783 }
784 },
785 "cart_unique_item_quantity": {
786 "type": "object",
787 "properties": {
788 "equals": {
789 "type": "number",
790 "format": "float",
791 "description": "Numeric value must be equal to cart level rules"
792 },
793 "greater_than_equals": {
794 "type": "number",
795 "format": "float",
796 "description": "Numeric value must be greater than or equal to cart level rules"
797 },
798 "greater_than": {
799 "type": "number",
800 "format": "float",
801 "description": "Numeric value must be greater than to cart level rules"
802 },
803 "less_than_equals": {
804 "type": "number",
805 "format": "float",
806 "description": "Numeric value must be less than or equal to cart level rules"
807 },
808 "less_than": {
809 "type": "number",
810 "format": "float",
811 "description": "Numeric value must be less than cart level rules"
812 }
813 }
814 },
815 "cart_unique_item_amount": {
816 "type": "object",
817 "properties": {
818 "equals": {
819 "type": "number",
820 "format": "float",
821 "description": "Numeric value must be equal to cart level rules"
822 },
823 "greater_than_equals": {
824 "type": "number",
825 "format": "float",
826 "description": "Numeric value must be greater than or equal to cart level rules"
827 },
828 "greater_than": {
829 "type": "number",
830 "format": "float",
831 "description": "Numeric value must be greater than to cart level rules"
832 },
833 "less_than_equals": {
834 "type": "number",
835 "format": "float",
836 "description": "Numeric value must be less than or equal to cart level rules"
837 },
838 "less_than": {
839 "type": "number",
840 "format": "float",
841 "description": "Numeric value must be less than cart level rules"
842 }
843 }
844 },
845 "meta": {
846 "type": "object",
847 "properties": {
848 "item_size_mapping": {
849 "type": "object",
850 "additionalProperties": {
851 "type": "array",
852 "items": {
853 "type": "string"
854 }
855 }
856 }
857 }
858 }
859 },
860 "description": "item criteria that should meet to apply the promotion"
861 },
862 "meta": {
863 "type": "object",
864 "properties": {},
865 "additionalProperties": true,
866 "description": "Meta data of the discount."
867 },
868 "max_discount_amount": {
869 "type": "number",
870 "format": "float",
871 "description": "Maximum discount amount in promotion"
872 },
873 "discount_price": {
874 "type": "number",
875 "format": "float",
876 "description": "Final item price the customer pays after subtracting the promotion’s discount amount — used only for fixed price promotions."
877 },
878 "max_usage_per_transaction": {
879 "type": "integer",
880 "description": "Maximum usage per transaction in promotion."
881 },
882 "apportion_discount": {
883 "type": "boolean",
884 "description": "When true, the promotion distributes the total discount proportionally across all eligible items."
885 },
886 "partial_can_ret": {
887 "type": "boolean",
888 "description": "When true the promotion allows partial returns of items."
889 },
890 "code": {
891 "type": "string",
892 "description": "Unique code of promotion"
893 }
894 }
895 }
896 ],
897 "description": "Discount rules for the promotion"
898 },
899 "promotion_type": {
900 "type": "string",
901 "description": "Promotion Type. Possible values: percentage, amount, fixed_price, bogo, contract_price, ladder_price, custom"
902 },
903 "auto_apply": {
904 "type": "boolean",
905 "description": "If promotion can be auto applied or not."
906 },
907 "apply_exclusive": {
908 "type": [
909 "string",
910 "null"
911 ],
912 "description": "If allowed, any other promotion after current promotion is applied. Possible values: article, cart, null"
913 },
914 "post_order_action": {
915 "type": "object",
916 "properties": {
917 "action_date": {
918 "type": [
919 "string",
920 "null"
921 ],
922 "description": "action data to be used to perform "
923 },
924 "action_type": {
925 "type": [
926 "string",
927 "null"
928 ],
929 "description": "action type to be performed after order placed with promotion"
930 }
931 },
932 "description": "Details of post order action for the promotion"
933 },
934 "apply_all_discount": {
935 "type": "boolean",
936 "description": "Indicates whether multiple discount rules can be applied together or not"
937 }
938 }
939 }
940 }
941 }
942 }
943}
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}