Show / Hide Table of Contents

Feedback Management

The purpose of this set of API calls is to enable user feedback management from the API perspective. These will allow users to create a feedback, approve or reject an existing feedback and manage feedback.

Note

In order to use this feature you need to have it enabled on your account.

Create feedback

This call should be used for adding a new translation feedback.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d '{   
   "translation":{ 
      "sourceLanguageId":"eng",
      "targetLanguageId":"ger",
      "model":"generic",
      "sourceText":"Guide wearing safety vest",
      "targetMTText":"Führung trägt Schutzweste",
      "metadata":"source.txt",
      "qualityEstimationMT": "GOOD",
      "numberOfSegments": 2
   },
   "improvement":{ 
      "text":"Der Führer trägt Schutzweste"
   },
   "rating":{ 
      "score":4,
      "comments":[ 
         "missing word"
      ]
   },
   "qualityEstimation": "POOR"
}' 'https://api.languageweaver.com/v4/accounts/1/feedback/translations'
Windows

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d ^
"{^   
   \"translation\":{ 
      \"sourceLanguageId\":\"eng\",^
      \"targetLanguageId\":\"ger\",^
      \"model\":\"generic\",^
      \"sourceText\":\"Guide wearing safety vest\",^
      \"targetMTText\":\"Führung trägt Schutzweste\",^
      \"metadata\":\"source.txt\",^
      \"qualityEstimationMT\": \"GOOD\",^
      \"numberOfSegments\": 2^
   },
   \"improvement\":{^ 
      \"text\":\"Der Führer trägt Schutzweste\"^
   },
   \"rating\":{^ 
      \"score\":4,^
      \"comments\":[^ 
         \"missing word\"^
      ]
   },
   \"qualityEstimation\": \"POOR\"^
}" 'https://api.languageweaver.com/v4/accounts/1/feedback/translations'

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
POST /v4/accounts/{accountId}/feedback/translations

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "translation": {
    "sourceLanguageId": "eng",
    "targetLanguageId": "ger",
    "model": "generic",
    "sourceText": "Guide wearing safety vest",
    "targetMTText": "Führung trägt Schutzweste",
    "metadata": "source.txt",
    "qualityEstimationMT": "GOOD",
    "numberOfSegments": 2
  },
  "improvement": {
    "text": "Der Führer trägt Schutzweste"
  },
  "rating": {
    "score": "4",
    "comments": [
      "missing word"
    ]
  },
  "qualityEstimation": "POOR"
}

Format
JSON

Name Mandatory Type Description
translation yes object Object containing details about the translation for which the feedback is created
sourceLanguageId yes string Three letters language code of the source language.
targetLanguageId yes string Three letters language code of the target language.
model yes string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)
sourceText yes string Text provided to be translated
targetMTText yes string Translation provided by machine translation
metadata no string Metadata about translation (e.g. source file name)
qualityEstimationMT no string The quality estimation provided by machine translation
numberOfSegments no integer Positive integer which represents number of segments for translation (default value is 1)
improvement no object Object containing details about the translation improvement
text yes string Expected translation
rating yes object Object containing details about the translation's rating
score yes integer A score from 1 to 5 representing the quality of the translation
comments no list A list of comments about translation
qualityEstimation no string Expected quality estimation

Response JSON:

