Skip to main content

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:

KeyTypeDescription
latFloatThe latitude of the area.
lngFloatThe longitude of the area.
{
"lat": 24.7136,
"lng": 46.6753
}
  • Success Response:
Area Resource

You can check more details about Area Resource.

200 OK - If the area is available
{
"code": 200,
"data": {
"id": 1,
"name": "Riyadh",
"name_ar": "الرياض",
"active": true
}
}
info

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

tip

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:
Cities Resource

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": []
}
info

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:

KeyTypeDescription
area_idIntegerThe ID of the area.
latFloatThe latitude of the area.
lngFloatThe longitude of the area.
tip

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.

Request Body
{
"area_id": 1,
"lat": 24.7136,
"lng": 46.6753
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

200 OK - If the set area is successful
{
"code": 200,
"data": {
"id": 1153383,
"name": "Test",
"last_name": "Documentation",
"email": "doc@supercommerce.io",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
"is_guest": false,
//...
}
}
info

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.

polygons form screenshot

  • Endpoint: api/customer/profile/area-maps

  • Http Method: GET

  • Success Response:

KeyTypeDescription
idStringa unique identifier for the area.
nameStringthe area's name in a English.
name_arStringthe area's name in Arabic.
geometryStringinformation related to the area's shape or boundaries, including data like polygons and coordinates.
coordinatesStringan 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": []
}
info

Check the following section to learn more about the Get Coordinates Areas API Reference