Dozer logoDozer
Get started
Dozer Docs
Collections

Mechanics

The crew who maintain the machines.

Base path /api/v1/mechanics 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 mechanics

GET /api/v1/mechanics

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

Returns a paginated list of mechanic objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "mechanic",
      "id": "obj_123",
      "name": "Maria Vasquez",
      "specialization": "hydraulics",
      "assigned_types": [
        "excavator",
        "loader"
      ],
      "phone": "+1 907 555 0142",
      "email": "maria@example.com",
      "status": "assigned",
      "location": "North Pit",
      "created_at": "2026-07-25T12:00:00.000Z",
      "updated_at": "2026-07-25T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Parameters

ParameterTypeKindDescription
statusstringfilterWhether the mechanic is free to take work — available, assigned, busy, or off_shift.
specializationstringfilterWhat this mechanic is the person to call for (e.g. hydraulics, electrical).
qstringsearchFree-text search across name, email.
sortstringsortOne of shift_count, name; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a mechanic

GET /api/v1/mechanics/a60h-12

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

Returns the mechanic object.

{
  "object": "mechanic",
  "id": "obj_123",
  "name": "Maria Vasquez",
  "specialization": "hydraulics",
  "assigned_types": [
    "excavator",
    "loader"
  ],
  "phone": "+1 907 555 0142",
  "email": "maria@example.com",
  "status": "assigned",
  "location": "North Pit",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe mechanic's id or slug.

Create a mechanic

POST /api/v1/mechanics

curl -X POST "https://trydozer.com/api/v1/mechanics" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit" \
  -H "Content-Type: application/json" \
  -d '{"name":"Maria Vasquez","specialization":"hydraulics","assigned_types":["excavator","loader"],"phone":"+1 907 555 0142","email":"maria@example.com","status":"available","location":"North Pit"}'
Create a new mechanic
data_set {
  "collection": "mechanics",
  "object_id": "a60h-12",
  "data": {
    "name": "Maria Vasquez",
    "specialization": "hydraulics",
    "assigned_types": [
      "excavator",
      "loader"
    ],
    "phone": "+1 907 555 0142",
    "email": "maria@example.com",
    "status": "available",
    "location": "North Pit"
  }
}

Returns the mechanic object.

{
  "object": "mechanic",
  "id": "obj_123",
  "name": "Maria Vasquez",
  "specialization": "hydraulics",
  "assigned_types": [
    "excavator",
    "loader"
  ],
  "phone": "+1 907 555 0142",
  "email": "maria@example.com",
  "status": "assigned",
  "location": "North Pit",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoThe mechanic's name.
specializationstringnoWhat this mechanic is the person to call for (e.g. hydraulics, electrical).
assigned_typesarraynoEquipment types this mechanic services, used to match a ticket to a mechanic (e.g. ["skid_steer", "dozer"]).
phonestringnoPhone number to reach the mechanic on.
emailstringnoEmail address to reach the mechanic on.
statusstringnoWhether the mechanic is free to take work — available, assigned, busy, or off_shift.
locationstringnoSite or pit the mechanic is based at.
last_dispatched_atstringnoWhen this mechanic was last dispatched (ISO 8601). Auto-dispatch round-robins on the oldest value.

Update a mechanic

PATCH /api/v1/mechanics/a60h-12

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

Returns the mechanic object.

{
  "object": "mechanic",
  "id": "obj_123",
  "name": "Maria Vasquez",
  "specialization": "hydraulics",
  "assigned_types": [
    "excavator",
    "loader"
  ],
  "phone": "+1 907 555 0142",
  "email": "maria@example.com",
  "status": "assigned",
  "location": "North Pit",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoThe mechanic's name.
specializationstringnoWhat this mechanic is the person to call for (e.g. hydraulics, electrical).
assigned_typesarraynoEquipment types this mechanic services, used to match a ticket to a mechanic (e.g. ["skid_steer", "dozer"]).
phonestringnoPhone number to reach the mechanic on.
emailstringnoEmail address to reach the mechanic on.
statusstringnoWhether the mechanic is free to take work — available, assigned, busy, or off_shift.
locationstringnoSite or pit the mechanic is based at.
last_dispatched_atstringnoWhen this mechanic was last dispatched (ISO 8601). Auto-dispatch round-robins on the oldest value.

Append an event to a mechanic

POST /api/v1/mechanics/{id}/events

curl -X POST "https://trydozer.com/api/v1/mechanics/a60h-12/events" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_northpit" \
  -H "Content-Type: application/json" \
  -d '{"event":"Noted by the operator","context":{"source":"api"}}'
Add a note to the mechanic {id}
data_event {
  "collection": "mechanics",
  "object_id": "a60h-12",
  "event": "Noted by the operator"
}

Returns the appended event object.

{
  "object": "event",
  "id": "evt_123",
  "event": "Noted by the operator"
}

Parameters

FieldTypeRequiredDescription
eventstringyesThe human-readable timeline entry.
contextobjectnoProvenance — source, integration, worker_run_id, …

What comes back (read-only)

Every mechanic carries the envelope below. The fields under it are computed or stamped by the platform — they are returned, never sent.

FieldTypeDescription
objectstringAlways mechanic.
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.
last_known_locationobjectLast reported coordinates, used by auto-dispatch to rank mechanics by distance to the machine.
  last_known_location.latnumberLatitude in decimal degrees.
  last_known_location.lngnumberLongitude in decimal degrees.
shift_countnumberHow many shifts this mechanic has on record. Rolled up from shift data, not set by a caller.
linked_user_idstringDash user this mechanic record is linked to, once they have accepted an invite.
icon_imagestringStorage key of the mechanic's avatar image, generated by the platform image pipeline.

Errors

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