{
  "createdByAccountId": 1,
  "createdByUserId": 10,
  "createdByUserEmail": "jsmith@example.com",
  "creationDate": "2022/09/29",
  "lastModifiedByAccountId": 1,
  "lastModifiedByUserId": 10,
  "lastModifiedByUserEmail": "jsmith@example.com",
  "lastModifyDate": "2022/09/29",
  "translation": {
    "sourceLanguageId": "eng",
    "targetLanguageId": "ger",
    "model": "generic",
    "sourceText": "Guide wearing safety vest",
    "targetMTText": "Führung trägt Schutzweste",
    "metadata": "source.txt",
    "qualityEstimationMT": "GOOD",
    "numberOfSegments": 1
  },
  "improvement": {
    "text": "Der Führer trägt Schutzweste"
  },
  "rating": {
    "score": 1,
    "comments": [
      "missing word"
    ]
  },
  "qualityEstimation": "POOR",
  "feedbackId": "3f4561e9-4ac7-49d8-a007-35d8421d749c",
  "approval": {
    "status": "PENDING"
  }
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
translation object Object containing details about the translation for which the feedback is created
sourceLanguageId string Three letters language code of the source language.
targetLanguageId string Three letters language code of the target language.
model string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)
sourceText string Text provided to be translated
targetMTText string Translation provided by machine translation
metadata string Metadata about translation (e.g. source file name)
qualityEstimationMT string The quality estimation provided by machine translation
numberOfSegments integer Positive integer which represents number of segments for translation (default value is 1)
improvement object Object containing details about the translation improvement
text string Expected translation
rating object Object containing details about the translation's rating
score integer A score from 1 to 5 representing the quality of the translation
comments list A list of comments about translation
approval object Object containing information about the feedback's approval
status string The approval status of the feedback
qualityEstimation string Expected quality estimation
feedbackId string The id of the created feedback
createdByAccountId integer The id of the account which created the feedback
createdByUserId integer The id of the user who created the feedback
createdByUserEmail string The email of the user who created the feedback
createdByClientId string The client id which created the feedback
creationDate string Creation date of the feedback
lastModifiedByAccountId integer The id of the account which last modified the feedback
lastModifiedByUserId integer The id of the user who last modified the feedback
lastModifiedByUserEmail string The email of the user who last modified the feedback
lastModifiedByClientId string The client id which last modified the feedback
lastModifyDate string The date when the feedback was last modified
Note

The creation audit data for feedback approval is omitted since it corresponds with the feedback creation details.

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the feedback is successfully created
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Get feedback

This call should be used to retrieve information about a feedback. The feedback id must be provided.

Linux

curl -XGET -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' \
'https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442'
Windows

curl -XGET -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" ^
https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
GET /v4/accounts/{accountId}/feedback/translations/{feedbackId}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Response JSON:

{
  "createdByAccountId": 1,
  "createdByUserId": 10,
  "createdByUserEmail": "jsmith@example.com",
  "creationDate": "2022/09/29",
  "lastModifiedByAccountId": 1,
  "lastModifiedByClientId": "ihfw62iWt3wrEtK3MpwJhnsWTJsSmFgs",
  "lastModifyDate": "2022/10/01",
  "translation": {
    "sourceLanguageId": "eng",
    "targetLanguageId": "ger",
    "model": "generic",
    "sourceText": "Guide wearing safety vest",
    "targetMTText": "Führung trägt Schutzweste",
    "metadata": "source.txt",
    "qualityEstimationMT": "GOOD",
    "numberOfSegments": 1
  },
  "improvement": {
    "text": "Der Führer trägt Schutzweste"
  },
  "rating": {
    "score": 1,
    "comments": [
      "missing word"
    ]
  },
  "qualityEstimation": "POOR",
  "feedbackId": "3f4561e9-4ac7-49d8-a007-35d8421d749c",
  "approval": {
    "status": "APPROVED",
    "lastModifiedByAccountId": 2,
    "lastModifiedByUserId": 3,
    "lastModifiedByUserEmail": "approver@example.com",
    "lastModifyDate": "2022/01/17"
  }
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
translation object Object containing details about the translation for which the feedback is created
sourceLanguageId string Three letters language code of the source language.
targetLanguageId string Three letters language code of the target language.
model string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)
sourceText string Text provided to be translated
targetMTText string Translation provided by machine translation
metadata string Metadata about translation (e.g. source file name)
qualityEstimationMT string The quality estimation provided by machine translation
numberOfSegments integer Positive integer which represents number of segments for translation (default value is 1)
improvement object Object containing details about the translation improvement
text string Expected translation
rating object Object containing details about the translation's rating
score integer A score from 1 to 5 representing the quality of the translation
comments list A list of comments about translation
approval object Object containing information about the feedback's approval
status string The approval status of the feedback
qualityEstimation string Expected quality estimation
feedbackId string The id of the created feedback
createdByAccountId integer The id of the account which created the feedback
createdByUserId integer The id of the user who created the feedback
createdByUserEmail string The email of the user who created the feedback
createdByClientId string The client id which created the feedback
creationDate string Creation date of the feedback
lastModifiedByAccountId integer The id of the account which last modified the feedback
lastModifiedByUserId integer The id of the user who last modified the feedback
lastModifiedByUserEmail string The email of the user who last modified the feedback
lastModifiedByClientId string The client id which last modified the feedback
lastModifyDate string The date when the feedback was last modified
Note

