---
title: "Translate page spatial data"
method: POST
path: "/api/v1/annotations/{annotationID}/page_data/translate"
tags: ["Annotation"]
---

# Translate page spatial data

`POST /api/v1/annotations/{annotationID}/page_data/translate`

Get translation for all lines on a page, including position coordinates. Source language of the page can be either
specified by a user or automatically detected by the service. Translated text of a page in a particular language
is cached for 60 days.
   
**Requirements:**
- Document translations feature must be enabled for the organization
- User must have translate permissions
- Page must have OCR data available

**Supported languages:**

| Key   | Description           |
|-------|-----------------------|
| af    | Afrikaans             |
| sq    | Albanian              |
| am    | Amharic               |
| ar    | Arabic                |
| hy    | Armenian              |
| az    | Azerbaijani           |
| bn    | Bengali               |
| bs    | Bosnian               |
| bg    | Bulgarian             |
| ca    | Catalan               |
| zh    | Chinese (Simplified)  |
| zh-TW | Chinese (Traditional) |
| hr    | Croatian              |
| cs    | Czech                 |
| da    | Danish                |
| fa-AF | Dari                  |
| nl    | Dutch                 |
| en    | English               |
| et    | Estonian              |
| fa    | Farsi (Persian)       |
| tl    | Filipino, Tagalog     |
| fi    | Finnish               |
| fr    | French                |
| fr-CA | French (Canada)       |
| ka    | Georgian              |
| de    | German                |
| el    | Greek                 |
| gu    | Gujarati              |
| ht    | Haitian Creole        |
| ha    | Hausa                 |
| he    | Hebrew                |
| hi    | Hindi                 |
| hu    | Hungarian             |
| is    | Icelandic             |
| id    | Indonesian            |
| ga    | Irish                 |
| it    | Italian               |
| ja    | Japanese              |
| kn    | Kannada               |
| kk    | Kazakh                |
| ko    | Korean                |
| lv    | Latvian               |
| lt    | Lithuanian            |
| mk    | Macedonian            |
| ms    | Malay                 |
| ml    | Malayalam             |
| mt    | Maltese               |
| mr    | Marathi               |
| mn    | Mongolian             |
| no    | Norwegian (Bokmål)    |
| ps    | Pashto                |
| pl    | Polish                |
| pt    | Portuguese (Brazil)   |
| pt-PT | Portuguese (Portugal) |
| pa    | Punjabi               |
| ro    | Romanian              |
| ru    | Russian               |
| sr    | Serbian               |
| si    | Sinhala               |
| sk    | Slovak                |
| sl    | Slovenian             |
| so    | Somali                |
| es    | Spanish               |
| es-MX | Spanish (Mexico)      |
| sw    | Swahili               |
| sv    | Swedish               |
| ta    | Tamil                 |
| te    | Telugu                |
| th    | Thai                  |
| tr    | Turkish               |
| uk    | Ukrainian             |
| ur    | Urdu                  |
| uz    | Uzbek                 |
| vi    | Vietnamese            |
| cy    | Welsh                 |

## Path parameters

- `annotationID` integer, required

## Request body

- object
  - `page_numbers` integer[], required — Single page number to translate (currently only one page at a time is supported)
  - `target_language` 'af' | 'sq' | 'am' | 'ar' | 'hy' | 'az' | 'bn' | 'bs' | 'bg' | 'ca' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fa' | 'tl' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'lv' | 'lt' | 'mk' | 'ms' | 'ml' | 'mt' | 'mr' | 'mn' | 'no' | 'ps' | 'pl' | 'pt' | 'pt-PT' | 'pa' | 'ro' | 'ru' | 'sr' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy', required — Target language code. Either ISO 639-1 format or a combination of ISO 639-1 two-digit language code followed by an underscore followed by an ISO 3166 2-digit country code.
  - `source_language` 'auto' | 'af' | 'sq' | 'am' | 'ar' | 'hy' | 'az' | 'bn' | 'bs' | 'bg' | 'ca' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fa' | 'tl' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'lv' | 'lt' | 'mk' | 'ms' | 'ml' | 'mt' | 'mr' | 'mn' | 'no' | 'ps' | 'pl' | 'pt' | 'pt-PT' | 'pa' | 'ro' | 'ru' | 'sr' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy' — Source language code. When not specified, the value `auto` is used which indicates the service will automatically detect the source language.
  - `granularity` 'lines', required — Level of text granularity

## Response `200`

Translation completed successfully (or retrieved from cache)

- object
  - `results` object[]
    - `page_number` integer — Page number
    - `granularity` string — Granularity level
    - `source_language` string — Detected or specified source language code
    - `items` object[] — Translated text items with original positions
      - `text` string — Translated text
      - `position` integer[] — Coordinates of the item on the given page

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
