Set routing
PUT
/ admin/ v1/ stores/ {store_id}/ inventory/ routing- settings:write
Save the routing rules and, when sent, the ranking of locations. Send If-Match: "v{version}" ("v0" before the first save). ; staff limited to some locations can't.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
If-Matchstring · or nullETag from the last read, e.g. "v3"
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
rulesarray of enumsrequiredThe rules on, in the order they apply; each at most once.
- same_region
- one_shipment
- ranked
rankingarray of strings · or nullLocations first to last; locations left out lose their rank. Omit to keep the ranking.
Returns
200 The routing rules.
Errors
- 403
forbiddenMissing permission, or limited to some locations. - 412
precondition_failedThey changed since they were read. - 422
validation_failedA rule twice, or an unknown or repeated location.