Create Student Emergency Contact
POST/students/:communityId/emergency-contact
This endpoint creates a new emergency contact for a student.
If the emergency contact to be created is an existing community member then you only need to provide the communityId of the community member along with the contactType 'community'. If the emergency contact to be created is not an existing community member then you need to provide the details of the contact along with the contactType 'non-community'.
Request
Path Parameters
communityId uuidrequired
The unique identifier of the community member.
- application/json
Body
- CreateStudentEmergencyContactCommunityRequestDto
- CreateStudentEmergencyContactNonCommunityRequestDto
- Array [
- ]
oneOf
contactType stringrequired
contactCommunityId uuidrequired
contactType stringrequired
name stringrequired
Possible values: non-empty
email stringnullablerequired
address stringnullablerequired
relationship objectnullablerequired
id uuid
phones object[]nullablerequired
phone stringnullablerequired
phoneOrder numberrequired
Possible values: [1
, 2
]
Can only be for Phone (1) and Alt Phone (2)
Responses
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- application/json
- Schema
- Example (from schema)
- Successful
Schema
- Array [
- ]
code stringrequired
Status Code
data object
id uuidrequired
contactCommunityId uuidnullablerequired
contactOrder integerrequired
name stringrequired
schoolId stringnullablerequired
relationship objectnullablerequired
id uuidrequired
description stringrequired
code stringrequired
phones object[]required
phone stringrequired
phoneOrder numberrequired
Possible values: [1
, 2
]
Can only be for Phone (1) and Alt Phone (2)
id uuidrequired
email stringnullablerequired
address stringnullablerequired
{
"code": "OK",
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contactCommunityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contactOrder": 0,
"name": "string",
"schoolId": "string",
"relationship": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "string",
"code": "string"
},
"phones": [
{
"phone": "string",
"phoneOrder": 1,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"email": "string",
"address": "string"
}
}
{
"code": "CREATED",
"data": {
"id": "2abc466a-5509-4429-b220-4c503ebc51d0",
"contactCommunityId": "2abc466a-5509-4429-b220-4c503ebc51d0",
"name": "Kaley Addison",
"email": null,
"address": "7 Hutchinson Street\nBURWOOD EAST\nVIC\n3151",
"schoolId": "17",
"contactOrder": 4,
"relationship": {
"id": "cf975174-763e-4e99-af63-4dbd709c8f0c",
"description": "Mother",
"code": "MO"
},
"phones": [
{
"id": "be41d888-a484-4bb6-bf1f-553067ec2910",
"phone": "9632587",
"phoneOrder": 1
}
]
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1100",
"message": "Bad Request"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1101",
"message": "Unauthorized"
}
]
}
Forbidden
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1102",
"message": "Forbidden"
}
]
}
Resource not found
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1103",
"message": "Not Found"
}
]
}
Unprocessable entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1108",
"message": "Unprocessable Entity"
}
]
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors object[]required
code stringrequired
message stringrequired
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
{
"errors": [
{
"code": "PA1109",
"message": "Internal Server Error"
}
]
}
Loading...