---
title: "Get a template's translations"
description: "Read every translation override on the preorder confirmation template, plus the full enumeration of translatable field paths, each field's default-locale source text, and every locale the shop has actually published. cam"
url: https://docs.stoqapp.com/v2-reference/account-templates/get-a-templates-translations/
api: "API v2 reference"
method: GET
path: "/account/templates/{campaign_type}/translations"
---

# Get a template's translations

`GET https://app.stoqapp.com/api/v2/external/account/templates/{campaign_type}/translations`

Read every translation override on the preorder confirmation template, plus the full enumeration of translatable field paths, each field's default-locale source text, and every locale the shop has actually published. campaign_type is &quot;preorder&quot;; back-in-stock notifications are [`GET /back_in_stock/templates/:key/translations`](https://docs.stoqapp.com/v2-reference/back-in-stock-templates/get-a-templates-translations/).

**Note:** `translations` holds only the fields with an override, by locale; `source_values` is the text in `default_locale`, the alert language. `published_locales` always includes the alert language and can lag a change in Shopify by a few minutes. Write a translation with [`PATCH /preorders/templates/confirmation`](https://docs.stoqapp.com/v2-reference/preorders-templates/update-confirmation-email/) and its `locale`. A shop with no preorder notification gets 404 `not_found`; a `campaign_type` other than `preorder` gets 422 `invalid_params`.

## Path parameters

- `campaign_type` (string, required): The template's campaign type; only preorder is supported. One of: `preorder`.

## Query parameters

- `position` (integer): Position of the notification in the campaign, 0 for the first (default).

## Returns

- `default_locale` (string): e.g. `string`
- `locales` (array of strings)
- `published_locales` (array of strings)
- `fields` (array of strings)
- `source_values` (object)
  - `email.subject` (string): e.g. `string`
  - `email.preheader` (null)
  - `email.header` (string): e.g. `string`
  - `email.description` (string): e.g. `string`
  - `email.footer` (string): e.g. `string`
  - `email.button_text` (string): e.g. `string`
  - `email.unsubscribe_text` (string): e.g. `string`
  - `email.consent_text` (string): e.g. `string`
  - `email.reviews_title` (string): e.g. `string`
  - `sms.body` (string): e.g. `string`
- `translations` (object)
  - `fr` (object)
    - `email.subject` (string): e.g. `string`

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Examples

### Get a template's translations

```sh
curl "https://app.stoqapp.com/api/v2/external/account/templates/{campaign_type}/translations" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### Get a template's translations filtered by position

```sh
curl "https://app.stoqapp.com/api/v2/external/account/templates/{campaign_type}/translations?position=0" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: the requested resource.

```json
{
  "default_locale": "string",
  "locales": [
    "string"
  ],
  "published_locales": [
    "string"
  ],
  "fields": [
    "string"
  ],
  "source_values": {
    "email.subject": "string",
    "email.preheader": null,
    "email.header": "string",
    "email.description": "string",
    "email.footer": "string",
    "email.button_text": "string",
    "email.unsubscribe_text": "string",
    "email.consent_text": "string",
    "email.reviews_title": "string",
    "sms.body": "string"
  },
  "translations": {
    "fr": {
      "email.subject": "string"
    }
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

