Migrating from legacy

This guide is for integrations built against Yeti's older API — the one whose URLs look like api/{locale}/public_access/{company_id}/…. It is organised by what you were doing, not by which route you called, because most of the mapping is not one-to-one.

First: can you move today?

If your integration only reads, yes. Everything you export — sites, history, billing, the catalog, routes, people — has an equivalent, and this guide maps it.

If your integration writes, no, and we are not going to give you a date. v1 is read-only today. Creating a site, approving a visit, updating a contract: none of it exists here yet, and the legacy surface stays available until it does. If you are told otherwise by a roadmap, believe this page.

So a realistic migration is usually split: move your reads now, keep your writes where they are, and cut over the rest later. Running both at once is expected and supported — the two surfaces read the same database.

Before you map a single endpoint

Six things changed at the contract level. Each of them will bite once, early, and then never again.

The URL no longer carries your company

Legacy put the acting company in the path. v1 takes it from your key.

# was
GET /api/en/public_access/1234/site/index

# now
GET /v1/sites

One key, one company. If you managed several companies by varying {company_id}, you now need a key per company — issued by a company admin in the office UI, not through this API.

Authentication is a bearer key, not a session

curl https://api.yetisoftware.com/v1/sites \
  -H "Authorization: Bearer yeti_pk_…"

There is no login call and nothing to keep alive. See Getting started.

Ids are strings

"id": "4021", not "id": 4021. They are opaque: compare them, store them, do not do arithmetic on them. If your code parses ids as integers it will keep working by accident today and break the day an id stops looking like a number.

Money is an object, never a float

"rate": { "amount": "185.00", "currency": "CAD" }

Legacy returned 185.0 with the currency nowhere in the response. The new shape is a decimal string — parse it as a decimal, not a float, and read the currency rather than assuming the one you saw last time.

Collections page by cursor, and there is no total

?page=2 does nothing. Follow links.next until it is null, exactly as given. The full procedure, including why counting was removed, is in Exporting a collection.

This is the change most likely to break a working script silently: a loop that increments a page number will read page one forever.

Errors are application/problem+json

{
  "type": "https://developer.yetisoftware.com/problems/validation_failed",
  "title": "Validation failed",
  "status": 422,
  "code": "validation_failed",
  "detail": "…",
  "instance": "/v1/sites"
}

Switch on code. It is the stable member and the one we treat as contract — renaming a code is a breaking change. Do not switch on title or on the prose in detail, and do not switch on type: it is a documentation URL, so it is the member most likely to move, and matching on it couples your error handling to where our docs happen to be hosted.

The catalogue is at Errors.

One more, which is a feature

Field sets are fixed by the resource, not by the endpoint. Legacy returned raw models with per-endpoint visibility toggles, so the same record arrived with different fields depending on where you asked, and a column rename upstream changed your payload without warning. In v1 a field that is documented is part of the contract and a field that is not documented is not published. Use fields[sites]=id,name to narrow what you receive.

By what you were doing

Ordered by what integrations actually do with this API, so the first two sections cover most of what most people are moving.

Pulling service history

This is the bulk of what the legacy surface is used for.

was now
GET /history/site/index · /show GET /v1/work-performances · /{id}
GET /site_performance/index · /show same
GET /history/shift/index · /show GET /v1/shifts · /{id}
GET /history/route/index · /show GET /v1/route-runs · /{id}
GET /route_performance/sites GET /v1/work-performances?filter[route_run_id]={id}

Read this before you map fields. The v1 record is a different and smaller record than the legacy SHR, and the difference is not cosmetic:

Equipment and consumables used on a visit are includes rather than nested fields: ?include=equipment_usage,consumable_usage.

Two things to get right there:

What a crew carried is a different question from what they used: GET /v1/shifts?include=onboard_equipment. A plow that rode along all night and never ran appears there and in no visit's equipment_usage, so adding the two together counts availability as work.

Exporting your sites

was now
GET /site/index GET /v1/sites
GET /site/show GET /v1/sites/{id}
GET /history/site/site_contacts GET /v1/sites/{id}?include=contacts
GET /contractor/show/{id}/sites GET /v1/sites?filter[client_company_id]={id}

Site contacts are an include rather than a second call. Ask for them on the collection too — GET /v1/sites?include=contacts — instead of looping.

Two fields the legacy surface did not have, and one of them you need.

timezone is the IANA zone the site keeps. Every timestamp in this API is UTC, so this is what tells you whether 03:00Z was a late night or an early morning for the crew. Without it you are guessing, or keeping your own table.

geofence is the property boundary as a GeoJSON Polygon, or null where nobody has drawn one — most sites, today. Longitude first, as GeoJSON requires; note that coordinates on the same site is latitude-first, each following its own convention. It is on the collection too, so a map does not need a request per site; drop it with fields[sites]= if a large export does not need it.

Tags

was now
GET /tag/index GET /v1/tags
tags on a record GET /v1/sites?include=tags

