View Categories

Correct Time Zone and Time Range for Lead Retrieval Using Criteria Base API.

1 min read

Scenario:  The user was not obtaining all of the data for a certain date range when retrieving leads (using criteria-based APIs) through events or triggers. (Example: if we are retrieving a data from 8th Feb to 17th Feb, user was not receiving a proper data for 8th feb).

Root cause: The client was retrieving data using the current date and time as well as the standard time zone.
Example: 2024-02-08 00:01:00 with >= greater than equals to operator was used by the user to obtain data from February 8 through February 17. 


Solution: We advised the client to cut five hours off of the time they had hoped to collect their leads. The payload must be adjusted in the payload by 5:30 hours from the actual time you wish to retrieve because the API’s retrieval time range operates on UTC standards.

Example: To obtain all the data from February 8th, for example, you will need to enter 2024-02-07 18:30:00 if you wish to access it with the intent of 2024-02-08 00:00:00.

Please find the URL and payload use to retrieve 8th feb(Date for refence only) data.

URL:


Body: 
{
    “Parameter”: {
        “LookupName”: “CreatedOn”,
        “LookupValue”: “2024-02-07 18:30:00”,
        “SqlOperator”: “>=”
    },
    “Columns”: {
        “Include_CSV”: “”
    },
    “Sorting”: {
        “ColumnName”: “ProspectAutoId”,
        “Direction”: “1”
    },
    “Paging”: {
        “PageIndex”: 1,
        “PageSize”: 1000
    }
}



Scroll to Top