Evaluations
Evaluations represent evaluations associated with a supplier. They are used to store evaluations of the supplier's performance.
The Evaluation object
Properties
idstring
Unique identifier for the object.
commentstring
The comment of the evaluation.
commentEditedboolean
True if the comment has been edited.
editedAtdate
The date and time the evaluation was edited.
evaluationDatedate
The date and time the evaluation was made.
jobobject
The linked job.linesarray
The evaluation lines.
rateAveragenumber
The average rate of the evaluation.
supplierobject
The supplier linked to the evaluation.userobject
The user that created the evaluation.
createdAtdate
The date and time the entity was created.
updatedAtdate
The date and time the entity was last updated.
Evaluation object
{
"id": "66fa925618c0028eabfe7e4a",
"comment": "<p>Description</p>",
"commentEdited": false,
"evaluationDate": "2024-09-30T11:58:14.334Z",
"lines": [
{
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"rate": 3,
"id": "66fa925618c0028eabfe7e4b"
},
{
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e52",
"name": "Communication"
},
"rate": 3,
"id": "66fa925618c0028eabfe7e4d"
},
{...},
{...}
],
"rateAverage": 3,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T11:58:14.338Z",
"updatedAt": "2024-09-30T11:58:14.338Z"
}
List all evaluations
This endpoint allows you to retrieve all the evaluations.
Request
curl -G https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations \
-u {key}:
Response
{
"items": [{
"id": "66fa925618c0028eabfe7e4a",
"comment": "<p>Description</p>",
"commentEdited": false,
"evaluationDate": "2024-09-30T11:58:14.334Z",
"lines": [
{
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"rate": 3,
"id": "66fa925618c0028eabfe7e4b"
},
{
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e52",
"name": "Communication"
},
"rate": 3,
"id": "66fa925618c0028eabfe7e4d"
},
{...},
{...}
],
"rateAverage": 3,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T11:58:14.338Z",
"updatedAt": "2024-09-30T11:58:14.338Z"
},
{...},
{...}
],
"pageSize": 20,
"page": 1,
"totalPages": 1,
"totalItems": 2,
"hasNextPage": false,
"hasPreviousPage": false
}
Create an evaluation
This endpoint allows you to add a new evaluation.
Parameters
commentstring
The comment of the evaluation.
jobobject
The linked job.
linesarray
The evaluation lines.
Request
curl https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations \
-u {key}: \
-d comment="My comment for the supplier"\
-d lines='[{"evaluationConfiguration":"6548c11c5136b418fd626e54","rate":3},{"evaluationConfiguration":"6548c11c5136b418fd626e52","rate":3}]'
Response
{
"id": "66fa959618c0028eabfe7e5b",
"comment": "<p>Demo evaluation</p>",
"commentEdited": false,
"evaluationDate": "2024-09-30T12:12:06.091Z",
"lines": [
{
"rate": 3,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"id": "66fa959618c0028eabfe7e5c"
},
{
"rate": 4,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e46",
"name": "Grammar & spelling"
},
"id": "66fa959618c0028eabfe7e5e"
}
],
"rateAverage": 3.5,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T12:12:06.093Z",
"updatedAt": "2024-09-30T12:12:06.093Z"
}
Retrieve an evaluation
This endpoint allows you to retrieve an evaluation by providing their id.
Request
curl https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/66fa959618c0028eabfe7e5b \
-u {key}:
Response
{
"id": "66fa959618c0028eabfe7e5b",
"comment": "<p>Demo evaluation</p>",
"commentEdited": false,
"evaluationDate": "2024-09-30T12:12:06.091Z",
"lines": [
{
"rate": 3,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"id": "66fa959618c0028eabfe7e5c"
},
{
"rate": 4,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e46",
"name": "Grammar & spelling"
},
"id": "66fa959618c0028eabfe7e5e"
}
],
"rateAverage": 3.5,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T12:12:06.093Z",
"updatedAt": "2024-09-30T12:12:06.093Z"
}
Retrieve an evaluation for a job
This endpoint allows you to retrieve an evaluation for a job by providing their id.
Request
curl https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/6669627c35076b408a557837/66825e48edde360f163d4e68 \
-u {key}:
Response
{
"id": "66fa959618c0028eabfe7e5b",
"comment": "<p>Demo evaluation</p>",
"commentEdited": false,
"evaluationDate": "2024-09-30T12:12:06.091Z",
"job": {
"id": "6669627c35076b408a557837",
"outsourcingId": "66825e48edde360f163d4e68"
},
"lines": [
{
"rate": 3,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"id": "66fa959618c0028eabfe7e5c"
},
{
"rate": 4,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e46",
"name": "Grammar & spelling"
},
"id": "66fa959618c0028eabfe7e5e"
}
],
"rateAverage": 3.5,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T12:12:06.093Z",
"updatedAt": "2024-09-30T12:12:06.093Z"
}
Retrieve evaluations averages
This endpoint allows you to retrieve the averages of all evaluation lines for a supplier.
Request
curl https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/averages \
-u {key}:
Response
[
{
"average": 3,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
}
},
{
"average": 4,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e46",
"name": "Grammar & spelling"
}
}
]
Update an evaluation supplier
This endpoint allows you to perform an update on a supplier. Any parameters not provided will be left unchanged.
Parameters
commentstring
comment
Request
curl -X PUT https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/66fa959618c0028eabfe7e5b \
-u {key}: \
-d comment="Updated comment"
Response
{
"id": "66fa959618c0028eabfe7e5b",
"comment": "Updated comment",
"commentEdited": true,
"evaluationDate": "2024-09-30T12:12:06.091Z",
"editedAt": "2024-09-30T14:12:06.093Z",
"lines": [
{
"rate": 3,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e54",
"name": "Accuracy of the translation"
},
"id": "66fa959618c0028eabfe7e5c"
},
{
"rate": 4,
"evaluationConfiguration": {
"id": "6548c11c5136b418fd626e46",
"name": "Grammar & spelling"
},
"id": "66fa959618c0028eabfe7e5e"
}
],
"rateAverage": 3.5,
"supplier": {
"id": "659bfadde9bb5bd797708d69",
"name": "Arnaud Bachelier"
},
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
},
"createdAt": "2024-09-30T12:12:06.093Z",
"updatedAt": "2024-09-30T14:12:06.093Z"
}
Delete an evaluation
This endpoint allows you to delete an evaluation.
Request
curl -X DELETE https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/66fa959618c0028eabfe7e5b \
-u {key}: