Skip to main content

Get List Wards

Use this api to get List Wards by code

URL : api-auth/v2/wards

Method : GET

Validate :

'page' => 'nullable|integer|min:1',
'limit' => 'nullable|integer|min:1|max:256',
'name' => 'nullable|string', // name of ward
'codes' => 'nullable', // list code of ward
'codes.*' => 'nullable|string',
'district_code' => 'nullable|string' // code of parent

Example : https://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?district_code=315&limit=2

Success Response

Code : 200 OK

Content example

{
"result": "success",
"error": "",
"errorCode": "",
"current_page": 1,
"data": [
{
"province_id": 20,
"district_id": 289,
"ward_id": 4799,
"province_code": "31",
"district_code": "315",
"ward_code": "11755",
"province_name": "Thành phố Hải Phòng",
"district_name": "Huyện Tiên Lãng",
"ward_name": "Thị trấn Tiên Lãng"
},
{
"province_id": 20,
"district_id": 289,
"ward_id": 4800,
"province_code": "31",
"district_code": "315",
"ward_code": "11758",
"province_name": "Thành phố Hải Phòng",
"district_name": "Huyện Tiên Lãng",
"ward_name": "Xã Đại Thắng"
}
],
"from": 1,
"last_page": 12,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=1",
"label": "1",
"active": true
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=2",
"label": "2",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=3",
"label": "3",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=4",
"label": "4",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=5",
"label": "5",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=6",
"label": "6",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=7",
"label": "7",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=8",
"label": "8",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=9",
"label": "9",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=10",
"label": "10",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=11",
"label": "11",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=12",
"label": "12",
"active": false
},
{
"url": "http://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?page=2",
"label": "pagination.next",
"active": false
}
],
"per_page": 2,
"to": 2,
"total": 23
}

cURL

curl --location 'https://api-gateway.develop.pharmacity.io/pmc-ecm-store-service/api-auth/v2/wards?district_code=315&limit=2'