# Generations

The generations and facelifts of a model, with their bodies, chassis codes and power band.

## List generations

`GET /v1/generations`

**Request**

```bash
curl "https://autospec.launchit.ro/v1/generations?model=1&sort=-year_start&limit=1" \
  -H "X-API-Key: as_live_your_key"
```

**Response**

```json
{
  "items": [
    {
      "id": 111,
      "path": "volkswagen/golf/viii-facelift-2024",
      "slug": "viii-facelift-2024",
      "name": "VIII (facelift 2024)",
      "vehicle_type": "car",
      "make": { "id": 1, "path": "volkswagen", "name": "Volkswagen" },
      "model": { "id": 1, "path": "volkswagen/golf", "name": "Golf" },
      "ordinal": 8,
      "variant": null,
      "facelift_year": 2024,
      "chassis_codes": [],
      "body": ["hatchback"],
      "production": { "start": 2024, "end": null },
      "facelift_of": { "id": 110, "path": "volkswagen/golf/viii", "name": "VIII" },
      "version_count": 15,
      "power_kw": { "min": 85.3, "max": 244.9 },
      "notes": null,
      "updated_at": "2026-09-26T20:29:15.566664"
    }
  ],
  "next_cursor": "WyIteWVhcl9zdGFydCIsMjAyNCwxMTFd",
  "limit": 1
}
```

## Filters

| Filter | Type | Operators | Meaning |
|---|---|---|---|
| `make` | custom | `=` | Make id or slug. A comma means any of several. |
| `model` | custom | `=` | Model id. A comma means any of several. |
| `q` | text | `=` | Matches the name. |
| `body` | one of `body` | `=` | Has this body. A comma means any of several. |
| `chassis_code` | custom | `=` | Carries this chassis code, exactly as written: 5G, W205. |
| `year` | custom | `=` `.between` `.gte` `.lte` | Built at some point in this year (or span). |
| `facelift` | bool | `=` | true for a facelift, false for an original. |
| `power_kw` | custom | `.gte` `.lte` `.gt` `.lt` `.between` | Has a version with output in this band, in kW. |
| `tier` | one of `make_tier` | `=` `.not` | Only generations from makes of this kind: mainstream, luxury, exotic or specialist. A comma means any of several. `.not` leaves those kinds out instead. |
| `market` | one of `market` | `=` | Only generations from makes sold in this market, now or in the past, such as europe. A comma means any of several. |
| `powertrain_kind` | one of `powertrain_kind` | `=` | Only generations with a published version of this powertrain: combustion, hybrid, electric, fuel_cell. A comma means any of several. The counts on the page then count only what matches. |
| `vehicle_type` | one of `vehicle_type` | `=` | Which kind of generation: car or motorcycle. A comma means either. Left out, it is car. |

Sort by `name`, `id`, `year_start`, with `-` in front to reverse.

`power_kw` here asks whether the generation has **a version** in that band: `power_kw.gte=200` keeps the generations with at least one version of 200 kW or more.

## One generation

`GET /v1/generations/{id}`

## Fields

| Field | Type | Description |
|---|---|---|
| `id` | integer | Never changes. |
| `path` | string | `make/model/generation`, in slugs. |
| `vehicle_type` | string | `car` or `motorcycle`, from its model. The list answers with cars unless `vehicle_type` says otherwise. |
| `make`, `model` | object | Each parent's `id`, `path` and `name`. |
| `name` | string | The generation in English, put together from the parts below. |
| `ordinal` | integer or null | The generation's number in the model's history, where it has one: 8 for a Golf VIII. |
| `variant` | string or null | The maker's own name for this one: `Avant`, `Allroad`, `Stepway`. A proper name, the same in every language. `null` when it is simply the model in one body. |
| `facelift_year` | integer or null | The year of the facelift this generation is, if it is one. |
| `chassis_codes` | list of strings | Factory codes such as `5G` or `W205`, exactly as written. |
| `body` | list | The body styles offered, from the `body` [vocabulary](https://autospec.launchit.ro/docs/vocabularies). |
| `production.start`, `production.end` | year or null | No end means it is still built. |
| `facelift_of` | object or null | The generation this one is a facelift of. `null` for an original. |
| `version_count` | integer | Published versions, or the matching ones under a `powertrain_kind` filter. |
| `power_kw` | object or null | The lowest and highest output among those versions, as `min` and `max`. |

## Showing a generation in your own language

`name` is written in English: `Sedan (B9 8W, facelift 2019)`. Every part of it is also given on its own, so you can build the same label in any language without parsing or translating that string:

| Part | Field | In another language |
|---|---|---|
| `VIII` | `ordinal` | Write the number as you like: a Roman numeral, "Mk 8", "8th generation". |
| `Avant` | `variant` | Keep as it is. It is the maker's name for the car. |
| `Sedan` | `body` | A value from the `body` [vocabulary](https://autospec.launchit.ro/docs/vocabularies), such as `sedan` or `wagon`. Translate the value. |
| `B9 8W` | `chassis_codes` | Keep as they are. |
| `facelift 2019` | `facelift_year` | Your word for a facelift, and the year. |

The English name follows one order, which a translation can follow too: the number, then the variant, or the body type where there is neither a variant nor a number, then the codes and the facelift in brackets.

```
ordinal 8, variant null,    body [hatchback], facelift_year 2024   ->   VIII (facelift 2024)
variant "Avant", body [wagon], chassis_codes [B9 8W]              ->   Avant (B9 8W)
variant null,    body [sedan], chassis_codes [B9 8W], 2019        ->   Sedan (B9 8W, facelift 2019)
all empty,       body [suv]                                        ->   SUV
```

With `lang`, `name` is already in your language, which is all most clients need. The parts are for a label of your own design, and [translations](https://autospec.launchit.ro/docs/languages) gives you the words for one.

A few names carry a remark that fits none of these, such as a market or a phase. That remark is in `variant`. The parts are filled for cars. A motorcycle's generation is named after its years, which need no translation.
