Skip to content

Commit 797c392

Browse files
committed
Update the openapi spec for the product.update webhook
1 parent 083677d commit 797c392

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

features/product-catalog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ The response will include a `pagination` object with the following fields. You c
223223

224224
## Keeping your catalog in sync
225225

226-
If you need to maintain a copy of your product catalog in your system you can use the [product update webhook](/reference/2024-02-05/webhook/product.update) to keep it synchronized with Runa's system.
226+
If you maintain a copy of the product catalog in your system you can use the [product update webhook](/reference/2024-02-05/webhook/product.update) to keep it synchronized and avoid order failures.
227227

228228
<Card
229229
title="How to implement real-time product updates"

features/realtime-product-updates.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ description: "Using webhooks to get real-time updates on product catalog changes
44
icon: "webhook"
55
---
66

7-
Instead of polling the product catalog for changes, you can use the `product.update` webhook to get real-time update pushed to your system when a product is added, updated or removed from your catalog. If multiple products are updated at once, an event is triggered for each product.
7+
Instead of polling the product catalog for changes, you can use the `product.update` webhook to get real-time update pushed to your system when a product is added, updated or removed from your catalog.
88

99
## How to use the `product.update` webhook
1010

11-
If you maintain a copy of the product catalog in your system, you can use the `product.update` webhook to keep it synchronized with Runa's system and minimize order failures. Attempts to order a product that is no longer available or for a denomination that is no longer available will be rejected. If you subscribe to the webhook, you will receive an event for each product that is updated and can take action to avoid these rejections.
11+
An event is triggered when there is an update to a product in the catalog. If multiple products are updated at once, an event is triggered for each product. This can be a product being added, updated or removed from the catalog.
12+
13+
Attempts to order a product that is no longer available or for a denomination that is no longer available will be rejected. If you subscribe to the webhook, you will receive an event for each product that is updated and can take action to avoid these rejections.
1214

1315
We won't cover the generic details of how to set up a webhook subscription, but you can read about that in the [webhook reference](/reference/webhooks).
1416

reference/2024-02-05/openapi.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,12 @@
15871587
"required": ["price_multiplier", "is_orderable"],
15881588
"properties": {
15891589
"price_multiplier": {
1590-
"type": "string",
1591-
"example": "0.8"
1590+
"$ref": "#/components/schemas/ProductDiscountMultiplier"
15921591
},
1593-
"is_orderable": { "$ref": "#/components/schemas/ProductIsOrderable" }
1592+
"is_orderable": { "$ref": "#/components/schemas/ProductIsOrderable" },
1593+
"denominations": {
1594+
"$ref": "#/components/schemas/ProductDenominations"
1595+
}
15941596
}
15951597
},
15961598
"PayoutStatus": {
@@ -1955,7 +1957,8 @@
19551957
"type": {
19561958
"type": "string",
19571959
"enum": ["open", "fixed"],
1958-
"description": "The type of denomination. Can be `open` or `fixed`. `open` is any amount between minimum and maximum value. Fixed is limited to those returned in the `available_list`."
1960+
"description": "The type of denomination. Can be `open` or `fixed`. `open` is any amount between minimum and maximum value. Fixed is limited to those returned in the `available_list`.",
1961+
"example": "fixed"
19591962
},
19601963
"minimum_value": {
19611964
"$ref": "#/components/schemas/ProductMinimumValue"

0 commit comments

Comments
 (0)