Keeping Track of Customer Records
Opportunity
Every business needs to be able to understand their customer base. By using IndicaOnline API you can easily retrieve customer information, be it in bulk or on a customer-by-customer basis. In this guide we will describe an example of how that can be done.
Flow
Customer data can be retrieved for one specific customer or en masse.
If you want to get data for a specific customer, consider using the Get customer by ID endpoint: https://api.indicaonline.com/open_api/v2.3/customers/{id}
Step 1: Choose a customer your account and copy their customer_id. It may be found in the area highlighted on the screenshot.
Step 2: Specify the customer_id you are interested in and send the request. IndicaOnline will return a 200 status code with the current customer data.
If the user is not found (e.g. does not exist or has been deleted), IndicaOnline will return a 404 error code.
To get data for several customers per request, use the Get customers endpoint: https://api.indicaonline.com/open_api/v2.3/customers
This endpoint allows you to get the customers whose profiles were created within a certain period. To do this, you need to specify the start_date and end_date (yyyy-mm-dd format) and sent the request.
Important: you cannot insert the end_date that comes before the start_date.
You can also set the number of records the request will return by filling in the Limit field
As a result, IndicaOnline will return customers that were created within the specified period.
PRO Plan users may also take advantage of the Get Customer by State ID endpoint to retrieve the data about a specific Customer using their State ID number:
https://api.indicaonline.com/open_api/v2.3/customers/state-id/{state_id}
Specify the state_id you are interested in and send the request. IndicaOnline will return a 200 status code with the current customer data:
{
"id": 12345,
"first_name": "Jane",
"last_name": "Smith",
"date_of_birth": "1990-04-12",
"phone": "555-123-4567",
"email": "[email protected]",
"comment": "Frequent customer",
"has_medical_recommendation": true,
"recommendation": {
"number": "RX987654",
"valid_from": "2025-01-01",
"valid_to": "2025-12-31",
"state_id_expires_on": "2025-07-15"
},
"middle_name": "A",
"state_id": CA987654,
"alternative_id": null,
"passport": null,
"gender": "female",
"weight": 65,
"height": "5'6\"",
"type": "medical_with_rec",
"ethnicity": "latino_or_hispanic",
"preferred_language": "english",
"manual_groups": [101, 203],
"auto_groups": [301],
"home_phone": null,
"office_phone": null,
"fax": null,
"address": {
"street_address_1": "456 Sunset Blvd",
"street_address_2": "Unit 2",
"city": "Los Angeles",
"state": "CA",
"zip": "90026"
},
"mail_messages_allowed": true,
"email_messages_allowed": true,
"text_messages_allowed": false,
"call_messages_allowed": true,
"email_consent_date": "2024-11-10",
"phone_consent_date": "2024-11-10"
}
If no customer with the specified state_idwas found, the system will return a 404 error.
Updated 9 months ago
