Download OpenAPI specification:
The versioned, resource-oriented API your company uses to get its Yeti data in and out — sites, service history, billing, the catalog and the people who do the work.
Every call is authenticated with a key issued by an admin of your company, and answers only for that company. It is not open to the public.
This document is the contract, and it is the source of truth: the build fails if the service grows a route that does not appear here. It replaces Yeti's older integration surface.
Read-only. Sites, tags, catalog, parties, contracts, routes, history and billing are served. Every write — create, update, archive, approve — is still on the legacy surface, and no date is promised for moving it here.
So a migration is normally split: move your reads now, keep your writes where they are. Both surfaces read the same data and running them side by side is expected.
Start with the migration guide. It is organised by what you were doing rather than by route name, because most of the mapping is not one-to-one — and it lists what has no equivalent here, which is the part worth knowing before you start.
Send a per-company API key as Authorization: Bearer <key>. Keys are issued
by a company admin in the Yeti office UI, shown once, and stored only as a
hash. Each key carries scopes of the form {resource}:{ability} — see
GET /v1/reference/scopes.
application/problem+json documents. Switch on the
code member, which is stable; type is a URI to documentation.{ data, meta, links } and page by cursor
(?cursor=…&limit=…). There is no total: counting every match on every
page is what makes large exports slow, and meta.page.has_more answers the
question a paging client actually has.{ "amount": "12.50", "currency": "USD" } — a decimal string
so no client loses precision, and always an explicit ISO currency.RateLimit-Limit,
RateLimit-Remaining and RateLimit-Reset on every response.What this key is, which company it is bound to, and which scopes it holds. The first call to make when setting up an integration: it turns "some endpoint returns 403" into "this key is missing that scope".
Never returns the key itself — only prefix…last_four.
{- "data": {
- "api_key": {
- "id": "string",
- "name": "string",
- "identifier": "yeti_pk_a1b2c3…9f4e",
- "scopes": [
- "string"
], - "expires_at": "2019-08-24T14:15:22Z",
- "revokes_at": "2019-08-24T14:15:22Z"
}, - "company": {
- "id": "string",
- "name": "string",
- "currency": "string"
}
}
}Which image is serving this request — the commit, branch, tag and when it was deployed. Stamped into the image at build time, so it describes the running code rather than whatever the deployment configuration claims.
Unauthenticated, so anyone debugging a deployment can answer "what is actually out there?" without first being issued a key — which is the whole point of the endpoint. Nothing returned is a secret: a commit SHA is not a credential and is inert without the (private) repository.
Every field is nullable: an image built outside the deploy script carries no stamp, and the null is the answer — "this was not built by the deploy script" — rather than an error.
{- "commit_hash": "4b1ee3bd2c9f7a05e18d6c3b2a91f4e7d0c85a63",
- "branch": "main",
- "tag": "untagged",
- "deployed_at": "Fri August 15, 2026 4:12pm MDT"
}The full scope vocabulary, as data rather than prose, so a client or an admin UI can enumerate it without hardcoding.
Unpaginated: the list is bounded by the resource catalogue.
{- "data": [
- {
- "scope": "sites:read",
- "resource": "sites",
- "ability": "read",
- "domain": "Sites"
}
], - "meta": {
- "count": 0
}
}Serviced locations. The resource most integrations are about, and the first
collection endpoint — so it is also where the shared collection conventions
(cursor paging, filter, sort, include, fields) are documented.
The calling company's sites, newest ids last, paged by cursor.
Request the first page, then follow links.next until it is null. Do
not rebuild the query string yourself — next already carries your
filters, and the cursor is only valid alongside them.
The default order is id ascending. That is deliberate for exports: an
immutable unique key is a total order, so a row edited while you page
cannot move and be seen twice.
filter[updated_since] is the incremental sync: store the time your last
successful run started, and pass it next time.
GET /v1/sites?filter[updated_since]=2026-08-01T00:00:00Z
Includable: contacts, tags.
include=tags needs only sites:read — the labels on a site are part of
the site. Enumerating the company's whole tag vocabulary is GET /v1/tags
and needs tags:read.
Requires sites:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Examples:
Filterable:
Three named filters:
Filtering by an archived tag matches nothing, which is the same answer
|
{- "data": [
- {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "client_company_id": "string",
- "notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}, - "coordinates": {
- "latitude": 51.0447,
- "longitude": -114.0719,
- "accuracy": "rooftop",
- "geocoded_at": "2019-08-24T14:15:22Z"
}, - "timezone": "America/Edmonton",
- "geofence": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- -114.08,
- 51.03
], - [
- -114.06,
- 51.03
], - [
- -114.06,
- 51.05
], - [
- -114.08,
- 51.05
], - [
- -114.08,
- 51.03
]
]
]
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "contacts": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
], - "tags": [
- {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}The first write in v1 (YET-112). Everything else on this surface is a read.
It runs the same code the office does: the same validation, the same geocode, the same activity log, the same plan-allowance check. A site created here is indistinguishable from one typed into the app, which is the point — the alternative was a second implementation that agrees with the first until it does not.
address and coordinates are objects here, exactly as a site is
returned, so a record read from GET /v1/sites/{siteId} can be posted
without being taken apart. Validation errors point at the path you sent:
errors["address.postal_code"], not errors["postal_code"].
Send both halves or neither — one alone is a 422. A pin you send is treated as hand-placed and is never moved by a later geocode, which is what makes it safe to import coordinates you already trust. Send no pin and the address is geocoded for you.
Send Idempotency-Key. Without one a timeout leaves you unable to tell
whether the site was created, and retrying can create a second.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name required | string [ 3 .. 255 ] characters Unique within your company among live sites. An archived site does not hold its name, so reusing one is allowed. |
| client_company_id | string or null The client this site belongs to, or null for none. Must be a client your company manages, or your own company's id for in-house work (priced, never charged); any other company id is a 422. |
| name_for_operators | string or null <= 255 characters |
| site_reference | string or null <= 255 characters |
| client_reference | string or null <= 255 characters |
| notes | string or null <= 2000 characters Shareable notes, returned on reads. |
| internal_notes | string or null <= 2000 characters Never returned. See the note above. |
| area | integer or null [ 0 .. 100000000 ] Serviced area in square metres. |
| min_before_photos | integer or null [ 0 .. 20 ] |
| min_after_photos | integer or null [ 0 .. 20 ] Together with |
object Sent as an object, the same way it is returned. Geocoded for you when
no | |
object or null Both halves or neither — one alone is a 422. A pin you send is treated as hand-placed and will not be moved by a later geocode, which is what makes importing coordinates you already trust safe. | |
Array of objects The full desired set, not a delta: what you send is what the site ends up with. |
{- "name": "Riverside Plaza",
- "client_company_id": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "notes": "string",
- "internal_notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "CA"
}, - "coordinates": {
- "latitude": -90,
- "longitude": -180
}, - "contacts": [
- {
- "id": 0,
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
]
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "client_company_id": "string",
- "notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}, - "coordinates": {
- "latitude": 51.0447,
- "longitude": -114.0719,
- "accuracy": "rooftop",
- "geocoded_at": "2019-08-24T14:15:22Z"
}, - "timezone": "America/Edmonton",
- "geofence": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- -114.08,
- 51.03
], - [
- -114.06,
- 51.03
], - [
- -114.06,
- 51.05
], - [
- -114.08,
- 51.05
], - [
- -114.08,
- 51.03
]
]
]
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "contacts": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
], - "tags": [
- {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}A single site of the calling company.
include and fields behave exactly as they do on the collection.
A site belonging to another company returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires sites:read.
| siteId required | string The site's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "client_company_id": "string",
- "notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}, - "coordinates": {
- "latitude": 51.0447,
- "longitude": -114.0719,
- "accuracy": "rooftop",
- "geocoded_at": "2019-08-24T14:15:22Z"
}, - "timezone": "America/Edmonton",
- "geofence": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- -114.08,
- 51.03
], - [
- -114.06,
- 51.03
], - [
- -114.06,
- 51.05
], - [
- -114.08,
- 51.05
], - [
- -114.08,
- 51.03
]
]
]
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "contacts": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
], - "tags": [
- {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}Changes what you send and leaves the rest alone.
Every field is optional. A field you omit keeps its current value; a field
you send as null is cleared. Those are two different instructions, and
the difference is how you undo a typo.
The body is the same shape as POST /sites — address and coordinates
nested exactly as a read returns them — so you can take a site you fetched,
change one thing and send it back.
contacts is the exception, and it deletesSending contacts replaces the whole set: any contact you leave out is
removed from the site. Omit the field entirely and contacts are untouched.
This is deliberate rather than an oversight. A site's contacts are a list
the server reconciles against what you send, and a partial list has no
unambiguous meaning — "add these" and "these are all of them" look
identical on the wire. If you are changing one contact, send them all,
including the id of each one you are keeping.
Omitting coordinates leaves the pin where it is, including when you
change the address — an existing point is never re-geocoded or moved on
your behalf. Send both latitude and longitude to move it; sending one
without the other is a 422. Send coordinates: null to remove the
location, even when a geocoder is configured.
Requires sites:write. Accepts Idempotency-Key.
| siteId required | string The site's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name required | string [ 3 .. 255 ] characters Unique within your company among live sites. An archived site does not hold its name, so reusing one is allowed. |
| client_company_id | string or null The client this site belongs to, or null for none. Must be a client your company manages, or your own company's id for in-house work (priced, never charged); any other company id is a 422. |
| name_for_operators | string or null <= 255 characters |
| site_reference | string or null <= 255 characters |
| client_reference | string or null <= 255 characters |
| notes | string or null <= 2000 characters Shareable notes, returned on reads. |
| internal_notes | string or null <= 2000 characters Never returned. See the note above. |
| area | integer or null [ 0 .. 100000000 ] Serviced area in square metres. |
| min_before_photos | integer or null [ 0 .. 20 ] |
| min_after_photos | integer or null [ 0 .. 20 ] Together with |
object Sent as an object, the same way it is returned. Geocoded for you when
no | |
object or null Both halves or neither — one alone is a 422. A pin you send is treated as hand-placed and will not be moved by a later geocode, which is what makes importing coordinates you already trust safe. | |
Array of objects The full desired set, not a delta: what you send is what the site ends up with. |
{- "name": "Riverside Plaza",
- "client_company_id": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "notes": "string",
- "internal_notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "CA"
}, - "coordinates": {
- "latitude": -90,
- "longitude": -180
}, - "contacts": [
- {
- "id": 0,
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
]
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "site_reference": "string",
- "client_reference": "string",
- "client_company_id": "string",
- "notes": "string",
- "area": 0,
- "min_before_photos": 0,
- "min_after_photos": 0,
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}, - "coordinates": {
- "latitude": 51.0447,
- "longitude": -114.0719,
- "accuracy": "rooftop",
- "geocoded_at": "2019-08-24T14:15:22Z"
}, - "timezone": "America/Edmonton",
- "geofence": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- -114.08,
- 51.03
], - [
- -114.06,
- 51.03
], - [
- -114.06,
- 51.05
], - [
- -114.08,
- 51.05
], - [
- -114.08,
- 51.03
]
]
]
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "contacts": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "email": "user@example.com",
- "phone": "string",
- "phone_type": "string"
}
], - "tags": [
- {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}Archives the site. This is a soft delete: the record and its history
stay, and the site leaves the working set — the same thing the Archive
action does in the Yeti app, and the same thing the legacy
DELETE /site/archive did.
Answers 204 with no body. There is no archived representation worth returning, and sending the record back would invite reading it as "still here".
Afterwards the site is invisible to this API, so a second call is a 404 rather than a second success. Restoring one is done in the Yeti app.
Requires sites:write. Accepts Idempotency-Key.
| siteId required | string The site's |
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
{- "title": "string",
- "status": 0,
- "code": "insufficient_scope",
- "detail": "string",
- "instance": "string",
- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "required_scope": "string",
- "retry_after": 0
}The labels a company puts on its own records. Sites are the only thing
carrying them today, so tags arrive either as a list of their own or as
include=tags on a site.
The calling company's tags — the labels it puts on its own records.
Read this to learn the vocabulary before you try to use it: a site's
tags tell you what one record carries, but not what exists.
yetiv4 keeps a tag name unique per company among live rows only, so
archiving a tag frees its name for reuse. A client keyed on name can
follow a different tag across an archive-and-recreate without noticing.
Key on id.
Requires tags:read. Its own scope, not sites:read — enumerating a
company's whole vocabulary is a different permission from reading the
labels on one site.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Examples:
Filterable: There is deliberately no |
{- "data": [
- {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single tag of the calling company. Exists so that a tag id read out of
a site's tags resolves — following an id and getting a 404 would say
the record exists and may not be had.
A tag belonging to another company returns 404, not 403.
Requires tags:read.
| tagId required | string The tag's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "Salt — bulk",
- "color": "slate",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}The companies a business works with, and the people who work for it.
contractors and subcontractors are the same relationship read from
opposite ends — see either endpoint's description.
Companies that contract work to you: for each, the caller is the subcontractor.
This and /v1/subcontractors read the same agreements relationship from
opposite ends. One row, two points of view — a company that hires you appears
here, one you hire appears there.
Paged by cursor, id ascending. filter[updated_since] is the incremental
export.
Requires contractors:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}Creates an agreement where the calling company provides the work.
Choose one counterparty mode: an existing managed client id, a new
managed-client name, or an external tenant's company code. This is
yetiv4's agreement operation, not the legacy upsert-and-prune of sites,
contacts, and rates. Requires contractors:write.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| client_id | integer An existing managed client owned by the caller. |
| new_client_name | string [ 3 .. 255 ] characters |
| client_code | string Code of an existing external tenant. |
| started_at | string or null <date> |
| ended_at | string or null <date> |
| reference_number | string or null <= 255 characters |
| notes | string or null <= 2000 characters |
{- "client_id": 0,
- "new_client_name": "string",
- "client_code": "string",
- "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "reference_number": "string",
- "notes": "string"
}{- "data": {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}A single record visible to the calling company.
A record the caller is not party to returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires contractors:read.
| contractorId required | string The agreement's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Companies you contract work out to: for each, the caller is the contractor.
The mirror of /v1/contractors — see there.
Paged by cursor, id ascending. filter[updated_since] is the incremental
export.
Requires subcontractors:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}Creates an agreement where the calling company hires an existing
tenant, identified by id or company code. The provider must accept
before the agreement is active. Does not create a company on the
provider's behalf. Requires subcontractors:write.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| subcontractor_id | integer An existing tenant's id. |
| subcontractor_code | string An existing tenant's company code. |
| started_at | string or null <date> |
| ended_at | string or null <date> |
| reference_number | string or null <= 255 characters |
{- "subcontractor_id": 0,
- "subcontractor_code": "string",
- "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "reference_number": "string"
}{- "data": {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}A single record visible to the calling company.
A record the caller is not party to returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires subcontractors:read.
| subcontractorId required | string The agreement's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "status": "pending",
- "reference_number": "string",
- "notes": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "acceptance": {
- "contractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}, - "subcontractor": {
- "accepted_at": "2019-08-24T14:15:22Z",
- "refused_at": "2019-08-24T14:15:22Z"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Emails an invitation on behalf of the calling company, without a human
inviter. No subcontractor company or agreement exists until the recipient
accepts and chooses their company. Re-inviting the same email rotates its
token. Requires subcontractors:write and an Idempotency-Key for retries.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| email required | string <email> <= 255 characters |
| label | string or null <= 255 characters |
{- "email": "user@example.com",
- "label": "string"
}{- "data": {
- "id": "string",
- "email": "user@example.com",
- "label": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "status": "pending"
}
}People who work for the calling company.
Addressed by the person's id. What is published is their membership of this company — role, employee code, whether they are suspended — because a person may work for several.
Suspended people are listed rather than filtered out: last season's history refers to them, and a client reconciling records needs them to exist.
Paged by cursor, id ascending. filter[updated_since] is the incremental
export.
Requires users:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "name": "string",
- "email": "user@example.com",
- "phone": "string",
- "role": "string",
- "employee_code": "string",
- "suspended_at": "2019-08-24T14:15:22Z",
- "accepted_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}Creates an active membership for the calling company without impersonating
a human administrator. Only operator and crew_member roles are allowed.
A passwordless user receives a set-password email. Requires users:write
and an Idempotency-Key for retries.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| first_name required | string <= 255 characters |
| last_name required | string <= 255 characters |
| email required | string <email> <= 255 characters |
| role required | string Enum: "operator" "crew_member" |
| phone | string or null <= 50 characters |
| timezone | string or null |
| employee_code | string or null <= 255 characters |
| notes | string or null <= 2000 characters |
{- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "role": "operator",
- "phone": "string",
- "timezone": "string",
- "employee_code": "string",
- "notes": "string"
}{- "data": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "name": "string",
- "email": "user@example.com",
- "phone": "string",
- "role": "string",
- "employee_code": "string",
- "suspended_at": "2019-08-24T14:15:22Z",
- "accepted_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}A single record visible to the calling company.
A record the caller is not party to returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires users:read.
| userId required | string The person's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "name": "string",
- "email": "user@example.com",
- "phone": "string",
- "role": "string",
- "employee_code": "string",
- "suspended_at": "2019-08-24T14:15:22Z",
- "accepted_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Contracts with clients and subcontractors, their revisions, and the priced lines that say what is charged for which service at which site.
Contracts the calling company holds, with clients and with subcontractors —
filter[type] separates them.
Terms are not on the contract: they belong to its versions, because they
change over a contract's life and only the version says which applied when.
Use include=versions, or include=versions.lines for the priced
lines. Those lines are where per-site pricing lives.
Requires contracts:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
Line rates are not filterable, for the reason no money is: minor units in the database against decimal strings on the wire. |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "number": "string",
- "client_reference": "string",
- "type": "string",
- "status": "string",
- "counterparty": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "versions": [
- {
- "id": "string",
- "version": 0,
- "is_sealed": true,
- "sealed_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "number": "string",
- "client_reference": "string",
- "type": "string",
- "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "client_charge_rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single contract of the calling company.
Another company's contract returns 404, not 403.
Requires contracts:read.
| contractId required | string The contract's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "number": "string",
- "client_reference": "string",
- "type": "string",
- "status": "string",
- "counterparty": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "versions": [
- {
- "id": "string",
- "version": 0,
- "is_sealed": true,
- "sealed_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "number": "string",
- "client_reference": "string",
- "type": "string",
- "started_at": "2019-08-24",
- "ended_at": "2019-08-24",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "client_charge_rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
]
}
}What a company prices work from: services, equipment, equipment categories and consumables. Each family carries its own scope.
The services this company sells. client is what it charges; subcontractor is what it pays.
Paged by cursor, id ascending — follow links.next until it is null.
filter[updated_since] is the incremental export.
Requires services:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable: Rates are not filterable — see the |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "color": "#0a31a8",
- "client": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}Adds a service to the company's catalogue.
It runs the same code the office does — the same validation, the same activity log, and the same rule about what a charge type may carry. A service created here is indistinguishable from one typed into the app.
Pricing is nested per side, exactly as a read returns it: client and
subcontractor, each with a charge_type, a rate and
minimum_minutes.
A rate is kept only when the charge type uses one, and a minimum only when
it uses one. Send hourly_equipment with a rate and the rate is not
stored — equipment pricing comes from the equipment. Send anything but
hourly_service with minimum_minutes and the minimum is not stored
either. This is the catalogue's rule rather than this endpoint's; the app
behaves the same way.
A rate.currency must be the company's own. Money is denominated by the
company that owns it, so a rate in another currency is a 422 rather
than a conversion — there is no exchange rate in this API, and accepting it
silently would store the right number as the wrong money.
Requires services:write. Accepts Idempotency-Key.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name | string [ 2 .. 255 ] characters Unique within the company among live services. |
| color | string^#[0-9A-Fa-f]{6}$ Hex, six digits, with the leading |
| name_for_operators | string or null <= 255 characters What the crew sees, when it should differ from the client-facing name. |
| client_description | string or null <= 2000 characters |
object (ServicePriceWrite) One side of a service's pricing — what a client is charged, or what a subcontractor is paid. | |
object (ServicePriceWrite) One side of a service's pricing — what a client is charged, or what a subcontractor is paid. |
{- "name": "string",
- "color": "#1D4ED8",
- "name_for_operators": "string",
- "client_description": "string",
- "client": {
- "charge_type": "per_visit",
- "rate": {
- "amount": "650.16",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "per_visit",
- "rate": {
- "amount": "650.16",
- "currency": "USD"
}, - "minimum_minutes": 0
}
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "color": "#0a31a8",
- "client": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}A single record of the calling company.
Another company's record returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires services:read.
| serviceId required | string The service's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "color": "#0a31a8",
- "client": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Changes what you send and leaves the rest alone.
Every field is optional. A field you omit keeps its current value; a field
you send as null is cleared.
charge_type and rate are not independent. Send only a rate and the
existing charge type still decides whether it is kept; send only a charge
type and the existing rate is re-evaluated against it.
So switching a service to hourly_equipment clears its rate even though
your payload never mentioned one. That is the catalogue's rule — the same
thing happens when somebody changes the dropdown in the app — and it is the
one place a partial update can change a field you did not send.
If you are changing a price, send both halves.
A rate.currency must be the company's own, as on create.
Requires services:write. Accepts Idempotency-Key.
| serviceId required | string The service's |
object Example: fields[sites]=name,address
|
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name | string [ 2 .. 255 ] characters Unique within the company among live services. |
| color | string^#[0-9A-Fa-f]{6}$ Hex, six digits, with the leading |
| name_for_operators | string or null <= 255 characters What the crew sees, when it should differ from the client-facing name. |
| client_description | string or null <= 2000 characters |
object (ServicePriceWrite) One side of a service's pricing — what a client is charged, or what a subcontractor is paid. | |
object (ServicePriceWrite) One side of a service's pricing — what a client is charged, or what a subcontractor is paid. |
{- "name": "string",
- "color": "#1D4ED8",
- "name_for_operators": "string",
- "client_description": "string",
- "client": {
- "charge_type": "per_visit",
- "rate": {
- "amount": "650.16",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "per_visit",
- "rate": {
- "amount": "650.16",
- "currency": "USD"
}, - "minimum_minutes": 0
}
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "color": "#0a31a8",
- "client": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "subcontractor": {
- "charge_type": "string",
- "rate": {
- "amount": "12.50",
- "currency": "USD"
}, - "minimum_minutes": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Archives the service. A soft delete: the record stays, and the service leaves the catalogue people pick from.
What is already priced by it is untouched. A commitment holding this service keeps its terms and a billable record already raised keeps its amount — archiving changes what can be chosen next, not what happened.
Answers 204 with no body. Afterwards the service is invisible to this API, so a second call is a 404 rather than a second success. Restoring one is done in the Yeti app.
Requires services:write. Accepts Idempotency-Key.
| serviceId required | string The service's |
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
{- "title": "string",
- "status": 0,
- "code": "insufficient_scope",
- "detail": "string",
- "instance": "string",
- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "required_scope": "string",
- "retry_after": 0
}Equipment this company operates. It carries no rate of its own — pricing is the category's, so include=category is usually what you want.
Paged by cursor, id ascending — follow links.next until it is null.
filter[updated_since] is the incremental export.
Includable: category.
Requires equipment:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable: |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "category_id": "string",
- "category": {
- "id": "string",
- "name": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single record of the calling company.
Another company's record returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires equipment:read.
| equipmentId required | string The equipment's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "category_id": "string",
- "category": {
- "id": "string",
- "name": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Equipment categories, and where equipment pricing lives.
In the legacy API categories were global with a separate per-company rate join; in v1 a category is the company's and carries its own defaults.
Paged by cursor, id ascending — follow links.next until it is null.
filter[updated_since] is the incremental export.
Requires equipment-categories:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable: |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single record of the calling company.
Another company's record returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires equipment-categories:read.
| categoryId required | string The category's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Consumables — salt, sand, brine. Unlike equipment these carry their own default rates.
Paged by cursor, id ascending — follow links.next until it is null.
filter[updated_since] is the incremental export.
Requires consumables:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
object Example: fields[sites]=name,address
| |
object Filterable: |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single record of the calling company.
Another company's record returns 404, not 403: saying "forbidden" would confirm the id exists.
Requires consumables:read.
| consumableId required | string The consumable's |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "client_description": "string",
- "group": "string",
- "default_rates": {
- "client": {
- "amount": "12.50",
- "currency": "USD"
}, - "subcontractor": {
- "amount": "12.50",
- "currency": "USD"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}The standing lists of stops a crew works through, storm after storm.
A route holds two ordered collections and they are not duplicates: its stops are where the crew goes, its work plans are what they do. A site can be a stop with no work against it, which means the crew passes it.
This is also the one area where a company sees records it does not own: a route is visible to whoever runs it, not only to whoever owns it.
The standing lists of stops a crew works through.
You see routes you run, not only routes you own. A route is returned
when the calling company owns it or is assigned to it — being sent out on
a route you cannot read is not a useful assignment. This is the only
collection in this API whose scope is wider than the caller's own company,
and include=companies says which side you are on.
A route holds two ordered collections. include=stops is the geography
— which sites, in which order. Work plans are what fires at them, and are
not the same list: a site can be a stop with no work against it, which means
the crew passes it.
There is no notes field. The source system retired the column; a
route's crew notes and work notes are compiled from its work plans, each
contributing its own. internal_notes is absent for the ordinary reason —
it is the company's own commentary.
Requires routes:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
There is no filter for "assigned to me versus owned by me". That
distinction is published per assignment as |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "stops": [
- {
- "id": "string",
- "site_id": "string",
- "position": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "work_plans": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "services": [
- {
- "id": "string",
- "name": "string"
}
], - "companies": [
- {
- "id": "string",
- "role": "owner",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "operators": [
- {
- "id": "string",
- "user_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}Creates a route owned by the API key's company. Work plans are ordered by
work_plan_ids; stops and services are derived from them, not supplied
separately. Requires routes:write. Send Idempotency-Key for safe retries.
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name required | string [ 3 .. 255 ] characters |
| name_for_operators | string or null <= 255 characters |
| internal_notes | string or null <= 2000 characters |
| color | string^#[0-9a-fA-F]{6}$ |
| estimated_hours | number or null [ 0 .. 999.9 ] |
| season | string or null Enum: "all" "summer" "winter" null |
| auto_go_at | string or null^([01][0-9]|2[0-3]):[0-5][0-9]$ |
| auto_go_timezone | string or null IANA timezone. |
| work_plan_ids required | Array of integers non-empty Ordered active work plans owned by the calling company. |
| owner_assigned | boolean Default: true |
| owner_operator_ids | Array of integers Empty means everyone at the owner when owner_assigned is true. |
| subcontractor_company_ids | Array of integers Companies the owner has an agreed subcontract with — both sides accepted. A subcontract you create is pending until the other company accepts it, so a company you have just added is not assignable yet. Naming one that has not agreed is a 422 against this field, by position; it is never silently left off the route. |
{- "name": "string",
- "name_for_operators": "string",
- "internal_notes": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "auto_go_at": "string",
- "auto_go_timezone": "string",
- "work_plan_ids": [
- 0
], - "owner_assigned": true,
- "owner_operator_ids": [
- 0
], - "subcontractor_company_ids": [
- 0
]
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "stops": [
- {
- "id": "string",
- "site_id": "string",
- "position": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "work_plans": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "services": [
- {
- "id": "string",
- "name": "string"
}
], - "companies": [
- {
- "id": "string",
- "role": "owner",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "operators": [
- {
- "id": "string",
- "user_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}A single route the calling company owns or is assigned to.
A route it is party to neither returns 404, not 403.
Requires routes:read.
| routeId required | string The route's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "stops": [
- {
- "id": "string",
- "site_id": "string",
- "position": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "work_plans": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "services": [
- {
- "id": "string",
- "name": "string"
}
], - "companies": [
- {
- "id": "string",
- "role": "owner",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "operators": [
- {
- "id": "string",
- "user_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}Changes only fields supplied. Explicit null clears nullable fields.
Lists are replaced only when supplied. Only the route's owner may write;
an assigned subcontractor receives 404. Requires routes:write.
| routeId required | string The route's |
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
| name | string [ 3 .. 255 ] characters |
| name_for_operators | string or null <= 255 characters |
| internal_notes | string or null <= 2000 characters |
| color | string^#[0-9a-fA-F]{6}$ |
| estimated_hours | number or null [ 0 .. 999.9 ] |
| season | string or null Enum: "all" "summer" "winter" null |
| auto_go_at | string or null^([01][0-9]|2[0-3]):[0-5][0-9]$ |
| auto_go_timezone | string or null IANA timezone. |
| work_plan_ids | Array of integers non-empty Ordered active work plans owned by the calling company. |
| owner_assigned | boolean Default: true |
| owner_operator_ids | Array of integers Empty means everyone at the owner when owner_assigned is true. |
| subcontractor_company_ids | Array of integers Companies the owner has an agreed subcontract with — both sides accepted. A subcontract you create is pending until the other company accepts it, so a company you have just added is not assignable yet. Naming one that has not agreed is a 422 against this field, by position; it is never silently left off the route. |
{- "name": "string",
- "name_for_operators": "string",
- "internal_notes": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "auto_go_at": "string",
- "auto_go_timezone": "string",
- "work_plan_ids": [
- 0
], - "owner_assigned": true,
- "owner_operator_ids": [
- 0
], - "subcontractor_company_ids": [
- 0
]
}{- "data": {
- "id": "string",
- "name": "string",
- "name_for_operators": "string",
- "color": "string",
- "estimated_hours": 0,
- "season": "all",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "stops": [
- {
- "id": "string",
- "site_id": "string",
- "position": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "work_plans": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "services": [
- {
- "id": "string",
- "name": "string"
}
], - "companies": [
- {
- "id": "string",
- "role": "owner",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string"
}, - "operators": [
- {
- "id": "string",
- "user_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}Soft-deletes an owned route and releases its work plans. Only the owner
may archive; an assigned subcontractor receives 404. Requires routes:write.
| routeId required | string The route's |
| Idempotency-Key | string [ 1 .. 255 ] characters Example: 8f14e45f-ea8d-4b2f-9c1a-2b3d4e5f6a7b A caller-chosen value, unique per operation, that makes a retry safe: the same key returns the first response instead of acting twice. Optional, but a write without one has no protection — a request that times out on the wire is indistinguishable from one that never arrived. Use something unguessable and unique per operation, such as a UUID; reuse it only to retry the same request. Reusing a key for a different body is refused with
|
{- "title": "string",
- "status": 0,
- "code": "insufficient_scope",
- "detail": "string",
- "instance": "string",
- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "required_scope": "string",
- "retry_after": 0
}The standing templates — one service at one site, fired by a trigger.
A plan is not a visit. It holds the terms and the instructions; each
time its trigger fires it spawns a work performance, and that is where
execution state lives. status here is active or paused and nothing
else — there is no "in progress" plan. To ask what actually happened, read
/v1/work-performances.
sla and instructions are published in the same shape a work performance
uses, because a performance snapshots both from the plan when it fires.
Diffing the two is how you see that a visit ran under terms since edited.
A plan can ride several routes. include=routes is a list, not a
single value: a temporary catch-up route can hold work that the standing
route also keeps for the next storm.
Visibility follows the route. A plan is returned when the calling
company owns it or it rides a route that company can read — the same rule
as /v1/routes, one join further. A subcontractor assigned to a route can
therefore read the work on it, which is the point of the assignment.
Requires work-plans:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single plan the calling company owns, or that rides a route it can read.
Anything else returns 404, not 403.
Requires work-plans:read.
| workPlanId required | string The work plan's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "active",
- "trigger_type": "sla_event",
- "client_charge_type": "per_visit",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "last_performed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "position": 0,
- "routes": [
- {
- "id": "string",
- "name": "string"
}
]
}
}What the work was worth — the accounting export.
One resource, not the four this area was originally scoped for. Invoicing and subcontractor reports have no representation in the source system at all, and timesheets are shifts, under History.
What the work was worth — one charge per settled visit.
The same records are embedded in a work performance under
include=billing. This is the other direction, and it is the one an
accounting integration wants: ask for the charges, filtered by period and
status, rather than paging every visit in the month and keeping the ones
that carried a charge.
Read status before amount. A row exists for every settled visit,
including those that produced none: status is then not_billable and
reason says why. A null amount and a deliberate zero are different
facts, and totalling a month on amount alone misstates it. The audit of
what was not charged, and why, is:
filter[status]=not_billable
include=performance names the visit each charge settles, so an export does
not need a second request per row.
Requires billings:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable: Amounts are not filterable, for the reason no money is anywhere in
this API: integer minor units in the database against decimal strings on
the wire, so the parameter would have to guess which you meant.
There is no |
{- "data": [
- {
- "id": "string",
- "work_performance_id": "string",
- "status": "string",
- "reason": "string",
- "amount": {
- "amount": "12.50",
- "currency": "USD"
}, - "client_charge_rate_snapshot": {
- "amount": "12.50",
- "currency": "USD"
}, - "rate_source": "string",
- "client_charge_type": "string",
- "duration_minutes": 0,
- "client_company_id": "string",
- "pushed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "performance": {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "contract_version_line_id": "string",
- "work_plan_id": "string",
- "route_run_id": "string",
- "redo_of_perform_id": "string",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0,
- "min_before_photos": 0,
- "min_after_photos": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "triggered_at": "2019-08-24T14:15:22Z",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "assignment": {
- "company_id": "string",
- "operator_id": "string"
}, - "review": {
- "reviewed_by": "string",
- "reviewed_at": "2019-08-24T14:15:22Z",
- "rejection_reason": "string"
}, - "inspection": {
- "established_by": "string",
- "note": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "billing": { },
- "equipment_usage": [
- {
- "id": "string",
- "equipment_category_id": "string",
- "equipment_id": "string",
- "duration": {
- "basis": "recorded",
- "minutes": 0
}, - "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "consumable_usage": [
- {
- "id": "string",
- "consumable_id": "string",
- "quantity": "12.50",
- "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single charge raised by the calling company.
Another company's charge returns 404, not 403. Note that scoping is by
the company that did the work and is owed — client_company_id is the other
side, and is a filter rather than a way in.
Requires billings:read.
| billingId required | string The charge's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "work_performance_id": "string",
- "status": "string",
- "reason": "string",
- "amount": {
- "amount": "12.50",
- "currency": "USD"
}, - "client_charge_rate_snapshot": {
- "amount": "12.50",
- "currency": "USD"
}, - "rate_source": "string",
- "client_charge_type": "string",
- "duration_minutes": 0,
- "client_company_id": "string",
- "pushed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "performance": {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "contract_version_line_id": "string",
- "work_plan_id": "string",
- "route_run_id": "string",
- "redo_of_perform_id": "string",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0,
- "min_before_photos": 0,
- "min_after_photos": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "triggered_at": "2019-08-24T14:15:22Z",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "assignment": {
- "company_id": "string",
- "operator_id": "string"
}, - "review": {
- "reviewed_by": "string",
- "reviewed_at": "2019-08-24T14:15:22Z",
- "rejection_reason": "string"
}, - "inspection": {
- "established_by": "string",
- "note": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "billing": { },
- "equipment_usage": [
- {
- "id": "string",
- "equipment_category_id": "string",
- "equipment_id": "string",
- "duration": {
- "basis": "recorded",
- "minutes": 0
}, - "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "consumable_usage": [
- {
- "id": "string",
- "consumable_id": "string",
- "quantity": "12.50",
- "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
}What was actually done: every visit to a site, and what it was worth.
This is the export the legacy site_performances surface existed for, and
the resource is named for the system that owns the data rather than for that
table — Yeti calls one visit a work performance.
Every visit to a site, for one service — the history export.
filter[status]=approved is not "the work we did". A visit where the
crew attended and nothing needed doing settles as no_service_required,
and it is history just as much: leave it out and a storm where crews
attended forty sites and none needed doing reads as though nobody went.
The whole settled set is:
filter[status][in]=approved,no_service_required
Everything else in status is either in flight (outstanding,
in_progress, work_complete, inspected, pending_review) or was not
accepted (rejected).
To sync a season incrementally, page with filter[updated_since] and keep
the last updated_at you saw. For a fixed window, filter[started_at]
and filter[ended_at] take gte / lte.
What each visit was worth arrives with include=billing — an object,
not an array: a visit has at most one charge.
Includable: billing, equipment_usage, consumable_usage.
equipment_usage publishes a resolved duration, not the two columns
yetiv4 stores. basis: "recorded" means the crew keyed a number in;
basis: "site_time" means the machine ran for the whole visit and
minutes is the lap's span. minutes is null when the basis is
site_time and the lap has not ended — the answer does not exist yet
rather than being unknown.
consumable_usage.quantity is a decimal string and is not money: it
carries no currency, and 0 means "brought it, used none".
Requires work-performances:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
Amounts are not filterable, for the reason no money is: minor units in the database against decimal strings on the wire. |
{- "data": [
- {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "contract_version_line_id": "string",
- "work_plan_id": "string",
- "route_run_id": "string",
- "redo_of_perform_id": "string",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0,
- "min_before_photos": 0,
- "min_after_photos": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "triggered_at": "2019-08-24T14:15:22Z",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "assignment": {
- "company_id": "string",
- "operator_id": "string"
}, - "review": {
- "reviewed_by": "string",
- "reviewed_at": "2019-08-24T14:15:22Z",
- "rejection_reason": "string"
}, - "inspection": {
- "established_by": "string",
- "note": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "billing": {
- "id": "string",
- "work_performance_id": "string",
- "status": "string",
- "reason": "string",
- "amount": {
- "amount": "12.50",
- "currency": "USD"
}, - "client_charge_rate_snapshot": {
- "amount": "12.50",
- "currency": "USD"
}, - "rate_source": "string",
- "client_charge_type": "string",
- "duration_minutes": 0,
- "client_company_id": "string",
- "pushed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "performance": { }
}, - "equipment_usage": [
- {
- "id": "string",
- "equipment_category_id": "string",
- "equipment_id": "string",
- "duration": {
- "basis": "recorded",
- "minutes": 0
}, - "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "consumable_usage": [
- {
- "id": "string",
- "consumable_id": "string",
- "quantity": "12.50",
- "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single visit recorded by the calling company.
Another company's record returns 404, not 403.
Requires work-performances:read.
| workPerformanceId required | string The work performance's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "site_id": "string",
- "service_id": "string",
- "status": "string",
- "trigger_type": "string",
- "client_charge_type": "string",
- "contract_version_line_id": "string",
- "work_plan_id": "string",
- "route_run_id": "string",
- "redo_of_perform_id": "string",
- "instructions": {
- "notes": "string",
- "estimated_minutes": 0,
- "min_before_photos": 0,
- "min_after_photos": 0
}, - "sla": {
- "response_minutes": 0,
- "completion_minutes": 0,
- "terms": "string"
}, - "triggered_at": "2019-08-24T14:15:22Z",
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "assignment": {
- "company_id": "string",
- "operator_id": "string"
}, - "review": {
- "reviewed_by": "string",
- "reviewed_at": "2019-08-24T14:15:22Z",
- "rejection_reason": "string"
}, - "inspection": {
- "established_by": "string",
- "note": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "billing": {
- "id": "string",
- "work_performance_id": "string",
- "status": "string",
- "reason": "string",
- "amount": {
- "amount": "12.50",
- "currency": "USD"
}, - "client_charge_rate_snapshot": {
- "amount": "12.50",
- "currency": "USD"
}, - "rate_source": "string",
- "client_charge_type": "string",
- "duration_minutes": 0,
- "client_company_id": "string",
- "pushed_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "performance": { }
}, - "equipment_usage": [
- {
- "id": "string",
- "equipment_category_id": "string",
- "equipment_id": "string",
- "duration": {
- "basis": "recorded",
- "minutes": 0
}, - "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "consumable_usage": [
- {
- "id": "string",
- "consumable_id": "string",
- "quantity": "12.50",
- "recorded_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}One person's working period, one row each — so a crew member who joined
late or left early carries their own real hours without anything having to
model "partial". A crew is a set of shifts pointing at one lead's, through
crew_lead_shift_id.
is_open is derived from ended_at, not from status. Someone whose
last shift is still pending_approval can start a new one: approving is
office work that happens later and must not stop anyone clocking on
tomorrow. status says where the paperwork is. To filter, ask the column
that decides — filter[ended_at][null]=true.
include=events is the timeline of where someone was.
include=labour is the join from hours to jobs, and the only path in
this API between /v1/shifts and /v1/work-performances.
include=onboard_equipment is what the crew carried, which is not what
they used: a plow that rode along all night and never ran appears here
and in no visit's equipment_usage. Adding the two together counts
availability as work.
This is a separate grant from the rest of history on purpose: reconciling work done is not the same permission as reading whose hours went into it.
Requires shifts:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "worker": {
- "type": "user",
- "id": "string",
- "name": "string"
}, - "status": "string",
- "is_open": true,
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "worked_minutes": 0,
- "evidence": "string",
- "recorded_by": {
- "started_by": "string",
- "ended_by": "string"
}, - "approval": {
- "approved_by": "string",
- "approved_at": "2019-08-24T14:15:22Z"
}, - "crew_lead_shift_id": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "events": [
- {
- "id": "string",
- "type": "route_start",
- "occurred_at": "2019-08-24T14:15:22Z",
- "route_id": "string",
- "route_run_id": "string",
- "site_id": "string",
- "recorded_by": "string",
- "note": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "labour": [
- {
- "id": "string",
- "work_performance_id": "string",
- "assigned_at": "2019-08-24T14:15:22Z",
- "released_at": "2019-08-24T14:15:22Z",
- "held_minutes": 0
}
], - "onboard_equipment": [
- {
- "id": "string",
- "name": "string"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single shift recorded by the calling company.
Another company's shift returns 404, not 403.
Requires shifts:read.
| shiftId required | string The shift's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "worker": {
- "type": "user",
- "id": "string",
- "name": "string"
}, - "status": "string",
- "is_open": true,
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "worked_minutes": 0,
- "evidence": "string",
- "recorded_by": {
- "started_by": "string",
- "ended_by": "string"
}, - "approval": {
- "approved_by": "string",
- "approved_at": "2019-08-24T14:15:22Z"
}, - "crew_lead_shift_id": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "events": [
- {
- "id": "string",
- "type": "route_start",
- "occurred_at": "2019-08-24T14:15:22Z",
- "route_id": "string",
- "route_run_id": "string",
- "site_id": "string",
- "recorded_by": "string",
- "note": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "labour": [
- {
- "id": "string",
- "work_performance_id": "string",
- "assigned_at": "2019-08-24T14:15:22Z",
- "released_at": "2019-08-24T14:15:22Z",
- "held_minutes": 0
}
], - "onboard_equipment": [
- {
- "id": "string",
- "name": "string"
}
]
}
}One trip through a route. A route is the standing list of sites a crew works through; firing GO sends them out along it, and that is a run.
Two things worth knowing before you build against this:
ended_at can go back to null. A run closes when every work
performance on it has reached an ending it cannot bounce back from, and
work does come back — a rejected performance is re-fired as a redo on the
same run, and an overruled no-service claim returns to outstanding.
Closure is recomputed, not latched. An incremental export must re-read a
run when its updated_at moves, rather than archiving it the first time
it looks finished.include=crew is who was sent out, snapshotted at the moment GO fired.
Who actually worked is /v1/shifts, and the two differ whenever somebody
did not go, went home early or joined late.
The work a run spawned is not embedded — it is
/v1/work-performances?filter[route_run_id]={id}, which pages. A storm's
run can hold hundreds.
Requires route-runs:read.
| cursor | string An opaque cursor from |
| limit | integer [ 1 .. 200 ] Default: 50 Rows per page. Clamped to the maximum rather than rejected. |
| sort | string Example: sort=-updated_at,name Comma-separated fields, The primary key is always appended, so the order is total and paging cannot skip or repeat a row when values tie. |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
| |
object Filterable:
|
{- "data": [
- {
- "id": "string",
- "route": {
- "id": "string",
- "name": "string"
}, - "is_open": true,
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "fired_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "crew": [
- {
- "id": "string",
- "member": {
- "type": "user",
- "id": "string",
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
], - "meta": {
- "page": {
- "limit": 0,
- "has_more": true
}
},
}A single run of the calling company.
Another company's run returns 404, not 403.
Requires route-runs:read.
| routeRunId required | string The route run's |
| include | string Example: include=contacts,tags Comma-separated related resources to embed, at most 5. A relation that is not included is absent from the response rather than null, so "not requested" is distinguishable from "requested, and empty". An include obeys your scopes. Where the embedded records are a resource
this API serves in its own right, reading them through an include needs that
resource's The example below is both cases at once: |
object Example: fields[sites]=name,address
|
{- "data": {
- "id": "string",
- "route": {
- "id": "string",
- "name": "string"
}, - "is_open": true,
- "started_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "fired_by": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "crew": [
- {
- "id": "string",
- "member": {
- "type": "user",
- "id": "string",
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}