Retrieves users. Supports filtering, sorting and paging.
Filtering
The filter parameter accepts a list of semicolon-separated filters in the form: {fieldName}{operator}{fieldValue} Filter terms within a single filter parameter are joined by a logical AND. Separate filter parameters are joined by a logical OR.
Operators
| Operator | Meaning |
|---|---|
| == | Exact match |
| != | Not equal |
| < | Less than |
| <= | Less than or equal |
| > | Greater than |
| >= | Greater than or equal |
| ~ | Matches string, supports wildcard characters * and ? |
| !~ | Not like, supports wildcard characters * and ? |
Examples:
| URI | Results |
|---|---|
| GET /v1/users?filter=lastName==Doe;firstName==John | Users with firstName of 'John' AND lastName of 'Doe'. |
| GET /v1/users?filter=firstName==John;lastName=Doe&filter=firstName==Bob | Users with: (firstName of 'John' AND lastName of 'Doe') OR firstName of 'Bob'. |
| GET /v1/users?filter=location.cityName==Portland | Users with a city of 'Portland'. |
| GET /v1/users?filter=customAttributes.internalId==12345 | Users with a custom attribute of internalId equal to 12345'. |
| GET /v1/users?filter=lastInferredLocation.stateName==Georgia | Users with a last inferred location.stateName value of Georgia'. |
| GET /v1/users?filter=lastVisitedUserAgentData.userAgent.browserType==firefox | Users with firefox as last visited browser across the products '. |
| GET /v1/users?filter=lastVisitedUserAgentData.userAgent.browserType==firefox;lastVisitedUserAgentData.propertyKey==AP-8MF5LPSWUBFW-2 | Users with firefox as last visited browser for a particular product(with property key AP-8MF5LPSWUBFW-2)'. |
Supported filter fields for last inferred location
| Field |
|---|
| lastInferredLocation.countryCode |
| lastInferredLocation.countryName |
| lastInferredLocation.stateCode |
| lastInferredLocation.stateName |
| lastInferredLocation.city |
| lastInferredLocation.continent |
| lastInferredLocation.postalCode |
| lastInferredLocation.regionName |
| lastInferredLocation.timeZone |
| lastInferredLocation.street |
Sorting
The sort parameter accepts a list of semi-colon separated fields names, each with an optional dash to imply descending sort order. Examples:
| URI | Results |
|---|---|
| GET /v1/users?sort=lastName;firstName | Users sorted by firstName, lastName, in ascending order. |
| GET /v1/users?sort=-createDate | Users sorted by createDate in descending order. |
GET
/v1/users
curl \
--request GET 'https://api.aptrinsic.com/v1/users'
Response examples (200)
{
"users": [
{
"aptrinsicId": "string",
"identifyId": "string",
"type": "LEAD",
"gender": "MALE",
"email": "string",
"firstName": "string",
"lastName": "string",
"lastSeenDate": 42,
"signUpDate": 42,
"firstVisitDate": 42,
"title": "string",
"phone": "string",
"score": 42,
"role": "string",
"subscriptionId": "string",
"accountId": "string",
"numberOfVisits": 42,
"location": {
"countryName": "United States",
"countryCode": "USA",
"stateName": "California",
"stateCode": "CA",
"city": "San Mateo",
"street": "101 Broadway",
"postalCode": 94010,
"continent": "NA",
"regionName": "string",
"timeZone": "string",
"coordinates": {
"latitude": 37.567147,
"longitude": -122.324211
}
},
"propertyKeys": [
"AP-XXXXXXXXXX-2"
],
"createDate": 42,
"lastModifiedDate": 42,
"customAttributes": {},
"globalUnsubscribe": true,
"sfdcContactId": "string",
"channelMetricList": [
{
"groupId": "string",
"channel": 42,
"environment": 42,
"firstSeenDate": 42,
"lastSeenDate": 42
}
],
"lastVisitedUserAgentData": [
{
"propertyKey": "string",
"userAgent": {
"rawUserAgent": "string",
"device": "string",
"platformType": "string",
"platformVersion": "string",
"browserType": "string",
"browserVersion": "string"
}
}
],
"id": "string",
"lastInferredLocation": {
"countryName": "United States",
"countryCode": "USA",
"stateName": "California",
"stateCode": "CA",
"city": "San Mateo",
"street": "101 Broadway",
"postalCode": 94010,
"continent": "NA",
"regionName": "string",
"timeZone": "string",
"coordinates": {
"latitude": 37.567147,
"longitude": -122.324211
}
},
"globalId": "string"
}
],
"totalHits": 42,
"scrollId": "string"
}