Team Management
1 User teams list
Endpoint: GET /profile/teams
Description: Get user animal teams list. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{}
Response (200 Ok):
{
"message": "Teams retrieved successfully",
"handler_teams": [
{
"id": 43,
"team_code": "SDS-5715824",
"account_id": 1,
"animal_id": 17,
"trainer_id": null,
"is_primary_owner": true,
"flag_training_graduated": true,
"flag_training_logs": true,
"flag_training_sds": true,
"flag_training_akc": true,
"flag_records_have": true,
"flag_health_animal": true,
"flag_health_handler": true,
"flag_recommendations": true,
"likes": 10,
"position": 999,
"created_at": "2025-04-15T11:53:38.000000Z",
"updated_at": "2025-04-15T13:38:45.000000Z",
"deleted_at": null,
"trainer": null,
"animal": {
"id": 17,
"animal_type": "emotional_support",
"name": "Buddy",
"gender": "female",
"breed": "Labrador",
"size": "medium",
"microchip_number": null,
"status": "active",
"profile_photo_path": null,
"created_at": "2025-04-15T08:03:49.000000Z",
"updated_at": "2025-04-15T08:03:49.000000Z",
"birth_year": "2023",
"age": "2 years",
"profile_photo_url": null
}
},
{
"id": 45,
"team_code": "SDS-4038901",
"account_id": 1,
"animal_id": 18,
"trainer_id": null,
"is_primary_owner": true,
"flag_training_graduated": false,
"flag_training_logs": false,
"flag_training_sds": false,
"flag_training_akc": false,
"flag_records_have": false,
"flag_health_animal": false,
"flag_health_handler": false,
"flag_recommendations": false,
"likes": 0,
"position": 999,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"deleted_at": null,
"trainer": null,
"animal": {
"id": 18,
"animal_type": "service_dog",
"name": "Pedro",
"gender": "male",
"breed": "HellHound",
"size": "medium",
"microchip_number": null,
"status": "active",
"profile_photo_path": null,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"birth_year": "2020",
"age": "5 years",
"profile_photo_url": null
}
}
],
"trainer_teams": []
}
2 Get team by code
Endpoint: GET /profile/teams/code/{team_code}
Description: Get one user animal team by team code. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{}
Response (200 Ok):
{
"message": "Team retrieved successfully",
"team": {
"id": 45,
"team_code": "SDS-4038901",
"account_id": 1,
"animal_id": 18,
"trainer_id": null,
"is_primary_owner": true,
"flag_training_graduated": false,
"flag_training_logs": false,
"flag_training_sds": false,
"flag_training_akc": false,
"flag_records_have": false,
"flag_health_animal": false,
"flag_health_handler": false,
"flag_recommendations": false,
"likes": 0,
"position": 999,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"deleted_at": null,
"animal": {
"id": 18,
"animal_type": "service_dog",
"name": "Pedro",
"gender": "male",
"breed": "HellHound",
"size": "medium",
"microchip_number": null,
"status": "active",
"profile_photo_path": null,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"birth_year": "2020",
"age": "5 years",
"profile_photo_url": null
},
"trainer": null
}
}
3 Get team by id
Endpoint: GET /profile/teams/{team_id}
Description: Get one user animal team by team ID. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{}
Response (200 Ok):
{
"message": "Team retrieved successfully",
"team": {
"id": 45,
"team_code": "SDS-4038901",
"account_id": 1,
"animal_id": 18,
"trainer_id": null,
"is_primary_owner": true,
"flag_training_graduated": false,
"flag_training_logs": false,
"flag_training_sds": false,
"flag_training_akc": false,
"flag_records_have": false,
"flag_health_animal": false,
"flag_health_handler": false,
"flag_recommendations": false,
"likes": 0,
"position": 999,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"deleted_at": null,
"animal": {
"id": 18,
"animal_type": "service_dog",
"name": "Pedro",
"gender": "male",
"breed": "HellHound",
"size": "medium",
"microchip_number": null,
"status": "active",
"profile_photo_path": null,
"created_at": "2025-04-15T13:59:39.000000Z",
"updated_at": "2025-04-15T13:59:39.000000Z",
"birth_year": "2020",
"age": "5 years",
"profile_photo_url": null
},
"trainer": null
}
}
4 Share animal to another user
Endpoint: POST /profile/teams/{team_id}/share
Description: Share animal to another user. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
Response (200 Ok):
{
"message": "Animal shared successfully",
"team": {
"account_id": 2,
"animal_id": 18,
"is_primary_owner": false,
"team_code": "SDS-7821770",
"updated_at": "2025-04-15T14:07:03.000000Z",
"created_at": "2025-04-15T14:07:03.000000Z",
"id": 46
}
}
5 Transfer animal to another user
Endpoint: POST /profile/teams/{team_id}/transfer
Description: Transfer animal to another user. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
Response (200 Ok):
{
"message": "Animal transferred successfully"
}
6 Update team fields
Endpoint: PUT /profile/teams/{team_id}
Description: Update team. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{
"flag_training_graduated":true,
"flag_training_logs":true,
"flag_training_sds":true,
"flag_training_akc":true,
"flag_records_have":true,
"flag_health_animal":true,
"flag_health_handler":true,
"flag_recommendations":true
}
Response (200 Ok):
{
"message": "Team updated successfully",
"team": {
"id": 43,
"team_code": "SDS-5715824",
"account_id": 1,
"animal_id": 17,
"trainer_id": null,
"is_primary_owner": true,
"flag_training_graduated": true,
"flag_training_logs": true,
"flag_training_sds": true,
"flag_training_akc": true,
"flag_records_have": true,
"flag_health_animal": true,
"flag_health_handler": true,
"flag_recommendations": true,
"likes": 10,
"position": 999,
"created_at": "2025-04-15T11:53:38.000000Z",
"updated_at": "2025-04-15T13:38:45.000000Z",
"deleted_at": null,
"animal": {
"id": 17,
"animal_type": "emotional_support",
"name": "Buddy",
"gender": "female",
"breed": "Labrador",
"size": "medium",
"microchip_number": null,
"status": "active",
"profile_photo_path": null,
"created_at": "2025-04-15T08:03:49.000000Z",
"updated_at": "2025-04-15T08:03:49.000000Z",
"birth_year": "2023",
"age": "2 years",
"profile_photo_url": null
},
"trainer": null
}
}
7 Delete team
Endpoint: DELETE /profile/teams/{team_id}
Description: Delete team. Requires Bearer Token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{}
Response (200 Ok):
{
"message": "Team deleted successfully"
}
15 April 2025