Get project information via API

Receiving information about your projects is essential, as the projects are mainly the core part of your account. There are many useful methods that are prepped for you, so go ahead and get them!

Start with the simple GET project/list method that will return a detailed list of projects in your account.

See our project/list example

Request URL: 
https://smartcat.ai/api/integration/v1/project/list

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

Response:
[
  {
     "id": "1c0c9279-6868-4093-9564-d5ff693fe944",
     "name": "Test",
     "description": "",
     "creationDate": "2018-12-08T19:41:35.468Z",
     "createdByUserId": "ac56ed95-bd78-43a4-b817-30a7b12d3269",
     "modificationDate": "2018-12-08T19:41:35.468Z",
     "sourceLanguage": "en",
     "targetLanguages": [
        "ru"
     ],
     "status": "created",
     "statusModificationDate": "2018-12-08T19:41:35.468Z",
     "vendors": [],
     "workflowStages": [
  {
     "progress": 0,
     "stageType": "translation"
  }
     ],
     "documents": [
     {
        "id": "cd08227b3c181d6a9e8524f0_25",
        "name": "Test",
        "creationDate": "2018-12-08T19:41:35.515Z",
        "sourceLanguage": "en",
        "documentDisassemblingStatus": "success",
        "targetLanguage": "ru",
        "status": "created",
        "wordsCount": 2,
        "statusModificationDate": "2018-12-08T19:41:35.515Z",
        "pretranslateCompleted": false,
        "workflowStages": [
     {
        "progress": 0,
        "wordsTranslated": 0,
        "unassignedWordsCount": 0,
        "status": "assigned",
        "executives": [
     {
        "assignedWordsCount": 2,
        "progress": 0,
        "id": "64b982ad-8b06-447b-82e1-cbbb7ab3e327"
     }
      ]
     }
     ],
        "externalId": "cd08227b3c181d6a9e8524f0",
        "placeholdersAreEnabled": true
     }
     ],
     "specializations": []
}

Once you receive information about all your projects, you might want to get details about a particular one with a GET project/{projectid} method...

See our project/{projectId} example

Request URL: 
https://smartcat.ai/api/integration/v1/project/67db6b32-1d54-4a09-940e-c1f550751787

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

Response:
{
     "id": "67db6b32-1d54-4a09-940e-c1f550751787",
     "name": "test",
     "description": "",
     "creationDate": "2018-12-17T22:19:07.234Z",
     "createdByUserId": "ac56ed95-bd78-43a4-b817-30a7b12d3269",
     "modificationDate": "2018-12-17T22:19:07.234Z",
     "sourceLanguage": "en",
     "targetLanguages": [
     "ru"
     ],
     "status": "inProgress",
     "statusModificationDate": "2018-12-17T22:19:51.351Z",
     "vendors": [],
     "workflowStages": [
        {
           "progress": 0,
           "stageType": "translation"
        }
     ],
     "documents": [
        {
           "id": "dd386e70420c1d60fc560f84_25",
           "name": "test",
           "creationDate": "2018-12-17T22:19:51.335Z",
           "sourceLanguage": "en",
           "documentDisassemblingStatus": "success",
           "targetLanguage": "ru",
           "status": "created",
           "wordsCount": 1,
           "statusModificationDate": "2018-12-17T22:19:51.337Z",
           "pretranslateCompleted": false,
           "workflowStages": [
             {
                 "progress": 0,
                 "wordsTranslated": 0,
                 "unassignedWordsCount": 1,
                 "status": "notAssigned",
                 "executives": []
              }
           ],
           "externalId": "dd386e70420c1d60fc560f84",
           "placeholdersAreEnabled": true
        }
     ],
     "specializations": []
}

 ...and count statistics for it with GET project/{projectId}/statistics. The statistics will be displayed for the whole project as well as for each document in the project separately.

See our project/{projectId}/statistics example

Request URL: 
https://smartcat.ai/api/integration/v1/project/67db6b32-1d54-4a09-940e-c1f550751787/statistics

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

Response:
[
    {
        "language": "ru",
        "statistics": [
           {
              "name": "total",
              "words": 1,
              "percent": 100,
              "segments": 1,
              "pages": 0,
              "charsWithoutSpaces": 4,
              "charsWithSpaces": 4,
              "effectiveWordsForBilling": 1
           },
           {
              "name": "newWords",
              "words": 1,
              "percent": 100,
              "segments": 1,
              "pages": 0,
              "charsWithoutSpaces": 4,
              "charsWithSpaces": 4,
              "effectiveWordsForBilling": 1
           },
           {
              "name": "repetitions",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "crossFileRepeated",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0, "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "contextMatch_102",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0 },
           {
              "name": "contextMatch_101",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_100",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_95_99",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_85_94",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_75_84",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_50_74",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           }
        ],
        "documents": [
           {
           "name": "test",
           "statistics": [
           {
              "name": "total",
              "words": 1,
              "percent": 100,
              "segments": 1,
              "pages": 0,
              "charsWithoutSpaces": 4,
              "charsWithSpaces": 4,
              "effectiveWordsForBilling": 1
           },
           {
              "name": "newWords",
              "words": 1,
              "percent": 100,
              "segments": 1,
              "pages": 0,
              "charsWithoutSpaces": 4,
              "charsWithSpaces": 4,
              "effectiveWordsForBilling": 1
           },
           {
              "name": "repetitions",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "crossFileRepeated",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "contextMatch_102",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "contextMatch_101",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_100", "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_95_99",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_85_94",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_75_84",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           },
           {
              "name": "match_50_74",
              "words": 0,
              "percent": 0,
              "segments": 0,
              "pages": 0,
              "charsWithoutSpaces": 0,
              "charsWithSpaces": 0,
              "effectiveWordsForBilling": 0
           }
         ]
      }
    ]
  }
]

When the project is partially or fully completed, it's also possible to receive statistics for the parts completed by assignees of the project with GET project/{projectId}/completedWorkStatistics. The request will return statistics for both the project and every document on the project for each assignee id.

See our project/{projectId}/completedWorkStatistics example

Request URL: 
https://smartcat.ai/api/integration/v1/project/67db6b32-1d54-4a09-940e-c1f550751787/completedWorkStatistics

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

There are also a couple methods to identify plugged resources to a project. With GET project/{projectid}/translationmemories you receive a list of all active translation memories on the project.

See our project/{projectId}/translationmemories example

Request URL: 
https://smartcat.ai/api/integration/v1/project/67db6b32-1d54-4a09-940e-c1f550751787/translationmemories

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

Response:
[
   {
      "id": "94ef1275-7c45-4a77-b193-43a49099f736",
      "matchThreshold": 75,
      "isWritable": true
    }
]

"isWritable": true defines a translation memory where your translations are written into.

GET project/{projectId}/glossaries helps to receive a list of the attached glossaries.

See our project/{projectId}/glossaries example

Request URL: 
https://smartcat.ai/api/integration/v1/project/67db6b32-1d54-4a09-940e-c1f550751787/glossaries

Headers:
Authorization: Basic ZG0wMTpRd2VydHkxMjM=

Response:
[
   {
      "id": "ba226212-7e7a-4bf8-aad9-17a875d71d21",
      "name": "Glossary",
      "description": "",
      "languages": [
         "en",
         "ru"
      ],
      "units": 1,
      "unitsPending": 0
   }
]