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
  • locationName
    Type: string
    min length:  
    1
    required

    The location's current name. URL-encode it in the path — e.g. Shelf%20A. Matched case-insensitively.

Body
application/json
  • color
    Type: string
    min length:  
    1
    max length:  
    50
    nullable

    A new display colour. Send null to remove the colour, omit to leave it unchanged.

  • icon
    Type: string
    min length:  
    1
    max length:  
    50
    nullable

    A new display icon. Send null to remove the icon, omit to leave it unchanged.

  • name
    Type: string
    min length:  
    1
    max 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"
}