> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truckaurbus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Work and compare

> Vehicles by the work they do, two to four side by side, and the words the register uses.

Three doors that the site grew before the API did, now on every key with `catalogue:read`.

## Vehicles by the work

`GET /v1/work?locale=en` lists the kinds of work the register knows (tipper work on a quarry road, a container run on the highway, a city bus route, and the rest), each with its slug, its name and lede in the locale (`en`, `hi`, `ta`) and `total`, the count of variants that fit it.

`GET /v1/work/{slug}?locale=&limit=` is one kind of work: the operating envelope as `cells` (payload, body, axle, the roads it runs, each a value and a note), the `checks` a buyer should make, the `guides` that go with it, and `vehicles`, the register's matching variants ranked, up to `limit` (six by default). `listing_query` is the filter string that reproduces the list on `GET /v1/variants`.

```bash theme={"system"}
curl "https://api.truckaurbus.com/v1/work/quarry-tipper?locale=hi&limit=10" \
  -H "Authorization: Bearer tab_live_..."
```

## Compare

`GET /v1/compare?v=a,b&state=` puts two to four variants side by side: `v` is the slugs, comma-separated (a repeated `v` works too). The answer holds, per variant, `sheet` (the summary: the plate figures, the body options, the price with its kind and its date), the register rows (the plate figures, the body options, the price with its kind and its date), how the price moved this year, and the dealers' quotes in `state` (a two-letter code, `DL` when omitted).

A slug that is not published comes back under `missing`, so a wrong slug never passes silently; the same list sits on the cost and fit answers.

```bash theme={"system"}
curl "https://api.truckaurbus.com/v1/compare?v=tata-motors-signa-4825-tk,ashok-leyland-4825-10x4&state=MH" \
  -H "Authorization: Bearer tab_live_..."
```

`GET /v1/compare/cost` is what each will cost over the years on the road: purchase, finance, fuel, tyres and upkeep at your figures. Every parameter has a default the answer echoes back, so start with the slugs and the state and add what you know:

| Parameter                                                     | Meaning                                                                                             |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `years`                                                       | The horizon, 5 by default                                                                           |
| `km_month`                                                    | Kilometres a month                                                                                  |
| `fuel_inr`, `diesel_inr`, `cng_inr`, `petrol_inr`, `unit_inr` | The pump or grid price you pay; `fuel_inr` is the general figure, the named ones win for their fuel |
| `kmpl`                                                        | Your own mileage, when you know it better than the class's                                          |
| `finance_pct`, `months`, `rate_pct`                           | The loan: the share financed (80), the tenure (48), the rate (10.5)                                 |
| `body`                                                        | The body you will build, when the price should include it                                           |
| `tyre_each`, `tyre_life_km`                                   | A tyre's price and life on your roads                                                               |

`GET /v1/compare/fit?v=a,b&work=&locale=&lines=` marks each variant against one kind of work (a slug from `GET /v1/work`) with the reasons in the locale; `lines` caps the reasons per variant.

A compared price is still a price: show its kind next to the figure, and keep the date with it. The API never carries the page a figure was read from.

## The words

`GET /v1/words?locale=en` is the glossary the site uses: `groups` of terms, each word with its `key`, the `word` itself, a plain `tip`, the `forms` it appears in and the `door` on the site where it matters, and the `faqs` that hang off the group. `GET /v1/words/{key}?locale=` is one term. Use it to label your own screens the way the register does, in the reader's language.
