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.

Coupon

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

Events
application/coupon/create/v1
# this event is triggered when coupon is created
application/coupon/update/v1
# this event is triggered when coupon is updated
application/coupon/redeem/v1
# this event is triggered when coupon is redeemed

Coupon/coupon/create/v1

this event is triggered when coupon is created

Payload
Properties
This event is triggered when coupon is created.
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
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
The payload data of event.
Properties
coupon
object
Required
Coupon date consisting data like code and coupon fields.
Properties
action
object
action details of coupon
Properties
action_date
null|string
Required
action date to start coupon actions required in case of txn_mode is not coupon
txn_mode
string
Required
txn mode of the coupon like coupon
author
object
Required
author details of the coupon
Properties
created_by
string
Nullable
Required
user id by whom the coupon created
modified_by
string
Nullable
Required
user id by whom the coupon modified
rejected_by
string|null
Nullable
The user id of user, who has rejected the coupon
approved_by
string|null
Nullable
The user id of user, who has approved the coupon
reviewed_by
string|null
Nullable
The user id of user who has reviewed the coupon.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
code
string
Required
Coupon unique code
date_meta
object
Required
date details of coupon
Properties
created_on
string|null
Timestamp on which the coupon was created
modified_on
string|null
Timestamp on which the coupon was modified
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
display_meta
object
Required
display details of the coupon
Properties
apply
object
apply message details of the coupon
Properties
subtitle
string
Required
apply message subtitle of the coupon
title
string
Required
title message of the coupon
auto
object
auto apply details of the coupon
Properties
subtitle
string
Required
auto apply subtitle of the coupon
title
string
Required
auto apply title of the coupon
description
string
Description of the coupon
remove
object
Remove details of the coupon
Properties
subtitle
string
Required
remove subtitle of the coupon
title
string
Required
remove title of the coupon
subtitle
string
subtitle of the coupon
title
string
title of the coupon
identifiers
object
Required
condition fields of the coupon
Properties
exclude_brand_id
array of integer
This brand ids will be excluded while applying coupon.
brand_id
array of integer
The brand ids on which coupon will be applied.
item_id
array of integer
The item ids on which coupon will be applied.
company_id
array of integer
The company ids on which coupon will be applied.
article_id
array of integer
The article ids on which coupon will be applied.
store_id
array of integer
The store ids on which coupon will be applied.
collection_id
array of string
Coupon will be applied on mentioned collection ids products.
category_id
array of integer
The category ids on which coupon will be applied.
user_id
array of string
The user ids for which this coupon will be usable.
ownership
object
Required
Ownership details of the coupon
Properties
payable_by
string
Required
user id for who will pay the amount discounted by coupon
payable_category
string
Required
user category for who will pay the amount discounted by coupon
restrictions
object
Required
Restrictions for coupon usage.
Properties
user_type
string
Type of the users allowed to use coupon ex. all_users, registered, guests etc.
bulk_bundle
object
Properties
multi_store_allowed
boolean
Multiple store allowed in bulk bundle coupon or not
coupon_allowed
boolean
Whether normal coupons can be applied if bulk coupon is used.
ordering_stores
array of integer
Ordering stores for which coupon is restricted.
platforms
array of string
Required
platforms on which coupon is applicable like web, android, ios
post_order
object
Required
restrictions after the order is placed
Properties
return_allowed
boolean
Required
return is allowed or not on order on which the coupon is applied
cancellation_allowed
boolean
Required
cancellation is allowed or not on order on which the coupon is applied
price_range
object
price range for the coupon
Properties
max
number
Required
max price range of cart.
min
number
Required
min price range of cart.
uses
object
Required
Maximum and remaining usage count for coupon used by user
Properties
maximum
object
Required
Properties
app
number
Total number of times the coupon can be used in the app.
Default Value : -1
total
number
Total number of times per user the coupon can be applied
Default Value : -1
user
number
Maximum number of times per user the coupon can be applied
Default Value : -1
remaining
object
Required
Remaining coupon usage counts.
Properties
app
number
Remaining number of times the coupon can be used in the app.
Default Value : -1
total
number
total number of times the coupon applied and order placed
Default Value : -1
user
number
Uses done by the customer for the coupon
Default Value : -1
rule
array of Undefined Type
Required
Rules to be applied on coupon code i.e payment restriction, cart value, etc.
rule_definition
object
Required
rule defination of the coupon
Properties
applicable_on
string
Required
On which the coupon is applicable like quantity, amount etc.
auto_apply
boolean
Required
If coupon can be auto applied or not.
calculate_on
string
Required
product field on which the coupon calculation happens like esp or mrp
currency_code
string
Required
currency code
is_exact
boolean
Required
scope
array of string
Required
type
string
Required
Display type of the coupon
value_type
string
Required
Exact type of the coupon
state
object
Required
current state of the coupon
Properties
is_archived
boolean
Required
Defines coupon is active or not
is_display
boolean
Required
Defines coupon to be displayed in coupon list
is_public
boolean
Required
Defines if the coupon is public or not
tags
array of Undefined Type
Required
Identify a coupon through tags
type_slug
string
Required
coupon type
validation
object
Required
Coupon validations
Properties
anonymous
boolean
coupon applicable to anonymous user or not
app_id
array of Undefined Type
Required
application/sales channel for which the coupon is created
user_registered_after
null|string
Required
If coupon is for registered user then after which date user is registered on that coupon will apply
validity
object
Required
validity of the coupon
Properties
priority
number
Required
priority of the coupon
_schedule
object
Required
schedule of the coupon
Properties
cron
null|string
cron string of the coupon, if coupon is created periodically
duration
null|number
For how much time coupon can be active
end
null|string
When should coupon should stop applying to user
next_schedule
array of object
Array of Properties
start
null|string
Required
start time of the coupon to be live
end
null|string
Required
end time of the coupon to be live
status
string
Status of the coupon.
Enum
start
null|string
coupon_type
string
Type of the coupon.
Enum
is_exclusive_coupon
boolean
If this coupon is exclusive, no other promotions can be applied.
coupon_prefix
string
Prefix added at the start of every bulk generated coupon code.
coupon_counts
integer
Number of coupon codes to generate for bulk coupon creation defaults to 1 for single coupons.
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when coupon is created.",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "internal trace_id for Fynd Platform services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "coupon"
81 ],
82 "properties": {
83 "coupon": {
84 "type": "object",
85 "description": "Coupon date consisting data like code and coupon fields.",
86 "required": [
87 "author",
88 "code",
89 "date_meta",
90 "display_meta",
91 "identifiers",
92 "ownership",
93 "restrictions",
94 "rule",
95 "rule_definition",
96 "state",
97 "tags",
98 "type_slug",
99 "validation",
100 "validity",
101 "_schedule"
102 ],
103 "properties": {
104 "action": {
105 "type": "object",
106 "required": [
107 "action_date",
108 "txn_mode"
109 ],
110 "properties": {
111 "action_date": {
112 "type": [
113 "null",
114 "string"
115 ],
116 "description": "action date to start coupon actions required in case of txn_mode is not coupon"
117 },
118 "txn_mode": {
119 "type": "string",
120 "description": "txn mode of the coupon like coupon"
121 }
122 },
123 "description": "action details of coupon"
124 },
125 "author": {
126 "type": "object",
127 "additionalProperties": true,
128 "required": [
129 "modified_by",
130 "created_by"
131 ],
132 "properties": {
133 "created_by": {
134 "type": "string",
135 "description": "user id by whom the coupon created",
136 "nullable": true
137 },
138 "modified_by": {
139 "type": "string",
140 "description": "user id by whom the coupon modified",
141 "nullable": true
142 },
143 "rejected_by": {
144 "type": [
145 "string",
146 "null"
147 ],
148 "description": "The user id of user, who has rejected the coupon",
149 "nullable": true
150 },
151 "approved_by": {
152 "type": [
153 "string",
154 "null"
155 ],
156 "description": "The user id of user, who has approved the coupon",
157 "nullable": true
158 },
159 "reviewed_by": {
160 "type": [
161 "string",
162 "null"
163 ],
164 "description": "The user id of user who has reviewed the coupon.",
165 "nullable": true
166 }
167 },
168 "description": "author details of the coupon"
169 },
170 "code": {
171 "type": "string",
172 "description": "Coupon unique code"
173 },
174 "date_meta": {
175 "type": "object",
176 "additionalProperties": true,
177 "properties": {
178 "created_on": {
179 "type": [
180 "string",
181 "null"
182 ],
183 "description": "Timestamp on which the coupon was created"
184 },
185 "modified_on": {
186 "type": [
187 "string",
188 "null"
189 ],
190 "description": "Timestamp on which the coupon was modified"
191 }
192 },
193 "description": "date details of coupon"
194 },
195 "display_meta": {
196 "type": "object",
197 "required": [],
198 "properties": {
199 "apply": {
200 "type": "object",
201 "required": [
202 "title",
203 "subtitle"
204 ],
205 "properties": {
206 "subtitle": {
207 "type": "string",
208 "description": "apply message subtitle of the coupon"
209 },
210 "title": {
211 "type": "string",
212 "description": "title message of the coupon"
213 }
214 },
215 "description": "apply message details of the coupon"
216 },
217 "auto": {
218 "type": "object",
219 "required": [
220 "title",
221 "subtitle"
222 ],
223 "properties": {
224 "subtitle": {
225 "type": "string",
226 "description": "auto apply subtitle of the coupon"
227 },
228 "title": {
229 "type": "string",
230 "description": "auto apply title of the coupon"
231 }
232 },
233 "description": "auto apply details of the coupon"
234 },
235 "description": {
236 "type": "string",
237 "description": "Description of the coupon"
238 },
239 "remove": {
240 "type": "object",
241 "required": [
242 "title",
243 "subtitle"
244 ],
245 "properties": {
246 "subtitle": {
247 "type": "string",
248 "description": "remove subtitle of the coupon"
249 },
250 "title": {
251 "type": "string",
252 "description": "remove title of the coupon"
253 }
254 },
255 "description": "Remove details of the coupon"
256 },
257 "subtitle": {
258 "type": "string",
259 "description": "subtitle of the coupon"
260 },
261 "title": {
262 "type": "string",
263 "description": "title of the coupon"
264 }
265 },
266 "description": "display details of the coupon"
267 },
268 "identifiers": {
269 "type": "object",
270 "required": [],
271 "properties": {
272 "exclude_brand_id": {
273 "type": "array",
274 "description": "This brand ids will be excluded while applying coupon.",
275 "items": {
276 "type": "integer"
277 }
278 },
279 "brand_id": {
280 "type": "array",
281 "description": "The brand ids on which coupon will be applied.",
282 "items": {
283 "type": "integer"
284 }
285 },
286 "item_id": {
287 "type": "array",
288 "description": "The item ids on which coupon will be applied.",
289 "items": {
290 "type": "integer"
291 }
292 },
293 "company_id": {
294 "type": "array",
295 "description": "The company ids on which coupon will be applied.",
296 "items": {
297 "type": "integer"
298 }
299 },
300 "article_id": {
301 "type": "array",
302 "description": "The article ids on which coupon will be applied.",
303 "items": {
304 "type": "integer"
305 }
306 },
307 "store_id": {
308 "type": "array",
309 "description": "The store ids on which coupon will be applied.",
310 "items": {
311 "type": "integer"
312 }
313 },
314 "collection_id": {
315 "type": "array",
316 "description": "Coupon will be applied on mentioned collection ids products.",
317 "items": {
318 "type": "string"
319 }
320 },
321 "category_id": {
322 "type": "array",
323 "description": "The category ids on which coupon will be applied.",
324 "items": {
325 "type": "integer"
326 }
327 },
328 "user_id": {
329 "type": "array",
330 "description": "The user ids for which this coupon will be usable.",
331 "items": {
332 "type": "string"
333 }
334 }
335 },
336 "description": "condition fields of the coupon"
337 },
338 "ownership": {
339 "type": "object",
340 "required": [
341 "payable_by",
342 "payable_category"
343 ],
344 "properties": {
345 "payable_by": {
346 "type": "string",
347 "description": "user id for who will pay the amount discounted by coupon"
348 },
349 "payable_category": {
350 "type": "string",
351 "description": "user category for who will pay the amount discounted by coupon"
352 }
353 },
354 "description": "Ownership details of the coupon"
355 },
356 "restrictions": {
357 "type": "object",
358 "required": [
359 "platforms",
360 "post_order",
361 "uses"
362 ],
363 "properties": {
364 "user_type": {
365 "type": "string",
366 "description": "Type of the users allowed to use coupon ex. all_users, registered, guests etc."
367 },
368 "bulk_bundle": {
369 "type": "object",
370 "properties": {
371 "multi_store_allowed": {
372 "type": "boolean",
373 "description": "Multiple store allowed in bulk bundle coupon or not"
374 }
375 }
376 },
377 "coupon_allowed": {
378 "type": "boolean",
379 "description": "Whether normal coupons can be applied if bulk coupon is used."
380 },
381 "ordering_stores": {
382 "type": "array",
383 "items": {
384 "type": "integer"
385 },
386 "description": "Ordering stores for which coupon is restricted."
387 },
388 "platforms": {
389 "type": "array",
390 "items": {
391 "type": "string"
392 },
393 "description": "platforms on which coupon is applicable like web, android, ios"
394 },
395 "post_order": {
396 "type": "object",
397 "required": [
398 "cancellation_allowed",
399 "return_allowed"
400 ],
401 "properties": {
402 "return_allowed": {
403 "type": "boolean",
404 "description": "return is allowed or not on order on which the coupon is applied"
405 },
406 "cancellation_allowed": {
407 "type": "boolean",
408 "description": "cancellation is allowed or not on order on which the coupon is applied"
409 }
410 },
411 "description": "restrictions after the order is placed"
412 },
413 "price_range": {
414 "type": "object",
415 "required": [
416 "max",
417 "min"
418 ],
419 "properties": {
420 "max": {
421 "type": "number",
422 "description": "max price range of cart."
423 },
424 "min": {
425 "type": "number",
426 "description": "min price range of cart."
427 }
428 },
429 "description": "price range for the coupon"
430 },
431 "uses": {
432 "type": "object",
433 "description": "Maximum and remaining usage count for coupon used by user",
434 "required": [
435 "maximum",
436 "remaining"
437 ],
438 "properties": {
439 "maximum": {
440 "type": "object",
441 "properties": {
442 "app": {
443 "type": "number",
444 "default": -1,
445 "description": "Total number of times the coupon can be used in the app."
446 },
447 "total": {
448 "type": "number",
449 "default": -1,
450 "description": "Total number of times per user the coupon can be applied"
451 },
452 "user": {
453 "type": "number",
454 "default": -1,
455 "description": "Maximum number of times per user the coupon can be applied"
456 }
457 }
458 },
459 "remaining": {
460 "type": "object",
461 "properties": {
462 "app": {
463 "type": "number",
464 "default": -1,
465 "description": "Remaining number of times the coupon can be used in the app."
466 },
467 "total": {
468 "type": "number",
469 "default": -1,
470 "description": "total number of times the coupon applied and order placed"
471 },
472 "user": {
473 "type": "number",
474 "default": -1,
475 "description": "Uses done by the customer for the coupon"
476 }
477 },
478 "description": "Remaining coupon usage counts."
479 }
480 }
481 }
482 },
483 "description": "Restrictions for coupon usage."
484 },
485 "rule": {
486 "type": "array",
487 "items": [
488 {
489 "type": "object",
490 "required": [
491 "max",
492 "min",
493 "value"
494 ],
495 "properties": {
496 "key": {
497 "type": "number",
498 "description": "number of products bought by the customer"
499 },
500 "max": {
501 "type": "number",
502 "description": "maximum price of products bought by the customer"
503 },
504 "min": {
505 "type": "number",
506 "description": "minimum price of products bought by the customer"
507 },
508 "value": {
509 "type": "number",
510 "description": ""
511 }
512 }
513 }
514 ],
515 "description": "Rules to be applied on coupon code i.e payment restriction, cart value, etc."
516 },
517 "rule_definition": {
518 "type": "object",
519 "required": [
520 "value_type",
521 "type",
522 "scope",
523 "is_exact",
524 "currency_code",
525 "calculate_on",
526 "auto_apply",
527 "applicable_on"
528 ],
529 "properties": {
530 "applicable_on": {
531 "type": "string",
532 "description": "On which the coupon is applicable like quantity, amount etc."
533 },
534 "auto_apply": {
535 "type": "boolean",
536 "description": "If coupon can be auto applied or not."
537 },
538 "calculate_on": {
539 "type": "string",
540 "description": "product field on which the coupon calculation happens like esp or mrp"
541 },
542 "currency_code": {
543 "type": "string",
544 "description": "currency code"
545 },
546 "is_exact": {
547 "type": "boolean",
548 "description": ""
549 },
550 "scope": {
551 "type": "array",
552 "items": {
553 "type": "string"
554 },
555 "description": ""
556 },
557 "type": {
558 "type": "string",
559 "description": "Display type of the coupon"
560 },
561 "value_type": {
562 "type": "string",
563 "description": "Exact type of the coupon"
564 }
565 },
566 "description": "rule defination of the coupon"
567 },
568 "state": {
569 "type": "object",
570 "required": [
571 "is_archived",
572 "is_display",
573 "is_public"
574 ],
575 "properties": {
576 "is_archived": {
577 "type": "boolean",
578 "description": "Defines coupon is active or not"
579 },
580 "is_display": {
581 "type": "boolean",
582 "description": "Defines coupon to be displayed in coupon list"
583 },
584 "is_public": {
585 "type": "boolean",
586 "description": "Defines if the coupon is public or not"
587 }
588 },
589 "description": "current state of the coupon"
590 },
591 "tags": {
592 "type": "array",
593 "items": [
594 {
595 "type": "string"
596 }
597 ],
598 "description": "Identify a coupon through tags"
599 },
600 "type_slug": {
601 "type": "string",
602 "description": "coupon type"
603 },
604 "validation": {
605 "type": "object",
606 "required": [
607 "app_id",
608 "user_registered_after"
609 ],
610 "properties": {
611 "anonymous": {
612 "type": "boolean",
613 "description": "coupon applicable to anonymous user or not"
614 },
615 "app_id": {
616 "type": "array",
617 "items": [
618 {
619 "type": "string"
620 }
621 ],
622 "description": "application/sales channel for which the coupon is created"
623 },
624 "user_registered_after": {
625 "type": [
626 "null",
627 "string"
628 ],
629 "description": "If coupon is for registered user then after which date user is registered on that coupon will apply"
630 }
631 },
632 "description": "Coupon validations"
633 },
634 "validity": {
635 "type": "object",
636 "required": [
637 "priority"
638 ],
639 "properties": {
640 "priority": {
641 "type": "number",
642 "description": "priority of the coupon"
643 }
644 },
645 "description": "validity of the coupon"
646 },
647 "_schedule": {
648 "type": "object",
649 "properties": {
650 "cron": {
651 "type": [
652 "null",
653 "string"
654 ],
655 "description": "cron string of the coupon, if coupon is created periodically"
656 },
657 "duration": {
658 "type": [
659 "null",
660 "number"
661 ],
662 "description": "For how much time coupon can be active"
663 },
664 "end": {
665 "type": [
666 "null",
667 "string"
668 ],
669 "description": "When should coupon should stop applying to user"
670 },
671 "next_schedule": {
672 "type": "array",
673 "items": {
674 "type": "object",
675 "required": [
676 "start",
677 "end"
678 ],
679 "properties": {
680 "start": {
681 "type": [
682 "null",
683 "string"
684 ],
685 "description": "start time of the coupon to be live"
686 },
687 "end": {
688 "type": [
689 "null",
690 "string"
691 ],
692 "description": "end time of the coupon to be live"
693 }
694 },
695 "description": "next schedule of the coupon"
696 }
697 },
698 "status": {
699 "type": "string",
700 "enum": [
701 "draft",
702 "review",
703 "rejected",
704 "approved"
705 ],
706 "description": "Status of the coupon."
707 },
708 "start": {
709 "type": [
710 "null",
711 "string"
712 ]
713 }
714 },
715 "description": "schedule of the coupon"
716 },
717 "coupon_type": {
718 "type": "string",
719 "description": "Type of the coupon.",
720 "enum": [
721 "bulk",
722 "single"
723 ]
724 },
725 "is_exclusive_coupon": {
726 "type": "boolean",
727 "description": "If this coupon is exclusive, no other promotions can be applied."
728 },
729 "coupon_prefix": {
730 "type": "string",
731 "description": "Prefix added at the start of every bulk generated coupon code."
732 },
733 "coupon_counts": {
734 "type": "integer",
735 "description": "Number of coupon codes to generate for bulk coupon creation defaults to 1 for single coupons."
736 }
737 }
738 }
739 }
740 }
741 }
742}
Payload Example
1{
2 "application_id": "65f834e526be5a568ecdb3df",
3 "company_id": 7084,
4 "contains": [
5 "coupon"
6 ],
7 "event": {
8 "category": "application",
9 "created_timestamp": 1711106635525,
10 "id": "sjOC45ZdeB5xNnfbb++qBE/MmFFxJ8HrT28p9bUyZlw=",
11 "name": "coupon",
12 "trace_id": [
13 "megatron.23901d1a-62bb-4156-b333-d4c1f455ef43"
14 ],
15 "type": "create",
16 "version": "1"
17 },
18 "payload": {
19 "coupon": {
20 "_schedule": {
21 "cron": null,
22 "duration": null,
23 "end": null,
24 "next_schedule": [
25 {
26 "end": null,
27 "start": "2024-03-22T11:23:51.854000+00:00"
28 }
29 ],
30 "start": "2024-03-22T11:23:51.854000+00:00"
31 },
32 "action": {
33 "action_date": null,
34 "txn_mode": "coupon"
35 },
36 "author": {
37 "created_by": "00b72455245370605c35ee80",
38 "modified_by": "00b72455245370605c35ee80"
39 },
40 "code": "wde",
41 "date_meta": {
42 "created_on": "2024-03-22T11:23:55.506888+00:00",
43 "modified_on": "2024-03-22T11:23:55.506888+00:00"
44 },
45 "display_meta": {
46 "apply": {
47 "subtitle": "",
48 "title": "Coupon applied successfully"
49 },
50 "auto": {
51 "subtitle": "",
52 "title": ""
53 },
54 "description": "",
55 "remove": {
56 "subtitle": "",
57 "title": ""
58 },
59 "subtitle": "wdsa",
60 "title": "23"
61 },
62 "identifiers": {
63 "brand_id": [
64 5989
65 ],
66 "user_id": []
67 },
68 "ownership": {
69 "payable_by": "",
70 "payable_category": "seller"
71 },
72 "restrictions": {
73 "ordering_stores": [],
74 "platforms": [
75 "web",
76 "android",
77 "ios"
78 ],
79 "post_order": {
80 "cancellation_allowed": true,
81 "return_allowed": true
82 },
83 "price_range": {
84 "max": -1,
85 "min": -1
86 },
87 "uses": {
88 "maximum": {
89 "app": -1,
90 "total": -1,
91 "user": -1
92 },
93 "remaining": {
94 "app": -1,
95 "total": -1,
96 "user": -1
97 }
98 }
99 },
100 "rule": [
101 {
102 "key": 1,
103 "max": 3,
104 "min": 2,
105 "value": 3
106 }
107 ],
108 "rule_definition": {
109 "applicable_on": "quantity",
110 "auto_apply": false,
111 "calculate_on": "esp",
112 "currency_code": "INR",
113 "is_exact": true,
114 "scope": [
115 "brand_id"
116 ],
117 "type": "bundle",
118 "value_type": "percentage"
119 },
120 "state": {
121 "is_archived": false,
122 "is_display": true,
123 "is_public": true
124 },
125 "tags": [
126 "platform"
127 ],
128 "type_slug": "bundle_quantity_percentage",
129 "validation": {
130 "anonymous": true,
131 "app_id": [
132 "65f834e526be5a568ecdb3df"
133 ],
134 "user_registered_after": null
135 },
136 "validity": {
137 "priority": 0
138 }
139 }
140 }
141}

