UpdateMerchantSettingsv0.0.2
Update Merchant settings.
When firing this event make sure you set the `correlation-id` in the headers. Our schemas have standard metadata make sure you read and follow it.
Details
This event can be triggered multiple times per Merchant. Everytime the Merchant adds or updates their information this event will be triggered.
Consumer / Producer Diagram
How to trigger event
1var kafka = require('kafka-node'),
2 Consumer = kafka.Consumer,
3 client = new kafka.KafkaClient(),
4 consumer = new Consumer(
5 client,
6 [
7 { topic: 't', partition: 0 },
8 { topic: 'AddedItemToCart', partition: 1 },
9 ],
10 {
11 autoCommit: false,
12 }
13 );
14
15consumer.on('message', function (message) {
16 console.log(message);
17});
18UpdateMerchantSettings Schema (json)
{
"$id": "https://example.com/AddedItemToCart.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "UpdateMerchantSettings",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"correlationId": {
"type": "string",
"description": "The ID of the user"
},
"domain": {
"type": "string",
"description": "The domain of the event"
},
"service": {
"type": "string",
"description": "The name of the service that triggered the event"
}
},
"required": ["correlationId", "domain"]
},
"data": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "The ID of the user"
},
"itemId": {
"type": "string",
"description": "The ID of the shopping item"
},
"quantity": {
"type": "number",
"description": "How many items the user wants to add to their shopping cart",
"minimum": 1,
"maximum": 1000,
"default": 1
}
}
}
}
}
metadata
objectdata
objectLast updated on 2023/10/23