---
title: Correct Time Zone and Time Range for Lead Retrieval Using Criteria Base API.
description: "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 ..."
url: "https://supportb.kinsta.cloud/docs/correct-time-zone-for-lead-retrieval-using-an-api/"
updated: "2024-02-17"
category: API Related
---

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

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:

POST- [https://api-in21.leadsquared.com/v2/LeadManagement.svc/Leads.Get?accessKey=u$r9c9db741eb460c8cdb619022561ee561&secretKey=060b66eb4faa350ce9da82263f9d46990b3aae32](https://api-in21.leadsquared.com/v2/LeadManagement.svc/Leads.Get?accessKey=u$r9c9db741eb460c8cdb619022561ee561&secretKey=060b66eb4faa350ce9da82263f9d46990b3aae32)
**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    }}
