{
    "openapi": "3.1.0",
    "info": {
        "title": "Translayte Agent API",
        "version": "1.0.0",
        "description": "Quotes and reference data for AI shopping agents: the price of a certified translation for a language pair, page count, speed and certification, in the currency asked for, from the same calculator as checkout. No key is needed. To order, send the customer to the order_url in the quote."
    },
    "servers": [
        {
            "url": "https:\/\/translayte.com\/api\/agent\/v1"
        }
    ],
    "paths": {
        "\/files": {
            "post": {
                "operationId": "agent.files.store",
                "description": "Sends the document to be translated ahead of the quote or order: as a multipart upload,\nas a public https URL, or as base64 in a JSON body with its filename. The document is\nmeasured the way the order form measures an upload,\nand the response carries its billable page count and a `file_token`. Pass the tokens of\nevery document as `file_tokens` to \/quote and \/orders: the quantity is then the measured\npages, so the price is set on the real documents before payment. A token is valid for 24\nhours and for one order.",
                "summary": "Send a document",
                "tags": [
                    "Files",
                    "File"
                ],
                "requestBody": {
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreFileRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "file_token": {
                                            "type": "string"
                                        },
                                        "filename": {
                                            "type": "string"
                                        },
                                        "pages": {
                                            "type": "string"
                                        },
                                        "words": {
                                            "type": "string"
                                        },
                                        "page_definition": {
                                            "type": "string"
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "file_token",
                                        "filename",
                                        "pages",
                                        "words",
                                        "page_definition",
                                        "expires_at"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/orders": {
            "post": {
                "operationId": "agent.orders.store",
                "description": "Places an unpaid order for the customer from the same inputs as a quote plus their name,\nemail and phone number (E.164), priced by the same calculator. The response carries signed links: `pay_url` opens our payment page,\nwhere the customer pays by card, PayPal, Google Pay or Apple Pay; `status_url` shows the\norder and collects the documents after payment. The links expire after 48 hours and\nfresh ones can be requested with \/orders\/recover-link.\n\nA customer whose email already has an account receives the links by email instead,\nand the response says so without the links; the agent should tell the customer to\ncheck their inbox.\n\nSend an `Idempotency-Key` header (or `idempotency_key` in the body) and a retry\nwithin a day answers with the order the first request placed, marked `replayed`,\nrather than a second order.",
                "summary": "Create an order",
                "tags": [
                    "Orders",
                    "Order"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateOrderRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "order_id": {
                                            "type": "integer"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "currency": {
                                            "type": "string"
                                        },
                                        "amount": {
                                            "type": "string"
                                        },
                                        "pay_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "status_url": {
                                            "type": "string"
                                        },
                                        "links_expire_at": {
                                            "type": "string"
                                        },
                                        "next_action": {
                                            "type": "string",
                                            "const": "pay"
                                        },
                                        "replayed": {
                                            "type": "boolean",
                                            "description": "True when an idempotency key answered with the order a previous request placed."
                                        }
                                    },
                                    "required": [
                                        "order_id",
                                        "status",
                                        "currency",
                                        "amount",
                                        "pay_url",
                                        "status_url",
                                        "links_expire_at",
                                        "next_action",
                                        "replayed"
                                    ]
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "We have emailed the customer secure links to pay for and follow this order."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/orders\/recover-link": {
            "post": {
                "operationId": "agent.orders.recover-link",
                "description": "Emails the customer fresh pay and status links for an order placed with their email\naddress. The response is the same whether or not the order and email match, so it\ntells the caller nothing about other people's orders. Rate limited.",
                "summary": "Recover the links to an order",
                "tags": [
                    "Orders",
                    "Order"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/RecoverLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "If that order was placed with that email address, the links are on their way to it."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/quote": {
            "get": {
                "operationId": "agent.quote",
                "description": "The price of a certified translation for a language pair, page count, speed and\ncertification, in the currency asked for: the same calculator as checkout, with\nthe ex-VAT lines, the VAT and the total, and every certification the pair offers.\nNo key, upload or account is needed; the response may be cached for an hour.",
                "summary": "Get a quote",
                "tags": [
                    "Quote"
                ],
                "parameters": [
                    {
                        "name": "source_language",
                        "in": "query",
                        "required": true,
                        "description": "Source language, as listed by \/api\/agent\/v1\/languages.",
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 7
                        },
                        "example": "en-gb"
                    },
                    {
                        "name": "target_language",
                        "in": "query",
                        "required": true,
                        "description": "Target language, as listed by \/api\/agent\/v1\/languages.",
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 7
                        },
                        "example": "es"
                    },
                    {
                        "name": "quantity",
                        "in": "query",
                        "description": "Pages to translate. A page is up to 250 words of the source document. Optional when file_tokens are given: the documents are measured instead.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 999
                        },
                        "example": 5
                    },
                    {
                        "name": "file_tokens[]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "maxLength": 255
                            }
                        }
                    },
                    {
                        "name": "speed",
                        "in": "query",
                        "description": "standard, next_day (+25%) or same_day (+100%).",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "standard",
                                "next_day",
                                "same_day",
                                null
                            ]
                        },
                        "example": "standard"
                    },
                    {
                        "name": "certification",
                        "in": "query",
                        "description": "standard, sworn, statement_of_truth, certified_translator_canada or naati. Omit for the standard certification; the response lists every option the pair offers with its total.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "standard",
                                "sworn",
                                "statement_of_truth",
                                "certified_translator_canada",
                                "naati",
                                null
                            ]
                        },
                        "example": "sworn"
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "description": "The currency to quote in. Each currency is its own price sheet; GBP prices carry UK VAT.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "GBP",
                                "EUR",
                                "USD",
                                "AUD",
                                "CAD",
                                "BRL",
                                "ZAR",
                                null
                            ]
                        },
                        "example": "GBP"
                    },
                    {
                        "name": "country_of_use",
                        "in": "query",
                        "description": "ISO 3166-1 alpha-2 code of the country the translation is for, e.g. ES for a sworn translation for Spain.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 2,
                            "maxLength": 2
                        },
                        "example": "ES"
                    },
                    {
                        "name": "customer_country",
                        "in": "query",
                        "description": "ISO 3166-1 alpha-2 code of the customer's country. Outside GB no VAT is charged, as at checkout.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 2,
                            "maxLength": 2
                        },
                        "example": "GB"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "service": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "const": 1
                                                },
                                                "code": {
                                                    "type": "string",
                                                    "const": "document_notarisation"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "const": "Certified Translation"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "code",
                                                "name"
                                            ]
                                        },
                                        "source_language": {
                                            "type": "string"
                                        },
                                        "target_language": {
                                            "type": "string"
                                        },
                                        "country_of_use": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "certification": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sworn_country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "code",
                                                "name",
                                                "sworn_country"
                                            ]
                                        },
                                        "quantity": {
                                            "type": "integer"
                                        },
                                        "files": {},
                                        "unit": {
                                            "type": "string",
                                            "const": "page"
                                        },
                                        "page_definition": {
                                            "type": "string"
                                        },
                                        "page_overrun": {
                                            "type": "string"
                                        },
                                        "speed": {},
                                        "delivery": {
                                            "type": "object",
                                            "properties": {
                                                "estimated_by": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "estimated_by"
                                            ]
                                        },
                                        "currency": {
                                            "type": "string"
                                        },
                                        "lines": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "code": {
                                                            "type": "string",
                                                            "const": "volume_discount"
                                                        },
                                                        "description": {
                                                            "type": "string"
                                                        },
                                                        "amount_minor": {
                                                            "type": "string"
                                                        },
                                                        "amount": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "code",
                                                        "description",
                                                        "amount_minor",
                                                        "amount"
                                                    ]
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1,
                                            "additionalItems": false
                                        },
                                        "net_minor": {
                                            "type": "integer"
                                        },
                                        "vat": {
                                            "type": "object",
                                            "properties": {
                                                "rate": {
                                                    "type": "number"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "string"
                                                },
                                                "included_in_total": {
                                                    "type": "boolean"
                                                },
                                                "customer_country_assumed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "VAT was charged without being told where the customer is, so the agent knows the total rests on an assumption.",
                                                    "enum": [
                                                        "GB",
                                                        null
                                                    ]
                                                },
                                                "note": {
                                                    "type": "string",
                                                    "enum": [
                                                        "VAT applies to customers in the United Kingdom; a customer elsewhere pays none, and a UK-registered business pays it while a valid non-UK VAT number removes it.",
                                                        "No VAT applies on this price sheet."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "rate",
                                                "amount_minor",
                                                "amount",
                                                "included_in_total",
                                                "customer_country_assumed",
                                                "note"
                                            ]
                                        },
                                        "total_minor": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "string"
                                        },
                                        "order_url": {
                                            "type": "string"
                                        },
                                        "certification_options": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "warnings": {
                                            "anyOf": [
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                {
                                                    "type": "array",
                                                    "prefixItems": [
                                                        {
                                                            "type": "string"
                                                        }
                                                    ],
                                                    "minItems": 1,
                                                    "maxItems": 1,
                                                    "additionalItems": false
                                                }
                                            ]
                                        },
                                        "generated_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "service",
                                        "source_language",
                                        "target_language",
                                        "country_of_use",
                                        "certification",
                                        "quantity",
                                        "files",
                                        "unit",
                                        "page_definition",
                                        "page_overrun",
                                        "speed",
                                        "delivery",
                                        "currency",
                                        "lines",
                                        "net_minor",
                                        "vat",
                                        "total_minor",
                                        "total",
                                        "order_url",
                                        "certification_options",
                                        "warnings",
                                        "generated_at"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/services": {
            "get": {
                "operationId": "agent.services",
                "description": "The services sold online, their unit, whether \/quote can price them, and their\n\"from\" price in every currency, VAT included where the sheet charges it.",
                "summary": "List services",
                "tags": [
                    "Reference data",
                    "Reference"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "services": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "quotable": {
                                                        "type": "boolean"
                                                    },
                                                    "from": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "currency": {
                                                                    "type": "string"
                                                                },
                                                                "amount": {
                                                                    "type": "string"
                                                                },
                                                                "amount_minor": {
                                                                    "type": "integer"
                                                                },
                                                                "vat_included": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "currency",
                                                                "amount",
                                                                "amount_minor",
                                                                "vat_included"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "code",
                                                    "name",
                                                    "unit",
                                                    "quotable",
                                                    "from"
                                                ]
                                            }
                                        },
                                        "currencies": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "page_definition": {
                                            "type": "string"
                                        },
                                        "page_overrun": {
                                            "type": "string"
                                        },
                                        "volume_discounts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "min": {
                                                        "type": "integer"
                                                    },
                                                    "max": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "percent": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "min",
                                                    "max",
                                                    "percent"
                                                ]
                                            }
                                        },
                                        "speeds": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "certifications": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "services",
                                        "currencies",
                                        "page_definition",
                                        "page_overrun",
                                        "volume_discounts",
                                        "speeds",
                                        "certifications"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/languages": {
            "get": {
                "operationId": "agent.languages",
                "description": "The language codes \/quote accepts, with the country whose sworn translators serve the language.",
                "summary": "List languages",
                "tags": [
                    "Reference data",
                    "Reference"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "languages": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "iso": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "country": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "iso",
                                                    "name",
                                                    "country"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "languages"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/countries": {
            "get": {
                "operationId": "agent.countries",
                "description": "ISO 3166-1 alpha-2 codes for country_of_use and customer_country, each with whether it\nis in the Hague Apostille Convention, whether sworn translations are offered for it, and\nwhether document notarisation and apostille are priced online, quoted, or not offered there.",
                "summary": "List countries",
                "tags": [
                    "Reference data",
                    "Reference"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "countries": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "iso": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "apostille_convention": {
                                                        "type": "boolean"
                                                    },
                                                    "sworn_translation": {
                                                        "type": "boolean"
                                                    },
                                                    "document_notarisation": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "apostille_legalisation": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "iso",
                                                    "name",
                                                    "apostille_convention",
                                                    "sworn_translation",
                                                    "document_notarisation",
                                                    "apostille_legalisation"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "countries"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/coverage": {
            "get": {
                "operationId": "agent.coverage",
                "description": "Where each service is available: the languages and certifications of certified\ntranslation and the countries whose authorities ask for each; the countries document\nnotarisation and apostille & legalisation are offered for, with their routes, formats\nand turnaround, and whether each is priced online or quoted. Anywhere else is a quote\nrequest through the order form.",
                "summary": "Service coverage",
                "tags": [
                    "Reference data",
                    "Reference"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "certified_translation": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string"
                                                },
                                                "languages": {
                                                    "type": "integer"
                                                },
                                                "pairs": {
                                                    "type": "string"
                                                },
                                                "countries_of_use": {
                                                    "type": "string"
                                                },
                                                "certifications": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "note": {
                                                                "type": "string"
                                                            },
                                                            "target_languages": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    }
                                                                ]
                                                            },
                                                            "countries": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "code",
                                                            "name",
                                                            "note",
                                                            "target_languages",
                                                            "countries"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "unit",
                                                "languages",
                                                "pairs",
                                                "countries_of_use",
                                                "certifications"
                                            ]
                                        },
                                        "document_notarisation": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string"
                                                },
                                                "countries": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "iso": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "note": {
                                                                "type": "string"
                                                            },
                                                            "availability": {
                                                                "type": "string"
                                                            },
                                                            "types": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "formats": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "iso",
                                                            "name",
                                                            "availability",
                                                            "types",
                                                            "formats"
                                                        ]
                                                    }
                                                },
                                                "elsewhere": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "unit",
                                                "countries",
                                                "elsewhere"
                                            ]
                                        },
                                        "apostille_legalisation": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string"
                                                },
                                                "countries": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "iso": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "availability": {
                                                                "type": "string"
                                                            },
                                                            "turnaround_days": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "routes": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "name": {
                                                                            "type": "string"
                                                                        },
                                                                        "availability": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "id",
                                                                        "name",
                                                                        "availability"
                                                                    ]
                                                                }
                                                            },
                                                            "formats": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "iso",
                                                            "name",
                                                            "availability",
                                                            "turnaround_days",
                                                            "routes",
                                                            "formats"
                                                        ]
                                                    }
                                                },
                                                "embassy_legalisation": {
                                                    "type": "string"
                                                },
                                                "elsewhere": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "unit",
                                                "countries",
                                                "embassy_legalisation",
                                                "elsewhere"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "certified_translation",
                                        "document_notarisation",
                                        "apostille_legalisation"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        }
    },
    "components": {
        "schemas": {
            "CreateOrderRequest": {
                "type": "object",
                "properties": {
                    "source_language": {
                        "type": "string",
                        "description": "Source language, as listed by \/api\/agent\/v1\/languages.",
                        "examples": [
                            "en-gb"
                        ],
                        "minLength": 2,
                        "maxLength": 7
                    },
                    "target_language": {
                        "type": "string",
                        "description": "Target language, as listed by \/api\/agent\/v1\/languages.",
                        "examples": [
                            "es"
                        ],
                        "minLength": 2,
                        "maxLength": 7
                    },
                    "quantity": {
                        "type": "integer",
                        "description": "Pages to translate. A page is up to 250 words of the source document. Optional when file_tokens are given: the documents are measured instead.",
                        "examples": [
                            5
                        ],
                        "minimum": 1,
                        "maximum": 999
                    },
                    "file_tokens": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Tokens from \/files for the documents to translate. The quantity is then their measured page count (or your quantity if higher), so the price is set on the real documents.",
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        },
                        "maxItems": 20
                    },
                    "speed": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "standard, next_day (+25%) or same_day (+100%).",
                        "enum": [
                            "standard",
                            "next_day",
                            "same_day",
                            null
                        ],
                        "examples": [
                            "standard"
                        ]
                    },
                    "certification": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "standard, sworn, statement_of_truth, certified_translator_canada or naati. Omit for the standard certification; the response lists every option the pair offers with its total.",
                        "enum": [
                            "standard",
                            "sworn",
                            "statement_of_truth",
                            "certified_translator_canada",
                            "naati",
                            null
                        ],
                        "examples": [
                            "sworn"
                        ]
                    },
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The currency to quote in. Each currency is its own price sheet; GBP prices carry UK VAT.",
                        "enum": [
                            "GBP",
                            "EUR",
                            "USD",
                            "AUD",
                            "CAD",
                            "BRL",
                            "ZAR",
                            null
                        ],
                        "examples": [
                            "GBP"
                        ]
                    },
                    "country_of_use": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-2 code of the country the translation is for, e.g. ES for a sworn translation for Spain.",
                        "examples": [
                            "ES"
                        ],
                        "minLength": 2,
                        "maxLength": 2
                    },
                    "customer_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-2 code of the customer's country. Outside GB no VAT is charged, as at checkout.",
                        "examples": [
                            "GB"
                        ],
                        "minLength": 2,
                        "maxLength": 2
                    },
                    "name": {
                        "type": "string",
                        "description": "The customer's full name, as it should appear on the order.",
                        "examples": [
                            "Ted Smith"
                        ],
                        "minLength": 2,
                        "maxLength": 255
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The customer's email address. The order links are sent here when the address already has an account.",
                        "examples": [
                            "ted.smith@example.com"
                        ],
                        "maxLength": 255
                    },
                    "phone": {
                        "type": "string",
                        "description": "The customer's phone number in E.164 format: a plus sign, the country code and the number, no spaces.",
                        "examples": [
                            "+14155552671"
                        ],
                        "maxLength": 20
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Anything the translator should know: names to keep, the document's purpose, formatting wishes.",
                        "examples": [
                            "Birth certificate for a Spanish residency application; keep the name spellings as on the passport."
                        ],
                        "maxLength": 2000
                    },
                    "idempotency_key": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64
                    }
                },
                "required": [
                    "source_language",
                    "target_language",
                    "name",
                    "email",
                    "phone"
                ],
                "title": "CreateOrderRequest"
            },
            "RecoverLinkRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The email address the order was placed with.",
                        "examples": [
                            "ted.smith@example.com"
                        ],
                        "maxLength": 255
                    },
                    "order_id": {
                        "type": "integer",
                        "description": "The order number.",
                        "examples": [
                            123456
                        ],
                        "minimum": 1
                    }
                },
                "required": [
                    "email",
                    "order_id"
                ],
                "title": "RecoverLinkRequest"
            },
            "StoreFileRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "description": "The document itself, as a multipart upload. Up to 25 MB; PDF, images or Office documents."
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Or a public https URL the document can be downloaded from, ending in the file's extension. Up to 25 MB.",
                        "examples": [
                            "https:\/\/files.example.com\/birth-certificate.pdf"
                        ],
                        "maxLength": 2048
                    },
                    "content_base64": {
                        "type": "string",
                        "description": "Or the document's bytes as base64, for an assistant holding an attachment rather than a URL. Up to 25 MB decoded.",
                        "maxLength": 35000000
                    },
                    "filename": {
                        "type": "string",
                        "description": "The document's filename, with its extension, when sending content_base64.",
                        "examples": [
                            "birth-certificate.pdf"
                        ],
                        "maxLength": 255
                    }
                },
                "title": "StoreFileRequest"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}