---
title: "translationsRemove"
description: "删除资源 ID 下的店铺的翻译语料。你可以基于资源 ID 、市场、语言、类型细分删除对应的语料信息。"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/localizations/mutations/translations-remove'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/localizations/mutations/translations-remove.md'
---
# translationsRemove

删除资源 ID 下的店铺的翻译语料。你可以基于资源 ID 、市场、语言、类型细分删除对应的语料信息。

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

## Required Permissions

* `write_translation`

接口访问需要令牌，具体如何获取令牌请参考：[身份认证](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md)

## Arguments

* `translationKeys`

  [[String!]!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/string.md)

  业务资源字段列表。

* `locales`

  [[String!]!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/string.md)

  [市场](https://help.shopline.com/hc/en-001/articles/12436136316313-Market-Management) 里面使用的语言列表。<br></br>例如 `en`。

* `marketIds`

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

  商店的主要市场 ID 列表。

* `resourceId`

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

  资源的唯一标识符。<br></br>样例：商品 ID：`16057169190700063316363001`。

## Returns

* `translations`

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

  被删除的语料

* `userErrors`

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

  删除异常信息

## Examples

### 删除店铺下资源 ID 、市场、语言、类型细分的翻译语料。

删除店铺下资源 ID 、市场、语言、类型细分的翻译语料。

**Request:**

```json
mutation TranslationsRemove {
    translationsRemove(
        translationKeys: ["title"]
        locales: ["en"]
        resourceId: "gid://shopline/Product/16065881455967920659531950"
        marketIds: ["2805979406510623080534"]
    ) {
        translations {
            outdated
            locale
            value
            key
            market {
                id
            }
        }
        userErrors {
            code
            field
            message
        }
    }
}
```

**Response:**

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

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes)。

