Hello 👋 How can we help?

Bulk request customers via REST API

You can bulk request customers with the help of REST API.
Written by Konstantine
Updated 3 weeks ago

You can bulk request customers (including events, excluding your private notes and tags) by sending a GET request with the limit option, which is a number between 1-100 ( 100 customers are requested by default) and offset option, which allows requesting next portion, starting from a specific number. For example, starting from the 300th customer. This can come in handy if you need to regularly update customers from your third-party database/CRM.

For sorting you can use ‘orderBy’ parameter and specify to sort by email or the lastSeen date.

URL: https://your-organization.helpcrunch.com/api/public/customers-batch?limit=100&offset=0
Alternative: https://your-organization.helpcrunch.com/api/public/customers-batch?limit=50&offset=100
Alternative: https://your-organization.helpcrunch.com/api/public/customers-batch?limit=100&offset=150
Alternative: https://your-organization.helpcrunch.com/api/public/customers-batch?limit=100&offset=0&orderBy=email
Alternative: https://your-organization.helpcrunch.com/api/public/customers-batch?limit=100&offset=0&orderBy=lastSeen
Method: GET
Headers: Authorization: Bearer api-key=”842699d800d4df44831d8968ecfda46367717109″
Responses:

{  
[
    {
        "id": 203312,
        "name": "Alex Ternovoy",
        "user_id": "_",
        "email": "",
        "referrer": null,
        "source": null,
        "company": null,
        "phone": null,
        "first_seen": "2016-02-02T08:55:49+0000",
        "locale": "ru",
        "timezone": "Asia/Riyadh",
        "last_seen": "2016-02-15T14:23:54+0000",
        "sessions": 1,
        "ip": "37.17.35.20/32",
        "country": "Belarus",
        "country_code": "BY",
        "region": null,
        "city": null,
        "online": false,
        "hostname": "blog.helpcrunch.com",
        "last_page": null,
        "user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 OPR/34.0.2036.47",
        "heard_from": "2016-02-02T08:56:38+0000"
    },
    {
        "id": 207150,
        "name": "Eugene Test Offline",
        "user_id": null,
        "email": "",
        "referrer": null,
        "source": null,
        "company": null,
        "phone": null,
        "first_seen": "2016-02-03T16:53:43+0000",
        "locale": "en",
        "timezone": "Europe/Minsk",
        "last_seen": "2016-04-11T11:57:31+0000",
        "sessions": 65,
        "ip": "46.216.30.251/32",
        "country": "Belarus",
        "country_code": "BY",
        "region": null,
        "city": null,
        "online": false,
        "hostname": "helpcrunch.com",
        "last_page": null,
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36",
        "heard_from": "2016-03-10T16:58:13+0000"
    },
    {
        "id": 218602,
        "name": "Bar",
        "user_id": null,
        "email": "",
        "referrer": null,
        "source": null,
        "company": null,
        "phone": null,
        "first_seen": "2016-02-08T17:28:34+0000",
        "locale": "en",
        "timezone": "Asia/Jerusalem",
        "last_seen": "2016-02-08T17:28:34+0000",
        "sessions": 1,
        "ip": "31.168.172.137/32",
        "country": "Israel",
        "country_code": "IL",
        "region": null,
        "city": null,
        "online": false,
        "hostname": "helpcrunch.com",
        "last_page": null,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36",
        "heard_from": "2016-02-08T17:29:19+0000"
    },
	...
] 
}
Did this answer your question?