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.

Discount

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

Events
application/discount/create/v1
# this event is triggered when discount is created
application/discount/update/v1
# this event is triggered when discount is updated
application/discount/start/v1
# this event is triggered when discount is started
application/discount/end/v1
# this event is triggered when discount is ended

Discount/discount/create/v1

this event is triggered when discount is created

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "properties": {
77 "discount": {
78 "type": "object",
79 "properties": {
80 "job_type": {
81 "type": "string",
82 "description": "Used to determines type of discount."
83 },
84 "name": {
85 "type": "string",
86 "description": "The name of the discount"
87 },
88 "file_path": {
89 "type": "string",
90 "description": "The file path of the uploaded file used to create the discount, particularly applicable for custom discounts."
91 },
92 "is_active": {
93 "type": "boolean",
94 "description": "Whether the discount is currently active or not"
95 },
96 "discount_type": {
97 "type": "string",
98 "description": "The type of the discount"
99 },
100 "discount_level": {
101 "type": "string",
102 "description": "The level at which the discount will be applicable"
103 },
104 "company_id": {
105 "type": "integer",
106 "description": "The identifier of the company for which the discount was created"
107 },
108 "zone_ids": {
109 "type": "array",
110 "items": [
111 {
112 "type": "string"
113 }
114 ],
115 "description": "The discount will be applied to the products associated with the delivery zones listed."
116 },
117 "app_ids": {
118 "type": "array",
119 "items": {
120 "type": "string"
121 },
122 "description": "The discount will be applied to the products associated with the app IDs listed."
123 },
124 "validity": {
125 "type": "object",
126 "properties": {
127 "start": {
128 "type": "string",
129 "description": "The commencement time of the discount period for the products."
130 },
131 "end": {
132 "type": "string",
133 "description": "The conclusion time of the discount period for the products."
134 }
135 },
136 "required": [
137 "start",
138 "end"
139 ],
140 "description": "The duration during which the discount is applicable to the products."
141 },
142 "created_by": {
143 "type": "object",
144 "properties": {
145 "user_id": {
146 "type": "string",
147 "description": "User ID of the user who created the discount"
148 }
149 },
150 "required": [
151 "user_id"
152 ],
153 "description": "Username of the user who created the discount"
154 },
155 "modified_by": {
156 "type": "object",
157 "properties": {
158 "user_id": {
159 "type": "string",
160 "description": "User ID of the user who last modified the discount"
161 }
162 },
163 "required": [
164 "user_id"
165 ],
166 "description": "The user who last modified the discount."
167 },
168 "created_on": {
169 "type": "string",
170 "description": "The date and time when the discount was created"
171 },
172 "modified_on": {
173 "type": "string",
174 "description": "The date and time when the discount was last modified"
175 },
176 "brand_ids": {
177 "type": "array",
178 "items": {
179 "type": "integer"
180 },
181 "description": "The discount will be applied to the products associated with the brand IDs listed."
182 },
183 "discount_meta": {
184 "type": "object",
185 "properties": {
186 "timer": {
187 "type": "boolean",
188 "description": "This field determines whether the countdown timer is visible or hidden. A value of true means the timer is displayed, while false means it's hidden."
189 },
190 "hours": {
191 "type": "integer",
192 "description": "The time in hours before the discount ends when the countdown timer should start."
193 },
194 "minutes": {
195 "type": "integer",
196 "description": "The time in minutes before the discount ends when the countdown timer should start."
197 }
198 },
199 "required": [
200 "timer",
201 "hours",
202 "minutes"
203 ],
204 "description": "Holds information about the discount countdown timer displayed to the user"
205 },
206 "id": {
207 "type": "string",
208 "description": "The discount.id field contains a unique identifier of type ObjectId assigned to the discount."
209 },
210 "price_factory_ids": {
211 "type": "array",
212 "items": {
213 "type": "string"
214 },
215 "description": "The discount will be applied to the products associated with the price factory IDs listed."
216 },
217 "store_ids": {
218 "type": "array",
219 "items": {
220 "type": "integer"
221 },
222 "description": "The discount will be applied to the products associated with the store IDs listed."
223 }
224 },
225 "required": [
226 "job_type",
227 "name",
228 "is_active",
229 "discount_type",
230 "discount_level",
231 "company_id",
232 "app_ids",
233 "validity",
234 "id"
235 ],
236 "description": ""
237 }
238 },
239 "required": [
240 "discount"
241 ]
242 }
243 }
244}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "galvatron.817daf90-f274-11ee-9d9d-7d9d01b806ed"
5 ],
6 "name": "discount",
7 "type": "create",
8 "version": "1",
9 "created_timestamp": 1712229269769,
10 "id": "hOv4gBHXsGfBXGq+EbR1Ke0RgOFG1F4HPF4U2Xe7RwU=",
11 "category": "application"
12 },
13 "company_id": 4460,
14 "application_id": "6461f4dfbdbb9e66f912ca09",
15 "contains": [
16 "discount"
17 ],
18 "payload": {
19 "discount": {
20 "job_type": "app|brand|inventory",
21 "name": "INC.5 DISCOUNT 30% 4 APR",
22 "file_path": "/company/4460/self/documents/product-import/free/original/Y9CNHYeN_-discout_sku_sample-(30).xlsx",
23 "is_active": true,
24 "discount_type": "percentage",
25 "value": null,
26 "discount_meta": {
27 "timer": false,
28 "hours": 0,
29 "minutes": 0
30 },
31 "discount_level": "application",
32 "company_id": 4460,
33 "zone_ids": [],
34 "app_ids": [
35 "6461f4dfbdbb9e66f912ca09"
36 ],
37 "validity": {
38 "start": "2024-04-04T11:20:05.000Z",
39 "end": "2024-06-29T18:30:00.000Z"
40 },
41 "created_by": {
42 "user_id": "23125331"
43 },
44 "modified_by": {
45 "user_id": "23125331"
46 },
47 "created_on": "2024-04-04T11:14:29.718Z",
48 "modified_on": "2024-04-04T11:14:29.748Z",
49 "id": "660e8b958fe23bcea999b88c",
50 "price_factory_ids": [
51 "6847c80f5a7010caa1642850"
52 ]
53 }
54 }
55}

