Skip to main content
A site is a plant, depot or building your organisation runs, and every asset and work order belongs to one. This guide adds a site and a location inside it. The examples assume a token in $TOKEN, which Authentication explains how to get. The account needs permission to create sites. Without it the request is refused with HTTP 403, and the answer names the permission to add to the identity’s role.

See which sites exist

Filter by code to check whether a site is already there before you add it: &code=eq.COL-01.

Add the site

Call create_site with the site’s fields in p_values. Only name is required.
The answer is the new site:
The code comes from your organisation’s numbering, so you do not send one. Keep the id: assets, locations and work orders refer to the site by it. Fields worth setting at the start: The Add a site page under Integration API lists every field. Your organisation’s own fields go in p_custom_fields, keyed by the field’s key.
If your organisation requires approval for new sites, the answer is "status": "PENDING_APPROVAL" instead of the site, and the site is created once somebody approves it.

Add a location inside it

Locations are the rooms, areas and lines inside a site. Add one with create_record, naming the kind of record as core.locations:
name and site_id are required. Set parent_id to another location’s id to put this one inside it.

Change a site later

Call update_record with core.sites, the site’s id and only the fields that change:
Next: add an asset at the new site.