The creation audit data for feedback approval is omitted since it corresponds with the feedback creation details.

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "account with id 12 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the feedback information was successfully retrieved
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Delete feedback

This call is used to delete an existing feedback. The feedback id needs to be provided.

Linux

curl -XDELETE -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" \
'https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442'
Windows

curl -XDELETE -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" ^
https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
DELETE /v4/accounts/{accountId}/feedback/translations/{feedbackId}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

When the feedback is deleted successfully, no content is returned.

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "account with id 12 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
204 When the feedback is deleted successfully
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Update feedback

This call should be used to update an existing feedback within the system. The account id and feedback id need to be provided.

Linux

curl -XPUT -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d '{   
   "improvement":{ 
      "text":"Der Führer trägt Schutzweste"
   },
   "rating":{ 
      "score":4,
      "comments":[ 
         "missing word"
      ]
   },
   "qualityEstimation": "ADEQUATE"     
}' 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442'
Windows

curl -XPUT -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d ^
"{^   
   \"improvement\":{^ 
      \"text\":\"Der Führer trägt Schutzweste\"^
   },
   \"rating\":{^ 
      \"score\":4,^
      \"comments\":[^ 
         \"missing word\"^
      ]
   },
   \"qualityEstimation\": \"ADEQUATE\"  
}" 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/e8b01170-1bc4-4d61-89f7-fc2f65733442'

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
PUT /v4/accounts/{accountId}/feedback/translations/{feedbackId}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "improvement": {
    "text": "Der Führer trägt Schutzweste"
  },
  "rating": {
    "score": "4",
    "comments": [
      "missing word"
    ]
  },
  "qualityEstimation": "ADEQUATE"
}

Format
JSON

Name Mandatory Type Description
improvement no object Object containing details about the translation improvement
text yes string Expected translation
rating yes object Object containing details about the translation's rating
score yes integer A score from 1 to 5 representing the quality of the translation
comments no list A list of comments about translation
qualityEstimation no string Expected quality estimation

Response JSON:

{
  "createdByAccountId": 1,
  "createdByUserId": 10,
  "createdByUserEmail": "jsmith@example.com",
  "creationDate": "2022/09/29",
  "lastModifiedByAccountId": 1,
  "lastModifiedByUserId": 10,
  "lastModifiedByUserEmail": "jsmith@example.com",
  "lastModifyDate": "2022/09/29",
  "translation": {
    "sourceLanguageId": "eng",
    "targetLanguageId": "ger",
    "model": "generic",
    "sourceText": "Guide wearing safety vest",
    "targetMTText": "Führung trägt Schutzweste",
    "metadata": "source.txt",
    "qualityEstimationMT": "GOOD",
    "numberOfSegments": 1
  },
  "improvement": {
    "text": "Der Führer trägt Schutzweste"
  },
  "rating": {
    "score": 1,
    "comments": [
      "missing word"
    ]
  },
  "qualityEstimation": "ADEQUATE",
  "feedbackId": "3f4561e9-4ac7-49d8-a007-35d8421d749c",
  "approval": {
    "status": "PENDING"
  }
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
translation object Object containing details about the translation for which the feedback is created
sourceLanguageId string Three letters language code of the source language.
targetLanguageId string Three letters language code of the target language.
model string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)
sourceText string Text provided to be translated
targetMTText string Translation provided by machine translation
metadata string Metadata about translation (e.g. source file name)
qualityEstimationMT string The quality estimation provided by machine translation
numberOfSegments integer Positive integer which represents number of segments for translation (default value is 1)
improvement object Object containing details about the translation improvement
text string Expected translation
rating object Object containing details about the translation's rating
score integer A score from 1 to 5 representing the quality of the translation
comments list A list of comments about translation
approval object Object containing information about the feedback's approval
status string The approval status of the feedback
qualityEstimation string Expected quality estimation
feedbackId string The id of the created feedback
createdByAccountId integer The id of the account which created the feedback
createdByUserId integer The id of the user who created the feedback
createdByUserEmail string The email of the user who created the feedback
createdByClientId string The client id which created the feedback
creationDate string Creation date of the feedback
lastModifiedByAccountId integer The id of the account which last modified the feedback
lastModifiedByUserId integer The id of the user who last modified the feedback
lastModifiedByUserEmail string The email of the user who last modified the feedback
lastModifiedByClientId string The client id which last modified the feedback
lastModifyDate string The date when the feedback was last modified
Note