Discount/discount/update/v1

this event is triggered when discount is updated

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "properties": {
77 "discount": {
78 "type": "object",
79 "properties": {
80 "job_type": {
81 "type": "string",
82 "description": "Used to determines type of discount."
83 },
84 "name": {
85 "type": "string",
86 "description": "The name of the discount"
87 },
88 "file_path": {
89 "type": "string",
90 "description": "The file path of the uploaded file used to create the discount, particularly applicable for custom discounts."
91 },
92 "is_active": {
93 "type": "boolean",
94 "description": "Whether the discount is currently active or not"
95 },
96 "discount_type": {
97 "type": "string",
98 "description": "The type of the discount"
99 },
100 "discount_level": {
101 "type": "string",
102 "description": "The level at which the discount will be applicable"
103 },
104 "company_id": {
105 "type": "integer",
106 "description": "The identifier of the company for which the discount was created"
107 },
108 "zone_ids": {
109 "type": "array",
110 "items": [
111 {
112 "type": "string"
113 }
114 ],
115 "description": "The discount will be applied to the products associated with the delivery zones listed."
116 },
117 "app_ids": {
118 "type": "array",
119 "items": {
120 "type": "string"
121 },
122 "description": "The discount will be applied to the products associated with the app IDs listed."
123 },
124 "validity": {
125 "type": "object",
126 "properties": {
127 "start": {
128 "type": "string",
129 "description": "The commencement time of the discount period for the products."
130 },
131 "end": {
132 "type": "string",
133 "description": "The conclusion time of the discount period for the products."
134 }
135 },
136 "required": [
137 "start",
138 "end"
139 ],
140 "description": "The duration during which the discount is applicable to the products."
141 },
142 "created_by": {
143 "type": "object",
144 "properties": {
145 "user_id": {
146 "type": "string",
147 "description": "User ID of the user who created the discount"
148 }
149 },
150 "required": [
151 "user_id"
152 ],
153 "description": "Username of the user who created the discount"
154 },
155 "modified_by": {
156 "type": "object",
157 "properties": {
158 "user_id": {
159 "type": "string",
160 "description": "User ID of the user who last modified the discount"
161 }
162 },
163 "required": [
164 "user_id"
165 ],
166 "description": "The user who last modified the discount."
167 },
168 "created_on": {
169 "type": "string",
170 "description": "The date and time when the discount was created"
171 },
172 "modified_on": {
173 "type": "string",
174 "description": "The date and time when the discount was last modified"
175 },
176 "brand_ids": {
177 "type": "array",
178 "items": {
179 "type": "integer"
180 },
181 "description": "The discount will be applied to the products associated with the brand IDs listed."
182 },
183 "discount_meta": {
184 "type": "object",
185 "properties": {
186 "timer": {
187 "type": "boolean",
188 "description": "This field determines whether the countdown timer is visible or hidden. A value of true means the timer is displayed, while false means it's hidden."
189 },
190 "hours": {
191 "type": "integer",
192 "description": "The time in hours before the discount ends when the countdown timer should start."
193 },
194 "minutes": {
195 "type": "integer",
196 "description": "The time in minutes before the discount ends when the countdown timer should start."
197 }
198 },
199 "required": [
200 "timer",
201 "hours",
202 "minutes"
203 ],
204 "description": "Holds information about the discount countdown timer displayed to the user"
205 },
206 "id": {
207 "type": "string",
208 "description": "The discount.id field contains a unique identifier of type ObjectId assigned to the discount."
209 },
210 "price_factory_ids": {
211 "type": "array",
212 "items": {
213 "type": "string"
214 },
215 "description": "The discount will be applied to the products associated with the price factory IDs listed."
216 },
217 "store_ids": {
218 "type": "array",
219 "items": {
220 "type": "integer"
221 },
222 "description": "The discount will be applied to the products associated with the store IDs listed."
223 }
224 },
225 "required": [
226 "job_type",
227 "name",
228 "is_active",
229 "discount_type",
230 "discount_level",
231 "company_id",
232 "app_ids",
233 "validity",
234 "id"
235 ],
236 "description": ""
237 }
238 },
239 "required": [
240 "discount"
241 ]
242 }
243 }
244}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "galvatron.383fda70-efb2-11ee-9f71-6b13d47b08a7"
5 ],
6 "name": "discount",
7 "type": "update",
8 "version": "1",
9 "created_timestamp": 1711925922199,
10 "id": "iODieB89d9h9JcqA7yaxX4tyddAN5izmQzRDKMzo6w8=",
11 "category": "application"
12 },
13 "company_id": 25,
14 "application_id": "618a224ce93512680cfd93d0",
15 "contains": [
16 "discount"
17 ],
18 "payload": {
19 "discount": {
20 "job_type": "app|brand|inventory",
21 "name": "MYNTRA EOSS DISCOUNT",
22 "file_path": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyprod/wrkr/company/25/self/documents/product-import/free/original/Jid9SRa6z-RiyTkKqRX-discout_sku_sample-Updated-27.3-licensee-revised.xlsx",
23 "is_active": true,
24 "discount_type": "percentage",
25 "value": null,
26 "discount_level": "application",
27 "company_id": 25,
28 "zone_ids": [],
29 "app_ids": [
30 "618a224ce93512680cfd93d0"
31 ],
32 "validity": {
33 "start": "2023-07-14T19:15:09.916Z",
34 "end": "2024-04-02T18:15:00.000Z"
35 },
36 "created_by": {
37 "user_id": "23108124"
38 },
39 "modified_by": {
40 "user_id": "23108124"
41 },
42 "created_on": "2023-07-14T19:12:25.370Z",
43 "modified_on": "2024-03-31T22:58:42.194Z",
44 "brand_ids": [
45 44
46 ],
47 "discount_meta": {
48 "timer": false,
49 "hours": 0,
50 "minutes": 0
51 },
52 "id": "64b19e1989d131ab16c58522",
53 "price_factory_ids": [
54 "6847c80f5a7010caa1642850"
55 ]
56 }
57 }
58}

Discount/discount/start/v1

this event is triggered when discount is started

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "properties": {
77 "discount": {
78 "type": "object",
79 "properties": {
80 "job_type": {
81 "type": "string",
82 "description": "Used to determines type of discount."
83 },
84 "name": {
85 "type": "string",
86 "description": "The name of the discount"
87 },
88 "file_path": {
89 "type": "string",
90 "description": "The file path of the uploaded file used to create the discount, particularly applicable for custom discounts."
91 },
92 "is_active": {
93 "type": "boolean",
94 "description": "Whether the discount is currently active or not"
95 },
96 "discount_type": {
97 "type": "string",
98 "description": "The type of the discount"
99 },
100 "discount_level": {
101 "type": "string",
102 "description": "The level at which the discount will be applicable"
103 },
104 "company_id": {
105 "type": "integer",
106 "description": "The identifier of the company for which the discount was created"
107 },
108 "zone_ids": {
109 "type": "array",
110 "items": [
111 {
112 "type": "string"
113 }
114 ],
115 "description": "The discount will be applied to the products associated with the delivery zones listed."
116 },
117 "app_ids": {
118 "type": "array",
119 "items": {
120 "type": "string"
121 },
122 "description": "The discount will be applied to the products associated with the app IDs listed."
123 },
124 "validity": {
125 "type": "object",
126 "properties": {
127 "start": {
128 "type": "string",
129 "description": "The commencement time of the discount period for the products."
130 },
131 "end": {
132 "type": "string",
133 "description": "The conclusion time of the discount period for the products."
134 }
135 },
136 "required": [
137 "start",
138 "end"
139 ],
140 "description": "The duration during which the discount is applicable to the products."
141 },
142 "created_by": {
143 "type": "object",
144 "properties": {
145 "user_id": {
146 "type": "string",
147 "description": "User ID of the user who created the discount"
148 }
149 },
150 "required": [
151 "user_id"
152 ],
153 "description": "Username of the user who created the discount"
154 },
155 "modified_by": {
156 "type": "object",
157 "properties": {
158 "user_id": {
159 "type": "string",
160 "description": "User ID of the user who last modified the discount"
161 }
162 },
163 "required": [
164 "user_id"
165 ],
166 "description": "The user who last modified the discount."
167 },
168 "created_on": {
169 "type": "string",
170 "description": "The date and time when the discount was created"
171 },
172 "modified_on": {
173 "type": "string",
174 "description": "The date and time when the discount was last modified"
175 },
176 "brand_ids": {
177 "type": "array",
178 "items": {
179 "type": "integer"
180 },
181 "description": "The discount will be applied to the products associated with the brand IDs listed."
182 },
183 "discount_meta": {
184 "type": "object",
185 "properties": {
186 "timer": {
187 "type": "boolean",
188 "description": "This field determines whether the countdown timer is visible or hidden. A value of true means the timer is displayed, while false means it's hidden."
189 },
190 "hours": {
191 "type": "integer",
192 "description": "The time in hours before the discount ends when the countdown timer should start."
193 },
194 "minutes": {
195 "type": "integer",
196 "description": "The time in minutes before the discount ends when the countdown timer should start."
197 }
198 },
199 "required": [
200 "timer",
201 "hours",
202 "minutes"
203 ],
204 "description": "Holds information about the discount countdown timer displayed to the user"
205 },
206 "id": {
207 "type": "string",
208 "description": "The discount.id field contains a unique identifier of type ObjectId assigned to the discount."
209 },
210 "price_factory_ids": {
211 "type": "array",
212 "items": {
213 "type": "string"
214 },
215 "description": "The discount will be applied to the products associated with the price factory IDs listed."
216 },
217 "store_ids": {
218 "type": "array",
219 "items": {
220 "type": "integer"
221 },
222 "description": "The discount will be applied to the products associated with the store IDs listed."
223 }
224 },
225 "required": [
226 "job_type",
227 "name",
228 "is_active",
229 "discount_type",
230 "discount_level",
231 "company_id",
232 "app_ids",
233 "validity",
234 "id"
235 ],
236 "description": ""
237 }
238 },
239 "required": [
240 "discount"
241 ]
242 }
243 }
244}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "galvatron.611e9770-f259-11ee-b382-c921e5151b42"
5 ],
6 "name": "discount",
7 "type": "start",
8 "version": "1",
9 "created_timestamp": 1712217619047,
10 "id": "BX3XNehJyKTgxYcdLSF17dI+JnqGEl7yHH1+cc9T5gU=",
11 "category": "application"
12 },
13 "company_id": 7089,
14 "application_id": "65f95d4c5ce7282c80c71a3b",
15 "contains": [
16 "discount"
17 ],
18 "payload": {
19 "discount": {
20 "job_type": "app|brand|inventory",
21 "name": "DISCOUNT",
22 "file_path": "/company/7089/self/documents/product-import/free/original/0jFZnx9WU-discount-7089-sku-86lao7.xlsx",
23 "is_active": true,
24 "discount_type": "percentage",
25 "value": null,
26 "discount_meta": {
27 "timer": false,
28 "hours": 0,
29 "minutes": 0
30 },
31 "discount_level": "application",
32 "company_id": 7089,
33 "zone_ids": [],
34 "app_ids": [
35 "65f95d4c5ce7282c80c71a3b"
36 ],
37 "validity": {
38 "start": "2024-04-04T08:00:19.000Z",
39 "end": "2024-05-30T18:30:00.000Z"
40 },
41 "created_by": {
42 "user_id": "23532512"
43 },
44 "modified_by": {
45 "user_id": "23532512"
46 },
47 "created_on": "2024-04-04T07:45:29.749Z",
48 "modified_on": "2024-04-04T07:45:30.428Z",
49 "brand_ids": [
50 7914
51 ],
52 "id": "660e5a998fe23bcea999b86e",
53 "price_factory_ids": [
54 "6847c80f5a7010caa1642850"
55 ]
56 }
57 }
58}

