I don’t think I saw a RESTv2 two months ago. Is this new? Is there an announcement about this somewhere? What are the differences?
Good afternoon Leo!
We released the first working versions of a narrow slice of v2 domains during PartnerCon, but we haven’t extensively publicized them. These endpoints are representative of a coherent standard that follows Google RESTful design principles for a standardized usage.
Documentation is here, if you’d like to take a look: Keap REST API
Can you give some specifications on how the filter query works on the v2/contacts endpoint?
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 | |
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 |
thank you
I need to search by a custom field. How would I go about doing that?
Custom fields are not indexed, so unfortunately we can not provide a way to search them currently.
Ok, thank you for the prompt reply.
is there a way to query by tags?
To query for contacts by tag? Yes.
I am sorry I am having trouble using these filters.
I finally figured out how to use one filter but I want to specify a starting last update and ending last updated. How would i do that. I tried the semicolons uhg
Did you encode the semicolon as %3B? Here’s an example of that: start_update_time%3D%3D2023-08-16T14:45:34.000Z%3Bend_update_time%3D%3D2023-08-16T14:55:34.000Z
Hi,
The discussion in this thread has helped me in using the REST v2 API, thank you. Is it also possible when using the parameter fields=custom_fields to make it only return the custom field IDs that I am interested in?
it is possible to list contacts by tag and filter by the start_update_time field?
Hi @Carlo_Narcisi,
You will have to use the XML-RPC API to get something close to what you need.
The “ContactGroupAssign” table has the “Contact.DateCreated” and “GroupId” fields that you can query on.
https://developer.infusionsoft.com/docs/table-schema/#ContactGroupAssign
Hope that helps.