Get List Provider Areas
Use this api to get List Provider Areas
Flow: Read data in db.
URL : api/shipping-manage/provider/areas
Method : GET
Authorization : Use OAuth token
Validate Rule
'province_code' => ['nullable', 'string'],
'district_code' => ['nullable', 'string'],
'delivery_provider' => ['required', new Enum(DeliveryProvider::class)],
'store_in_charge' => ['nullable', 'string'],
'status_3pl' => ['nullable', 'int'],
'pmc_status' => ['nullable', 'int'],
'lead_time' => ['nullable', 'exists:lead_time,code'],
'page_size' => ['nullable', 'int'],
'page' => ['nullable', 'int'],
'sort_by' => ['nullable', 'string'],
'sort_type' => ['nullable', 'string'],
DeliveryProvider
delivery_provider: ahamove,viettelpost
Sort
sort_by: created_at
sort_type: asc, desc
Example : https://api-gateway.develop.pharmacity.io/pmc-ecm-delivery-api/api/shipping-manage/provider/areas?delivery_provider=viettelpost&page=1
Success Response
Code : 200 OK
Content example
{
"success": true,
"errors": null,
"errorCode": null,
"data": {
"items": [
{
"id": 1,
"province_code": "01",
"district_code": "001",
"province_name": "Thành phố Hà Nội",
"district_name": "Quận Ba Đình",
"zone": "Thành phố Hà Nội - Quận Ba Đình",
"delivery_provider": "viettelpost",
"store_in_charge": null,
"status_3pl": 1,
"pmc_status": 1,
"lead_time": "30 phut",
"data": {
"district_id": 22,
"province_id": 1
},
"created_at": "2023-11-20T09:03:21.000000Z",
"updated_at": "2023-11-20T09:03:21.000000Z"
}
],
"sort_by": null,
"sort_type": null,
"page": 1,
"page_size": 10,
"next_page": 2,
"previous_page": null,
"total_page": 72,
"total_records": 713
}
}
cURL
curl --location 'https://api-gateway.develop.pharmacity.io/pmc-ecm-delivery-api/api/shipping-manage/provider/areas?delivery_provider=viettelpost&page=1' \
--header 'Authorization: Bearer XXXX'