openapi: 3.0.0
info:
  title: ""
  description: "With the i18n API, you can retrieve a list of translated custom labels."
  version: 1.0.0
servers:
- url: "https://{instanceUrl}/services/apexrest/mvn/i18n/v1"
tags:
- name: labels
  description: Handling of 'CustomLabel' records.
paths:
  /labels/:
    post:
      tags:
      - labels
      summary: Returns a list of translated labels.
      description: Used to return a list of translated labels.
      requestBody:
        description: Language and list of labels to translate.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchLabelsRequest"
            examples:
              SearchLabelsRequest:
                $ref: "#/components/examples/SearchLabelsRequest"
        required: true
      responses:
        "201":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchLabelsResponse"
              examples:
                SearchLabelsResponse:
                  $ref: "#/components/examples/SearchLabelsResponse"
        "400":
          description: Bad request
        "500":
          description: Error creating the document
components:
  schemas:
    SearchLabelsRequest:
      title: Labels - Search Labels Request
      type: object
      properties:
        language:
          type: string
          description: Represents the language in which to return the translated labels.
          example: en_US
          enum:
          - de
          - en_US
          - es
          - es_MX
          - fr
          - ja
          - ru
        labels:
          type: array
          description: Represents a list of label API names
          items:
            type: string
    SearchLabelsResponse:
      title: Labels - Search Labels Response
      type: object
      properties:
        totalSize:
          type: integer
        records:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              translation:
                type: string
  examples:
    SearchLabelsRequest:
      value:
        language: fr_CA
        labels:
        - MM_Search
        - MM_Add
        - MM_Welcome
    SearchLabelsResponse:
      value:
        totalSize: 3
        records:
        - label: MM_Search
          translation: Rechercher
        - label: MM_Add
          translation: Ajouter
        - label: MM_Welcome
          translation: Bienvenue sur Medical Mobile %s! Veuillez-vous identifier en utilisant Touch ID.
