OIC - How to implement the "Product Update Webhook"
Whenever a product is created or updated in your system, you must notify OmniChat by sending a POST request to the product update endpoint.
The request must be authenticated using the authorization token. Check how to create your token here
Request
Method: POST
Content-Type: application/json
Authorization: Generated bearer token
The request body must contain a single product following the structure below.
Send one product per request. For bulk synchronization, use the full sync integration — contact OmniChat support to configure it.
Example
curl --location 'https://oic-service.omni.chat/products' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_token' \
--data '{
"blocked": false,
"objectId": "12345",
"name": "iPhone 14 Pro",
"productDescription": "Smartphone Apple iPhone 14 Pro",
"externalUrl": "https://www.yourstore.com/iphone-14-pro",
"sellOutOfStock": false,
"trackInventory": true,
"service": false,
"categories": [
"iphone14",
"novo"
],
"specifications": [
{
"key": "tela",
"value": "OLED, HDR, Super Retina"
},
{
"key": "chip",
"value": "a19-pro"
}
],
"variants": [
{
"objectId": "12345-1",
"erpId": "54321-1",
"name": "iPhone 14 Pro 128gb Purple",
"visible": true,
"price": 9499.99,
"salePrice": 9400,
"quantity": 30,
"refCode": "ABC-123",
"unlimitedQuantity": false,
"images": [
"https://www.yourstore.com/images/iphone-14-pro-purple.jpg",
"https://www.yourstore.com/images/iphone-14-pro-purple-2.jpg"
],
"sellerId": "1",
"sellerName": "Your Store",
"width": 7.15,
"height": 14.8,
"variantLength": 1,
"weight": 206,
"variations": [
{
"key": "Color",
"value": "Purple"
},
{
"key": "Storage",
"value": "128gb"
}
]
},
{
"objectId": "12345-2",
"images": [
"https://www.yourstore.com/images/iphone-14-pro-gold.jpg"
],
"erpId": "54321-2",
"name": "iPhone 14 Pro 128gb Gold",
"visible": true,
"price": 9399.99,
"salePrice": 9200,
"quantity": 28,
"sellerId": "1",
"sellerName": "Your Store",
"width": 7.15,
"height": 14.8,
"variantLength": 1,
"weight": 206,
"variations": [
{
"key": "Color",
"value": "Gold"
},
{
"key": "Storage",
"value": "128gb"
}
]
}
]
}'
References
Product
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
blocked | boolean | No | False | Whether the product is blocked from being displayed. Default: false |
objectId | string | Yes | Unique product identifier in your system | |
name | string | Yes | Product name | |
productDescription | string | No | Product description | |
externalUrl | string | No | URL to the product page on your website | |
variants | Variant[] | Yes | All available variants (including the main variant) | |
sellOutOfStock | boolean | No | False | Whether the product can be sold when out of stock |
trackInventory | boolean | No | True | Whether inventory should be tracked for this product |
specifications | Specification[] | No |
Variant
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
objectId | string | Yes | Unique variant identifier | |
externalImageURL | string | No | URL to the variant image | |
erpId | string | No | Variant identifier in your ERP system | |
name | string | Yes | Variant display name | |
visible | boolean | No | True | Whether this variant is visible to end users |
price | number | Yes | Original price | |
salePrice | number | No | Promotional/sale price | |
quantity | number | No | Available stock quantity | |
sellerId | string | No | Seller identifier (for marketplace scenarios) | |
sellerName | string | No | Seller display name | |
width | number | No | Width in cm | |
height | number | No | Height in cm | |
variantLength | number | No | Length in cm | |
weight | number | No | Weight in grams | |
variations | Variation[] | No | List of variation attributes (e.g., color, size) |
Specification
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Specification name (e.g., "Color", "Size") |
value | string | Yes | Specification attribute value (e.g., "Purple", "128gb") |
Variation
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Variation attribute name (e.g., "Color", "Size") |
value | string | Yes | Variation attribute value (e.g., "Purple", "128gb") |
Updated 2 months ago
Did this page help you?