Search between date in api v2

Izno
Izno Member Posts: 4 NEW MEMBER
First Comment
edited May 29 in Apps and Integrations #1

I what to find all persons new to this table between 2 dates with the API V2. End, Start doesn't work and updated_since also

Tagged:

Answers

  • Sophie
    Sophie Pipedrive Team Posts: 228 PIPEDRIVE TEAM
    Third Anniversary 100 Comments 5 Answers 5 Likes

    Hi @Izno,

    It looks like there isn’t currently a built-in way to filter Persons by creation date directly in the API request. Parameters like start and end are for pagination, and updated_since filters based on the last update time, not the add/creation date.

    That said, each Person does have an add_time field in the response, so a common workaround is to fetch the list of Persons and then filter them on your side using that field to match your desired date range.

    I know that’s not the lost efficient option if you have a large number of records, but it’s the best available approach at the moment from what I can tell.

    I hope this helps clarify!

  • Izno
    Izno Member Posts: 4 NEW MEMBER
    First Comment

    add_time is not permit in API V2

    "success": false, "error": "Validation failed: add_time: Parameter 'add_time' is not allowed for this request", "code": "ERR_SCHEMA_VALIDATION_FAILED"

  • Sophie
    Sophie Pipedrive Team Posts: 228 PIPEDRIVE TEAM
    Third Anniversary 100 Comments 5 Answers 5 Likes

    Hi @Izno,

    Thanks for the follow-up!

    You are correct that add_time isn’t a valid request parameter, so it can't be used to filter results directly in the API call. But just to clarify, add_time is included in the response data for each Person, so the usual workaround is to:

    1. Get the full list of Persons using the /persons endpoint.
    2. Then, on your end, filter those results by checking the add_time field in the returned data.