Discount/discount/end/v1

this event is triggered when discount is ended

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "properties": {
77 "discount": {
78 "type": "object",
79 "properties": {
80 "job_type": {
81 "type": "string",
82 "description": "Used to determines type of discount."
83 },
84 "name": {
85 "type": "string",
86 "description": "The name of the discount"
87 },
88 "file_path": {
89 "type": "string",
90 "description": "The file path of the uploaded file used to create the discount, particularly applicable for custom discounts."
91 },
92 "is_active": {
93 "type": "boolean",
94 "description": "Whether the discount is currently active or not"
95 },
96 "discount_type": {
97 "type": "string",
98 "description": "The type of the discount"
99 },
100 "discount_level": {
101 "type": "string",
102 "description": "The level at which the discount will be applicable"
103 },
104 "company_id": {
105 "type": "integer",
106 "description": "The identifier of the company for which the discount was created"
107 },
108 "zone_ids": {
109 "type": "array",
110 "items": [
111 {
112 "type": "string"
113 }
114 ],
115 "description": "The discount will be applied to the products associated with the delivery zones listed."
116 },
117 "app_ids": {
118 "type": "array",
119 "items": {
120 "type": "string"
121 },
122 "description": "The discount will be applied to the products associated with the app IDs listed."
123 },
124 "validity": {
125 "type": "object",
126 "properties": {
127 "start": {
128 "type": "string",
129 "description": "The commencement time of the discount period for the products."
130 },
131 "end": {
132 "type": "string",
133 "description": "The conclusion time of the discount period for the products."
134 }
135 },
136 "required": [
137 "start",
138 "end"
139 ],
140 "description": "The duration during which the discount is applicable to the products."
141 },
142 "created_by": {
143 "type": "object",
144 "properties": {
145 "user_id": {
146 "type": "string",
147 "description": "User ID of the user who created the discount"
148 }
149 },
150 "required": [
151 "user_id"
152 ],
153 "description": "Username of the user who created the discount"
154 },
155 "modified_by": {
156 "type": "object",
157 "properties": {
158 "user_id": {
159 "type": "string",
160 "description": "User ID of the user who last modified the discount"
161 }
162 },
163 "required": [
164 "user_id"
165 ],
166 "description": "The user who last modified the discount."
167 },
168 "created_on": {
169 "type": "string",
170 "description": "The date and time when the discount was created"
171 },
172 "modified_on": {
173 "type": "string",
174 "description": "The date and time when the discount was last modified"
175 },
176 "brand_ids": {
177 "type": "array",
178 "items": {
179 "type": "integer"
180 },
181 "description": "The discount will be applied to the products associated with the brand IDs listed."
182 },
183 "discount_meta": {
184 "type": "object",
185 "properties": {
186 "timer": {
187 "type": "boolean",
188 "description": "This field determines whether the countdown timer is visible or hidden. A value of true means the timer is displayed, while false means it's hidden."
189 },
190 "hours": {
191 "type": "integer",
192 "description": "The time in hours before the discount ends when the countdown timer should start."
193 },
194 "minutes": {
195 "type": "integer",
196 "description": "The time in minutes before the discount ends when the countdown timer should start."
197 }
198 },
199 "required": [
200 "timer",
201 "hours",
202 "minutes"
203 ],
204 "description": "Holds information about the discount countdown timer displayed to the user"
205 },
206 "id": {
207 "type": "string",
208 "description": "The discount.id field contains a unique identifier of type ObjectId assigned to the discount."
209 },
210 "price_factory_ids": {
211 "type": "array",
212 "items": {
213 "type": "string"
214 },
215 "description": "The discount will be applied to the products associated with the price factory IDs listed."
216 },
217 "store_ids": {
218 "type": "array",
219 "items": {
220 "type": "integer"
221 },
222 "description": "The discount will be applied to the products associated with the store IDs listed."
223 }
224 },
225 "required": [
226 "job_type",
227 "name",
228 "is_active",
229 "discount_type",
230 "discount_level",
231 "company_id",
232 "app_ids",
233 "validity",
234 "id"
235 ],
236 "description": ""
237 }
238 },
239 "required": [
240 "discount"
241 ]
242 }
243 }
244}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "galvatron.029ac000-f247-11ee-8ebf-a5449eb2a343"
5 ],
6 "name": "discount",
7 "type": "end",
8 "version": "1",
9 "created_timestamp": 1712209729536,
10 "id": "MLbp0ah4hV/+HuBTZa2HYMOQeEPl6f4zd41xRRWVhng=",
11 "category": "application"
12 },
13 "company_id": 1202,
14 "application_id": "6266915e7dc67510e66c8b42",
15 "contains": [
16 "discount"
17 ],
18 "payload": {
19 "discount": {
20 "is_active": true,
21 "app_ids": [
22 "6266915e7dc67510e66c8b42"
23 ],
24 "name": "FLAT 50% OFF",
25 "job_type": "app|brand|inventory",
26 "discount_type": "percentage",
27 "discount_level": "application",
28 "company_id": 1202,
29 "validity": {
30 "start": "2022-06-15T07:25:43.185Z",
31 "end": "2023-07-01T18:25:00.000Z"
32 },
33 "value": 0,
34 "file_path": "/company/1202/self/documents/product-import/free/original/-ENdY7AHU-FYND-Discount-File-(01-Mar-23).xlsx",
35 "created_by": {
36 "user_id": "23259036"
37 },
38 "modified_by": {
39 "user_id": "23530585"
40 },
41 "created_on": "2022-06-15T07:11:09.831Z",
42 "modified_on": "2024-04-04T05:48:49.524Z",
43 "discount_meta": {
44 "timer": false,
45 "hours": 0,
46 "minutes": 0
47 },
48 "zone_ids": [],
49 "id": "62a9860dbbb01500073d98ba",
50 "price_factory_ids": [
51 "6847c80f5a7010caa1642850"
52 ]
53 }
54 }
55}