Two parameters do not come across, and neither is an oversight:

Key on id, not on name. A tag name is unique among live tags only, so archiving one frees its name — a client matching on the name can silently follow a different tag afterwards. The legacy endpoint grouped by name, which is exactly the habit this breaks.

To go the other way — which sites carry a label — filter the sites:

GET /v1/sites?filter[tag_id]=4021

One tag at a time. filter[tag_id][in]=1,2 is refused with a 422 rather than answering about the first id, so a query that needs more than this supports fails loudly. Filtering by an archived tag matches nothing.

Timesheets, and the one thing v1 cannot do

was now
GET /report/employee_timesheet/index · /show GET /v1/shifts?include=labour

This is the largest gap between the two surfaces, so check it before you plan anything else.

/v1/shifts gives you who worked and for how long — worked_minutes on the shift, held_minutes on each labour period. It does not give pay. Per-employee pay rates are not published by this API, by decision.

So if your integration exists to produce a payroll export, it has no path here, and no amount of field mapping will produce one. Tell us if that is you — knowing how many integrations sit on this changes how it gets prioritised.

If you were using the timesheet report for hours rather than for money, the mapping is clean and you can move today.

People and companies

was now
GET /user/index · /show GET /v1/users · /{id}
GET /contractor/index · /show/{id} GET /v1/contractors · /{id}
GET /sub_contractor/index · /show/{id} GET /v1/subcontractors · /{id}
GET /contractor/show/{id}/users GET /v1/users
GET /contract/services GET /v1/contracts/{id}?include=versions.lines

If you were calling search_companies or a dataprovider endpoint, those are gone, and "What is not coming back" below says what to do instead. The short version: fetch the collection once with filter[] and hold it.

Per-site pricing lives on contract version lines, not on the site. If you were reading site-service rates, that is where they moved.

Reading billing

was now
GET /report/billing/index · /show GET /v1/billings · /{id}

A billing row exists even when nothing was charged. status = not_billable with a reason, and amount null. Null does not mean zero — it means the charge is not known — so summing amount without reading status will misreport a month in whichever direction your language treats null as.

Routes

was now
GET /route/index · /show GET /v1/routes · /{id}

A route publishes its stops and its work separately, because they are separate things: a stop is a place in an order, and a work plan is a service to perform at one. The same plan can appear on more than one route.

Listing your catalog

was now
GET /service/index · /show GET /v1/services · /{id}
GET /equipment/index · /show GET /v1/equipment · /{id}
GET /equipment_category/index GET /v1/equipment-categories
GET /consumable/index · /show GET /v1/consumables · /{id}

Rates are nested by who pays: client and subcontractor each carry their own charge_type and rate. Equipment itself carries no rate — pricing belongs to its category, which is also true in the legacy schema and was easy to miss there.

GET /consumable_category/index has no equivalent and will not get one. Consumable categories were never a table: the grouping is a plain group string on the consumable itself, so read group from /v1/consumables and group them your side. If you were using it to populate a filter, the distinct values of that field are the same list.

What is not coming back

These have no v1 equivalent and will not get one. If your integration depends on one, the answer is a change on your side, and we would rather you knew now.

The dataprovider_* and search_* helpers. Around sixty endpoints that fed dropdowns in our office UI — a page number, a partial string, {id, name} pairs. They are not an API surface, and publishing them would freeze our own form internals into your contract.

Instead: fetch the collection once with filter[] and hold it. For a type-ahead box that is fewer requests than the feed was, because you stop asking on every keystroke.

If you are calling one of these today, it is worth checking what it returns before you port it — several of them fail more often than they succeed, and an integration built on one may already be getting less than you think.

Column and field configuration (show_fields, update_columns, …). These stored which columns a user had chosen in our UI. Use fields[type]= to choose what you receive.

PDF and Excel generation (/pdf, /excel). v1 returns data; rendering a document is your side of the line. Everything those files contained is available as JSON except the pieces named above as missing.

Dispatch (/dispatch/*, /mass_dispatch/*). A live operations board, driven from the office. It is not an export surface and offers are not sent through an integration.

Xero export (/report/billing/xero). A streamed CSV for one accounting system. Read /v1/billings and shape it for whichever system you use.

Seven routes that already return an error today. If you call one, you are already handling a failure; it will simply stop being registered.

What is not built yet

Different from the list above: these are absent rather than declined.

Scheduled reports are not affected

If anyone at your company relies on the recurring Daily Exception Report — the one that arrives by email on a schedule, often addressed to your clients rather than to you — it keeps working. It is configured and sent inside the Yeti office application, not through this API, so migrating your integration does not touch it.

Worth knowing for the other direction: v1 has no scheduled delivery and no email, so there is nothing here to move it to, and nothing you need to rebuild. If you were hoping to manage those schedules programmatically, that is not something v1 offers.

Getting help

Ask before you build a workaround. If something here has no v1 equivalent and you need one, that is useful to know while the API is still being shaped — several endpoints exist because an integrator asked.