---
title: "One mapping table of a consumer: its rows, values and candidates"
method: GET
path: "/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}"
tags: ["Syncs"]
---

# One mapping table of a consumer: its rows, values and candidates

`GET /consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}`

## Request

- Base URL: `https://api.chift.eu`
- URL: `https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chift/apis/chift-api/docs/consumers/:consumer_id/syncs/:syncid/mappings/:table_key/get.ts> (a function with typed inputs; its response is checked against the schema)

The table's rows with their values, and one page of what a row may point at. Rows are what the source lists (or the fixed rows in use), then the keys an execution or a preview met without a value. Candidates are read from the consumer's connection: `refresh` reads them again, not from the connector's cache. The table's autofill rules run first, so a row they can fill has a value. Edit the values with `PATCH /consumers/{consumer_id}/syncs/{syncid}`.

## Path parameters

- `consumer_id` string, uuid, required
- `syncid` string, uuid, required
- `table_key` string, required

## Query parameters

- `search` string, nullable: Keeps the candidates whose label or key contains it, ignoring case.
- `page` integer: Page of candidates.
- `size` integer: Candidates per page.
- `show_all` boolean: Every item of the target, not only the suggested ones.
- `row` string, nullable: The row (its `source_key`) to suggest candidates for: a table can suggest per row.
- `refresh` boolean: Read the rows and candidates from the connections again.
- `language` string, nullable: ISO 639-1 code of the language of the texts (en, fr, nl, de, es; any case), falling back to English. Without it, translation keys.

## Response `200`

Successful Response

- MappingTableView: One mapping table of a consumer: its rows with their values, and what they may point at.
  - `key` string, required: Stable key, e.g. 'spend_to_accounting.SupplierInvoices'. Send it back as is.
  - `id` string, uuid, required: The stable uuid derived from the key, as the legacy sync routes identify the same item.
  - `title` string, required: Name to show, in the requested language; its translation key without one.
  - `description` string, required: What it does, the tooltip: in the requested language, its translation key without one.
  - `required` boolean, required: A row without a value stops the objects that need it (an issue is raised).
  - `allow_delete` boolean, required: The consumer may hide rows.
  - `rows` MappingRowView[], required: The source's rows, then the keys met in the data, then any other row holding a value.
    - `source_key` string, required: The row's key, the value the sync looks up.
    - `label` string, required: What to show for the row.
    - `value` string, nullable, required: The candidate key the row points at. Null when it has none.
    - `value_label` string, nullable, required: The label of the value, when the target still lists it.
    - `origin` string, nullable, required: Who wrote the value: 'human' (the consumer), 'sync_created' (the sync created what the consumer asked for), 'rule' (the sync's own autofill), 'ai' (ai-fill) or 'default'. A write never replaces a value of a higher rank: human = sync_created > rule > ai > default.
    - `hidden` boolean, required: The consumer hid the row: it has no value, and no fill gives it one.
    - `missing` boolean, required: An execution or the latest preview needed this row and it still has no value: it holds those objects up, and the table is incomplete until it is filled. The row may not be one the source lists.
  - `candidates` ChiftPageMappingCandidate, required
    - `items` MappingCandidate[], required
      - `key` string, required: The value to store.
      - `label` string, required: What to show.
      - `fixed` boolean, required: A fixed option of the table (e.g. 'to_be_created'), not an item of the target.
    - `total` integer, required
    - `page` integer, required
    - `size` integer, required

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `422`: Validation Error

## Changes

- **2026-11-03** `020884969534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/chift/apis/chift-api/changes/consumers/:consumer_id/syncs/:syncid/mappings/:table_key/get.md)

---

[API](https://skmtc.dev/chift/apis/chift-api.md) - [All operations](https://skmtc.dev/chift/apis/chift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chift/apis/chift-api/revisions/020884969534?raw)
