Custom Webhook
Inventory Update API Endpoint
Purpose:
Allow to update stock level real time.
API Endpoint Details:
Method | Endpoint |
---|---|
POST |
|
Request Headers:
Header | Required | Description |
---|---|---|
| Yes |
|
| Yes | API key for authentication |
Request Payload (JSON):
{
"id": "1622203826274",
"variantId": "14607116304482",
"stock": 1
}
Field Description:
id (string, required) - The product id.
variantId (string, required) - The variant id.
stock (integer, required) - The new stock count..
Response:
Status code 200 (Automatically send the response if API key is valid and process the update in queue).
Status code 401 Unauthorised
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 401,
"detail": "Invalid API Key",
"errors": [
{
"field": "x-api-key",
"message": "Invalid API Key"
}
]
}
Status code 403 Forbidden
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 403,
"detail": "Invalid TenantId: ",
"errors": [
{
"field": "tenantId",
"message": "Invalid TenantId: "
}
]
}
Status code 400 Validation Error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "Validation errors.",
"errors": [
{
"field": "Id",
"message": "Id is required."
},
{
"field": "VariantId",
"message": "VariantId is required."
}
]
}
Price Update API Endpoint
Purpose:
Allow to update product variant price real time.
API Endpoint Details:
Method | Endpoint |
---|---|
POST |
|
Request Headers:
Header | Required | Description |
---|---|---|
| Yes |
|
| Yes | API key for authentication |
Request Payload (JSON):
{
"id": "1622203826274",
"variantId": "14607116304482",
"price": 500.32,
"originalPrice": 700.53
}
Field Description:
id (string, required) - The product id.
variantId (string, required) - The variant id.
Price (decimal, required) - The new variant price.
OriginalPrice (decimal, required) - The new original price for sale.
Response:
Status code 200 (Automatically send the response if API key is valid and process the update in queue).
Status code 401 Unauthorised
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 401,
"detail": "Invalid API Key",
"errors": [
{
"field": "x-api-key",
"message": "Invalid API Key"
}
]
}
Status code 403 Forbidden
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 403,
"detail": "Invalid TenantId: ",
"errors": [
{
"field": "tenantId",
"message": "Invalid TenantId: "
}
]
}
Status code 400 Validation Error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "Validation errors.",
"errors": [
{
"field": "Id",
"message": "Id is required."
},
{
"field": "VariantId",
"message": "VariantId is required."
}
]
}
Product Delete API Endpoint (advanced)
Purpose:
Allow to delete product real time.
API Endpoint Details:
Method | Endpoint |
---|---|
POST |
|
Request Headers:
Header | Required | Description |
---|---|---|
| Yes |
|
| Yes | API key for authentication |
Request Payload (JSON):
{
"id": "1622203826274"
}
Field Description:
id (string, required) - The product id.
Response:
Status code 200 (Automatically send the response if API key is valid and process the update in queue).
Status code 401 Unauthorised
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 401,
"detail": "Invalid API Key",
"errors": [
{
"field": "x-api-key",
"message": "Invalid API Key"
}
]
}
Status code 403 Forbidden
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 403,
"detail": "Invalid TenantId: ",
"errors": [
{
"field": "tenantId",
"message": "Invalid TenantId: "
}
]
}
Status code 400 Validation Error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "Validation errors.",
"errors": [
{
"field": "Id",
"message": "Id is required."
}
]
}
Product Create API Endpoint (Advanced)
Purpose:
Allow to create product real time.
API Endpoint Details:
Method | Endpoint |
---|---|
POST |
|
Request Headers:
Header | Required | Description |
---|---|---|
| Yes |
|
| Yes | API key for authentication |
Request Payload (JSON):
{
"product": {
"id": "string",
"title": "string",
"body_html": "string"
...
}
}
Field Description:
product (object, required) - The product object, Can receive different product JSON schema.
Response:
Status code 200 (Automatically send the response if API key is valid and process the update in queue).
Status code 401 Unauthorised
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 401,
"detail": "Invalid API Key",
"errors": [
{
"field": "x-api-key",
"message": "Invalid API Key"
}
]
}
Status code 403 Forbidden
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 403,
"detail": "Invalid TenantId: ",
"errors": [
{
"field": "tenantId",
"message": "Invalid TenantId: "
}
]
}
Status code 400 Validation Error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"$": [
"JSON deserialization for type 'Preezie.Greenback.Importer.Application.ProductWebhook.Commands.CustomPriceUpdateCommand' was missing required properties including: 'shopDomain'."
],
"command": [
"The command field is required."
]
},
"traceId": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01"
}
Authentication & Security
API Key Authentication - Clients must send a valid
X-API-KEY
header.Tenant-Level Isolation - Each tenant has a unique web hook API key for security