The creation audit data for feedback approval is omitted since it corresponds with the feedback creation details.

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the translation feedback was successfully updated
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Update feedback approval status

This call should be used for updating the approval status of one or multiple feedback.

Linux

curl -XPUT -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d '{
  "feedback": [
    {
      "feedbackId": "d96794e7-6dbc-4606-aa73-f8571767b07b",
      "status": "APPROVED"
    }
  ]
}' 'https://api.sdlbeglobal.com/v4/accounts/1/feedback/translations/approval'
Windows

curl -XPUT -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d ^ 
'{
  \"feedback\": [^
    {
      \"feedbackId\": \"d96794e7-6dbc-4606-aa73-f8571767b07b\",^
      \"status\": \"APPROVED\"^
    }
  ]
}' 'https://api.sdlbeglobal.com/v4/accounts/1/feedback/translations/approval'

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
PUT /v4/accounts/{accountId}/feedback/translations/approval

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "feedback": [
    {
      "feedbackId": "d96794e7-6dbc-4606-aa73-f8571767b07b",
      "status": "APPROVED"
    }
  ]
}

Format
JSON

Name Mandatory Type Description
feedback yes list A list with feedback and new status for each
feedbackId yes string Feedback id for the feedback which need status updates
status yes string New approval status for the feedback (APPROVED/REJECTED/PENDING)

Response JSON:

