POST
Create a location or vehicle
Company space For: Manager, Stock keeper · Permission: assets_{locations|vehicles}.create Conditions
  • name and type are required; name is at most 250 characters and must be unique in the organization (the name of a deleted asset cannot be reused); type is location or vehicle.
  • A location must have a location_group_id of a group of the organization; a vehicle must not have one.
  • company_ids, when sent, must hold at least one entry, no duplicate, and only companies of the organization.
  • A location cannot join a group that a running transfer uses (409).
What else happens
  • When company_ids is sent, one sharing link is created per company. No metadata is created.
Part of Locations, vehicles and site sharing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, type, name, location_group_id, created_at, updated_at, company_ids, metadata, occupied_volume, fill_rate.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: locationGroup.

Response

Resource (only with response=resource).

id

Identifier of the asset (27-character KSUID).

type

Kind of asset: location or vehicle.

name

Name of the asset, unique in the organization.

location_group_id

Identifier of the location group of a location; null for a vehicle.

location_group
object

The group (id and name); omitted when the asset has none.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).

company_ids
any[]

Identifiers of the companies of the organization the asset is shared with, sorted by link id.

metadata
object

Map of every metadata key allowed for the type, with null for keys never set. Measurement values are in the unit chosen by the matching unit key.

occupied_volume

Locations only: volume of stock held at the location, expressed in the location's volume unit; null when no volume unit is set.

fill_rate

Locations only: occupied volume as a percentage of fillable_volume, rounded to two decimals; 0 when fillable_volume is not positive, null when it is not set.