API
1.1 Get Location list by division
This API is for selecting Department by department's code and user.
1.1.1 API Definition
| Field | Details |
|---|---|
| Endpoint | /api/department/select |
| Method | GET |
| Authentication | Required |
1.1.2 Request
| Header | Value |
|---|---|
| Authorization | Value |
| Content-type | application/json |
1.1.3 Query Parameters:
- None
Request Body:
- None
Parameter Type Required Description q string Yes Department's code filters array No Additional filters such as by division and status page integer Yes Page of search results limit integer Yes Limit of search results user_id integer Yes The ID of the User
Response
Success (200):
{
"data": {
"results": [
{
"id": "1",
"code": "EG-BRO01",
"description": "Egg-Brooding Farm"
},
{
"id": "2",
"code": "EG-CPS",
"description": "Egg-Central Packing Station"
},
{
"id": "3",
"code": "EG-DC",
"description": "Egg -Distribution Centre"
},
{
"id": "4",
"code": "EG-EWR",
"description": "Egg-Egg Washer Room"
},
{
"id": "5",
"code": "EG-L&D01",
"description": "Egg-Logistic & Distribution"
},
{
"id": "6",
"code": "EG-LAY01",
"description": "Egg-Layer Farm"
},
{
"id": "7",
"code": "EG-MAINT",
"description": "Egg-Maintenance"
},
{
"id": "8",
"code": "EG-MED01",
"description": "Egg-Medicine Group"
},
{
"id": "9",
"code": "EG-OFF01",
"description": "Egg-Office"
},
{
"id": "10",
"code": "EG-PROC",
"description": "Egg-Production"
}
],
"length": "28"
},
"success": true
}
Note/Business Logic
- None
Permission
- None