{
  "accountId": 1,
  "feedbackList": [
    {
      "createdByAccountId": 1,
      "createdByUserId": 10,
      "createdByUserEmail": "jsmith@example.com",
      "creationDate": "2022/09/29",
      "lastModifiedByAccountId": 2,
      "lastModifiedByUserId": 3,
      "lastModifiedByUserEmail": "approver@example.com",
      "lastModifyDate": "2022/01/17",
      "translation": {
        "sourceLanguageId": "eng",
        "targetLanguageId": "ger",
        "model": "generic",
        "sourceText": "Guide wearing safety vest",
        "targetMTText": "Führung trägt Schutzweste",
        "metadata": "source.txt",
        "qualityEstimationMT": "GOOD",
        "numberOfSegments": 1
      },
      "improvement": {
        "text": "Der Führer trägt Schutzweste"
      },
      "rating": {
        "score": 1,
        "comments": [
          "missing word"
        ]
      },
      "qualityEstimation": "POOR",
      "feedbackId": "d96794e7-6dbc-4606-aa73-f8571767b07b",
      "approval": {
        "status": "APPROVED",
        "lastModifiedByAccountId": 2,
        "lastModifiedByUserId": 3,
        "lastModifiedByUserEmail": "approver@example.com",
        "lastModifyDate": "2022/01/17"
      }
    }
  ]
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
accountId integer Unique numeric identifier for the account associated to the feedback
feedbackList list List of feedback objects with updated approvals

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the translation feedback was successfully updated
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Get all feedback for self

This call should be used to retrieve information about translation feedback created by the caller user.
For this call a type parameter can be provided. Type can be improvements or ratings and, if used, the response will contain only feedback of the provided type.
In addition, a pageNumber and a pageSize parameter can be provided. Both parameters are optional, but a default value will be set.

Linux

curl -XGET -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' \
'https://api.languageweaver.com/v4/accounts/1/feedback/translations?pageNumber=1&pageSize=2&type=ratings'
Windows

curl -XGET -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" ^
https://api.languageweaver.com/v4/accounts/1/feedback/translations?pageNumber=1&pageSize=2&type=ratings

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
GET /v4/accounts/{accountId}/feedback/translations?pageNumber={pageNumber}&pageSize={pageSize}&type={type}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Query Parameters

Name Type Mandatory Default value Description
pageNumber int no 1 Integer specifying the requested page number
pageSize int no 10 Integer specifying the requested page size, limited to 1000
type string no String specifying the type of the feedback (improvements/ratings)

Response JSON:

{
  "totalCount": 2,
  "pageSize": 10,
  "pageNumber": 1,
  "feedbackList": [
    {
      "createdByAccountId": 1,
      "createdByUserId": 10,
      "createdByUserEmail": "jsmith@example.com",
      "creationDate": "2022/09/29",
      "lastModifiedByAccountId": 1,
      "lastModifiedByUserId": 10,
      "lastModifiedByUserEmail": "jsmith@example.com",
      "lastModifyDate": "2022/09/29",
      "translation": {
        "sourceLanguageId": "eng",
        "targetLanguageId": "ger",
        "model": "generic",
        "sourceText": "Guide wearing safety vest",
        "targetMTText": "Führung trägt Schutzweste",
        "metadata": "source.txt",
        "qualityEstimationMT": "GOOD",
        "numberOfSegments": 1
      },
      "improvement": {
        "text": "Der Führer trägt Schutzweste"
      },
      "rating": {
        "score": 1,
        "comments": [
          "missing word"
        ]
      },
      "qualityEstimation": "POOR",
      "feedbackId": "3f4561e9-4ac7-49d8-a007-35d8421d749c",
      "approval": {
        "status": "APPROVED",
        "lastModifiedByAccountId": 2,
        "lastModifiedByUserId": 3,
        "lastModifiedByUserEmail": "approver@example.com",
        "lastModifyDate": "2022/01/17"
      }
    },
    {
      "createdByAccountId": 2,
      "createdByClientId": "ihfw62iWt3wrEtK3MpwJhnsWTJsSmFgs",
      "creationDate": "2022/01/17",
      "lastModifiedByAccountId": 1,
      "lastModifiedByUserId": 10,
      "lastModifiedByUserEmail": "jsmith@example.com",
      "lastModifyDate": "2022/01/17",
      "translation": {
        "sourceLanguageId": "eng",
        "targetLanguageId": "fra",
        "model": "generic",
        "sourceText": "Another feedback",
        "targetMTText": "autre commentaire",
        "metadata": "source.txt",
        "qualityEstimationMT": "GOOD",
        "numberOfSegments": 1
      },
      "improvement": {
        "text": "Un autre commentaire"
      },
      "rating": {
        "score": 1,
        "comments": [
          "missing word"
        ]
      },
      "qualityEstimation": "ADEQUATE",
      "feedbackId": "3f4561e9-4ac7-49d8-a007-3528421dd899c",
      "approval": {
        "status": "PENDING"
      }
    }
  ],
  "accountId": 1
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
accountId integer Unique numeric identifier for the account associated to the feedback
feedbackList list List of feedback objects
totalCount integer Total number of feedbacks for the given user
pageNumber integer Requested page number
pageSize integer Requested page size

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "account with id 12 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the feedback information was successfully retrieved
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Filter feedback

This call should be used to filter feedback by various criteria.
For users with user role Admin, all the feedback from the caller's account will be filtered.
Users with role Linguist or Translator must provide the userId parameter in the request.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d '{
  "startDate": "2018/05/19",
  "endDate": "2019/05/18",
  "category": "rating",
  "userId": 6,
  "approvalStatus": "APPROVED",
  "sourceLanguageId": "eng",
  "targetLanguageId": "ger",
  "model": "generic"
}' 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/filter?pageNumber=1&pageSize=10&sortField=date&sortDirection=DESC'
Windows

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d ^
"{^
  \"startDate\": \"2018/05/19\",^
  \"endDate\": \"2019/05/18\",^
  \"category\": \"rating\",^
  \"userId\": 6,^
  \"approvalStatus\": \"APPROVED\",^
  \"sourceLanguageId\": \"eng\",^
  \"targetLanguageId\": \"ger\",^
  \"model\": \"generic\"^
}" 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/filter?pageNumber=1&pageSize=10&sortField=date&sortDirection=DESC'

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
POST /v4/accounts/{accountId}/feedback/translations/filter?pageNumber={pageNumber}&pageSize={pageSize}&sortField={sortField}&sortDirection={sortDirection}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Query Parameters

