{"openapi":"3.0.0","info":{"title":"Dotdigital Application API","description":"API methods of this application cannot be called directly. Instead, you should trigger Crowdin's platform API endpoint, Crowdin will authorize your request and route it to this app.\n\nExample call for crowdin.com \n\n    curl --request GET \n    --url \"https://crowdin.com/api/v2/applications/dotmailer/api/data?report=raw&projects=479\" \n    --header \"Authorization: Bearer 70cf05deasdas78c84c73c4cf986ee0a3ee911w1dsad384e3c4asd1qdbbcf6b6db5732e\" \nExample call for Crowdin Enterprise \n\n    curl --request GET \n    --url \"https://acme.crowdin.com/api/v2/applications/dotmailer/api/data?report=raw&projects=479&startDate=2023-06-01T06%3A32%3A01.048Z&endDate=2023-06-23T06%3A32%3A01.048Z\" \n    --header \"Authorization: Bearer 70cf05dee35sad12rfes0a3ee911462e7b0723rfdfrg1e45bbcf6b6db5732e\" \n","version":"1.0.0","x-logo":{"url":"https://support.crowdin.com/assets/crowdin-logo.svg"}},"servers":[{"url":"{protocol}//{host}/api/v2/applications/dotmailer/api"}],"paths":{"/crowdin-files":{"get":{"summary":"List Crowdin Files","operationId":"crowdin.files","tags":["Files"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"responses":{"200":{"description":"Project files list","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/CrowdinFiles"}}}}}}}}},"/file-progress":{"get":{"tags":["Files"],"summary":"Get File Progress","operationId":"file.progress","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"fileId","in":"query","required":true,"description":"Get via [List Crowdin Files](#operation/crowdin.files)","schema":{"type":"integer","example":102}}],"responses":{"200":{"description":"File translation progress","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/FileProgress"}}}}}}}}},"/integration-files":{"get":{"summary":"List Integration Files","operationId":"integration.files","tags":["Files"],"parameters":[{"$ref":"#/components/parameters/ProjectId"}],"responses":{"200":{"description":"Integration files list","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/IntegrationFiles"}}}}}}}}},"/crowdin-update":{"post":{"tags":["Files"],"summary":"Update Crowdin Files","operationId":"crowdin.update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCrowdinFiles"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UpdateResponse"}}}}}}}}},"/integration-update":{"post":{"tags":["Files"],"summary":"Update Integration Files","operationId":"integration.update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileLanguagePair"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UpdateResponse"}}}}}}}}},"/all-jobs":{"get":{"tags":["Jobs"],"summary":"List Jobs","operationId":"job.list","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"limit","in":"query","required":false,"description":"Number of jobs to return","schema":{"type":"integer","example":25}},{"name":"offset","in":"query","required":false,"description":"Number of jobs to skip","schema":{"type":"integer","example":0}}],"responses":{"200":{"description":"Job information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}}}}},"/job-info":{"get":{"tags":["Jobs"],"summary":"Get Job Info","operationId":"job.info","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"jobId","in":"query","required":true,"schema":{"type":"string","example":"067da473-fc0b-43e3-b0a2-09d26af130c1"}}],"responses":{"200":{"description":"Job information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}}}}},"/jobs":{"get":{"tags":["Jobs"],"summary":"Get Job Info","operationId":"job.get","deprecated":true,"parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"jobId","in":"query","required":false,"schema":{"type":"string","example":"067da473-fc0b-43e3-b0a2-09d26af130c1"}}],"responses":{"200":{"description":"Job information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}}}},"delete":{"tags":["Jobs"],"summary":"Cancel Job","operationId":"job.cancel","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"jobId","in":"query","required":true,"schema":{"type":"string","example":"067da473-fc0b-43e3-b0a2-09d26af130c1"}}],"responses":{"204":{"description":"Job canceled successfully"}}}},"/settings":{"get":{"tags":["Settings"],"summary":"Get Application Settings","operationId":"settings.get","parameters":[{"$ref":"#/components/parameters/ProjectId"}],"responses":{"200":{"description":"File translation progress","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/SettingsResponse"}}}}}}}},"post":{"tags":["Settings"],"summary":"Update Application Settings","operationId":"settings.update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsData"}}}},"responses":{"204":{"description":"Application Settings was successfully update"}}}},"/sync-settings":{"get":{"tags":["Settings"],"summary":"Get Sync Settings","operationId":"sync.settings.get","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"name":"provider","in":"query","required":true,"schema":{"type":"string","enum":["crowdin","integration"]}}],"responses":{"200":{"description":"Application Sync Settings","content":{"application/json":{"schema":{"properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/CrowdinSyncSettingsResponse"},{"$ref":"#/components/schemas/IntegrationSyncSettingsResponse"}]}}}}}}}},"post":{"tags":["Settings"],"summary":"Update Sync Settings","operationId":"sync.settings.update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSyncSettingsData"}}}},"responses":{"204":{"description":"Application Sync Settings was successfully update"}}}},"/login-fields":{"get":{"tags":["Login"],"summary":"Integration Login Form Fields","operationId":"integration.fields","responses":{"200":{"description":"Login Form Fields","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/LoginFieldsResponse"}}}}}}}}},"/login":{"post":{"tags":["Login"],"summary":"Integration Login","operationId":"integration.login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"responses":{"204":{"description":"Login successful"}}}}},"components":{"schemas":{"CrowdinFiles":{"type":"array","example":[{"id":1,"name":"Landing pages"},{"id":2,"parentId":1,"name":"Home Page","type":"json"}],"items":{"anyOf":[{"properties":{"id":{"type":"string"},"name":{"type":"string"}}},{"properties":{"id":{"type":"string"},"parentId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}}}]}},"IntegrationFiles":{"type":"array","example":[{"id":1,"name":"Landing pages","parent_id":0,"node_type":0},{"name":"Intro","id":73291251883,"parentId":"Landing pages","type":"json","node_type":1}],"items":{"anyOf":[{"properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":"string"},"node_type":{"type":"string"}}},{"properties":{"name":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"type":{"type":"string"},"node_type":{"type":"string"}}}]}},"UpdateCrowdinFiles":{"title":"Update files","required":["projectId","files"],"properties":{"projectId":{"description":"Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","type":"integer","example":12},"files":{"$ref":"#/components/schemas/IntegrationFiles"},"uploadTranslations":{"description":"Upload exist translation from integration","type":"boolean","default":false,"example":true}}},"FileLanguagePair":{"title":"Update files","required":["projectId","files"],"properties":{"projectId":{"description":"Project Id. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","type":"integer","example":12},"files":{"example":{"102":["de","fr"],"999":["uk"]},"type":"object","description":"- **{fileId}** _(integer)_: Crowdin File Id. Get via [List Crowdin Files](#operation/crowdin.files)\n- **[{languageCode}]** _(array of strings)_: List Of  Language Id. Get via [List Supported Languages](https://support.crowdin.com/developer/api/v2/#tag/Languages/operation/api.languages.getMany)\n\n**Example:**\n  ```json\n  {\n   102: [\"de\", \"fr\"],\n   999: [\"uk\"]\n  }\n  ```\n"}}},"UpdateResponse":{"type":"object","properties":{"jobId":{"type":"string","example":"067da473-fc0b-43e3-b0a2-09d26af130c1"}}},"SettingsData":{"type":"object","example":{"schedule":0,"condition":0},"additionalProperties":{"type":"string"}},"UpdateSettingsData":{"title":"Update Application Settings","required":["projectId","config"],"properties":{"projectId":{"description":"Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","type":"integer","example":12},"config":{"$ref":"#/components/schemas/SettingsData"}}},"SettingsResponse":{"$ref":"#/components/schemas/SettingsData"},"CrowdinSyncSettingsResponse":{"type":"object","example":{"102":["uk","de"]},"additionalProperties":{"type":"array","items":{"type":"string"}}},"IntegrationSyncSettingsResponse":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"type":{"type":"string"},"node_type":{"type":"string"},"schedule":{"type":"boolean"}}}},"UpdateSyncSettingsData":{"title":"Update Application Sync Settings","required":["projectId","provider","files"],"properties":{"projectId":{"description":"Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","type":"integer","example":12},"provider":{"type":"string","enum":["crowdin","integration"]},"files":{"oneOf":[{"$ref":"#/components/schemas/CrowdinSyncSettingsResponse"},{"$ref":"#/components/schemas/IntegrationSyncSettingsResponse"}]}}},"FileProgress":{"title":"Language Translation Progress","description":"Language Translation File Progress Response Model","type":"object","properties":{"languageId":{"type":"string","example":"af"},"eTag":{"type":"string","example":"fd0ea167420ef1687fd16635b9fb67a3"},"words":{"properties":{"total":{"type":"integer","example":7249},"translated":{"type":"integer","example":3651},"approved":{"type":"integer","example":3637}},"type":"object"},"phrases":{"properties":{"total":{"type":"integer","example":3041},"translated":{"type":"integer","example":2631},"approved":{"type":"integer","example":2622}},"type":"object"},"translationProgress":{"type":"integer","example":86},"approvalProgress":{"type":"integer","example":86}}},"LoginFieldsResponse":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"apiKey"},"name":{"type":"string","example":"Service API key"}}},"example":[{"key":"email","name":"User email"},{"key":"password","name":"User password"}]},"Login":{"title":"Login","required":["projectId","credentials"],"properties":{"projectId":{"description":"Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","type":"integer","example":12},"credentials":{"$ref":"#/components/schemas/LoginData"}}},"LoginData":{"type":"object","description":"Login Form Fields. Get via [Integration Login Form Fields](#operation/integration.fields)","example":{"email":"user@crowdin.com","password":"password"}},"Job":{"type":"object","properties":{"id":{"type":"string","description":"The Unique Identifier For The Job.","example":"067da473-fc0b-43e3-b0a2-09d26af130c1"},"progress":{"type":"integer","description":"The Progress Of The Job.","example":94},"status":{"type":"string","description":"The Current Status Of The Job.","example":"inProgress"},"title":{"type":"string","description":"The Title Of The Job.","example":"Sync files to Crowdin"}}},"JobResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}},"parameters":{"ProjectId":{"name":"projectId","in":"query","description":"Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)","required":true,"schema":{"type":"integer","example":12}}}},"tags":[{"name":"Files"},{"name":"Settings"},{"name":"Login"}]}