getTokensByDate()
getTokensByDate() API returns up to 10,000 tokens created on or before the specified date, or between a specific date range.
Syntax
public String[] getTokensByDate (String customData, Calendar calendarDate, String table) throws TokenException
public String[] getTokensByDate (String customData, Calendar startDate, Calendar endDate, String table, int columnIdentifier) throws TokenException
Request Parameters
| Parameters | Data Types | Descriptions | 
|---|---|---|
| customData | string | Customer-specific data. Note: For My SQL, if the customData parameter is null or empty, then the getTokensByDate() API returns results for all customData values in token vault. | 
| calendarDate | calendar | A valid calendar date. | 
| startDate | calendar | A valid calendar date starting from which the tokens are required. | 
| endDate | calendar | A valid calendar date till which the tokens are required. Note: The first month of the year i.e. January starts with 0. For example: Calendar cal = Calendar.getInstance();cal.set(2017,8, 30);In the above example, the tokens are required till 30th September 2017. | 
| table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. | 
| columnIdentifier | integer | The particular column which is required as a criterion for searching tokens. Valid value can be either creation date or last accessed date. | 
Returned Values
Returned array of token(s).
Exception
Throws TokenException if:
- Table or date are missing. 
- A customData element is too long or too short. 
Example
getTokensByDate(null, endDate, "CREDIT_CARD_NUMBERS").
getTokensByDate(“customData”, startDate, endDate, dbTable, TokenService.LAST_ACCESS_DATE);
getTokensByDate(“customData”, startDate, endDate, dbTable, TokenService.CREATION_DATE);