Get All Customers
This API is used to retrieve all registered and unregistered drones.
This API provides programmatic access to retrieve all customer records within a specified timeframe based on search criteria, with secure API key authentication. Authorized users can use it for analysis or reference.
Authentication
To use the API, insert your API key in the Authorization header like this:
Replace <YOUR_API_KEY>
with your AeroGCS API key. Without it, you'll get a 401 Unauthorized error.
Method
GET : retrieve all customer's
HTTP Request
URL Parameters
URL parameters are:
searchString
Allows users to search by customer name.
Yes
"John Doe"
fromDateTime
Specifies the start date and time in UTC.
Yes
"2023-08-19T00:00:20.335Z"
toDateTime
Specifies the end date and time in UTC.
Yes
"2024-05-07T23:59:20.335Z"
orderBy
Specifies the field name to order results by.
Yes
"register_date"
orderType
Specifies the order type; ASC or DESC.
Yes
"DESC"
pageSize
Specifies the number of records per page.
Yes
15
pageNumber
Specifies the page number; must be greater than zero.
Yes
1
HTTP Response
Response Codes Explanation:
200
The request was successful.
"OK"
400
Request parameters missing.
"Request parameters missing"
500
Internal server error.
"Internal server error"
Code Snippet
Examples of how you can call this API using curl, Node.js, and Python:
Note: Replace <API_KEY>
with the actual API_KEY provided by Aeromegh.
API Response
Example of API response in JSON format:
API Response Parameter
The following parameters are included in API response:
id
Unique identifier for each customer.
userid
Identifier for the user associated with the customer.
customer_name
Name of the customer.
contact_number
Contact number of the customer.
address
Address of the customer.
Email address of the customer.
register_date
Date and time of customer registration.
government_id
Government-issued identification number, if available.
pilot_license_id
Pilot license ID, if applicable.
gst_no
Goods and Services Tax (GST) number, if available.
cust_type
Type of customer (e.g., green, premium, standard).
totalAcres
Total acres managed by the customer.
totalRevenue
Total revenue generated by the customer.
reportStatCrop
An array containing objects specifying crop types and their statistics for each customer. Each object includes the following subparameters:
Last updated