Save the lab's whole shipping rate table
Replaces the lab's shipping zones, types and prices with the given document. New rows carry client-generated ids so prices can reference a zone or type created in the same save. Omitted zones are deleted with their prices; an omitted shipping type is deleted unless an order still uses it (archive it with isActive=false instead). Orders keep the price they were sold with.
Replaces the lab's shipping zones, types and prices with the given document. New rows carry client-generated ids so prices can reference a zone or type created in the same save. Omitted zones are deleted with their prices; an omitted shipping type is deleted unless an order still uses it (archive it with isActive=false instead). Orders keep the price they were sold with.
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/shipping/settings" \ -H "Content-Type: application/json" \ -d '{ "zones": [ { "id": "string", "name": "string", "isCatchAll": true, "countries": [ "string" ] } ], "types": [ { "id": "string", "name": "string", "method": "carrier", "taxRate": "string", "insurance": { "mode": "off" }, "isActive": true, "sortOrder": 0 } ], "rates": [ { "shippingTypeId": "string", "zoneId": "string", "minWeightGrams": 0, "price": "string" } ] }'{ "currency": "string", "taxMode": "unconfigured", "defaultTaxRate": "string", "zones": [ { "id": "string", "name": "string", "isCatchAll": true, "countries": [ "string" ] } ], "types": [ { "id": "string", "name": "string", "method": "carrier", "taxRate": "string", "insurance": { "mode": "off" }, "isActive": true, "sortOrder": 0 } ], "rates": [ { "shippingTypeId": "string", "zoneId": "string", "minWeightGrams": 0, "price": "string" } ], "productsMissingWeight": { "count": 0, "products": [ { "id": "string", "name": "string" } ] }, "partnerCountries": [ "string" ]}