# Work types and VAT

You identify the kind of work with a **permanent code**, e.g. `performing_arts`. You never send a
VAT rate.

- `GET /v1/work_types` lists the codes allowed for you, with the VAT valid today and any announced
  change (`upcoming`).
- A gig's code comes from the worker (`workers[].work_type`), else the gig (`work_type`), else your
  default work type. Without any: `422 work_type_required`.
- The code resolves to the VAT treatment valid on the **date the gig was performed**. A gig on
  20.12. keeps the old rate even if reported in January.
- `amount` is VAT-excluded; VAT is added on top. A VAT increase never reduces the worker's share:
  you pay the difference and see it in `invoice_total`.
- Each worker in a response shows the `vat_percent` actually applied.

## When a code is retired

Codes change only when a kind of work goes away entirely. Then the code gets a sunset date at least
six months ahead and a replacement. Until the sunset it keeps working, but every response using it
carries a `work_type_deprecated` warning and the `Deprecation` and `Sunset` headers. After the
sunset: `422 work_type_retired`, with the replacement in the hint.

## Errors

| Code | Meaning |
|---|---|
| `work_type_required` | no code on the worker or gig, and no default |
| `work_type_not_allowed` | the code is not on your list |
| `work_type_not_available_on_date` | the code has no VAT treatment on the gig date |
| `work_type_retired` | past the sunset date |
