Dozer logoDozer
Get started
Dozer Docs
Collections

Locations

Sites, pits and zones your machines are assigned to.

Base path /api/v1/locations on https://trydozer.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in declared mode; an operation this resource does not declare answers 405 operation_not_supported.

List locations

GET /api/v1/locations

curl "https://trydozer.com/api/v1/locations?type=pit" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit"
Show me the locations filtered by type
data_query {
  "collection": "locations",
  "where": {
    "type": "pit"
  }
}

Returns a paginated list of location objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "location",
      "id": "obj_123",
      "name": "Dominion Cut",
      "type": "pit",
      "pit": "Dominion Cut",
      "pit_count": 1,
      "region": "Yukon",
      "created_at": "2026-07-25T12:00:00.000Z",
      "updated_at": "2026-07-25T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Parameters

ParameterTypeKindDescription
typestringfilterWhat kind of place it is — pit, shop or yard.
statusstringfilterWhether the location is still in use — active or inactive. A location created from chat defaults to active.
pitstringfilterPit name, when the pit is named differently from the site.
qstringsearchFree-text search across name.
sortstringsortOne of name, pit_count; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a location

GET /api/v1/locations/a60h-12

curl "https://trydozer.com/api/v1/locations/a60h-12" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit"
Open the location {id}
data_get {
  "collection": "locations",
  "object_id": "a60h-12"
}

Returns the location object.

{
  "object": "location",
  "id": "obj_123",
  "name": "Dominion Cut",
  "type": "pit",
  "pit": "Dominion Cut",
  "pit_count": 1,
  "region": "Yukon",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe location's id or slug.

Create a location

POST /api/v1/locations

curl -X POST "https://trydozer.com/api/v1/locations" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dominion Cut","type":"pit","status":"active","region":"Yukon"}'
Create a new location
data_set {
  "collection": "locations",
  "object_id": "a60h-12",
  "data": {
    "name": "Dominion Cut",
    "type": "pit",
    "status": "active",
    "region": "Yukon"
  }
}

Returns the location object.

{
  "object": "location",
  "id": "obj_123",
  "name": "Dominion Cut",
  "type": "pit",
  "pit": "Dominion Cut",
  "pit_count": 1,
  "region": "Yukon",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoDisplay name of the site, pit or zone (e.g. "Dominion Cut").
typestringnoWhat kind of place it is — pit, shop or yard.
pitstringnoPit name, when the pit is named differently from the site.
pit_countnumbernoNumber of pits at this location. Rows with type "pit" and no pit_count count as 1.
statusstringnoWhether the location is still in use — active or inactive. A location created from chat defaults to active.
regionstringnoWider area or district the site sits in (e.g. a mining district or state).

Update a location

PATCH /api/v1/locations/a60h-12

curl -X PATCH "https://trydozer.com/api/v1/locations/a60h-12" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit" \
  -H "Content-Type: application/json" \
  -d '{"name":"name","type":"type","pit":"pit"}'
Update the location {id}
data_set {
  "collection": "locations",
  "object_id": "a60h-12",
  "data": {
    "name": "name",
    "type": "type",
    "pit": "pit"
  }
}

Returns the location object.

{
  "object": "location",
  "id": "obj_123",
  "name": "Dominion Cut",
  "type": "pit",
  "pit": "Dominion Cut",
  "pit_count": 1,
  "region": "Yukon",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoDisplay name of the site, pit or zone (e.g. "Dominion Cut").
typestringnoWhat kind of place it is — pit, shop or yard.
pitstringnoPit name, when the pit is named differently from the site.
pit_countnumbernoNumber of pits at this location. Rows with type "pit" and no pit_count count as 1.
statusstringnoWhether the location is still in use — active or inactive. A location created from chat defaults to active.
regionstringnoWider area or district the site sits in (e.g. a mining district or state).

What comes back (read-only)

Every location carries the envelope below. This resource declares no server-owned fields beyond it.

FieldTypeDescription
objectstringAlways location.
idstringStable object id. Also accepted in place of slug on any path.
slugstringURL-safe name, unique within the collection.
created_atstringISO-8601 timestamp of the first write.
updated_atstringISO-8601 timestamp of the most recent write. The cursor sorts on this.

Errors

Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.

On this page

Dozer logoDozer

Ready to build? Connect an agent and go — no credit card needed to start.

Get startedSee our plans