Créer un commentaire
Vous pouvez créer un commentaire sur un candidat grâce à l'API.
token
Pour créer un commentaire il faut s'authentifier avec un token utilisateur qui peut être récupéré grâce à la méthode Login
Requête
Cette méthode permet de créer un commentaire sur un candidat :
POST /company/{companyID}/applicant/{applicantID}/comment
Paramètres
Paramètre | In | Type | Obligatoire | Description | Exemple |
---|---|---|---|---|---|
companyID | path | string | Identifiant de l'entreprise | 0GjqBwprWAdArDl4 | |
applicantID | path | string | id du candidat | ||
type | query | string | type du [commentaire] | note | |
private | query | boolean | Le commentaire est-il privé ? | true | |
file | query | file | Pièce jointe | zoGaHqRvJ/CV_test.pdf | |
text | query | string | Contenu du commentaire | En réponse au précédent commentaire : très bon niveau en anglais | |
reply_to | query | string | id du [commentaire] parent | j4hq6zbqYZ20JA1z |
Exemples de requête
Requête cURL
curl -X POST 'https://api.flatchr.io/company/0GjqBwprWAdArDl4/applicant/ADYjo9mGxZdkN0ry/comment'
-H "Authorization: Bearer {token}"
-H 'Content-Type: application/json'
-F 'text="En réponse au précédent commentaire : très bon niveau en anglais"' \
-F 'file=@"zoGaHrRvJ/CV_test.pdf"' \
-F 'private="true"' \
-F 'reply_to="j4hq6zbqYZ20Jn1z"'
Réponse
Name | Type | Description |
---|---|---|
id | integer | Identifiant du commentaire |
text | string | Le texte du commentaire |
private | boolean | Le commentaire est-il privé ? |
favorite | boolean | Le commentaire est-il en favori ? |
created_by | integer | Identifiant de l'auteur du commentaire |
created_at | timestamp | Date de création du commentaire |
reply_to | integer | Identifiant du commentaire parent si ce commentaire est une réponse à un commentaire déja existant |
author | author | Auteur du commentaire |
attachments | attachments | Les pièces jointes du commentaire |
ratings | [ratings] |
Exemple de réponse
{
"id": 3620,
"text": "En réponse au précédent commentaire : très bon niveau en anglais",
"private": true,
"favorite": false,
"created_by": 391,
"created_at": "2022-02-15T17:00:00.264Z",
"reply_to": 3618,
"author": {
"id": "lVq5r6pYXk9AmMvP",
"firstname": "XXXX",
"lastname": "XXXX"
},
"attachments": [],
"ratings": []
}