### Basic Auth with Python requests Source: https://textunited.readme.io/reference/authentication Use this Python example to authenticate with the TextUnited API using Basic Auth. Replace the placeholders with your actual API key and company ID. The code performs a GET request to the SegmentProjects endpoint with the Authorization header. ```python import requests from requests.auth import HTTPBasicAuth url = "https://api.textunited.com/v1/SegmentProjects" username = "" password = "" # Basic Authentication headers headers = { "Content-Type": "application/json" } # Perform the GET request with Basic Authentication response = requests.get(url, headers=headers, auth=HTTPBasicAuth(username, password)) # Check the response print(response.status_code) print(response.json()) # or response.text, depending on the expected response format ``` -------------------------------- ### Get segments by custom ID - response example Source: https://textunited.readme.io/reference/get-segments-by-custom-id Example response body for the get-segments-by-custom-id endpoint. It shows an array of segment objects, each with a source object and a translations array. The placeholders like and indicate where actual values are expected. ```json [ { "source": { "id": , "customId": "", "content": "", "notes": "", "taskId": "", "languageSpecificNotes": "" }, "translations": [ { "id": , "languageId": , "languageCode": "", "content": "", "status": "", "comments": } ] }, { "source": { "id": , "customId": "", "content": "", "notes": "", "taskId": "", "languageSpecificNotes": "" }, "translations": [ { "id": , "languageId": , "languageCode": "", "content": "", "status": "", "comments": } ] }, { "source": { "id": , "customId": "", "content": "", "notes": "", "taskId": "", "languageSpecificNotes": "" }, "translations": [ { "id": , "languageId": , "languageCode": "", "content": "", "status": "", "comments": } ] } ] ``` -------------------------------- ### OpenAPI definition for GET /segments/projects/{id} Source: https://textunited.readme.io/reference/get-project-by-textunited-id This is the complete OpenAPI 3.1.0 specification for the 'Get Project by Project ID' endpoint. It defines the server, security, path parameters, headers, and response examples. The 200 response shows a detailed project object with fields like id, customId, targetLanguages, and team. The 400 response returns an empty object. ```json { "openapi": "3.1.0", "info": { "title": "textunited-api", "version": "1.0" }, "servers": [ { "url": "https://api.textunited.com" } ], "security": [ {} ], "paths": { "/segments/projects/{id}": { "get": { "summary": "Get Project by Project ID", "description": "This endpoint enables users to retrieve detailed information about a specific project, identified by its unique ID in TextUnited. For a step-by-step guide on retrieving individual projects, including how to work with project details, see the [Project Listing](https://docs.textunited.com/docs/project-listing#by-project-id) guide.", "operationId": "get-project-by-textunited-id", "parameters": [ { "name": "{id}", "in": "path", "description": "Unique identifier of the project within TextUnited.", "schema": { "type": "integer", "format": "int32" }, "required": true }, { "name": "Content-Type", "in": "header", "description": "Indicates the media type of the resource, specifying that the payload is in JSON format. (e.g. Content-Type: application/json)", "schema": { "type": "string", "default": "application/json" } }, { "name": "Authorization", "in": "header", "description": "Used for authenticating requests with a JWT token obtained from the \"Obtain JWT\" endpoint. (e.g. Authorization: Bearer )", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"id\": ,\n \"customId\": \"\",\n \"taskId\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"creationDateUtc\": ,\n \"startDateUtc\": \"\",\n \"endDateUtc\": \"\",\n \"sourceLanguageId\": ,\n \"sourceLanguageCode\": \"\",\n \"targetLanguages\": [\n {\n \"id\": ,\n \"targetLanguageId\": ,\n \"targetLanguageCode\": \"\",\n \"managedProject\": ,\n \"serviceTranslation\": ,\n \"serviceProofreading\": ,\n \"serviceAutomaticTranslation\": ,\n \"progress\": ,\n \"flag\": ,\n \"state\": \"\",\n \"team\": [\n {\n \"id\": ,\n \"name\": \"\",\n \"username\": \"\",\n \"phone\": \"\",\n \"isProjectManager\": ,\n \"isTranslator\": ,\n \"isProofreader\": ,\n \"isInCountryReviewer\": ,\n \"translationRate\": ,\n \"translationProductivity\": ,\n \"proofreadedBy\": ,\n \"proofreadingRate\": ,\n \"proofreadingProductivity\": \n }\n ],\n \"referenceNumber\": \"\",\n \"customField1\": \"\",\n \"customField2\": \"\",\n \"additionalInfo\": \"\"\n\t\t}\n\t],\n \"domain\": ,\n \"segments\": ,\n \"referenceNumber\": \"\",\n \"customField1\": \"\",\n \"customField2\": \"\"\n}" } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### GET /segments/projects/{id} Source: https://textunited.readme.io/reference/get-project-by-textunited-id This endpoint enables users to retrieve detailed information about a specific project, identified by its unique ID in TextUnited. For a step-by-step guide on retrieving individual projects, including how to work with project details, see the Project Listing guide. ```APIDOC ## GET /segments/projects/{id} ### Description This endpoint enables users to retrieve detailed information about a specific project, identified by its unique ID in TextUnited. For a step-by-step guide on retrieving individual projects, including how to work with project details, see the [Project Listing](https://docs.textunited.com/docs/project-listing#by-project-id) guide. ### Method GET ### Endpoint /segments/projects/{id} ### Parameters #### Path Parameters - **{id}** (integer, int32) - Required - Unique identifier of the project within TextUnited. #### Header Parameters - **Content-Type** (string) - Optional - Indicates the media type of the resource, specifying that the payload is in JSON format. (e.g. Content-Type: application/json) - **Authorization** (string) - Optional - Used for authenticating requests with a JWT token obtained from the "Obtain JWT" endpoint. (e.g. Authorization: Bearer ) ### Response #### Success Response (200) - **id** (integer) - Auto-generated project identifier. - **customId** (string) - Your custom ID. - **taskId** (string) - Your task ID. - **name** (string) - Your project name. - **description** (string) - Description of your project. - **creationDateUtc** (integer) - Creation date. - **startDateUtc** (string) - Start date in UTC. - **endDateUtc** (string) - End date in UTC. - **sourceLanguageId** (integer) - Your source language ID. - **sourceLanguageCode** (string) - Your source language code. - **targetLanguages** (array) - List of target language objects. - **id** (integer) - Translation project ID. - **targetLanguageId** (integer) - Your target language ID. - **targetLanguageCode** (string) - Your target language code. - **managedProject** (boolean) - Whether the project is managed. - **serviceTranslation** (boolean) - Whether translation service is used. - **serviceProofreading** (boolean) - Whether proofreading service is used. - **serviceAutomaticTranslation** (boolean) - Whether automatic translation service is used. - **progress** (string) - Progress status. - **flag** (string) - Flag. - **state** (string) - Status of project. - **team** (array) - List of team members. - **id** (integer) - User ID. - **name** (string) - First and last name. - **username** (string) - Your email address. - **phone** (string) - User phone number. - **isProjectManager** (boolean) - Whether the user is a project manager. - **isTranslator** (boolean) - Whether the user is a translator. - **isProofreader** (boolean) - Whether the user is a proofreader. - **isInCountryReviewer** (boolean) - Whether the user is an in-country reviewer. - **translationRate** (number) - Translation rate. - **translationProductivity** (number) - Translation productivity. - **proofreadedBy** (string) - Proofreader. - **proofreadingRate** (number) - Proofreading rate. - **proofreadingProductivity** (number) - Proofreading productivity. - **referenceNumber** (string) - Your reference number. - **customField1** (string) - Custom project information. - **customField2** (string) - Custom project information. - **additionalInfo** (string) - Additional information. - **domain** (string) - Your project domain. - **segments** (string) - Your segments. - **referenceNumber** (string) - Your reference number for overall project. - **customField1** (string) - Custom project information. - **customField2** (string) - Custom project information. #### Response Example { "id": , "customId": "", "taskId": "", "name": "", "description": "", "creationDateUtc": , "startDateUtc": "", "endDateUtc": "", "sourceLanguageId": , "sourceLanguageCode": "", "targetLanguages": [ { "id": , "targetLanguageId": , "targetLanguageCode": "", "managedProject": , "serviceTranslation": , "serviceProofreading": , "serviceAutomaticTranslation": , "progress": , "flag": , "state": "", "team": [ { "id": , "name": "", "username": "", "phone": "", "isProjectManager": , "isTranslator": , "isProofreader": , "isInCountryReviewer": , "translationRate": , "translationProductivity": , "proofreadedBy": , "proofreadingRate": , "proofreadingProductivity": } ], "referenceNumber": "", "customField1": "", "customField2": "", "additionalInfo": "" } ], "domain": , "segments": , "referenceNumber": "", "customField1": "", "customField2": "" } #### Error Response (400) - **description**: 400 - **content**: application/json - **example**: {} ``` -------------------------------- ### GET /projects Source: https://textunited.readme.io/reference/get-projects Retrieves a list of translation projects on the TextUnited platform. Requires authentication via Basic Auth or JWT token. ```APIDOC ## GET /projects ### Description Retrieves a list of translation projects on the TextUnited platform. ### Method GET ### Endpoint /projects ### Parameters #### Headers - **Content-Type** (string) - Required - Must be set to "application/json". - **Authorization** (string) - Required - Use either Basic Auth or JWT Access Token. ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the project. - **customId** (String) - A custom identifier for the project. - **taskId** (Null/String) - The unique identifier for the task associated with the project. Optional and may be null. - **name** (String) - The name of the project. - **description** (String) - A description of the project. - **creationDateUtc** (DateTime) - The date and time the project was created in UTC format. - **startDateUtc** (DateTime) - The start date and time of the project in UTC format. - **endDateUtc** (DateTime) - The end date and time of the project in UTC format. - **sourceLanguageId** (Integer) - The identifier for the source language of the project. - **sourceLanguageCode** (String) - The code for the source language of the project. - **targetLanguages** (Array) - An array of target languages for the project, including details such as language code and progress. - **domain** (Null/String) - The domain of the project. Optional and may be null. - **segments** (Array) - An array of segments within the project. - **referenceNumber** (String) - A reference number for the project. - **customField1** (String) - Additional information about the project. - **customField2** (String) - Additional information about the project. #### Response Example { "id": 123, "customId": "CUST-001", "taskId": null, "name": "Sample Project", "description": "A sample project description.", "creationDateUtc": "2025-06-12T23:00:48Z", "startDateUtc": "2025-06-13T00:00:00Z", "endDateUtc": "2025-06-20T00:00:00Z", "sourceLanguageId": 1, "sourceLanguageCode": "en", "targetLanguages": [ { "languageCode": "es", "progress": 50 } ], "domain": null, "segments": [], "referenceNumber": "REF-001", "customField1": "", "customField2": "" } ``` -------------------------------- ### GET /projects/{customId} Source: https://textunited.readme.io/reference/get-project-by-custom-id Fetches a specific project using its custom ID. The response includes detailed project information such as identifiers, dates, languages, and custom fields. ```APIDOC ## GET /projects/{customId} ### Description Fetches a specific project using its custom ID. The response includes detailed project information such as identifiers, dates, languages, and custom fields. ### Method GET ### Endpoint /projects/{customId} ### Parameters #### Path Parameters - **customId** (String) - Required - The custom identifier of the project to fetch. ### Request Example No request body required. ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the project. - **customId** (String) - A custom identifier for the project. - **taskId** (Null/String) - The unique identifier for the task associated with the project. Optional and may be null. - **name** (String) - The name of the project. - **description** (String) - A description of the project. - **creationDateUtc** (DateTime) - The date and time the project was created in UTC format. - **startDateUtc** (DateTime) - The start date and time of the project in UTC format. - **endDateUtc** (DateTime) - The end date and time of the project in UTC format. - **sourceLanguageId** (Integer) - The identifier for the source language of the project. - **sourceLanguageCode** (String) - The code for the source language of the project. - **targetLanguages** (Array) - An array of target languages for the project, including details such as language code and progress. - **domain** (Null/String) - The domain of the project. Optional and may be null. - **segments** (Null/Array) - An array of segments within the project. Optional and may be null. - **referenceNumber** (String) - A reference number for the project. - **customField1** (String) - Additional information about the project. - **customField2** (String) - Additional information about the project. #### Response Example { "id": 123, "customId": "custom-id-123", "taskId": null, "name": "Project Name", "description": "Project description", "creationDateUtc": "2025-06-12T23:00:52.000Z", "startDateUtc": "2025-06-12T23:00:52.000Z", "endDateUtc": "2025-06-12T23:00:52.000Z", "sourceLanguageId": 1, "sourceLanguageCode": "en", "targetLanguages": [], "domain": null, "segments": null, "referenceNumber": "REF-123", "customField1": "value1", "customField2": "value2" } ``` -------------------------------- ### GET /projects/{id}/progress Source: https://textunited.readme.io/reference/get-progress-by-textunited-id This endpoint shows the translation progress for a project, identified by its Project ID, and offers an option to view progress by specific tasks. ```APIDOC ## GET /projects/{id}/progress ### Description This endpoint shows the translation progress for a project, identified by its Project ID, and offers an option to view progress by specific tasks. ### Method GET ### Endpoint /projects/{id}/progress ### Parameters #### Path Parameters - **id** (string) - Required - The Project ID. #### Query Parameters - **taskId** (string) - Optional - The task ID to filter progress by a specific task. ### Request Example GET /projects/{id}/progress?taskId={taskId} ### Response #### Success Response (200) - **total** (Number) - Represents overall progress at each level (project, task, language), indicating completion status. - **tasks.taskId** (String) - A unique identifier for the task. - **tasks.total** (Number) - The total count of items (e.g., words) processed in the task. - **tasks.targetLanguages.languageId** (Number) - A unique identifier for the language. - **tasks.targetLanguages.languageCode** (String) - The ISO 639-3 code for the language. - **tasks.targetLanguages.progress** (Number) - The percentage of items processed in the task. - **languages.languageId** (Number) - A unique identifier for the language. - **languages.languageCode** (String) - The ISO 639-3 code for the language. - **languages.progress** (Number) - The percentage of items processed in the language. #### Response Example { "total": 50, "tasks": [ { "taskId": "task123", "total": 100, "targetLanguages": [ { "languageId": 1, "languageCode": "eng", "progress": 50 } ] } ], "languages": [ { "languageId": 1, "languageCode": "eng", "progress": 50 } ] } ``` -------------------------------- ### Example response for creating a project (200) Source: https://textunited.readme.io/reference/create-multilingual-project-1 Shows the JSON response returned when a project is successfully created. Contains the auto-generated project identifier, custom ID, task ID, and detailed target language information including team members and services. ```json { "id": , "customId": "", "taskId": "", "name": "", "description": "", "creationDateUtc": , "startDateUtc": "", "endDateUtc": "", "sourceLanguageId": , "sourceLanguageCode": "", "targetLanguages": [ { "id": , "targetLanguageId": , "targetLanguageCode": "", "managedProject": , "serviceTranslation": , "serviceProofreading": , "serviceAutomaticTranslation": , "progress": , "flag": , "state": "", "team": [ { "id": , "name": "", "username": "", "phone": "", "isProjectManager": , "isTranslator": , "isProofreader": , "isInCountryReviewer": , "translationRate": , "translationProductivity": , "proofreadedBy": , "proofreadingRate": , "proofreadingProductivity": } ], "referenceNumber": "", "customField1": "", "customField2": "", "additionalInfo": "" }, { "id": , "name": "", "username": "", "phone": "", "isProjectManager": , "isTranslator": , "isProofreader": , "isInCountryReviewer": , "translationRate": , "translationProductivity": , "proofreadedBy": , "proofreadingRate": , "proofreadingProductivity": } ] } ``` -------------------------------- ### POST /create-multilingual-project Source: https://textunited.readme.io/reference/create-multilingual-project-1 Initializes a new multilingual project in TextUnited. Requires authentication headers and a request body with project configuration details. ```APIDOC ## POST /create-multilingual-project ### Description Initializes a new multilingual project in TextUnited. Requires authentication headers and a request body with project configuration details. ### Method POST ### Endpoint /create-multilingual-project ### Parameters #### Request Body The request should include the following parameters. Enter your values in the input field(s) below for testing: - `targetLanguages` (array) - Required - Array of sub-objects with specific properties. - `segments` (array) - Required - Array of sub-objects with specific properties. ### Request Example ```json { "targetLanguages": [], "segments": [] } ``` ### Response #### Success Response (200) No response schema provided in the source. #### Response Example No response example provided in the source. ``` -------------------------------- ### POST /segments/projects Source: https://textunited.readme.io/reference/create-multilingual-project-1 Creates a new multilingual project in TextUnited. This endpoint initializes the project with the provided configuration, including source and target languages, project dates, and segments. ```APIDOC ## POST /segments/projects ### Description Creates a new multilingual project in TextUnited. This endpoint initializes the project with the provided configuration, including source and target languages, project dates, and segments. ### Method POST ### Endpoint https://api.textunited.com/segments/projects ### Parameters #### Header Parameters - **Content-Type** (string) - Required - Indicates the media type of the resource, specifying that the payload is in JSON format. (e.g. Content-Type: application/json) - **Authorization** (string) - Required - Used for authenticating requests with a JWT token obtained from the "Obtain JWT" endpoint. (e.g. Authorization: Bearer ) #### Request Body - **customId** (string) - Optional - A unique identifier for the project. - **taskId** (string) - Optional - An identifier for the task associated with the project. Refer to the documentation to learn more about taskId and its impact on segment processing and update scope. - **name** (string) - Required - The name of the project. - **description** (string) - Optional - A description of the project. - **startDateUtc** (string) - Required - The start date and time of the project in UTC timezone. (Must be in the present.) - **endDateUtc** (string) - Required - The end date and time of the project in UTC timezone. - **sourceLanguageId** (integer) - Optional - The ID of the source language. Optional if the `sourceLanguageCode` is defined. - **sourceLanguageCode** (string) - Optional - The code of the source language. Optional if the `sourceLanguageId` is defined. - **targetLanguages** (array) - Required - An array of objects representing the target languages for translation. - **targetLanguageId** (integer) - Optional - The identifier of the target language. Optional if the `targetLanguageCode` is defined. (e.g., 41) - **targetLanguageCode** (string) - Optional - The target language code (e.g., en-US). Optional if the `targetLanguageId` is defined. - **managedProject** (boolean) - Optional - Indicates whether the project will be handled by TextUnited (true) or internally by the company (false). - **serviceTranslation** (boolean) - Optional - Requests human translation for the project. (e.g., true). Must be true for all the currently supported projects. - **serviceProofreading** (boolean) - Optional - Requests proofreading service for the project. - **segments** (array) - Required - An array of segments to be translated. ### Request Example { "customId": "string", "taskId": "string", "name": "string", "description": "string", "startDateUtc": "string", "endDateUtc": "string", "sourceLanguageId": 0, "sourceLanguageCode": "string", "targetLanguages": [ { "targetLanguageId": 0, "targetLanguageCode": "string", "managedProject": true, "serviceTranslation": true, "serviceProofreading": true } ], "segments": [] } ### Response #### Success Response (200) No response schema is provided in the source documentation. #### Response Example No response example is provided in the source documentation. ``` -------------------------------- ### OpenAPI definition for TextUnited API Source: https://textunited.readme.io/reference/get-projects OpenAPI 3.1.0 definition for the TextUnited API, specifying the GET /segments/projects endpoint. It includes required headers (Content-Type and Authorization) and a 200 response example with placeholder values for project and segment fields. ```json { "openapi": "3.1.0", "info": { "title": "textunited-api", "version": "1.0" }, "servers": [ { "url": "https://api.textunited.com" } ], "security": [ {} ], "paths": { "/segments/projects": { "get": { "summary": "Get Projects", "description": "This endpoint retrieves a list of translation projects on the TextUnited platform. For detailed information on navigating through your projects, refer to the [Project Listing](https://docs.textunited.com/docs/project-listing) guide.", "operationId": "get-projects", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Indicates the media type of the resource, specifying that the payload is in JSON format. (e.g. Content-Type: application/json)", "schema": { "type": "string", "default": "application/json" } }, { "name": "Authorization", "in": "header", "description": "Used for authenticating requests with a JWT token obtained from the \"Obtain JWT\" endpoint. (e.g. Authorization: Bearer )", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "[\n {\n \"id\": ,\n \"customId\": \"\",\n \"taskId\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"creationDateUtc\": ,\n \"startDateUtc\": \"\",\n \"endDateUtc\": \"\",\n \"sourceLanguageId\": ,\n \"sourceLanguageCode\": \"\",\n \"targetLanguages\": [\n {\n \"id\": ,\n \"targetLanguageId\": ,\n \"targetLanguageCode\": \"\",\n \"managedProject\": ,\n \"serviceTranslation\": ,\n \"serviceProofreading\": ,\n \"serviceAutomaticTranslation\": ,\n \"progress\": ,\n \"flag\": ,\n \"state\": \"\",\n \"team\": [\n {\n \"id\": ,\n \"name\": \"\",\n \"username\": \"\",\n \"phone\": \"\",\n \"isProjectManager\": ,\n \"isTranslator\": ,\n \"isProofreader\": ,\n \"isInCountryReviewer\": ,\n \"translationRate\": ,\n \"translationProductivity\": ,\n \"proofreadedBy\": ,\n \"proofreadingRate\": ,\n \"proofreadingProductivity\": \n }\n ],\n \"referenceNumber\": \"\",\n \"customField1\": \"\",\n \"customField2\": \"\",\n \"additionalInfo\": \"\"\n },\n ],\n \"domain\": ,\n \"segments\": [\n {\n \"id\": ,\n \"customId\": \"\",\n \"content\": \"\",\n \"notes\": \"\",\n \"taskId\": \"\",\n \"languageSpecificNotes\": [\n {\n \"languageId\": ,\n \"languageCode\": \"\",\n \"note\": \"\"\n },\n {\n \"languageId\": ,\n \"languageCode\": \"\",\n \"note\": \"\"\n }\n ]\n }\n ]\n}", "summary": "Result" } } } } } } } } } } ``` -------------------------------- ### OpenAPI definition for textunited-api Source: https://textunited.readme.io/reference/get-project-by-custom-id Full OpenAPI 3.1.0 a specification defining the 'Get Project by Custom ID' endpoint at '/segments/projects/custom/{customId}'. The endpoint requires a path parameter for the custom ID and headers for Content-Type and Authorization (JWT). The 200 response provides an example of the project data structure, while the 400 response returns an empty object. ```json { "openapi": "3.1.0", "info": { "title": "textunited-api", "version": "1.0" }, "servers": [ { "url": "https://api.textunited.com" } ], "security": [ {} ], "paths": { "/segments/projects/custom/{customId}": { "get": { "summary": "Get Project by Custom ID", "description": "This endpoint allows users to find a specific project using its unique custom ID. For detailed instructions on fetching projects by custom IDs, refer to the [Project Listing](https://docs.textunited.com/docs/project-listing#by-custom-id) guide.", "operationId": "get-project-by-custom-id", "parameters": [ { "name": "{customId}", "in": "path", "description": "The custom identifier for the project that was specified during the project creation.", "schema": { "type": "string" }, "required": true }, { "name": "Content-Type", "in": "header", "description": "Indicates the media type of the resource, specifying that the payload is in JSON format. (e.g. Content-Type: application/json)", "schema": { "type": "string", "default": "application/json" } }, { "name": "Authorization", "in": "header", "description": "Used for authenticating requests with a JWT token obtained from the \"Obtain JWT\" endpoint. (e.g. Authorization: Bearer )", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"id\": ,\n \"customId\": \"\",\n \"taskId\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"creationDateUtc\": \,\n \"startDateUtc\": \"\",\n \"endDateUtc\": \"\",\n \"sourceLanguageId\": ,\n \"sourceLanguageCode\": \"\",\n \"targetLanguages\": [\n {\n \"id\": ,\n \"targetLanguageId\": ,\n \"targetLanguageCode\": \"\",\n \"managedProject\": ,\n \"serviceTranslation\": ,\n \"serviceProofreading\": ,\n \"serviceAutomaticTranslation\": ,\n \"progress\": ,\n \"flag\": ,\n \"state\": \"\",\n \"team\": [\n {\n \"id\": ,\n \"name\": \"\",\n \"username\": \"\",\n \"phone\": \"\",\n \"isProjectManager\": ,\n \"isTranslator\": ,\n \"isProofreader\": ,\n \"isInCountryReviewer\": ,\n \"translationRate\": ,\n \"translationProductivity\": ,\n \"proofreadedBy\": ,\n \"proofreadingRate\": ,\n \"proofreadingProductivity\": \n }\n ],\n \"referenceNumber\": \"\",\n \"customField1\": \"\",\n \"customField2\": \"\",\n \"additionalInfo\": \"\"\n}" } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Retrieve projects with Python requests Source: https://textunited.readme.io/reference/quick-start-guide Use this Python script to make a GET request to the TextUnited API's /SegmentProjects endpoint and print the names of all projects. Replace and with your actual credentials. The script uses HTTP Basic authentication with the company ID as username and API key as password. ```python import requests url = "https://api.textunited.com/v1/SegmentProjects" username = "" password = "" headers = { "Content-Type": "application/json" } response = requests.get(url, headers=headers, auth=(username, password)) projects = response.json() for project in projects: print(project["Name"]) ``` -------------------------------- ### GET /projects/{id}/segments Source: https://textunited.readme.io/reference/get-segments-by-textunited-id This endpoint retrieves all translations for a project identified by its unique ID. It supports filtering by status and task ID. ```APIDOC ## GET /projects/{id}/segments ### Description This endpoint lets users get all the translations for a particular project, identified by its unique ID in TextUnited. ### Method GET ### Endpoint /projects/{id}/segments ### Parameters #### Path Parameters - **id** (integer) - Required - Unique identifier of the project. #### Query Parameters - **status** (string) - Optional - Filter segments by translation status. - **taskId** (string) - Optional - Filter segments by task ID. ### Request Example ``` GET /projects/{id}/segments?status=completed&taskId=12345 ``` ### Response #### Success Response (200) - **source.id** (integer) - Unique identifier for the source segment. - **source.customId** (string) - Custom identifier assigned to the source segment. - **source.content** (string) - Content of the source segment. - **source.notes** (string) - Notes related to the source segment. - **source.taskId** (string) - Task ID associated with the source segment. - **source.languageSpecificNotes** (string) - Language-specific notes for the source segment. - **translations[].id** (integer) - Unique identifier for each translation. - **translations[].languageId** (integer) - Identifier for the language of the translation. - **translations[].languageCode** (string) - Language code (e.g., "EN-US", "FR-FR") for the translation. - **translations[].content** (string) - Translated content of the segment. - **translations[].status** (string) - Status of the translation (e.g., "untranslated", "completed"). - **translations[].comments[]** (object) - Comments on the translation, including an identifier and the comment text. #### Response Example ```json { "source": { "id": 1, "customId": "string", "content": "string", "notes": "string", "taskId": "string", "languageSpecificNotes": "string" }, "translations": [ { "id": 1, "languageId": 1, "languageCode": "EN-US", "content": "string", "status": "untranslated", "comments": [] } ] } ``` ```