Skip to main content

Time Parameters

The attributes under Time Parameters of Data Source API are -

  • Today Format
  • Yesterday Format
  • Rolling Time Format
  • Rolling Frequency
  • Time Offset Value

This parameters are needed when user does not have any means of retrieving data from a API with a given time window. Below are the cases where API architecture have shortfall in retrieving data

User needs to retrieve data between two time window. Example : From current timestamp to last 1 hour or last 15 minutes etc.

User needs to retrieve data from yesterday transaction only and the API does not provide any means to filter the yesterday's transactions dynamically

User needs to retrieve the data from today transaction only and the API does not provide any means to filter the today's transactions dynamically

User needs to retrieve the data by adjusting the Time Zone with the dataset time based attributes like create_date, update_date, invoice_date, due_date etc.

There are four reserved keywords which can be used in any API request to filter the time based data. These keywords can be used in API params, headers, JSON body, pre-requiest script etc. of any API request call

These four keywords are : today , yesterday, min_time, max_time


Today Format - A date format that returns the today's date. %Y-%m-%dT00:00:01ZUse the keyword today to use with any date field in dataset. For example: invoice_date = {%today%} then it will filter all transaction or records by today's date

Yesterday Format - A date format that returns previous days's date. %Y-%m-%dT00:00:01Z. Use the keyword yesterday to use with any date field in dataset. For example: invoice_date = {%yesterday%} then it will filter all transaction or records by yesterday's date

Rolling Time Format - A date format that matches with the date format of the date attribute which user needs to filter data based on time window. For example, user needs to filter and get the API response with all the invoices with invoice_date of past 15 minutes. So for such case the user will input the date format %Y-%m-%dT%H:%M:00.000 which is equivalent to date format of invoice_date

Use keywords min_time and max_time to define the time window of any API request. For example filter the invoice based on invoice_date as

invoice_date={%min_time%}&invoice_date={%max_time%}

GET https://example.com/api/orders?start_date={%min_time%}&end_date={%max_time%}

Rolling Frequency - The time window in seconds between the current timestamp and frequency input by user. Example : If 900 seconds is given then it will look for Rolling 15 minutes data based on invoice_date

Time Offset Value

A Time Offset Value typically refers to a numerical representation of the time difference between two points in time, often expressed in hours, minutes, and seconds. in API data source of eZintegrations , its in seconds This value is used to adjust or compare time between different time zones, measure time intervals, or calculate the time elapsed between two events.

Time offset values are essential for tasks such as time zone conversions, scheduling, and calculating the duration between two events, especially when those events occur in different time zones or involve time intervals. Time offset values are usually added to or subtracted from a reference time to obtain the adjusted time. For example, if you have a time in New York (EST) and want to convert it to Tokyo time (JST), you would apply a time offset of +9 hours (for the time difference between EST and JST).

Example 1 : Use of today and yesterday in Endpoint JSON Body of a API request

"query":"SELECT * FROM table_name WHERE column_name = '{%today%}' OR column_name = '{%yesterday%}'"

Example 2 : Use of min_time and max_time in Endpoint JSON body of a API request

"query":"SELECT * FROM table_name WHERE column_name BETWEEN '{%min_time%}' AND '{%max_time%}'"