payware_shops_set_delivery
[Merchant] Replace a shop's whole delivery table. Whatever you do not send is removed, so read it first with payware_shops_get_delivery and send every row you want to keep. An empty countries list means "deliver anywhere, no fee".
Instructions
[Merchant] Replace a shop's whole delivery table. Whatever you do not send is removed, so read it first with payware_shops_get_delivery and send every row you want to keep. An empty countries list means "deliver anywhere, no fee".
Endpoint: PUT /shops/{shopCode}/delivery
Each row: country (ISO alpha-2), currency, fee and optionally freeAbove, all amounts decimal strings at the currency's payable scale (at most 15 significant and 15 integer digits). Rules: no two rows with the same country and currency, at most 250 rows, fee 0 or more, freeAbove above zero. A refusal is 400 ERR_INVALID_DELIVERY_COUNTRY, ERR_INVALID_DELIVERY_SETTINGS or ERR_INVALID_AMOUNT_LENGTH and nothing is saved.
Read the answer. It is the saved table and, when the table is not empty, undeliverableProducts (also on every read of the table, until resolved) (productId, name, currency): the shop's active shippable products whose currency has no row in it, so they can now be delivered nowhere. It is absent when there are none. The table is saved either way: tell the merchant, and add rows in those currencies if that was not the intent.
Needs a plan that can ship: Standard or Premium. A Basic (BSC) merchant is refused with 403 ERR_METHOD_NOT_ALLOWED_FOR_CURRENT_USER_PLAN. Changes are audit-logged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"shopCode": "<shopCode>",
"countries": "<countries>"
},
"name": "payware_shops_set_delivery"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shopCode | Yes | The shop code, from payware_shops_list | |
| countries | Yes | The complete table: one row per country and currency. Empty means deliver anywhere with no fee | |
| useSandbox | No | Use the sandbox (the default) rather than production |