Welcome to the provider portal!
This section provides you with APIs to manage hospitals on Serenity
Onboard a provider
This endpoint you to create a new provider with a default user as its owner. By default, it comes with:
- A patient profile for the user
- A practitioner profile for the user
- Default roles for the provider
- Default workspaces for the provider
- A default location for the provider
- A default healthcare service for the provider
URL: {{base_url}}/providers
Method: POST
{
"country": "GH",
"name": "Your favorite hospital",
"address": "15 Sesame Street",
"primary_location": "FH Main branch",
"admin_first_name": "Chris",
"admin_last_name": "Dare",
"admin_email": "[email protected]" ,
"admin_mobile": "+233-valid-phone-number"
}
{
"success": true,
"message": "Successfully onboarded provider",
"data": {
"id": "74730a7c-2f36-4837-ae1f-749d992e09aa",
"name": "Nyaho Medical2",
"organization_type": "PROV",
"address": "15 Sesame Street",
"alias": null,
"is_active": false,
"part_of": null,
"telephone": null,
"website": null,
"tax_identification_number": null,
"country": "GH",
"owner": 109,
"created_at": "2021-09-22T13:32:35.153590Z"
},
"errors": null
}
Create locations
This endpoint allows you to create an new provider location
Method: {{base_url}}/providers/{{serenity_user_provider_id}}/locations
{
"street_address": "Airport Residential Street",
"location_name": "Test location",
"location_contact_number": "03005565625",
"country": "GH",
"city": "Accra",
"postal_code": "00233"
}
Update locations
This endpoint allows you to update an existing provider location
Method: {{base_url}}/providers/{{serenity_user_provider_id}}/locations/{{location_id}}
{
"street_address": "Airport Residential Street",
"location_name": "Airport Branch",
"location_contact_number": "03005565625",
"country": "GH",
"city": "Accra2",
"postal_code": "00233"
}
{
"operation_successful": true,
"message": "location updated",
"data": {
"id": "957b4a4c-02c3-4b93-b160-9abe40e192b1",
"location_hours_of_operation": null,
"location_name": "Airport Branch",
"location_alias": null,
"location_description": null,
"location_mode": "instance",
"location_contact_number": "03005565625",
"street_address": "Airport Residential Street",
"location_physical_status": "building",
"location_availability_exception": null,
"resource": null,
"resource_type": null,
"status": "active",
"operational_status": null,
"name": "Airport Branch",
"alias": null,
"description": null,
"mode": "instance",
"location_type": null,
"telecom": "03005565625",
"postal_code": "00233",
"city": "Accra2",
"country": "GH",
"address": "Airport Residential Street",
"availability_exception": null,
"physical_type": "building",
"is_branch": true,
"longitude": "0.000000",
"latitude": "0.000000",
"altitude": "0.000000",
"managing_organization": "19546458-c0c9-47af-9cea-7c5827a5a156",
"part_of": null
}
}