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"
}

GET/v2/suppliers/:id/evaluations

List all evaluations

This endpoint allows you to retrieve all the evaluations.

Request

GET
/v2/suppliers/:id
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
}

POST/v2/suppliers/:id/evaluations

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

POST
/v2/suppliers/:id/evaluations
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"
}


GET/v2/suppliers/:id/evaluations/:evaluationId

Retrieve an evaluation

This endpoint allows you to retrieve an evaluation by providing their id.

Request

GET
/v2/suppliers/:id/evaluations/:evaluationId
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"
}


GET/v2/suppliers/:id/evaluations/:jobId/:outsourcingId

Retrieve an evaluation for a job

This endpoint allows you to retrieve an evaluation for a job by providing their id.

Request

GET
/v2/suppliers/:id/evaluations/:jobId/:outsourcingId
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"
}


GET/v2/suppliers/:id/evaluations/averages

Retrieve evaluations averages

This endpoint allows you to retrieve the averages of all evaluation lines for a supplier.

Request

GET
/v2/suppliers/:id
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"
    }
  }
]



PUT/v2/suppliers/:id/evaluations/:evaluationId

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

PUT
/v2/suppliers/:id/evaluations/:evaluationId
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/v2/suppliers/:id/evaluations/:evaluationId

Delete an evaluation

This endpoint allows you to delete an evaluation.

Request

DELETE
/v2/suppliers/:id/evaluations/:evaluationId
curl -X DELETE https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/evaluations/66fa959618c0028eabfe7e5b \
  -u {key}: