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.
Events
application/legal/update/v1
# this event is triggered when legal is updated
Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{2 "type": "object",3 "required": [4 "company_id",5 "contains",6 "event",7 "payload",8 "application_id"9 ],10 "properties": {11 "application_id": {12 "type": [13 "array",14 "string"15 ],16 "description": "sales channel ID for which this event is triggered"17 },18 "company_id": {19 "type": "integer",20 "description": "company ID for which this event is triggered"21 },22 "contains": {23 "type": "array",24 "description": "This array will have all the keys present at root level of 'payload' object",25 "items": {26 "type": "string"27 }28 },29 "event": {30 "type": "object",31 "required": [32 "category",33 "created_timestamp",34 "id",35 "name",36 "trace_id",37 "type",38 "version"39 ],40 "properties": {41 "category": {42 "type": "string",43 "description": "category of the event. If it is at sales channel level or company level"44 },45 "created_timestamp": {46 "type": "integer",47 "description": "event generation timestamp in epoch milliseconds"48 },49 "id": {50 "type": "string",51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"52 },53 "name": {54 "type": "string",55 "description": "Name of the event"56 },57 "trace_id": {58 "type": "array",59 "description": "internal trace_id for Fynd Platform services",60 "items": {61 "type": "string"62 }63 },64 "type": {65 "type": "string",66 "description": "Type/Action of the event. e.g. create/update/delete"67 },68 "version": {69 "type": "string",70 "description": "Version of the event."71 }72 }73 },74 "payload": {75 "type": "object",76 "required": [77 "legal"78 ],79 "properties": {80 "legal": {81 "type": "object",82 "required": [83 "tnc",84 "policy",85 "shipping",86 "returns",87 "_id",88 "application",89 "__v",90 "createdAt",91 "updatedAt",92 "faq"93 ],94 "properties": {95 "__v": {96 "type": "integer",97 "description": "Version Key Property - auto generated by system"98 },99 "_id": {100 "type": "string",101 "description": "Unique Identifier of a Legal Entry in DB - auto generated by system"102 },103 "faq": {104 "type": "array",105 "description": "List of Frequently Asked Questions",106 "items": {107 "type": "object",108 "properties": {109 "question": {110 "type": "string",111 "description": "The question of a FAQ query"112 },113 "answer": {114 "type": "string",115 "description": "The answer of a FAQ query"116 }117 }118 }119 },120 "tnc": {121 "type": "string",122 "description": "Content within 'Terms and Conditions'"123 },124 "policy": {125 "type": "string",126 "description": "Content within 'Privacy policy'"127 },128 "returns": {129 "type": "string",130 "description": "Content within 'Return policy'"131 },132 "shipping": {133 "type": "string",134 "description": "Content within 'Shipping policy'"135 },136 "createdAt": {137 "type": "string"138 },139 "updatedAt": {140 "type": "string"141 },142 "application": {143 "type": "string",144 "description": "sales channel ID to which the legal documents are associated"145 }146 }147 }148 }149 }150 }151}
Payload Example
1{2 "event": {3 "trace_id": [4 "convex.c99ebdb3-8307-48d5-8d9d-6b569e7658cf"5 ],6 "name": "legal",7 "type": "update",8 "version": "1",9 "created_timestamp": 1712139859692,10 "id": "NQDXu+YB1nldd1y6PmjRYQMteTM057O68gvGcw1Biks=",11 "category": "application"12 },13 "company_id": 5275,14 "application_id": "64b8f5c14d7918e5e14a0ac9",15 "contains": [16 "legal"17 ],18 "payload": {19 "legal": {20 "_id": "660d22e238647a11da70d56b",21 "application": "64b8f5c14d7918e5e14a0ac9",22 "__v": 0,23 "createdAt": "2024-04-03T09:35:30.739Z",24 "faq": [],25 "policy": "Lorum ipsum dolor sit amut ",26 "updatedAt": "2024-04-03T10:24:19.667Z",27 "tnc": "",28 "shipping": "",29 "returns": ""30 }31 }32}