Get All Customers

This API is used to retrieve all registered and unregistered drones.

This API retrieves all available customer records within a specified timeframe and based on certain search criteria. Authorized users can access these customer records for analysis or reference.

Authentication with API Keys

This API uses API keys for authentication. To access the API, you'll need to include a valid API key in the Authorization header of your request using the Bearer token scheme. Here's the format:

Authorization: Bearer <YOUR_API_KEY>
  • Replace <YOUR_API_KEY> with your actual API key obtained from Aeromegh.

  • Requests without a valid API key will result in a 401 Unauthorized error.

Method

GET : retrieve all customer's

HTTP Request

https://ags.aeromegh.com/Aeromegh/getAllCustomers?searchString={searchString}&fromDateTime={fromDateTime}&toDateTime={toDateTime}&orderBy={orderBy}&orderType={orderType}&pageSize={pageSize}&pageNumber={pageNumber}

URL Parameters

Request Parameters:

HTTP Response

Response Codes Explanation:

Code Snippet

Take a look at how you might call this method using our official libraries, or via curl:

curl --location 'https://ags.aeromegh.com/Aeromegh/getAllCustomers?searchString=&fromDateTime=2023-08-19T00%3A00%3A20.335Z&toDateTime=2024-05-07T23%3A59%3A20.335Z&orderBy=register_date&orderType=DESC&pageSize=15&pageNumber=1' \
--header 'Authorization: Bearer <API_KEY>'

Note: Replace <API_KEY> with the actual API_KEY provided by Aeromegh.

API Response

"The API response comprises a comprehensive dataset detailing customers engaged in agricultural services. Each entry includes identifiers, customer names, registration dates, land acreage managed, revenue generated, and crop types cultivated. This structured information offers insights into the customer base, farming activities, and economic contributions to the agricultural sector. Analyzing this data facilitates trend identification, resource allocation optimization, and service customization to meet farmers' diverse needs."

{
    "allCustomers": [
        {
            "id": "97c4383c-f477-4cb3-8775-727bd0d375ac",
            "userid": "d5dc6351-d96b-49e2-afa8-ff7d509af7aa",
            "customer_name": "chetan shinde",
            "contact_number": null,
            "address": null,
            "email": null,
            "register_date": "2024-04-24T12:14:03.900Z",
            "government_id": null,
            "pilot_license_id": null,
            "gst_no": null,
            "cust_type": "green",
            "totalAcres": "16.5562",
            "totalRevenue": "15405",
            "reportStatCrop": [
                {
                    "crop_type": "rice"
                },
                {
                    "crop_type": "rice "
                },
                {
                    "crop_type": "rics"
                }
            ]
        },
        {
            "id": "8d5fcb25-8e01-44fc-9cff-8a7701f5b326",
            "userid": "d5dc6351-d96b-49e2-afa8-ff7d509af7aa",
            "customer_name": "chetan shinde",
            "contact_number": null,
            "address": null,
            "email": null,
            "register_date": "2024-04-05T09:32:03.498Z",
            "government_id": null,
            "pilot_license_id": null,
            "gst_no": null,
            "cust_type": "green",
            "totalAcres": "2.47",
            "totalRevenue": "100",
            "reportStatCrop": [
                {
                    "crop_type": "rice"
                }
            ]
        }
    ]
}

API Response Parameter Details

The API response parameter, "allCustomers," encapsulates an array of customer objects, each containing essential information such as unique identifiers, user IDs, customer names, contact details, registration dates, government IDs, pilot license IDs, GST numbers, customer types, total acres managed, total revenue generated, and crop type statistics. This structured data provides a comprehensive overview of customer profiles and their agricultural activities, enabling efficient analysis, decision-making, and customization of services tailored to individual customer needs.

Last updated