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

     1  ---
     2  summary: Create a new order
     3  description: Create a new order. Access token scope must include <code>orders.create</code>.
     4  operationId: order/create
     5  tags:
     6  - Orders
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  responses:
    11    '201':
    12      description: Created
    13      content:
    14        application/json:
    15          schema:
    16            "$ref": "../../schemas/translation_order.yaml#/translation_order"
    17      headers:
    18        X-Rate-Limit-Limit:
    19          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    20        X-Rate-Limit-Remaining:
    21          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    22        X-Rate-Limit-Reset:
    23          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    24    '400':
    25      "$ref": "../../responses.yaml#/400"
    26    '404':
    27      "$ref": "../../responses.yaml#/404"
    28    '429':
    29      "$ref": "../../responses.yaml#/429"
    30  x-code-samples:
    31  - lang: Curl
    32    source: |-
    33      curl "https://api.phrase.com/v2/projects/:project_id/orders" \
    34        -u USERNAME_OR_ACCESS_TOKEN \
    35        -X POST \
    36        -d '{"branch":"my-feature-branch","name":"Welcome message translations","lsp":"textmaster","source_locale_id":"abcd1234abcd1234abcd1234abcd1234","target_locale_ids":["1234abcd1234abcd1234abcd1234abcd","abcd1234abcd1234abcd1234abcd1234"],"translation_type":"premium","tag":"my-awesome-feature","message":"Please make everything sound really nice :)","styleguide_id":"1234abcd1234abcd1234abcd1234abcd","category":"C021"}' \
    37        -H 'Content-Type: application/json'
    38  - lang: CLI v2
    39    source: |-
    40      phrase orders create \
    41      --project_id <project_id> \
    42      --data '{"branch":"my-feature-branch", "name":"Welcome message translations", "lsp":"textmaster", "source_locale_id":"abcd1234abcd1234abcd1234abcd1234", "target_locale_ids": "1234abcd1234abcd1234abcd1234abcd,abcd1234abcd1234abcd1234abcd1234", "translation_type":"premium", "tag":"my-awesome-feature", "message": "Please make everything sound really nice :)", "styleguide_id":"1234abcd1234abcd1234abcd1234abcd", "category":"C021"}' \
    43      --access_token <token>
    44  requestBody:
    45    required: true
    46    content:
    47      application/json:
    48        schema:
    49          type: object
    50          title: order/create/parameters
    51          required:
    52            - name
    53            - lsp
    54          properties:
    55            branch:
    56              description: specify the branch to use
    57              type: string
    58              example: my-feature-branch
    59            name:
    60              description: 'the name of the order, default name is: Translation order from ''current datetime'''
    61              type: string
    62              example: Welcome message translations
    63            lsp:
    64              description: Name of the LSP that should process this order. Can be one of gengo, textmaster.
    65              type: string
    66              example: textmaster
    67            source_locale_id:
    68              description: Source locale for the order. Can be the name or id of the source locale. Preferred is id.
    69              type: string
    70              example: abcd1234abcd1234abcd1234abcd1234
    71            target_locale_ids:
    72              description: List of target locales you want the source content translate to. Can be the name or id of the target locales. Preferred is id.
    73              type: array
    74              items:
    75                type: string
    76              example:
    77              - 1234abcd1234abcd1234abcd1234abcd
    78              - abcd1234abcd1234abcd1234abcd1234
    79            translation_type:
    80              description: 'Name of the quality level, availability depends on the LSP. Can be one of:  standard, pro (for orders processed by Gengo) and one of regular, premium, enterprise (for orders processed by TextMaster)'
    81              type: string
    82              example: premium
    83            tag:
    84              description: Tag you want to order translations for.
    85              type: string
    86              example: my-awesome-feature
    87            message:
    88              description: Message that is displayed to the translators for description.
    89              type: string
    90              example: Please make everything sound really nice :)
    91            styleguide_id:
    92              description: Style guide for translators to be sent with the order.
    93              type: string
    94              example: 1234abcd1234abcd1234abcd1234abcd
    95            unverify_translations_upon_delivery:
    96              description: Unverify translations upon delivery.
    97              type: boolean
    98              example:
    99            include_untranslated_keys:
   100              description: Order translations for keys with untranslated content in the selected target locales.
   101              type: boolean
   102              example:
   103            include_unverified_translations:
   104              description: Order translations for keys with unverified content in the selected target locales.
   105              type: boolean
   106              example:
   107            category:
   108              description: Category to use (required for orders processed by TextMaster).
   109              type: string
   110              example: C021
   111            quality:
   112              description: Extra proofreading option to ensure consistency in vocabulary and style. Only available for orders processed by TextMaster.
   113              type: boolean
   114              example:
   115            priority:
   116              description: Indicates whether the priority option should be ordered which decreases turnaround time by 30%. Available only for orders processed by TextMaster.
   117              type: boolean
   118              example:
   119  x-cli-version: '2.5'