Rename or recolor a location
Renames a location or changes its display colour or icon. Send only the fields you want to change.
Renaming keeps the location on every line that already sits there — the lines follow the new name. A new name that clashes with another of your locations returns CONFLICT.
Requires the inventory:write scope.
Path Parameters
- Type: stringlocation
Name min length:1requiredThe location's current name. URL-encode it in the path — e.g.
Shelf%20A. Matched case-insensitively.
Body
application/json
- Type: stringcolormin length:1max length:50nullable
A new display colour. Send
nullto remove the colour, omit to leave it unchanged. - Type: stringiconmin length:1max length:50nullable
A new display icon. Send
nullto remove the icon, omit to leave it unchanged. - Type: stringnamemin length:1max length:100
A new name for the location. Omit to leave the name unchanged.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for patch/inventory/locations/{locationName}
curl 'https://public-api.cardnexus.com/v1/inventory/locations/{locationName}' \
--request PATCH \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "",
"color": "#22c55e",
"icon": "star"
}'
{
"name": "Trade binder",
"color": "#22c55e",
"icon": "star"
}