Skip to content

Shipping method deletion

Request

Removes an existing shipping method, so that an addon can clean up the methods it provisioned instead of leaving the merchant to delete them by hand in the administration.

The delete is soft. The method disappears from the storefront, from the administration and from GET /api/shipping-methods, and the GUID stops resolving — but orders that were already placed with it go on showing it. Deleting a method never rewrites order history.

Ownership. A token belonging to an addon may only delete 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.

The default method cannot be deleted. The e-shop's default retail and default wholesale shipping methods are rejected with shipping-method-deletion-blocked, whoever asks. Point the default at another method in the administration first.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
guidstringrequired

Unique identifier of the shipping method.

Example:b57f91bb-e920-11e0-baa3-7dc668b75ca8
Headers
Content-Typestringrequired
Default:"application/json"
curl -i -X DELETE \
  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'

Responses

OK

Bodyapplication/json
dataobject or nullrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": {}, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }