Create a location
Creates a new location in your account.
The name must be one you don't already use — names are compared case-insensitively, so Shelf A and shelf a count as the same and the second request returns CONFLICT.
Send "upsert": true to make the call safe to repeat: when the location already exists it is returned — updated with any color or icon you sent — instead of failing with CONFLICT. One call then guarantees the location exists before you reference it on inventory lines.
Requires the inventory:write scope.
- Type: stringnamemin length:1max length:100required
The location's name, unique within your account.
- Type: stringcolormin length:1max length:50
An optional display colour, free-form text.
- Type: stringiconmin length:1max length:50
An optional display icon, free-form text.
- Type: booleanupsert
When
trueand you already have a location with this name, the request returns that location — updated with anycolororiconyou sent — instead of failing withCONFLICT. The existing location keeps its stored name spelling.
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://public-api.cardnexus.com/v1/inventory/locations \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "Trade binder",
"color": "",
"icon": "",
"upsert": true
}'
{
"name": "Trade binder",
"color": "#22c55e",
"icon": "star"
}