Coupon/coupon/update/v1

this event is triggered when coupon is updated

Payload
Properties
This event is triggered when coupon is updated.
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
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
The payload data of event.
Properties
coupon
object
Required
Properties
action
object
action details of coupon
Properties
action_date
null|string
Required
action date to start coupon actions required in case of txn_mode is not coupon
txn_mode
string
Required
txn mode of the coupon like coupon
author
object
Required
author details of the coupon
Properties
created_by
string
Required
user id by whom the coupon created
modified_by
string
Required
user id by whom the coupon modified
rejected_by
string|null
Nullable
The user id of user, who has rejected the coupon
approved_by
string|null
Nullable
The user id of user, who has approved the coupon
reviewed_by
string|null
Nullable
The user id of user who has reviewed the coupon.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
code
string
Required
Coupon unique code
date_meta
object
Required
date details of coupon
Properties
created_on
string|null
Timestamp on which the coupon was created
modified_on
string|null
Timestamp on which the coupon was modified
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
display_meta
object
Required
display details of the coupon
Properties
apply
object
apply message details of the coupon
Properties
subtitle
string
Required
apply message subtitle of the coupon
title
string
Required
title message of the coupon
auto
object
auto apply details of the coupon
Properties
subtitle
string
Required
auto apply subtitle of the coupon
title
string
Required
auto apply title of the coupon
description
string
Description of the coupon
remove
object
Remove details of the coupon
Properties
subtitle
string
Required
remove subtitle of the coupon
title
string
Required
remove title of the coupon
subtitle
string
subtitle of the coupon
title
string
title of the coupon
identifiers
object
Required
condition fields of the coupon
Properties
exclude_brand_id
array of integer
This brand ids will be excluded while applying coupon.
brand_id
array of integer
The brand ids on which coupon will be applied.
item_id
array of integer
The item ids on which coupon will be applied.
company_id
array of integer
The company ids on which coupon will be applied.
article_id
array of integer
The article ids on which coupon will be applied.
store_id
array of integer
The store ids on which coupon will be applied.
collection_id
array of string
Coupon will be applied on mentioned collection ids products.
category_id
array of integer
The category ids on which coupon will be applied.
user_id
array of string
The user ids for which this coupon will be usable.
ownership
object
Required
Ownership details of the coupon
Properties
payable_by
string
Required
user id for who will pay the amount discounted by coupon
payable_category
string
Required
user category for who will pay the amount discounted by coupon
restrictions
object
Required
Restrictions for coupon usage
Properties
ordering_stores
array of integer
Ordering stores for which coupon is restricted.
platforms
array of string
Required
platforms on which coupon is applicable like web, android, ios
post_order
object
Required
restrictions after the order is placed
Properties
return_allowed
boolean
Required
return is allowed or not on order on which the coupon is applied
cancellation_allowed
boolean
Required
cancellation is allowed or not on order on which the coupon is applied
price_range
object
price range for the coupon
Properties
max
number
Required
max price range of cart.
min
number
Required
min price range of cart.
uses
object
Required
Maximum and remaining Usage count for coupon used by user.
Properties
maximum
object
Required
Properties
app
number
Total number of count for coupon usages in app
Default Value : -1
total
number
Total number of times per user the coupon can be applied
Default Value : -1
user
number
Maximum number of times per user the coupon can be applied
Default Value : -1
remaining
object
Required
Properties
app
number
Remained number of count for coupon usages in app
Default Value : -1
total
number
total number of times the coupon applied and order placed
Default Value : -1
user
number
Uses done by the customer for the coupon
Default Value : -1
rule
array of Undefined Type
Required
Rules to be applied on coupon code i.e payment restriction, cart value, etc.
rule_definition
object
Required
rule defination of the coupon
Properties
applicable_on
string
Required
On which the coupon is applicable like quantity, amount etc.
auto_apply
boolean
Required
If coupon can be auto applied or not.
calculate_on
string
Required
product field on which the coupon calculation happens like esp or mrp
currency_code
string
Required
currency code
is_exact
boolean
Required
scope
array of string
Required
type
string
Required
Display type of the coupon
value_type
string
Required
Exact type of the coupon
state
object
Required
current state of the coupon
Properties
is_archived
boolean
Required
Defines coupon is active or not
is_display
boolean
Required
Defines coupon to be displayed in coupon list
is_public
boolean
Required
Defines if the coupon is public or not
tags
array of Undefined Type
Required
Identify a coupon through tags
type_slug
string
Required
coupon type
validation
object
Required
Coupon validations
Properties
anonymous
boolean
coupon applicable to anonymous user or not
app_id
array of Undefined Type
Required
application/sales channel for which the coupon is created
user_registered_after
null|string
Required
If coupon is for registered user then after which date user is registered on that coupon will apply
validity
object
Required
validity of the coupon
Properties
priority
number
Required
priority of the coupon
_schedule
object
Required
schedule of the coupon
Properties
cron
null|string
cron string of the coupon, if coupon is created periodically
duration
null|number
For how much time coupon can be active
end
null|string
When should coupon should stop applying to user
next_schedule
array of object
Array of Properties
start
null|string
Required
start time of the coupon to be live
end
null|string
Required
end time of the coupon to be live
status
string
Status of the coupon.
Enum
start
null|string
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when coupon is updated.",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "internal trace_id for Fynd Platform services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "coupon"
81 ],
82 "properties": {
83 "coupon": {
84 "type": "object",
85 "required": [
86 "author",
87 "code",
88 "date_meta",
89 "display_meta",
90 "identifiers",
91 "ownership",
92 "restrictions",
93 "rule",
94 "rule_definition",
95 "state",
96 "tags",
97 "type_slug",
98 "validation",
99 "validity",
100 "_schedule"
101 ],
102 "properties": {
103 "action": {
104 "type": "object",
105 "required": [
106 "action_date",
107 "txn_mode"
108 ],
109 "properties": {
110 "action_date": {
111 "type": [
112 "null",
113 "string"
114 ],
115 "description": "action date to start coupon actions required in case of txn_mode is not coupon"
116 },
117 "txn_mode": {
118 "type": "string",
119 "description": "txn mode of the coupon like coupon"
120 }
121 },
122 "description": "action details of coupon"
123 },
124 "author": {
125 "type": "object",
126 "additionalProperties": true,
127 "required": [
128 "modified_by",
129 "created_by"
130 ],
131 "properties": {
132 "created_by": {
133 "type": "string",
134 "description": "user id by whom the coupon created"
135 },
136 "modified_by": {
137 "type": "string",
138 "description": "user id by whom the coupon modified"
139 },
140 "rejected_by": {
141 "type": [
142 "string",
143 "null"
144 ],
145 "description": "The user id of user, who has rejected the coupon",
146 "nullable": true
147 },
148 "approved_by": {
149 "type": [
150 "string",
151 "null"
152 ],
153 "description": "The user id of user, who has approved the coupon",
154 "nullable": true
155 },
156 "reviewed_by": {
157 "type": [
158 "string",
159 "null"
160 ],
161 "description": "The user id of user who has reviewed the coupon.",
162 "nullable": true
163 }
164 },
165 "description": "author details of the coupon"
166 },
167 "code": {
168 "type": "string",
169 "description": "Coupon unique code"
170 },
171 "date_meta": {
172 "type": "object",
173 "additionalProperties": true,
174 "properties": {
175 "created_on": {
176 "type": [
177 "string",
178 "null"
179 ],
180 "description": "Timestamp on which the coupon was created"
181 },
182 "modified_on": {
183 "type": [
184 "string",
185 "null"
186 ],
187 "description": "Timestamp on which the coupon was modified"
188 }
189 },
190 "description": "date details of coupon"
191 },
192 "display_meta": {
193 "type": "object",
194 "required": [],
195 "properties": {
196 "apply": {
197 "type": "object",
198 "required": [
199 "title",
200 "subtitle"
201 ],
202 "properties": {
203 "subtitle": {
204 "type": "string",
205 "description": "apply message subtitle of the coupon"
206 },
207 "title": {
208 "type": "string",
209 "description": "title message of the coupon"
210 }
211 },
212 "description": "apply message details of the coupon"
213 },
214 "auto": {
215 "type": "object",
216 "required": [
217 "title",
218 "subtitle"
219 ],
220 "properties": {
221 "subtitle": {
222 "type": "string",
223 "description": "auto apply subtitle of the coupon"
224 },
225 "title": {
226 "type": "string",
227 "description": "auto apply title of the coupon"
228 }
229 },
230 "description": "auto apply details of the coupon"
231 },
232 "description": {
233 "type": "string",
234 "description": "Description of the coupon"
235 },
236 "remove": {
237 "type": "object",
238 "required": [
239 "title",
240 "subtitle"
241 ],
242 "properties": {
243 "subtitle": {
244 "type": "string",
245 "description": "remove subtitle of the coupon"
246 },
247 "title": {
248 "type": "string",
249 "description": "remove title of the coupon"
250 }
251 },
252 "description": "Remove details of the coupon"
253 },
254 "subtitle": {
255 "type": "string",
256 "description": "subtitle of the coupon"
257 },
258 "title": {
259 "type": "string",
260 "description": "title of the coupon"
261 }
262 },
263 "description": "display details of the coupon"
264 },
265 "identifiers": {
266 "type": "object",
267 "required": [],
268 "properties": {
269 "exclude_brand_id": {
270 "type": "array",
271 "description": "This brand ids will be excluded while applying coupon.",
272 "items": {
273 "type": "integer"
274 }
275 },
276 "brand_id": {
277 "type": "array",
278 "description": "The brand ids on which coupon will be applied.",
279 "items": {
280 "type": "integer"
281 }
282 },
283 "item_id": {
284 "type": "array",
285 "description": "The item ids on which coupon will be applied.",
286 "items": {
287 "type": "integer"
288 }
289 },
290 "company_id": {
291 "type": "array",
292 "description": "The company ids on which coupon will be applied.",
293 "items": {
294 "type": "integer"
295 }
296 },
297 "article_id": {
298 "type": "array",
299 "description": "The article ids on which coupon will be applied.",
300 "items": {
301 "type": "integer"
302 }
303 },
304 "store_id": {
305 "type": "array",
306 "description": "The store ids on which coupon will be applied.",
307 "items": {
308 "type": "integer"
309 }
310 },
311 "collection_id": {
312 "type": "array",
313 "description": "Coupon will be applied on mentioned collection ids products.",
314 "items": {
315 "type": "string"
316 }
317 },
318 "category_id": {
319 "type": "array",
320 "description": "The category ids on which coupon will be applied.",
321 "items": {
322 "type": "integer"
323 }
324 },
325 "user_id": {
326 "type": "array",
327 "description": "The user ids for which this coupon will be usable.",
328 "items": {
329 "type": "string"
330 }
331 }
332 },
333 "description": "condition fields of the coupon"
334 },
335 "ownership": {
336 "type": "object",
337 "required": [
338 "payable_by",
339 "payable_category"
340 ],
341 "properties": {
342 "payable_by": {
343 "type": "string",
344 "description": "user id for who will pay the amount discounted by coupon"
345 },
346 "payable_category": {
347 "type": "string",
348 "description": "user category for who will pay the amount discounted by coupon"
349 }
350 },
351 "description": "Ownership details of the coupon"
352 },
353 "restrictions": {
354 "type": "object",
355 "required": [
356 "platforms",
357 "post_order",
358 "uses"
359 ],
360 "properties": {
361 "ordering_stores": {
362 "type": "array",
363 "items": {
364 "type": "integer"
365 },
366 "description": "Ordering stores for which coupon is restricted."
367 },
368 "platforms": {
369 "type": "array",
370 "items": {
371 "type": "string"
372 },
373 "description": "platforms on which coupon is applicable like web, android, ios"
374 },
375 "post_order": {
376 "type": "object",
377 "required": [
378 "cancellation_allowed",
379 "return_allowed"
380 ],
381 "properties": {
382 "return_allowed": {
383 "type": "boolean",
384 "description": "return is allowed or not on order on which the coupon is applied"
385 },
386 "cancellation_allowed": {
387 "type": "boolean",
388 "description": "cancellation is allowed or not on order on which the coupon is applied"
389 }
390 },
391 "description": "restrictions after the order is placed"
392 },
393 "price_range": {
394 "type": "object",
395 "required": [
396 "max",
397 "min"
398 ],
399 "properties": {
400 "max": {
401 "type": "number",
402 "description": "max price range of cart."
403 },
404 "min": {
405 "type": "number",
406 "description": "min price range of cart."
407 }
408 },
409 "description": "price range for the coupon"
410 },
411 "uses": {
412 "type": "object",
413 "description": "Maximum and remaining Usage count for coupon used by user.",
414 "required": [
415 "maximum",
416 "remaining"
417 ],
418 "properties": {
419 "maximum": {
420 "type": "object",
421 "properties": {
422 "app": {
423 "type": "number",
424 "default": -1,
425 "description": "Total number of count for coupon usages in app"
426 },
427 "total": {
428 "type": "number",
429 "default": -1,
430 "description": "Total number of times per user the coupon can be applied"
431 },
432 "user": {
433 "type": "number",
434 "default": -1,
435 "description": "Maximum number of times per user the coupon can be applied"
436 }
437 }
438 },
439 "remaining": {
440 "type": "object",
441 "properties": {
442 "app": {
443 "type": "number",
444 "default": -1,
445 "description": "Remained number of count for coupon usages in app"
446 },
447 "total": {
448 "type": "number",
449 "default": -1,
450 "description": "total number of times the coupon applied and order placed"
451 },
452 "user": {
453 "type": "number",
454 "default": -1,
455 "description": "Uses done by the customer for the coupon"
456 }
457 }
458 }
459 }
460 }
461 },
462 "description": "Restrictions for coupon usage"
463 },
464 "rule": {
465 "type": "array",
466 "items": [
467 {
468 "type": "object",
469 "required": [
470 "max",
471 "min"
472 ],
473 "properties": {
474 "key": {
475 "type": "number",
476 "description": "number of products bought by the customer"
477 },
478 "max": {
479 "type": "number",
480 "description": "maximum price of products bought by the customer"
481 },
482 "min": {
483 "type": "number",
484 "description": "minimum price of products bought by the customer"
485 },
486 "value": {
487 "type": "number",
488 "description": ""
489 }
490 }
491 }
492 ],
493 "description": "Rules to be applied on coupon code i.e payment restriction, cart value, etc."
494 },
495 "rule_definition": {
496 "type": "object",
497 "required": [
498 "value_type",
499 "type",
500 "scope",
501 "is_exact",
502 "currency_code",
503 "calculate_on",
504 "auto_apply",
505 "applicable_on"
506 ],
507 "properties": {
508 "applicable_on": {
509 "type": "string",
510 "description": "On which the coupon is applicable like quantity, amount etc."
511 },
512 "auto_apply": {
513 "type": "boolean",
514 "description": "If coupon can be auto applied or not."
515 },
516 "calculate_on": {
517 "type": "string",
518 "description": "product field on which the coupon calculation happens like esp or mrp"
519 },
520 "currency_code": {
521 "type": "string",
522 "description": "currency code"
523 },
524 "is_exact": {
525 "type": "boolean",
526 "description": ""
527 },
528 "scope": {
529 "type": "array",
530 "items": {
531 "type": "string"
532 },
533 "description": ""
534 },
535 "type": {
536 "type": "string",
537 "description": "Display type of the coupon"
538 },
539 "value_type": {
540 "type": "string",
541 "description": "Exact type of the coupon"
542 }
543 },
544 "description": "rule defination of the coupon"
545 },
546 "state": {
547 "type": "object",
548 "required": [
549 "is_archived",
550 "is_display",
551 "is_public"
552 ],
553 "properties": {
554 "is_archived": {
555 "type": "boolean",
556 "description": "Defines coupon is active or not"
557 },
558 "is_display": {
559 "type": "boolean",
560 "description": "Defines coupon to be displayed in coupon list"
561 },
562 "is_public": {
563 "type": "boolean",
564 "description": "Defines if the coupon is public or not"
565 }
566 },
567 "description": "current state of the coupon"
568 },
569 "tags": {
570 "type": "array",
571 "items": [
572 {
573 "type": "string"
574 }
575 ],
576 "description": "Identify a coupon through tags"
577 },
578 "type_slug": {
579 "type": "string",
580 "description": "coupon type"
581 },
582 "validation": {
583 "type": "object",
584 "required": [
585 "app_id",
586 "user_registered_after"
587 ],
588 "properties": {
589 "anonymous": {
590 "type": "boolean",
591 "description": "coupon applicable to anonymous user or not"
592 },
593 "app_id": {
594 "type": "array",
595 "items": [
596 {
597 "type": "string"
598 }
599 ],
600 "description": "application/sales channel for which the coupon is created"
601 },
602 "user_registered_after": {
603 "type": [
604 "null",
605 "string"
606 ],
607 "description": "If coupon is for registered user then after which date user is registered on that coupon will apply"
608 }
609 },
610 "description": "Coupon validations"
611 },
612 "validity": {
613 "type": "object",
614 "required": [
615 "priority"
616 ],
617 "properties": {
618 "priority": {
619 "type": "number",
620 "description": "priority of the coupon"
621 }
622 },
623 "description": "validity of the coupon"
624 },
625 "_schedule": {
626 "type": "object",
627 "properties": {
628 "cron": {
629 "type": [
630 "null",
631 "string"
632 ],
633 "description": "cron string of the coupon, if coupon is created periodically"
634 },
635 "duration": {
636 "type": [
637 "null",
638 "number"
639 ],
640 "description": "For how much time coupon can be active"
641 },
642 "end": {
643 "type": [
644 "null",
645 "string"
646 ],
647 "description": "When should coupon should stop applying to user"
648 },
649 "next_schedule": {
650 "type": "array",
651 "items": {
652 "type": "object",
653 "required": [
654 "start",
655 "end"
656 ],
657 "properties": {
658 "start": {
659 "type": [
660 "null",
661 "string"
662 ],
663 "description": "start time of the coupon to be live"
664 },
665 "end": {
666 "type": [
667 "null",
668 "string"
669 ],
670 "description": "end time of the coupon to be live"
671 }
672 },
673 "description": "next schedule of the coupon"
674 }
675 },
676 "status": {
677 "type": "string",
678 "enum": [
679 "draft",
680 "review",
681 "rejected",
682 "approved"
683 ],
684 "description": "Status of the coupon."
685 },
686 "start": {
687 "type": [
688 "null",
689 "string"
690 ]
691 }
692 },
693 "description": "schedule of the coupon"
694 }
695 }
696 }
697 }
698 }
699 }
700}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "megatron.046425af-2190-4026-aa80-3f589ca416e2"
5 ],
6 "name": "coupon",
7 "type": "update",
8 "version": "1",
9 "created_timestamp": 1711614375492,
10 "id": "UDu6EWAkiYjeUbl5KHLYXgdoBBVHKV69QnRpZWXpuIg=",
11 "category": "application"
12 },
13 "company_id": 327,
14 "application_id": "60744d605bdf7f6a00a86ff9",
15 "contains": [
16 "coupon"
17 ],
18 "payload": {
19 "coupon": {
20 "state": {
21 "is_archived": false,
22 "is_public": true,
23 "is_display": false
24 },
25 "action": {
26 "action_date": null,
27 "txn_mode": "coupon"
28 },
29 "rule": [
30 {
31 "min": 0,
32 "key": 1,
33 "value": 3000,
34 "max": 0
35 }
36 ],
37 "type_slug": "absolute_quantity_absolute",
38 "display_meta": {
39 "remove": {
40 "title": "",
41 "subtitle": ""
42 },
43 "subtitle": "ICC",
44 "description": "",
45 "auto": {
46 "title": "",
47 "subtitle": ""
48 },
49 "apply": {
50 "title": "Coupon applied successfully",
51 "subtitle": ""
52 },
53 "title": "ICC"
54 },
55 "ownership": {
56 "payable_by": "",
57 "payable_category": "seller"
58 },
59 "date_meta": {
60 "modified_on": "2024-03-28T08:26:15.474938+00:00",
61 "created_on": "2024-03-28T08:21:17.516000+00:00"
62 },
63 "rule_definition": {
64 "value_type": "absolute",
65 "scope": [
66 "brand_id"
67 ],
68 "auto_apply": false,
69 "type": "absolute",
70 "applicable_on": "quantity",
71 "currency_code": "INR",
72 "calculate_on": "esp",
73 "is_exact": false
74 },
75 "tags": [
76 "platform"
77 ],
78 "author": {
79 "modified_by": "be93d7a0639c8de35f2367b3",
80 "created_by": "be93d7a0639c8de35f2367b3"
81 },
82 "_schedule": {
83 "duration": null,
84 "cron": null,
85 "next_schedule": [
86 {
87 "start": "2024-03-28T08:21:06.072000+00:00",
88 "end": null
89 }
90 ],
91 "start": "2024-03-28T08:21:06.072000+00:00",
92 "end": null
93 },
94 "validation": {
95 "user_registered_after": null,
96 "app_id": [
97 "60744d605bdf7f6a00a86ff9"
98 ],
99 "anonymous": false
100 },
101 "identifiers": {
102 "brand_id": [
103 509,
104 4445
105 ],
106 "user_id": []
107 },
108 "code": "urnishac1",
109 "restrictions": {
110 "post_order": {
111 "cancellation_allowed": true,
112 "return_allowed": false
113 },
114 "ordering_stores": [],
115 "uses": {
116 "remaining": {
117 "app": -1,
118 "user": -1,
119 "total": 1
120 },
121 "maximum": {
122 "app": -1,
123 "user": -1,
124 "total": 1
125 }
126 },
127 "platforms": [
128 "web",
129 "android",
130 "ios"
131 ],
132 "price_range": {
133 "max": -1,
134 "min": -1
135 }
136 },
137 "validity": {
138 "priority": 0
139 }
140 }
141 }
142}

