The LocatorAPI currently has three endpoints. The locator API can currently support querying:
Locators or OrgUnits near by
List of Areas in a country
List of subAreas within the country and the area
Locators near me
This endpoint provides list of organization units around the provided coordinates.
url : api/v1/locator
method: POST
authorization: will be provided by admin
Mandatory parameters - you must provide at least one fo the following parameters
Parameter | dhis2 attribute | description |
---|---|---|
coordinates | core Org Unit geometry | |
code | core Org Unit Code | |
uid-exact match | ||
uid-parent |
Optional parameters
Parameter | Default value, if not provided | |
---|---|---|
number | limit | 10 |
distance | calculation | 100 |
unit | ||
phone | core | |
tag | custom Org Unit attribut | |
services |
payload: :
{ "number": 10, "distance": 5, "unit": "km", "coordinates": "lat,lng", "iso": "KE", ---> Remove "services": "service1,service2", "uid": 'q13we2452wsd', "code": "CODE-123", "contraception": "iud,imp", "tags": "tag1,tag2", "type": "Public", "area": "Managua", "subArea": "Ciudad Sandino", "phonenumber": "180999093107", "wap": "977984123145", "facebook": "https://fb.me/facility1" }
response:
{ "returnCode": "200", "outlet": [ { "dhisCode": "KE-CODE-123", "dhisId": "xkcEJARvo2O", "servicesStandard": "CCS,CNT,ANC,STI,HVS,HVT", "outletType": "Public", "ouShowContactInfo": "TLF", "path": "", "outletName": "Facility Clinic", "phoneNumber": "+254541483334", "postgresId": "1511345870", "locatorType": "OUT", "location": { "area": "Nairobi", "areaSub": "Starehe", "address": "street1, city, subarea, area", "latitude": "-1.28575", "longitude": "39.81234" }, "dhisName": "Facility Clinic (KE-CODE-123)", "openingHours": "Mon-Fri,8:00,17:00;Sat,9:00,14:00;Public Holiday,9:00,14:00;Sun,Closed", "openingDate": "2023-02-11", "ouTags": "MSI", "providers": [], "ouContraceptives": "IMP,OCP,IUD,INJ,STL,EMC" } ] }