GET child by ID - ocariot/api-gateway GitHub Wiki
Description
Returns an unique child by id.
Permissions:
- Admin, Educator, and Health Professional users can list any child's information.
- Child user can list only their own information, and Family user can only list information of their own children.
Scope
children:read
URL
Parameters
child_id: string (A 24-byte hex ID)
Curl example
curl -X GET "https://localhost/v1/children/5a62be07de34500146d9c544" -H "accept: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response body
-
200
Successful requisition.{ "id": "5db1cf6c099ed31587a74cf4", "username": "BR99999", "institution_id": "5a62be07de34500146d9c624", "gender": "male", "age": 11 }
-
400
Validation errors -
403
Permission Error -
404
Not Found Error