Product Changes Notification Data Schema
Basically all of these notification have same schemas, but we can differentiate it from variable action at JSON response.
The schemas are as follows:
Stock Overwrite Notification
Stock Overwrite is notification that show information overwrite main stock into new value.
This notification will be trigger when :
- Edit Stock At Seller Dashboard
- Hit Open API Edit Product Endpoint by change stock into new value
Example case
User current main stock are 50 and they got notification with value 40, then user can simply overwrite main stock into 40. So the new main stock value will be 40
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service unique identifier |
product_changes_data | Product Array | Products changes data |
Below are product_changes_data
schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
warehouse_id | Integer | Warehouse unique identifier |
value | String | New overwrite main stock value |
previous_value | String | Previous main stock value |
update_time | Integer | UNIX format updated time |
is_default_warehouse | Boolean | Indicate for default warehouse of the shop. If not implement multilocation project, pick the true response to overwrite stock |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "stock_overwrite",
"product_id": 15373818,
"shop_id": 479573,
"warehouse_id": 1610,
"value": "18",
"previous_value": "22",
"update_time": 1617177134262899227,
"is_default_warehouse": true
}
]
}
Stock Decrement Notification
Stock Decrement is notification that show information decrement stock into new value.
This notification will be trigger when :
- New Order with Payment Verified Status (order status
220
) - Hit Open API Update Stock
- Created new reserve stock by join campaign
Example case
User current main stock are 50 and they got notification with value 1, then user can simply update main stock by decrement it by 1. So the new main stock value will be 49.
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service unique identifier |
product_changes_data | Product Array | Products changes data |
Below are product_changes_data schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
warehouse_id | Integer | Warehouse unique identifier |
value | String | New decrement stock value |
previous_value | String | Previous main stock value |
update_time | Integer | UNIX format updated time |
is_default_warehouse | Boolean | Indicate for default warehouse of the shop. If not implement multilocation project, pick the true response to decrement stock |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "stock_decrement",
"product_id": 15373818,
"shop_id": 479573,
"warehouse_id": 1610,
"value": "10",
"previous_value": "20",
"update_time": 1617174461504856148,
"is_default_warehouse": true
}
]
}
Stock Increment Notification
Stock Increment is notification that show information increment stock into new value.
This notification will be trigger when :
- Order Rejected (order status
10
) - Hit Open API Update Stock)
- Transfer back remaining reserve stock by the end of campaign
Example Case
User current main stock are 50 and they got notification with value 1, then user can simply update main stock by increment it by 1. So the new main stock value will be 51.
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service unique identifier |
product_changes_data | Product Array | Products changes data |
Below are product_changes_data schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
warehouse_id | Integer | Warehouse unique identifier |
value | String | New increment stock value |
previous_value | String | Previous main stock value |
update_time | Integer | UNIX format updated time |
is_default_warehouse | Boolean | Indicate for default warehouse of the shop. If not implement multilocation project, pick the true response to increment stock |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "stock_increment",
"product_id": 15373818,
"shop_id": 479573,
"warehouse_id": 1610,
"value": "1",
"previous_value": "15",
"update_time": 1617173930274893859,
"is_default_warehouse": true
}
]
}
Stock Alert Notification
Stock Alert is notification that show information alert stock into new value.
This notification will be trigger when :
- Edit Stock Alert At Seller Dashboard
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service ID |
product_changes_data | Product Array | Products changes data |
Below are product_changes_data schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
warehouse_id | Integer | Warehouse unique identifier |
value | String | New stock alert value |
update_time | Integer | UNIX format updated time |
is_default_warehouse | Boolean | Indicate for default warehouse of the shop. If not implement multilocation project, pick the true response to update stock alert |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "stock_alert_changes",
"product_id": 15373818,
"shop_id": 479573,
"warehouse_id": 1610,
"value": "5",
"update_time": 1617173930274893859,
"is_default_warehouse": true
}
]
}
Price Changes Notification
Price Changes is notification that show information new price value.
This notification will be trigger when :
- Hit Open API Update Price
- Edit Price At Seller Dashboard
- Hit Open API Edit Product Endpoint by change price into new value(
Example Case
User current price are 5000 and they got notification with value 8000, then user can simply update price by into 8000. So the new price will be 8000
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service unique identifier |
product_changes_data | []Array | Products changes data |
Below are product_changes_data schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
warehouse_id | Integer | Warehouse unique identifier |
value | String | New price value |
previous_value | String | Previous price value |
update_time | Integer | UNIX format updated time |
is_default_warehouse | Boolean | Indicate for default warehouse of the shop. If not implement multilocation project, pick the true response to update price |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "price_changes",
"product_id": 15373818,
"shop_id": 479573,
"warehouse_id": 1610,
"value": "40000.00",
"previous_value": "30000.00",
"update_time": 1617175200092771477,
"is_default_warehouse": true
}
]
}
Status Changes Notification
Status Changes is notification that show information new product status value.
This notification will be trigger when :
- Hit Open API Update Stock
- Hit Open API Set Active Product
- Hit Open API Set Inactive Product
- Hit Open API Set Delete Product
- Edit Status At Seller Dashboard
- Hit Open API Edit Product Endpoint by change status into new value
Below are header schema :
Field | Type | Description |
---|---|---|
fs_id | Integer | Fulfillment service unique identifier |
product_changes_data | Product Array | Products changes data |
Below are product_changes_data schema :
Field | Type | Description |
---|---|---|
product_id | Integer | Product unique identifier |
action | String | Action Type of Product Change Notification |
shop_id | Integer | Shop unique identifier |
value | String | New product status value. To know the detail of product status code, please refer to Product Status Code on Notes for more details. |
update_time | Integer | UNIX format updated time |
Example Response
{
"fs_id": 14236,
"product_changes_data": [
{
"action": "status_changes",
"product_id": 15373818,
"shop_id": 479573,
"value": "3",
"update_time": 1617174558966800822
}
]
}
Notes
Code | Description |
---|---|
-2 | Banned |
-1 | Pending |
0 | Deleted |
1 | Active |
3 | Inactive (Warehouse) |