Skip to main content

Cart Price Adjustment

v1

Description

The Price Adjustment Webhook, an integral component of the Platform API, is triggered when modifications to price adjustments in the cart occur.

Operations:

  • Addition: Initiate a POST request with details of the new price adjustment.
  • Update: Trigger a PUT request to signify any changes in existing price adjustment data.
  • Removal: Utilize a DELETE request to specify the removal of a particular price adjustment.

These real-time triggers enhance data synchronization by promptly notifying relevant stakeholders.


Supported Type

  1. Create
  2. Update
  3. Remove

Payload

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,
"id": "6499383154769c889deefd28",
"cart_value": 100
},
"meta": {
"job_type": "cart_price_adjustment_webhook_event",
"trace": "6730d511bfe14cb0822f872bcf02f21e",
"event": {
"name": "cart-price-adjustment",
"type": "update",
"version": "1"
},
"company_id": 873,
"application_id": [
"000000000000000000000001"
],
"trace_id": [
"6730d511bfe14cb0822f872bcf02f21e"
],
"id": [
"6499383154769c889deefd28"
],
"created_timestamp": 1686263989,
"service": {
"name": "megatron"
}
}
}

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,
"id": "6499383154769c889deefd28",
"cart_value": 100
},
"meta": {
"job_type": "cart_price_adjustment_webhook_event",
"trace": "6730d511bfe14cb0822f872bcf02f21e",
"event": {
"name": "cart-price-adjustment",
"type": "create",
"version": "1"
},
"company_id": 873,
"application_id": [
"000000000000000000000001"
],
"trace_id": [
"6730d511bfe14cb0822f872bcf02f21e"
],
"id": [
"6499383154769c889deefd28"
],
"created_timestamp": 1686263989,
"service": {
"name": "megatron"
}
}
}

Remove

{
"payload": {
"id": "6499383154769c889deefd28"
},
"meta": {
"job_type": "cart_price_adjustment_webhook_event",
"trace": "6730d511bfe14cb0822f872bcf02f21e",
"event": {
"name": "cart-price-adjustment",
"type": "remove",
"version": "1"
},
"company_id": 873,
"application_id": [
"000000000000000000000001"
],
"trace_id": [
"6730d511bfe14cb0822f872bcf02f21e"
],
"id": [
"6499383154769c889deefd28"
],
"created_timestamp": 1686263989,
"service": {
"name": "megatron"
}
}
}

Object Properties

keyTypeDescriptionRequired
cart_idstringcart id on which the price adjustment 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 want 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
idstringid defines the unique price adjustment 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