Recipes
Filter users by multiple criteria
Filter users by multiple criteria
1
1. Set a filter
Use a 
filter parameter to set a filter.Set a value type, search operator, and value to filter users by. You can set as many filters as you need.Here, the two filters are set:- The users are filtered by the facebook_idfield with a value less than the50000.
- The users are filtered by the created_atfield with a value greater than the2019-08-27T21:08:55Z.
2
2. As a result, the API returns users filtered by two criteria.
- The users with the facebook_idvalue less than the50000are returned.
- The users with the created_atvalue greater than the2019-08-27T21:08:55Zare returned.
Filter users by criteria
Filter users by criteria
1
1. Set a filter
Use a 
filter parameter to set a filter.Set a value type, search operator, and value to filter users by.In this case, the users are filtered by the facebook_id with a value less than 50000.2
2. As a result, the API returns users by the specified criteria.
The users with the 
facebook_id value greater than 50000 are returned.List users with API key
List users with API key
1
1. Use 'Authorization' header to pass API key
2
2. As a result, the API returns a list of users.
created_at value is specified, the request will return only instances by the specified created_atvalue. Filters require an exact match of property values with an instance of the corresponding parameter value.
| Operator | Description | 
|---|---|
| gt | Greater Than operator Types: number, string, date Applicable to fields: id, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+external_user_id+gt+33 filter[]=date+updated_at+gt+2019-05-23T18:07:19Z Will return users with external_user_idgreater than 33.Will return users with updated_at greater than 2019-05-23T18:07:19Z. | 
| lt | Less Than operator Types: number, string, date Applicable to fields: id, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+id+lt+85000 filter[]=date+last_request_at+lt+2019-05-23T18:07:19Z Will return users with IDs less than 85000. Will return users with last_request_atless than 2019-05-23T18:07:19Z. | 
| ge | Greater or Equal to operator Types: number, string, date Applicable to fields: id, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+facebook_id+ge+34524 filter[]=date+last_request_at+ge+2019-05-23T18:07:19Z Will return users with facebook_idgreater than or equal to 34524.Will return users with last_request_atgreater than or equal to 2019-05-23T18:07:19Z. | 
| le | Less or Equal to operator Types: number, string, date Applicable to fields: id, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+facebook_id+le+34524 filter[]=date+created_at+le+2019-05-23T18:07:19Z Will return users with facebook_idless than or equal 34524.Will return users with created_at less than or equal 2019-05-23T18:07:19Z. | 
| eq | Equal to operator Types:number, string, date Applicable to fields: id, full_name, email, login, phone, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+facebook_id+eq+810 filter[]=string+email+eq+test@gmail.com filter[]=date+created_at+eq+2019-04-22 Will return a user with facebook_idequal to 810.Will return a user with email equal to test@gmail.com. Will return a user with created_at equal to 2019-04-22. | 
| ne | Not Equal to operator Types: number, string, date Applicable to fields: id, full_name, email, login, phone, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+external_user_id +ne+810 filter[]=string+email+ne+test@gmail.com filter[]=date+created_at+ne+2019-04-22T19:07:19Z Will return users with external_user_idnot equal to 810.Will return users with email not equal to test@gmail.com. Will return users with created_atnot equal to 2019-04-22T19:07:19Z. | 
| between | Contained Between values operator Types: number, string, date Applicable to fields: id, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+external_user_id+between+33,1000 filter[]=date+updated_at+between+2019-04-22T19:07:19Z,2019-04-23T11:04:03Z Will return users with external_user_idbetween 3 and 1000.Will return users with updated_atbetween 2019-04-22T19:07:19Z and 2019-04-23T11:04:03Z. | 
| in | Contained IN array operator Types: number, string, date Applicable to fields: id, full_name, email, login, phone, created_at, updated_at, last_request_at, external_user_id, facebook_id Example: filter[]=number+external_user_id+in+33,555 filter[]=string+email+in+test@test.com,test@gmail.com filter[]=date+created_at+in+2019-04-22T19:07:19Z,2019-04-22T19:08:38Z Will return users with external_user_id33 and 555.Will return users with email test@test.com and test@gmail.com. Will return users with created_at2019-04-22T19:07:19Z and 2019-04-22T19:08:38Z. | 
| Param | Possible values | Description | 
|---|---|---|
| order | asc, desc | Types: string, number, date Applicable to fields: id, full_name, email, login, phone, website, created_at, updated_at, last_request_at, external_user_id Example: order=asc+date +last_request_at Will return users with the last_request_atsorted in the ascending order. | 
Query Parameters
 Review Search Operators section for more details. 
 Review Sort operators section for more details. 
 Page of results to return. 
 Number of records to return in one request. Min: 1. Max: 100. 
Headers
 A user session token. See Authentication page to learn more about the session token. 
 API key from Dashboard. Expected format: 
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.Responses
200
200
403
403
An error response