Locations
Check Area Availability
The Check Lng Lat Area Availability API allows users to verify the availability of a specific location on our platform. By providing longitude and latitude coordinates, users can determine if the given area is supported by our services, making it easier to identify whether a particular location is within our serviceable range.
Endpoint:
api/customer/profile/check-area
Http Method:
GET
Request Parameters:
Key | Type | Description |
---|---|---|
lat | Float | The latitude of the area. |
lng | Float | The longitude of the area. |
{
"lat": 24.7136,
"lng": 46.6753
}
- Success Response:
You can check more details about Area Resource.
{
"code": 200,
"data": {
"id": 1,
"name": "Riyadh",
"name_ar": "الرياض",
"active": true
}
}
Check the following section to learn more about the Check Area API Reference
Get Available Areas
The "Get Available Cities and Areas" API provides information about the cities and their associated areas that users can select. This feature is particularly useful for populating dropdown menus where users can first choose a city and then select an area within that city.
Endpoint:
api/customer/profile/areas
Http Method:
GET
Please note that to utilize this API, multi-inventory or multi-vendor configuration must be enabled. Ensure that the ENABLE_MULTI_INVENTORY
and ENABLE_MULTI_VENDOR
keys in the configuration are both set to true for proper functionality.
Additionally, it's important to mention that vendors or inventories must have active areas to return data through this API.
- Success Response:
You can check more details about City Resource.
{
"code": 200,
"message": "Success",
"data": [
{
"id": 7,
"name": "Giza",
"name_ar": "الجيزة",
"areas": [
{
"id": 80,
"name": "6th of October City",
"name_ar": "مدينة 6 أكتوبر",
"city_id": 7,
"districts": [],
"active": true,
"fees_type": 1,
"delivery_fees": "0.00",
"fees_range": [],
"aramex_area_name": "October City",
"available": true,
"inventory": {
"id": 1,
"name": "General Inventory",
"active": 1,
//...
}
}
],
"active": 1,
"fees_type": 1,
"delivery_fees": "40.00",
"fees_range": []
},
//...
],
"meta": []
}
Check the following section to learn more about the Available Areas API Reference
Set Area
The User Profile API allows you to manage user profiles within your application. This endpoint enables you to set the area for a specific user profile. By setting the area, you can capture and update the geographical location or region associated with a user's profile.
Endpoint:
api/customer/profile/set_area
Http Method:
POST
Request Body:
Key | Type | Description |
---|---|---|
area_id | Integer | The ID of the area. |
lat | Float | The latitude of the area. |
lng | Float | The longitude of the area. |
You must provide either the area_id parameter or both lat and lng parameters. The specific requirement can be determined by checking the PICKUP_DELIVERY_SOURCE
configuration.
{
"area_id": 1,
"lat": 24.7136,
"lng": 46.6753
}
- Success Response:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
"id": 1153383,
"name": "Test",
"last_name": "Documentation",
"email": "doc@supercommerce.io",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
"is_guest": false,
//...
}
}
Check the following section to learn more about the Set Area API Reference
Get Polygons Area
The API provides a complete list of coordinates for all areas, enabling users to access geographical data for mapping and location-based applications.
Endpoint:
api/customer/profile/area-maps
Http Method:
GET
Success Response:
Key | Type | Description |
---|---|---|
id | String | a unique identifier for the area. |
name | String | the area's name in a English. |
name_ar | String | the area's name in Arabic. |
geometry | String | information related to the area's shape or boundaries, including data like polygons and coordinates. |
coordinates | String | an array of boundaries coordinates. |
{
"code": 200,
"message": "List Area Maps",
"data": [
{
"id": 78,
"name": "Egypt Alexandria desert",
"name_ar": "مصر اسكندرية الصحراوي",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
31.28500522442,
29.99963721989
],
[
31.289811742974,
29.997778906782
],
[
31.283202779962,
29.994285183943
],
[
31.28500522442,
29.99963721989
]
]
]
},
"coordinates": [
{
"lat": 29.99963721988987,
"lng": 31.285005224419617
},
{
"lat": 29.997778906782383,
"lng": 31.2898117429743
},
{
"lat": 29.994285183942814,
"lng": 31.28320277996161
}
]
}
],
"meta": []
}
Check the following section to learn more about the Get Coordinates Areas API Reference