Name Type Mandatory Default value Description
pageNumber int no 1 Integer specifying the requested page number
pageSize int no 10 Integer specifying the requested page size, limited to 1000
sortField string no String specifying the field by which the feedback is to be sorted. Valid values are date and lp.
sortDirection string no ASC String specifying the sorting direction. Valid values are ASC for ascending order and DESC for descending order.

Request Parameters

Request JSON:

{
  "startDate": "2018/05/19",
  "endDate": "2019/05/18",
  "category": "rating",
  "userId": 6,
  "approvalStatus": "APPROVED",
  "sourceLanguageId": "eng",
  "targetLanguageId": "ger",
  "model": "generic"
}

Format
JSON

Name Mandatory Type Description
startDate yes string The start date for filtering feedback. Required format: yyyy/MM/dd.
endDate yes string The end date for filtering feedback. Required format: yyyy/MM/dd.
category no string The category of translation feedback (equivalent to type from get all)
userId no* integer The id of the user which created the feedback.
*This parameter is mandatory for users with role Linguist or Translator.
feedbackId no string The id of the feedback
approvalStatus no string The approval state of the feedback
sourceLanguageId no string Three letters language code of the source language.
targetLanguageId no string Three letters language code of the target language.
model no string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)

Response JSON:

{
  "totalCount": 2,
  "pageSize": 10,
  "pageNumber": 1,
  "feedbackList": [
    {
      "createdByAccountId": 1,
      "createdByUserId": 6,
      "createdByUserEmail": "jsmith@example.com",
      "creationDate": "2022/09/29",
      "lastModifiedByAccountId": 1,
      "lastModifiedByUserId": 10,
      "lastModifiedByUserEmail": "jsmith@example.com",
      "lastModifyDate": "2022/09/29",
      "translation": {
        "sourceLanguageId": "eng",
        "targetLanguageId": "ger",
        "model": "generic",
        "sourceText": "Guide wearing safety vest",
        "targetMTText": "Führung trägt Schutzweste",
        "metadata": "source.txt",
        "qualityEstimationMT": "GOOD",
        "numberOfSegments": 1
      },
      "improvement": {
        "text": "Der Führer trägt Schutzweste"
      },
      "rating": {
        "score": 1,
        "comments": [
          "missing word"
        ]
      },
      "qualityEstimation": "POOR",
      "feedbackId": "3f4561e9-4ac7-49d8-a007-35d8421d749c",
      "approval": {
        "status": "APPROVED",
        "lastModifiedByAccountId": 2,
        "lastModifiedByUserId": 3,
        "lastModifiedByUserEmail": "approver@example.com",
        "lastModifyDate": "2022/01/17"
      }
    },
    {
      "createdByAccountId": 1,
      "createdByUserId": 6,
      "createdByUserEmail": "jsmith@example.com",
      "creationDate": "2022/01/17",
      "lastModifiedByAccountId": 1,
      "lastModifiedByUserId": 10,
      "lastModifiedByUserEmail": "jsmith@example.com",
      "lastModifyDate": "2022/01/20",
      "translation": {
        "sourceLanguageId": "eng",
        "targetLanguageId": "fra",
        "model": "generic",
        "sourceText": "Another feedback",
        "targetMTText": "autre commentaire",
        "metadata": "source.txt",
        "qualityEstimationMT": "GOOD",
        "numberOfSegments": 1
      },
      "improvement": {
        "text": "Un autre commentaire"
      },
      "rating": {
        "score": 1,
        "comments": [
          "missing word"
        ]
      },
      "qualityEstimation": "ADEQUATE",
      "feedbackId": "3f4561e9-4ac7-49d8-a007-3528421dd899c",
      "approval": {
        "status": "APPROVED",
        "lastModifiedByAccountId": 2,
        "lastModifiedByUserId": 3,
        "lastModifiedByUserEmail": "approver@example.com",
        "lastModifyDate": "2022/01/22"
      }
    }
  ],
  "accountId": 1
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
accountId integer Unique numeric identifier for the account associated to the feedback
feedbackList list List of feedback objects
totalCount integer Total number of filtered feedbacks for the given account
pageNumber integer Requested page number
pageSize integer Requested page size

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the feedback information was successfully retrieved
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Export feedback

This call should be used for exporting the filtered feedback from one account to a xlsx file based on some criteria, similar to the filter API.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d '{
  "startDate": "2018/05/19",
  "endDate": "2019/05/18",
  "category": "rating",
  "userId": 6,
  "approvalStatus": "APPROVED",
  "sourceLanguageId": "eng",
  "targetLanguageId": "ger",
  "model": "generic"
}' 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/export?pageNumber=1&pageSize=10&sortField=date&sortDirection=DESC'
Windows

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H "Content-type: application/json" -d ^
"{^
  \"startDate\": \"2018/05/19\",^
  \"endDate\": \"2019/05/18\",^
  \"category\": \"rating\",^
  \"userId\": 6,^
  \"approvalStatus\": \"APPROVED\",^
  \"sourceLanguageId\": \"eng\",^
  \"targetLanguageId\": \"ger\",^
  \"model\": \"generic\"^
}" 'https://api.languageweaver.com/v4/accounts/1/feedback/translations/export?pageNumber=1&pageSize=10&sortField=date&sortDirection=DESC'

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator

