---
title: "translationsRegister"
description: "Create or update the translation data for a store resource."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/localizations/mutations/translations-register'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/localizations/mutations/translations-register.md'
---
# translationsRegister

Create or update the translation data for a store resource.

- **Required Scopes:** `write_translation`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Required Permissions

* `write_translation`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `resourceId`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The unique identifier for the resource. <br></br>For example, product ID `16057169190700063316363001`.

* `translations`

  [[TranslationInput!]!](https://developer.shopline.com/docs/admin-graph-ql-api/localizations/inputs/translation-input.md)

  Translation corpus information.

## Returns

* `translations`

  [[Translation!]](https://developer.shopline.com/docs/admin-graph-ql-api/localizations/objects/translation.md)

  translations

* `userErrors`

  [[TranslationUserError!]!](https://developer.shopline.com/docs/admin-graph-ql-api/localizations/objects/translation-user-error.md)

  userErrors

## Examples

### Update the translation data for a specific market and language within a resource

Update the translation data for a specific market and language within a resource.

**Request:**

```json
mutation TranslationsRegister {
    translationsRegister(
        resourceId: "gid://shopline/Product/16065881455967920659531950"
        translations: [
            {
                translatableContentDigest: "07ec01a6c4ea382ed6ae7671b7bcf358"
                locale: "DEFAULT"
                value: "Product title"
                key: "title"
                marketId: "2805979406510623080534"
            }
        ]
    ) {
        userErrors {
            code
            field
            message
        }
        translations {
            outdated
            locale
            value
            key
            type
            updatedAt
            market {
                id
            }
        }
    }
}
```

**Response:**

```json
{
  "data": {
    "data": {
      "translationsRegister": {
        "translations": [
          {
            "outdated": false,
            "value": "Default corpus English - Product title",
            "key": "title",
            "locale": "en",
            "market": {
              "id": "DEFAULT"
            }
          }
        ]
      }
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

