POST /trainees/{trainee_id}/degrees
Create a degree for this trainee.
Request
POST /api/v0.1/trainees/{trainee_id}/degrees
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
trainee_id | path | string | true | The unique ID of the trainee |
Request body
Degree details
data
-
Degree object
Example request body
{ "data": { "grade": "02", "subject": "100425", "institution": "0116", "uk_degree": "083", "graduation_year": "2012-07-31" } }
Possible responses
HTTP 201 - A degree
{ "data": [ { "degree_id": "E1phsAcP3hDFMhx19qVGhchR", "uk_degree": "083", "non_uk_degree": null, "created_at": "2024-01-18T08:02:41.955Z", "updated_at": "2024-01-18T08:02:41.955Z", "subject": "100425", "institution": "0116", "graduation_year": 2022, "grade": "02", "country": null, "other_grade": null, "institution_uuid": "0271f34a-2887-e711-80d8-005056ac45bb", "uk_degree_uuid": "db695652-c197-e711-80d8-005056ac45bb", "subject_uuid": "bf8170f0-5dce-e911-a985-000d3ab79618", "grade_uuid": "e2fe18d4-8655-47cf-ab1a-8c3e0b0f078f" } ] }
HTTP 401 - Unauthorized
{ "error": "Unauthorized" }
HTTP 404 - Not found
{ "errors": [ { "error": "NotFound", "message": "Trainee(s) not found" } ] }
HTTP 409 - Conflict
{ "errors": [ { "error": "Conflict", "message": "This is a duplicate degree" }, ], "data": [ { "uk_degree": null, "non_uk_degree": null, "created_at": "2025-02-17T15:43:01.197Z", "updated_at": "2025-02-17T15:43:01.197Z", "subject": "100734", "institution": "0023", "graduation_year": 2022, "grade": "01", "country": null, "other_grade": null, "institution_uuid": "dc70f34a-2887-e711-80d8-005056ac45bb", "uk_degree_uuid": "3e042de2-a453-47dc-9452-90a23399e9ee", "subject_uuid": "338370f0-5dce-e911-a985-000d3ab79618", "grade_uuid": "8741765a-13d8-4550-a413-c5a860a59d25", "degree_id": "ao53fi469ar7kjfc04uys0dc" } ] }
HTTP 422 - Unprocessable Entity
{ "errors": [ { "error": "UnprocessableEntity", "message": "Param is missing or the value is empty: data" } ] }