Common Objects
Contents
JSON objects that describe things such as addresses and longitude/latitude coordinates are used in POST method calls to multiple APIs. The tables below describe several of those common JSON objects.
Address
Data Element | Description | Data Type | Value/Example |
---|---|---|---|
StreetAddress
| The house number and street name |
string | 495 Walker Road |
City
| The name of the city |
string | Endicott |
State
| The two letter state abbreviation |
string | NY |
Zip
| The postal code or zip |
string | 13760 |
County
| The county or jurisdiction. |
string | Broome |
Country
| The name of the country |
string | United States |
SPLC
| The Standard Point Location code to use in place of street/city/state/zip |
string | 656972001 |
CountryPostalFilter
| The postal code filter; use this to filter zip codes by country |
Enum | Us Em Both |
AbbreviationFormat
| The abbreviation format for the country code. This is not applicable for NA dataset |
Enum | FIPS ISO2 ISO3 |
StateName
| The full name of the state. |
string | Pennsylvania |
StateAbbreviation
| Abbreviated state code corresponding to requested format. |
string | PA |
CountryAbbreviation
| Abbreviated country code corresponding to requested format. |
string | CA |
Example
"Address": {
"StreetAddress": "1400 John F Kennedy Blvd",
"City": "Philadelphia",
"State": "PA",
"Zip": "19107",
"County": "Philadelphia",
"Country": "United States",
"SPLC": null,
"CountryPostalFilter": 0,
"AbbreviationFormat": 0,
"StateName": "Pennsylvania",
"StateAbbreviation": "PA",
"CountryAbbreviation": "US"
},
Coords
Data Element | Description | Data Type | Value/Example |
---|---|---|---|
Lat
| Latitude |
string | 42.12345 |
Lon
| Longitude |
string | -76.12345 |
Example
"Coords": {
"Lat": "39.965177",
"Lon": "-75.152564"
},
EstimatedTimeOptions
Data Element | Description | Data Type | Value/Example |
---|---|---|---|
ETAETD
| Whether you want to set an arrival or a departure time for your trip. |
boolean | 0 for Arrival1 for Departure
|
DateOption
| How you want to specify your arrival or departure time. |
Enum | 0 for Current time1 for Specific time2 for DayOfWeek.
|
DateAndTime
| An object with the following values: CalendarDate , DayOfWeek , TimeOfDay , TimeZone
|
object | |
CalendarDate
| A string value for the month, day and year in the following format mm/dd/yyyy . DateOption must be set to 1 for this value to be used.
|
string | 3/23/2024 |
DayOfWeek
| Day of the week, starting at 0 - Sunday, 1 - Monday, 2 - Tuesday and so on. DateOption must be set to 2 for this value to be used.
|
Enum | 2 |
TimeOfDay
| A string value for the time in the format hh:mm AM/PM .
|
string | 6:00 AM |
TimeZone
| Set to 0 for local time. Other supported time zones can be found here. When setting a departure time, if the request is sent in the same time zone as the first stop (origin of the trip), within 15 minutes of the current time, the current time will be returned in the response.
|
Enum | 2 |
Example
"EstimatedTimeOptions": {
"ETAETD": 1,
"DateOption": 0,
"DateAndTime": {
"CalendarDate": "3/23/2024",
"DayOfWeek": 3,
"TimeOfDay": "07:00 AM",
"TimeZone": 0
}
},