Updates an existing shipping method, including its pricelist, so that shipping costs can be kept in sync from an ERP or a carrier integration without any follow-up work in the administration.
The update is partial. Every field is optional, a field that is not sent keeps its current value, and the request body must contain at least one field. The response is the same representation GET /api/shipping-methods/{guid}?include=priceList returns.
Pricelist. priceList.priceTiers replaces the whole pricelist: send the complete set of tiers the method should end up with, which is how a tier is added, changed or removed. An individual tier cannot be addressed on its own, because a tier has no identifier that survives a change of shipping service. The array must not be empty — a method always has at least one tier.
Visibility. On an e-shop with the Sales channel module active, visible is derived from the sales-channel bindings, so a request that sends only visible has no effect there; send salesChannelGuids instead. Without the module, visible applies directly. visibility is a deprecated alias of visible; sending both with contradicting values is rejected.
Ownership. A token belonging to an addon may only update the shipping methods created from that addon's own shipping service; anything else is rejected with shipping-method-not-owned. A merchant's own API token is not restricted this way.
Changing the carrier. Sending shippingMethodCode repoints the method at another shipping service. That creates a new version of the method internally — the GUID, the pricelist and the listing position are carried over, so the method stays addressable at the same URL.
Fields that are not updatable here: trackingUrl (it belongs to the carrier, not to the individual method, and is shared by every e-shop using that carrier), wholesale and logo.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/shipping-methods/{guid}
- https://api.myshoptet.comhttps://api.myshoptet.com/api/shipping-methods/{guid}
curl -i -X PATCH \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/shipping-methods/b57f91bb-e920-11e0-baa3-7dc668b75ca8 \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"name": "Shipping name",
"description": "Shipping description",
"shippingMethodCode": "intime-colli-small",
"visible": true,
"visibility": true,
"priority": 3,
"atypicalProductAllowed": false,
"cPostBoxSize": "M",
"salesChannelGuids": [
"1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
],
"priceList": {
"allowFreeShipping": true,
"pairedPaymentMethodGuids": [
"1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
],
"priceTiers": [
{
"countryCode": "cz",
"regionId": 5,
"currencyCode": "CZK",
"priceFrom": "21.00",
"priceUntil": "21.00",
"weightFrom": "1.234",
"weightUntil": "1.234",
"price": "21.00",
"includingVat": true,
"taxClassId": 1
}
]
}
}
}'{ "data": { "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed", "name": "Shipping company", "description": "Delivery within 48 hours", "shippingCompany": { … }, "trackingUrl": "http://www.ppl.cz/main2.aspx?cls=Package&idSearch=#PACKAGE_NUMBER#", "visible": true, "priority": 16, "wholesale": true, "logoUrl": "https://www.example.com/logo.png", "priceList": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }