github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/glossary_term_translations/update.yaml (about)

     1  ---
     2  summary: Update a translation for a term
     3  description: 'Update an existing translation for a term in a term base (previously: glossary).'
     4  operationId: glossary_term_translation/update
     5  tags:
     6  - Glossary Term Translations
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/account_id"
    10  - "$ref": "../../parameters.yaml#/glossary_id"
    11  - "$ref": "../../parameters.yaml#/term_id"
    12  - "$ref": "../../parameters.yaml#/id"
    13  responses:
    14    '200':
    15      description: OK
    16      content:
    17        application/json:
    18          schema:
    19            "$ref": "../../schemas/glossary_term_translation.yaml#/glossary_term_translation"
    20      headers:
    21        X-Rate-Limit-Limit:
    22          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    23        X-Rate-Limit-Remaining:
    24          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    25        X-Rate-Limit-Reset:
    26          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    27    '400':
    28      "$ref": "../../responses.yaml#/400"
    29    '404':
    30      "$ref": "../../responses.yaml#/404"
    31    '429':
    32      "$ref": "../../responses.yaml#/429"
    33  x-code-samples:
    34  - lang: Curl
    35    source: |-
    36      curl "https://api.phrase.com/v2/accounts/:account_id/glossaries/:glossary_id/terms/:term_id/translations/:id" \
    37        -u USERNAME_OR_ACCESS_TOKEN \
    38        -X PATCH \
    39        -d '{"locale_code":"en-US","content":"My translated term"}' \
    40        -H 'Content-Type: application/json'
    41  - lang: CLI v2
    42    source: |-
    43      phrase glossary_term_translations update \
    44      --account_id <account_id> \
    45      --glossary_id <glossary_id> \
    46      --term_id <term_id> \
    47      --id <id> \
    48      --data '{"locale_code":"en-US", "content": "My translated term"}' \
    49      --access_token <token>
    50  requestBody:
    51    required: true
    52    content:
    53      application/json:
    54        schema:
    55          type: object
    56          title: glossary_term_translation/update/parameters
    57          properties:
    58            locale_code:
    59              description: Identifies the language for this translation
    60              type: string
    61              example: en-US
    62            content:
    63              description: The content of the translation
    64              type: string
    65              example: My translated term
    66  x-cli-version: '2.5'