Fetch areas

GET /area

Use this endpoint to retrieve a detailed list of areas in your organization. This version is more concise, clear, and improves overall readability.

Header

                    
                        
                        
                        Content-Type
                        Example: application/json
                        Accept
                        Example: application/json
                    
                

Response Parameters

Parameter Datatype Description
data object This object contains the entire resource.
id Integer The unique area identifier.
name String The name of the area.

Sample Request

                    
                        curl --location 'https://testwebservices.sourcehub.in/api/areas'
                    
                

Sample Success Response

                    
                        "data": [
                                    {
                                        "id": 108,
                                        "name": "BTM",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 109,
                                        "name": "Kormangala",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 110,
                                        "name": "name",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 111,
                                        "name": "Adugodi",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 112,
                                        "name": "Agaram",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 113,
                                        "name": "Air Force Stn. Yelahanka",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 114,
                                        "name": "Arabic College",
                                        "city_id": 1
                                    },
                                    {
                                        "id": 115,
                                        "name": "Banashankari",
                                        "city_id": 1
                                    }
                                ]
                    
                

Errors

The API key/secret provided is invalid. Error Status: 401

The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons are:

  • Different keys for test mode and live modes.
  • Expired API key.

Solution :
The API keys must be active and entered correctly with no whitespace before or after the keys.

CONTENTS