Coupon/coupon/redeem/v1

this event is triggered when coupon is redeemed

Payload
Properties
This event is triggered when coupon is redeemed.
application_id
array|string
Required
Application/sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
This contains event data like name and type of event.
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
The payload data of event.
Properties
coupon
object
Required
Coupon key contains coupon data and coupon value.
Properties
coupon
object
Required
Coupon date consisting data like code and coupon fields.
Properties
_id
string
Required
Unique identification for the coupon
code
string
Required
Coupon unique code
rule
array of object
Required
Rules to be applied on coupon code i.e payment restriction, cart value, etc.
tags
array of string
Identify a coupon through tags
state
object
Required
current state of the coupon
action
object
Required
action details of coupon
author
object
Required
author details of the coupon
Properties
created_by
string
Required
user id by whom the coupon created
modified_by
string
Required
user id by whom the coupon modified
rejected_by
string|null
Nullable
The user id of user, who has rejected the coupon
approved_by
string|null
Nullable
The user id of user, who has approved the coupon
reviewed_by
string|null
Nullable
The user id of user who has reviewed the coupon.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
_source
object
source of the coupon
validity
object
Required
validity of the coupon
_schedule
object
Required
schedule of the coupon
Properties
status
string
Status of the coupon
Enum
date_meta
object
Required
date details of coupon
Properties
created_on
string|null
Timestamp on which the coupon was created
modified_on
string|null
Timestamp on which the coupon was modified
rejected_on
string|null
| date-time
Timestamp on which the coupon was rejected
approved_on
string|null
| date-time
Timestamp on which the coupon was approved
reviewed_on
string|null
| date-time
Timestamp on which the coupon was reviewed
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
ownership
object
Required
Ownership details of the coupon
Properties
payable_by
string
Required
user id for who will pay the amount discounted by coupon
payable_category
string
Required
user category for who will pay the amount discounted by coupon
type_slug
string
Required
coupon type
validation
object
Required
Coupon validations
Properties
anonymous
boolean
coupon applicable to anonymous user or not
app_id
array of Undefined Type
Required
application/sales channel for which the coupon is created
user_registered_after
null|string
Required
If coupon is for registered user then after which date user is registered on that coupon will apply
identifiers
object
Required
condition fields of the coupon
Properties
exclude_brand_id
array of integer
This brand ids will be excluded while applying coupon.
brand_id
array of integer
The brand ids on which coupon will be applied.
item_id
array of integer
The item ids on which coupon will be applied.
company_id
array of integer
The company ids on which coupon will be applied.
article_id
array of integer
The article ids on which coupon will be applied.
store_id
array of integer
The store ids on which coupon will be applied.
collection_id
array of string
Coupon will be applied on mentioned collection ids products.
category_id
array of integer
The category ids on which coupon will be applied.
user_id
array of string
The user ids for which this coupon will be usable.
display_meta
object
Required
display details of the coupon
restrictions
object
Required
Restrictions for coupon usage
rule_definition
object
Required
rule defination of the coupon
Properties
applicable_on
string
Required
On which the coupon is applicable like quantity, amount etc.
auto_apply
boolean
Required
If coupon can be auto applied or not.
calculate_on
string
Required
product field on which the coupon calculation happens like esp or mrp
currency_code
string
Required
currency code
is_exact
boolean
Required
When set as true then qty cap for coupon being applied will be enforced otherwise no cap for qty.
scope
array of string
Required
Scope for coupon applicability like brand
type
string
Required
Display type of the coupon
value_type
string
Required
Exact type of the coupon
coupon_type
string
Type of the coupon
Enum
cart_id
string
Required
cart id on which the coupon is redeemed
coupon_value
number
Required
coupon value applied on cart
Payload Schema JSON
1{
2 "type": "object",
3 "description": "This event is triggered when coupon is redeemed.",
4 "required": [
5 "company_id",
6 "contains",
7 "event",
8 "payload",
9 "application_id"
10 ],
11 "properties": {
12 "application_id": {
13 "type": [
14 "array",
15 "string"
16 ],
17 "description": "Application/sales channel ID for which this event is triggered"
18 },
19 "company_id": {
20 "type": "integer",
21 "description": "company ID for which this event is triggered"
22 },
23 "contains": {
24 "type": "array",
25 "description": "This array will have all the keys present at root level of 'payload' object",
26 "items": {
27 "type": "string"
28 }
29 },
30 "event": {
31 "type": "object",
32 "description": "This contains event data like name and type of event.",
33 "required": [
34 "category",
35 "created_timestamp",
36 "id",
37 "name",
38 "trace_id",
39 "type",
40 "version"
41 ],
42 "properties": {
43 "category": {
44 "type": "string",
45 "description": "category of the event. If it is at sales channel level or company level"
46 },
47 "created_timestamp": {
48 "type": "integer",
49 "description": "event generation timestamp in epoch milliseconds"
50 },
51 "id": {
52 "type": "string",
53 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
54 },
55 "name": {
56 "type": "string",
57 "description": "Name of the event"
58 },
59 "trace_id": {
60 "type": "array",
61 "description": "internal trace_id for Fynd Platform services",
62 "items": {
63 "type": "string"
64 }
65 },
66 "type": {
67 "type": "string",
68 "description": "Type/Action of the event. e.g. create/update/delete"
69 },
70 "version": {
71 "type": "string",
72 "description": "Version of the event."
73 }
74 }
75 },
76 "payload": {
77 "type": "object",
78 "description": "The payload data of event.",
79 "required": [
80 "coupon"
81 ],
82 "properties": {
83 "coupon": {
84 "type": "object",
85 "description": "Coupon key contains coupon data and coupon value.",
86 "required": [
87 "cart_id",
88 "coupon_value",
89 "coupon"
90 ],
91 "properties": {
92 "coupon": {
93 "type": "object",
94 "description": "Coupon date consisting data like code and coupon fields.",
95 "required": [
96 "code",
97 "_id",
98 "_schedule",
99 "type_slug",
100 "rule_definition",
101 "date_meta",
102 "state",
103 "validation",
104 "action",
105 "restrictions",
106 "validity",
107 "display_meta",
108 "ownership",
109 "identifiers",
110 "author",
111 "rule"
112 ],
113 "properties": {
114 "_id": {
115 "type": "string",
116 "description": "Unique identification for the coupon"
117 },
118 "code": {
119 "type": "string",
120 "description": "Coupon unique code"
121 },
122 "rule": {
123 "type": "array",
124 "items": {
125 "type": "object"
126 },
127 "description": "Rules to be applied on coupon code i.e payment restriction, cart value, etc."
128 },
129 "tags": {
130 "type": "array",
131 "items": {
132 "type": "string"
133 },
134 "description": "Identify a coupon through tags"
135 },
136 "state": {
137 "type": "object",
138 "description": "current state of the coupon"
139 },
140 "action": {
141 "type": "object",
142 "description": "action details of coupon"
143 },
144 "author": {
145 "type": "object",
146 "additionalProperties": true,
147 "required": [
148 "modified_by",
149 "created_by"
150 ],
151 "properties": {
152 "created_by": {
153 "type": "string",
154 "description": "user id by whom the coupon created"
155 },
156 "modified_by": {
157 "type": "string",
158 "description": "user id by whom the coupon modified"
159 },
160 "rejected_by": {
161 "type": [
162 "string",
163 "null"
164 ],
165 "description": "The user id of user, who has rejected the coupon",
166 "nullable": true
167 },
168 "approved_by": {
169 "type": [
170 "string",
171 "null"
172 ],
173 "description": "The user id of user, who has approved the coupon",
174 "nullable": true
175 },
176 "reviewed_by": {
177 "type": [
178 "string",
179 "null"
180 ],
181 "description": "The user id of user who has reviewed the coupon.",
182 "nullable": true
183 }
184 },
185 "description": "author details of the coupon"
186 },
187 "_source": {
188 "type": "object",
189 "description": "source of the coupon"
190 },
191 "validity": {
192 "type": "object",
193 "description": "validity of the coupon"
194 },
195 "_schedule": {
196 "type": "object",
197 "description": "schedule of the coupon",
198 "properties": {
199 "status": {
200 "type": "string",
201 "enum": [
202 "draft",
203 "review",
204 "rejected",
205 "approved"
206 ],
207 "description": "Status of the coupon"
208 }
209 }
210 },
211 "date_meta": {
212 "type": "object",
213 "additionalProperties": true,
214 "properties": {
215 "created_on": {
216 "type": [
217 "string",
218 "null"
219 ],
220 "description": "Timestamp on which the coupon was created"
221 },
222 "modified_on": {
223 "type": [
224 "string",
225 "null"
226 ],
227 "description": "Timestamp on which the coupon was modified"
228 },
229 "rejected_on": {
230 "type": [
231 "string",
232 "null"
233 ],
234 "description": "Timestamp on which the coupon was rejected",
235 "format": "date-time"
236 },
237 "approved_on": {
238 "type": [
239 "string",
240 "null"
241 ],
242 "description": "Timestamp on which the coupon was approved",
243 "format": "date-time"
244 },
245 "reviewed_on": {
246 "type": [
247 "string",
248 "null"
249 ],
250 "description": "Timestamp on which the coupon was reviewed",
251 "format": "date-time"
252 }
253 },
254 "description": "date details of coupon"
255 },
256 "ownership": {
257 "type": "object",
258 "required": [
259 "payable_by",
260 "payable_category"
261 ],
262 "properties": {
263 "payable_by": {
264 "type": "string",
265 "description": "user id for who will pay the amount discounted by coupon"
266 },
267 "payable_category": {
268 "type": "string",
269 "description": "user category for who will pay the amount discounted by coupon"
270 }
271 },
272 "description": "Ownership details of the coupon"
273 },
274 "type_slug": {
275 "type": "string",
276 "description": "coupon type"
277 },
278 "validation": {
279 "type": "object",
280 "required": [
281 "app_id",
282 "user_registered_after"
283 ],
284 "properties": {
285 "anonymous": {
286 "type": "boolean",
287 "description": "coupon applicable to anonymous user or not"
288 },
289 "app_id": {
290 "type": "array",
291 "items": [
292 {
293 "type": "string"
294 }
295 ],
296 "description": "application/sales channel for which the coupon is created"
297 },
298 "user_registered_after": {
299 "type": [
300 "null",
301 "string"
302 ],
303 "description": "If coupon is for registered user then after which date user is registered on that coupon will apply"
304 }
305 },
306 "description": "Coupon validations"
307 },
308 "identifiers": {
309 "type": "object",
310 "required": [],
311 "properties": {
312 "exclude_brand_id": {
313 "type": "array",
314 "description": "This brand ids will be excluded while applying coupon.",
315 "items": {
316 "type": "integer"
317 }
318 },
319 "brand_id": {
320 "type": "array",
321 "description": "The brand ids on which coupon will be applied.",
322 "items": {
323 "type": "integer"
324 }
325 },
326 "item_id": {
327 "type": "array",
328 "description": "The item ids on which coupon will be applied.",
329 "items": {
330 "type": "integer"
331 }
332 },
333 "company_id": {
334 "type": "array",
335 "description": "The company ids on which coupon will be applied.",
336 "items": {
337 "type": "integer"
338 }
339 },
340 "article_id": {
341 "type": "array",
342 "description": "The article ids on which coupon will be applied.",
343 "items": {
344 "type": "integer"
345 }
346 },
347 "store_id": {
348 "type": "array",
349 "description": "The store ids on which coupon will be applied.",
350 "items": {
351 "type": "integer"
352 }
353 },
354 "collection_id": {
355 "type": "array",
356 "description": "Coupon will be applied on mentioned collection ids products.",
357 "items": {
358 "type": "string"
359 }
360 },
361 "category_id": {
362 "type": "array",
363 "description": "The category ids on which coupon will be applied.",
364 "items": {
365 "type": "integer"
366 }
367 },
368 "user_id": {
369 "type": "array",
370 "description": "The user ids for which this coupon will be usable.",
371 "items": {
372 "type": "string"
373 }
374 }
375 },
376 "description": "condition fields of the coupon"
377 },
378 "display_meta": {
379 "type": "object",
380 "description": "display details of the coupon"
381 },
382 "restrictions": {
383 "type": "object",
384 "description": "Restrictions for coupon usage"
385 },
386 "rule_definition": {
387 "type": "object",
388 "required": [
389 "value_type",
390 "type",
391 "scope",
392 "is_exact",
393 "currency_code",
394 "calculate_on",
395 "auto_apply",
396 "applicable_on"
397 ],
398 "properties": {
399 "applicable_on": {
400 "type": "string",
401 "description": "On which the coupon is applicable like quantity, amount etc."
402 },
403 "auto_apply": {
404 "type": "boolean",
405 "description": "If coupon can be auto applied or not."
406 },
407 "calculate_on": {
408 "type": "string",
409 "description": "product field on which the coupon calculation happens like esp or mrp"
410 },
411 "currency_code": {
412 "type": "string",
413 "description": "currency code"
414 },
415 "is_exact": {
416 "type": "boolean",
417 "description": "When set as true then qty cap for coupon being applied will be enforced otherwise no cap for qty."
418 },
419 "scope": {
420 "type": "array",
421 "items": {
422 "type": "string"
423 },
424 "description": "Scope for coupon applicability like brand"
425 },
426 "type": {
427 "type": "string",
428 "description": "Display type of the coupon"
429 },
430 "value_type": {
431 "type": "string",
432 "description": "Exact type of the coupon"
433 }
434 },
435 "description": "rule defination of the coupon"
436 },
437 "coupon_type": {
438 "type": "string",
439 "description": "Type of the coupon",
440 "enum": [
441 "bulk",
442 "single"
443 ]
444 }
445 }
446 },
447 "cart_id": {
448 "type": "string",
449 "description": "cart id on which the coupon is redeemed"
450 },
451 "coupon_value": {
452 "type": "number",
453 "description": "coupon value applied on cart"
454 }
455 }
456 }
457 }
458 }
459 }
460}
Payload Example
1{
2 "payload": {
3 "coupon": {
4 "coupon": {
5 "ownership": {
6 "payable_by": "",
7 "payable_category": "seller"
8 },
9 "author": {
10 "modified_by": "b0057be8702ac9b07834f8b6",
11 "created_by": "da036ff02652aaa554b79d69"
12 },
13 "validation": {
14 "anonymous": false,
15 "user_registered_after": null,
16 "app_id": [
17 "000000000000000000000001"
18 ]
19 },
20 "action": {
21 "txn_mode": "coupon",
22 "action_date": null
23 },
24 "_schedule": {
25 "next_schedule": [
26 {
27 "start": "2024-01-18 12:22:03.138000",
28 "end": null
29 }
30 ],
31 "start": "2024-01-18T12:22:03.138000+00:00",
32 "end": null,
33 "cron": null,
34 "duration": null
35 },
36 "rule": [
37 {
38 "min": 10,
39 "value": 11999,
40 "max": 0,
41 "key": 1
42 }
43 ],
44 "state": {
45 "is_display": true,
46 "is_archived": false,
47 "is_public": true
48 },
49 "display_meta": {
50 "apply": {
51 "subtitle": "",
52 "title": "Coupon applied successfully"
53 },
54 "description": "",
55 "subtitle": "Testing1",
56 "remove": {
57 "subtitle": "",
58 "title": ""
59 },
60 "title": "Testing1",
61 "auto": {
62 "subtitle": "",
63 "title": ""
64 }
65 },
66 "type_slug": "absolute_quantity_absolute",
67 "rule_definition": {
68 "currency_code": "INR",
69 "value_type": "absolute",
70 "type": "absolute",
71 "auto_apply": false,
72 "is_exact": false,
73 "applicable_on": "quantity",
74 "scope": [],
75 "calculate_on": "esp"
76 },
77 "tags": [
78 "platform"
79 ],
80 "identifiers": {
81 "user_id": []
82 },
83 "_id": "65a917eb5fc8c9b0eac889af",
84 "_source": {
85 "type": "extension",
86 "id": "64b00c93c733f68edef8157b"
87 },
88 "validity": {
89 "priority": 0
90 },
91 "code": "testing1",
92 "restrictions": {
93 "ordering_stores": [],
94 "uses": {
95 "remaining": {
96 "app": -1,
97 "user": -1,
98 "total": -1
99 },
100 "maximum": {
101 "app": -1,
102 "user": -1,
103 "total": -1
104 }
105 },
106 "post_order": {
107 "return_allowed": false,
108 "cancellation_allowed": false
109 },
110 "price_range": {
111 "max": -1,
112 "min": -1
113 },
114 "payments": {
115 "wl": {
116 "networks": [],
117 "uses": {
118 "max": -1
119 },
120 "types": [],
121 "codes": []
122 },
123 "nb": {
124 "networks": [],
125 "uses": {
126 "max": -1
127 },
128 "types": [],
129 "codes": []
130 },
131 "card": {
132 "networks": [],
133 "uses": {
134 "max": -1
135 },
136 "types": [],
137 "codes": []
138 },
139 "qr": {
140 "networks": [],
141 "uses": {
142 "max": -1
143 },
144 "types": [],
145 "codes": []
146 },
147 "cod": {
148 "networks": [],
149 "uses": {
150 "max": -1
151 },
152 "types": [],
153 "codes": []
154 },
155 "pay from potlee": {
156 "networks": [],
157 "uses": {
158 "max": -1
159 },
160 "types": [],
161 "codes": []
162 },
163 "icici bank paylater": {
164 "networks": [],
165 "uses": {
166 "max": -1
167 },
168 "types": [],
169 "codes": []
170 },
171 "flexipay by hdfc bank": {
172 "networks": [],
173 "uses": {
174 "max": -1
175 },
176 "types": [],
177 "codes": []
178 },
179 "simpl": {
180 "networks": [],
181 "uses": {
182 "max": -1
183 },
184 "types": [],
185 "codes": []
186 },
187 "rupifipg": {
188 "networks": [],
189 "uses": {
190 "max": -1
191 },
192 "types": [],
193 "codes": []
194 },
195 "cardless_emi": {
196 "networks": [],
197 "uses": {
198 "max": -1
199 },
200 "types": [],
201 "codes": []
202 },
203 "cas": {
204 "networks": [],
205 "uses": {
206 "max": -1
207 },
208 "types": [],
209 "codes": []
210 },
211 "csas": {
212 "networks": [],
213 "uses": {
214 "max": -1
215 },
216 "types": [],
217 "codes": []
218 }
219 },
220 "platforms": [
221 "web",
222 "android",
223 "ios"
224 ]
225 },
226 "date_meta": {
227 "created_on": "2024-01-18T12:22:03.307000+00:00",
228 "modified_on": "2024-02-07T07:51:09.917000+00:00"
229 }
230 },
231 "coupon_value": 11999,
232 "cart_id": "985404"
233 }
234 },
235 "contains": [
236 "coupon"
237 ],
238 "event": {
239 "id": "testID",
240 "name": "coupon",
241 "type": "redeem",
242 "version": "1",
243 "category": "application",
244 "trace_id": [
245 "megatron.c1d94419-57d6-47ef-a5d5-b8829e8b4304"
246 ],
247 "created_timestamp": 1712238862735
248 },
249 "company_id": 1,
250 "application_id": "000000000000000000000001"
251}