HTTP Request
POST /v4/accounts/{accountId}/feedback/translations/export?pageNumber={pageNumber}&pageSize={pageSize}&sortField={sortField}&sortDirection={sortDirection}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Query Parameters

Name Type Mandatory Default value Description
pageNumber int no 1 Integer specifying the requested page number
pageSize int no 10 Integer specifying the requested page size, limited to 1000
sortField string no String specifying the field by which the feedback is to be sorted. Valid values are date and lp.
sortDirection string no ASC String specifying the sorting direction. Valid values are ASC for ascending order and DESC for descending order.

Request Parameters

Request JSON:

{
  "startDate": "2018/05/19",
  "endDate": "2019/05/18",
  "category": "rating",
  "userId": 6,
  "approvalStatus": "APPROVED",
  "sourceLanguageId": "eng",
  "targetLanguageId": "ger",
  "model": "generic"
}

Format
JSON

Name Mandatory Type Description
startDate yes string The start date for filtering feedback. Required format: yyyy/MM/dd.
endDate yes string The end date for filtering feedback. Required format: yyyy/MM/dd.
category no string The category of translation feedback (equivalent to type from get all)
userId no integer The id of the user which created the feedback
feedbackId no string The id of the feedback
approvalStatus no string The approval state of the feedback
sourceLanguageId no string Three letters language code of the source language.
targetLanguageId no string Three letters language code of the target language.
model no string A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic)

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
BINARY

Excel file containing the filtered feedback.

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the feedback information was successfully retrieved
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Import feedback

This call should be used for importing feedback from a xlsx file.
This import consists of an update for a list of feedback. The xlsx file should be in the same format as the one received when exporting feedback.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' \
   -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' \
   -H "Content-type: multipart/form-data" \
   -F 'content=@feedback.xlsx' \
 'https://api.languageweaver.com/v4/accounts/{accountId}/feedback/translations/import'
Windows

curl -XPOST -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhUk0TVRkQk5qZzRwczovL2F"^
    -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555"^
    -H "Content-type: multipart/form-data"^
    -F "content=@\"feedback.xlsx\""^
  https://api.languageweaver.com/v4/accounts/{accountId}/feedback/translations/import

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator

HTTP Request
POST /v4/accounts/{accountId}/feedback/translations/import

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Format
multipart/form-data

Name Type Mandatory Default value Description
content string yes The binary content of the file

Response JSON:

{
  "errors": [
    {
      "code": 20,
      "description": "approvalStatus from line 2 parameter is invalid."
    },
    {
      "code": 20,
      "description": "approvalStatus from line 5 parameter is invalid."
    }
  ]
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
errors list List of errors encountered during feedback import
code integer The code of the error
description string The description of the error

Error JSON:

{
  "errors": [
    {
      "code": 15,
      "description": "Invalid request."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When all feedback was successfully imported
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error
In This Page
Back to top