# Stock Update Webhook

## Stock Updated Webhook

> This is a dummy endpoint that demonstrates the webhook payload structure that will be sent\
> to webhook subscribers when a stock.updated event occurs.\
> \
> The actual webhooks will be sent asynchronously to the URLs specified in the webhook subscriptions\
> that are subscribed to the stock.updated event type.\
> \
> The webhook payload includes:\
> \- id: ID of the webhook message\
> \- event: The event type (stock.updated)\
> \- timestamp: When the event occurred\
> \- subscription\_id: ID of the webhook subscription\
> \- message: The stock data in the same format as the GET /stock endpoint

```json
{"openapi":"3.1.0","info":{"title":"Sellers Center API","version":"1.0.0"},"security":[{"APIKeyAuth":[]}],"components":{"securitySchemes":{"APIKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"StockWebhookMessageSchema":{"properties":{"id":{"description":"ID of the webhook message","minimum":1,"title":"Id","type":"integer"},"event":{"const":"stock.updated","description":"Event type of webhook message","title":"Event","type":"string"},"timestamp":{"description":"UTC timestamp when the event was created","format":"date-time","title":"Timestamp","type":"string"},"message":{"description":"Stock payload of the triggered event","items":{"$ref":"#/components/schemas/WebhookStockSchema"},"title":"Message","type":"array"},"subscription_id":{"anyOf":[{"description":"ID (integer) of this property","minimum":1,"type":"integer"},{"type":"null"}],"description":"ID of the subscription","title":"Subscription Id"}},"required":["id","event","message"],"title":"StockWebhookMessageSchema","type":"object"},"WebhookStockSchema":{"properties":{"sku":{"description":"Stock Keeping Unit identifier","maxLength":120,"title":"Sku","type":"string"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Stock quantity of the product variant in the merchant's warehouse.","title":"Quantity"},"quantity_fbm":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Stock quantity of the product variant in ABOUT YOU warehouses.","title":"Quantity Fbm"}},"required":["sku","quantity","quantity_fbm"],"title":"WebhookStockSchema","type":"object"}}},"paths":{"/api/v1/webhooks/stock-updated":{"post":{"operationId":"scapi_app_endpoints_webhook_api_stock_updated_webhook","summary":"Stock Updated Webhook","parameters":[],"responses":{"200":{"description":"OK"}},"description":"This is a dummy endpoint that demonstrates the webhook payload structure that will be sent\nto webhook subscribers when a stock.updated event occurs.\n\nThe actual webhooks will be sent asynchronously to the URLs specified in the webhook subscriptions\nthat are subscribed to the stock.updated event type.\n\nThe webhook payload includes:\n- id: ID of the webhook message\n- event: The event type (stock.updated)\n- timestamp: When the event occurred\n- subscription_id: ID of the webhook subscription\n- message: The stock data in the same format as the GET /stock endpoint","tags":["Webhook Messages"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockWebhookMessageSchema"}}},"required":true}}}}}
```
