Skip to main content

Cart Dynamic Injection

v1

Description

Get notified on creation, updation, or deletion of dynamic injection to the cart.


Supported Type

  • Create
  • Update
  • Delete

Payload

Create

{
"payload":{
"cart_id":"644630845625add991225b47",
"is_authenticated":true,
"article_level_distribution":true,
"message":"DMS CART",
"value":5,
"collection":{
"collected_by":"FYND",
"refund_by":"FYND"
},
"meta":{

},
"apply_expiry":"2023-06-26-12:34:00",
"article_ids":[
{
"code":"",
"article_id":"647ef550a3bba8e197b81c7d",
"value":5,
"meta":{

},
"type":"discount"
}
],
"type":"discount",
"is_active":true,
"injection_id":"6499383154769c889deefd28",
"user_id":"64870b03f38d335c6e51c84c",
"cart_value":100
},
"meta":{
"job_type":"cart_dynamic_injection_webhook_event",
"trace":"6730d511bfe14cb0822f872bcf02f21e",
"event":{
"name":"cart-dynamic-injection",
"type":"create",
"version":"1"
},
"company_id":873,
"application_id":[
"000000000000000000000001"
],
"trace_id":[
"6730d511bfe14cb0822f872bcf02f21e"
],
"extension_id":[
"6499383154769c889deefd28"
],
"created_timestamp":1686263989,
"service":{
"name":"megatron"
}
}
}

Update

{
"payload":{
"cart_id":"644630845625add991225b47",
"is_authenticated":true,
"article_level_distribution":true,
"message":"DMS CART",
"value":5,
"collection":{
"collected_by":"FYND",
"refund_by":"FYND"
},
"meta":{

},
"apply_expiry":"2023-06-26-12:34:00",
"article_ids":[
{
"code":"",
"article_id":"647ef550a3bba8e197b81c7d",
"value":5,
"meta":{

},
"type":"discount"
}
],
"type":"discount",
"is_active":true,
"injection_id":"6499383154769c889deefd28",
"user_id":"64870b03f38d335c6e51c84c",
"cart_value":100
},
"meta":{
"job_type":"cart_dynamic_injection_webhook_event",
"trace":"6730d511bfe14cb0822f872bcf02f21e",
"event":{
"name":"cart-dynamic-injection",
"type":"update",
"version":"1"
},
"company_id":873,
"application_id":[
"000000000000000000000001"
],
"trace_id":[
"6730d511bfe14cb0822f872bcf02f21e"
],
"extension_id":[
"6499383154769c889deefd28"
],
"created_timestamp":1686263989,
"service":{
"name":"megatron"
}
}
}

Delete

{
"payload":{
"injection_id":"6499383154769c889deefd28"
},
"meta":{
"job_type":"cart_dynamic_injection_webhook_event",
"trace":"6730d511bfe14cb0822f872bcf02f21e",
"event":{
"name":"cart-dynamic-injection",
"type":"create",
"version":"1"
},
"company_id":873,
"application_id":[
"000000000000000000000001"
],
"trace_id":[
"6730d511bfe14cb0822f872bcf02f21e"
],
"extension_id":[
"6499383154769c889deefd28"
],
"created_timestamp":1686263989,
"service":{
"name":"megatron"
}
}
}

KeyTypeDescriptionRequired
injection_idstringdynamic injection unique id
cart_idstringcart id on which the dynamic injection is applied
is_authenticatedbooleanuser type define the user is authorized or not
article_level_distributionbooleanarticle level distribution define amount is distributed in articles or not
messagestringmessage define to show the text or detail regarding the discount, charge or mop etc.
valueintegervalue define the amount applied on the cart
metaobjectmeta define provide the additional information you wanr to pass on article level or cart level
typestringtype define injection type used for charge, discount or mop
is_activebooleanis_active defines the injection is active or not
injection_idstringinjection_id defines the unique injection id
user_idstringuser_id defines the user identification id
cart_valueintegercart_value defines the amount of the cart
article_idsobjectarticle_ids defines the list of articles you want to apply injection
article_idstringarticle_id define id of article
codestringcode define the code for coupon, promotion
collectionobjectcollection define the amount collention defined
collected_bystringcollected_by define who is collecting the amount
refund_bystringrefund_by define who is collecting the amount
allowed_refundbooleanallowed_refund define who will refund the amount in case of order cancelled/returned if refund is True