Hi Guys,
I am getting an issue calling a GET request on the contacts endpoint via REST v2: /rest/v2/contacts
When I perform my request I am getting a 400 error
Example request: https://api.infusionsoft.com/crm/rest/v2/contacts?filter=email@domain.com
{"status":400,"data":{"code":400,"message":"Filter 'email@domain.com' is invalid","status":"Bad Request","details":[{"domain":"Contacts","resource":"GET /rest/v2/contacts"}]}}
Im using OAuth and its working fine for creating users, updating users, it’s just the filtering which is causing me an issue.
The filter parameter is formatted as: ?filter=field_name==value
except URLs are encoded so it would appear as ?filter=field_name%3D%3Dvalue
Multiple filters can be applied, and are separated by an encoded semicolon (%3B):
Unencoded |
Url encoded |
Description |
field_name==value |
field_name%3D%3Dvalue |
Return results where the field is an exact match |
contact_ids==1,2,3,4 |
contact_ids%3D%3D1%2C2%2C3%2C4 |
Return results matching any of the provided values |
field_a==value;field_b==value |
field_a%3D%3Dvalue%3Bfield_b%3D%3Dvalue |
Multiple filters may be applied. Separate filters with a semicolon. |
Available Filter Fields
Field name |
Description |
Data type |
Length |
Unencoded example |
Encoded example |
Public |
contact_ids |
Filter for contacts matching any of the given values |
string |
|
contact_ids==1,2,3,4 |
contact_ids%3D%3D1%2C2%2C3%2C4 |
Yes |
email |
Matches any of the Email1, Email2, or Email3 fields |
string |
|
email==test@example.com |
email%3D%3Dtest%40example.com
|
Yes |
end_update_time |
Ending point for LastUpdated |
dateTime |
|
end_update_time==2020-06-16T16:18:17.000Z |
end_update_time%3D%3D2020-06-16T16%3A18%3A17.000Z |
Yes |
family_name |
Last name |
|
|
family_name==brown |
family_name%3D%3Dbrown |
Yes |
given_name |
First name |
|
|
given_name==charlie |
given_name%3D%3Dcharlie |
Yes |
start_update_time |
Starting point for LastUpdated |
dateTime |
|
start_update_time==1999-06-16T16:18:17.000Z |
start_update_time%3D%3D1999-06-16T16%3A18%3A17.000Z%3B |
Yes |
1 Like
Amazing Thank you @JustinGourley
1 Like