# Coach Only API
## Get Self Info (Coach)
| requests | info |
| :---: | :--- |
| endpoint | `/auth/coach/` |
| method | `GET` |
| Authorization | required |
| desc | return a coach object |
payload:
| key | type | remarks |
| :---: | :---: | :---: |
| - | - | - |
response:
```
{
"pk": 0,
"username": "string",
"email": "string",
"dob": "string",
"area": [
{
"id": 0,
"alias": "string",
"name": "string",
"category": 0 // category id
}
],
"approved": Boolean,
"group": {
"id": 0,
"name": "string",
"permissions": []
},
"certification": [
{
"id": 0,
"user_id: 0,
"name": "string",
"issue_institution": "string",
"issue_date": "YYYY-MM-DD",
"attachment": "string", // image url
},
],
"education": [
{
"id": 0,
"user_id: 0,
"school_name": "string",
"degree": "string",
"start_date": "YYYY-MM-DD",
"end_date": "YYYY-MM-DD",
},
],
"coach_profile: {
"user": 0,
"introduction": "string",
"website": "string",
"instagramId": "string",
"twitterId": "string",
"about_you": "string",
"business_logo": "string", // image url
"business_name": "string",
"coach_since": "YYYY-MM-DD",
"coach_location": "AF", // Enum
"coach_experience": "string,
},
"vetting_status": {
"id": 0,
"status": "string", // PD (pending), RE (reviewing), AP (approved)
"created_at": "YYYY-MM-DD",
"last_update": "YYYY-MM-DD"
},
"avatar": "string", // image url
"coachAlias": "string"
}
```
## Update Profile (Coach)
| requests | info |
| :---: | :--- |
| endpoint | `/auth/coach/` |
| method | `POST` |
| Authorization | required |
| desc | return a coach object (same as `GET`) |
payload:
| key | type | remarks |
| :---: | :---: | :---: |
| dob | Date | - |
| area_list | [Integer] | id can be obtained from `meta - Get Tag List` |
| avatar | File | - |
| website | String | - |
| instagramId | String | - |
| twitterId | String | - |
| introduction | String | - |
| about_you | String | - |
| mother_tongue | Integer | id can be obtained from `meta - Get Dialet List` |
| coaching_language | Integer | id can be obtained from `meta - Get Dialet List` |
| business_name | String | - |
| coach_location | String (Enum of Country List) | Enum can be obtained from `meta - Get Country List` |
| coach_since | Date | - |
| business_logo | File | - |
response:
same as `GET` method of `/auth/coach/`
## Create / Update Certification
| requests | info |
| :---: | :--- |
| endpoint | `/coach/certificate/` |
| method | `POST` |
| Authorization | required |
| desc | return a certification object
each user can only have 5 entries |
payload:
| key | type | remarks |
| :---: | :---: | :---: |
| id | Integer | create if not provided |
| user_id | Integer | required |
| name | String | - |
| issue_institution | String | - |
| issue_date | Date | YYYY-MM-DD |
| attachment | File | - |
response:
```
{
"id": 0,
"user_id: 0,
"name": "string",
"issue_institution": "string",
"issue_date": "string",
"attachment": "string", // image url
}
```
## Create / Update Education
| requests | info |
| :---: | :--- |
| endpoint | `/coach/education/` |
| method | `POST` |
| Authorization | required |
| desc | return an education object
each user can only have 5 entries |
payload:
| key | type | remarks |
| :---: | :---: | :---: |
| id | Integer | create if not provided |
| user_id | Integer | required |
| degree | String | - |
| school_name | String | - |
| start_date | Date | YYYY-MM-DD |
| end_date | Date | YYYY-MM-DD |
response:
```
{
"id": 0,
"user_id: 0,
"degree": "string",
"school_name": "string",
"start_date": "string",
"end_date": "string",
}
```
## Update Vetting Status
| requests | info |
| :---: | :--- |
| endpoint | `/coach/vetting/` |
| method | `POST` |
| Authorization | required |
| desc | set vetting status to `RE` (reviewing) |
payload:
`None`
response:
```
{
"id": 0,
"status: "string",
"created_at": "string",
"last_update": "string",
}
```