M
M
MOSIP Docs
Search…
Zone APIs
This section details about the service APIs for the Zones

Zone Master API

GET /zones/authorize/{rid}

This service will verify if the logged-in user is authorized to view the RID history.

Resource URL

GET /zones/authorize/{rid}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
rid
yes
rid for which user wants to know the history

Example Response

1
{
2
"id": null,
3
"version": null,
4
"responsetime": "2020-07-08T06:08:26.654Z",
5
"metadata": null,
6
"response": true,
7
"errors": null
8
}
Copied!

GET /zones/hierarchy/{langCode}

This service will fetch the logged-in user zone hierarchy.

Resource URL

GET /zones/hierarchy/{langCode}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
langCode
yes
user language code

Example Response

1
{
2
"id": null,
3
"version": null,
4
"responsetime": "2019-11-18T06:04:39.194Z",
5
"metadata": null,
6
"response": [
7
{
8
"isActive": true,
9
"createdBy": "superadmin",
10
"createdDateTime": "2019-08-27T12:28:10.549Z",
11
"updatedBy": null,
12
"updatedDateTime": null,
13
"isDeleted": null,
14
"deletedDateTime": null,
15
"code": "STT",
16
"langCode": "eng",
17
"name": "Settat",
18
"hierarchyLevel": 3,
19
"hierarchyName": "Province",
20
"parentZoneCode": "CST",
21
"hierarchyPath": "MOR/NTH/CST/STT"
22
}
23
],
24
"errors": []
25
}
Copied!

GET /zones/leafs/{langCode}

This service will fetch the logged-in user zone hierarchy leaf zones.

Resource URL

GET /zones/leafs/{langCode}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
langCode
yes
user language code

Example Response

1
{
2
"id": null,
3
"version": null,
4
"responsetime": "2019-11-18T06:09:15.321Z",
5
"metadata": null,
6
"response": [
7
{
8
"isActive": true,
9
"createdBy": "superadmin",
10
"createdDateTime": "2019-08-27T12:28:10.549Z",
11
"updatedBy": null,
12
"updatedDateTime": null,
13
"isDeleted": null,
14
"deletedDateTime": null,
15
"code": "BSN",
16
"langCode": "eng",
17
"name": "Benslimane",
18
"hierarchyLevel": 3,
19
"hierarchyName": "Province",
20
"parentZoneCode": "CST",
21
"hierarchyPath": "MOR/NTH/CST/BSN"
22
}
23
],
24
"errors": []
25
}
Copied!

GET /zones/zonename

This service will fetch the logged-in user zone hierarchy leaf zones.

Resource URL

GET /zones/zonename

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
langCode
yes
user language code
userID
yes
user id

Example Response

1
{
2
"id": null,
3
"version": null,
4
"responsetime": "2019-11-18T06:22:22.475Z",
5
"metadata": null,
6
"response": {
7
"zoneName": "Casablanca-Settat"
8
},
9
"errors": []
10
}
Copied!

Failure details

Error Code
Error Message
Error Description
KER-MSD-337
Error occured while fetching zone
Fetch Issue
KER-MSD-339
No zone found for the logged-in user
Data Not Found
KER-MSD-338
Error Occured while fetching zone of the user
Fetch Issue
KER-MSD-391
Entity for user ID specified Not Found
Data Not Found
KER-MSD-392
Entity for Zone Code of user ID specified Not Found
Data Not Found
KER-MSD-393
Internal Server Error
Dependency issue
Last modified 1yr ago