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
Parameters
Name
Required
Description
Default Value
Example
rid for which user wants to know the history
Example Response
{
"id": null,
"version": null,
"responsetime": "2020-07-08T06:08:26.654Z",
"metadata": null,
"response": true,
"errors": null
}
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
Parameters
Name
Required
Description
Default Value
Example
Example Response
{
"id": null,
"version": null,
"responsetime": "2019-11-18T06:04:39.194Z",
"metadata": null,
"response": [
{
"isActive": true,
"createdBy": "superadmin",
"createdDateTime": "2019-08-27T12:28:10.549Z",
"updatedBy": null,
"updatedDateTime": null,
"isDeleted": null,
"deletedDateTime": null,
"code": "STT",
"langCode": "eng",
"name": "Settat",
"hierarchyLevel": 3,
"hierarchyName": "Province",
"parentZoneCode": "CST",
"hierarchyPath": "MOR/NTH/CST/STT"
}
],
"errors": []
}
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
Parameters
Name
Required
Description
Default Value
Example
Example Response
{
"id": null,
"version": null,
"responsetime": "2019-11-18T06:09:15.321Z",
"metadata": null,
"response": [
{
"isActive": true,
"createdBy": "superadmin",
"createdDateTime": "2019-08-27T12:28:10.549Z",
"updatedBy": null,
"updatedDateTime": null,
"isDeleted": null,
"deletedDateTime": null,
"code": "BSN",
"langCode": "eng",
"name": "Benslimane",
"hierarchyLevel": 3,
"hierarchyName": "Province",
"parentZoneCode": "CST",
"hierarchyPath": "MOR/NTH/CST/BSN"
}
],
"errors": []
}
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
Parameters
Name
Required
Description
Default Value
Example
Example Response
{
"id": null,
"version": null,
"responsetime": "2019-11-18T06:22:22.475Z",
"metadata": null,
"response": {
"zoneName": "Casablanca-Settat"
},
"errors": []
}
Failure details
Error Code
Error Message
Error Description
Error occured while fetching zone
No zone found for the logged-in user
Error Occured while fetching zone of the user
Entity for user ID specified Not Found
Entity for Zone Code of user ID specified Not Found