INRIX documentation logo DOCUMENTATION

/blocks

GET Get blocks in a given area.

Parameters

Name Located in Description Type
accesstoken query See Authorization documenation. A valid access token provided from either the GET appToken, signIn or refreshToken api response. String
id query If used, other Location parameters cannot be used. An 'id' can be a single lot id or multiple separated by | symbols." Integer
alias query If used, other Location parameters cannot be used. A pipe-delimited data source and lot id, eg: < data_source_key >|< lot_id > String
box query If used, other Location parameters cannot be used. 'box' specifies two lat/long pairs (using the WGS 84 datum) that outline a bounding box. The first lat/long pair should be the northwestern most point, and the second pair the southeastern most point, eg: < lat1 >|< long1 >,< lat2 >|< long2 >. String
point query Used to select a region based on a point and radius. If used, other Location parameters cannot be used, eg: < lat >|< long >. String
radius query Used to select a region based on a point and radius in meters. If 'radius' is used, 'point' must also be used and 'box' / 'geoid' cannot be used." Double
entry_time query yyyy-mm-ddTHH:MM:ss String
duration query Duration in minutes. Can be pipe delimited for multiple durations, eg: 60|120|720|1400 Integer
limit query Maximum number of elements to return from a large collection (for pagination). Integer
offset query Starting index within the requested collection (for pagination) Integer
outputfields query Comma separated list of output fields String
restrictions query Comma separated list of restriction IDs as returned from the Filters API String
locale query The locale as defined by ISO 15897, default: en-US String

Responses

200 block segments returned
{
    "result": [
        {
            "m_id": "9419",
            "name": "Virginia St from 4th Ave to 5th Ave",
            "probability": 77,
            "segments": [
                {
                    "start": 11,
                    "rateCards": [
                        "Each 12 Min (Mon-Sat; 09:00-23:00): €0.20",
                        "Max (Mon-Sat; 09:00-23:00): €6",
                        "Mon-Sat (23:00-09:00): Free",
                        "Sun: Free",
                        "Residential Permit Only: Free"
                    ],
                    "rateCard": "Each 12 Min (Mon-Sat; 09:00-23:00): €0.20\nMax (Mon-Sat; 09:00-23:00): €6\nMon-Sat (23:00-09:00): Free\nSun: Free\nResidential Permit Only: Free",
                    "calculatedRates": [
                        {
                            "rate_cost": 0,
                            "quoted_duration": "1:00:00",
                            "rate_type": "B"
                        }
                    ],
                    "structuredRates": [
                        {
                            "dow_start": 1,
                            "repeats": true,
                            "increment": 12,
                            "dow_end": 6,
                            "time_in": "09:00-23:00",
                            "rate": 0.2
                        },
                        {
                            "dow_start": 1,
                            "repeats": true,
                            "increment": 840,
                            "dow_end": 6,
                            "time_in": "09:00-23:00",
                            "rate": 6
                        },
                        {
                            "dow_end": 6,
                            "time_in": "23:00-09:00",
                            "rate": 0,
                            "dow_start": 1
                        },
                        {
                            "dow_end": 7,
                            "dow_start": 7,
                            "repeats": true,
                            "rate": 0,
                            "increment": 1440
                        },
                        {
                            "dow_end": 6,
                            "dow_start": 1,
                            "repeats": true,
                            "rate": 0,
                            "increment": 1440
                        }
                    ],
                    "isOpen": true,
                    "polyline6": "kjjyzAytaaUpOq[",
                    "spacesTotal": 8,
                    "side": "RIGHT",
                    "segmentID": "60d754de-d5e2-4008-8239-803a6b7e431d",
                    "polyline": "qvydH}mreAt@{A",
                    "end": 58
                }
            ],
            "blockID": "9419",
            "bucket": 2,
            "streetID": "cf333060-eb0d-4304-8d11-fd789b5bb832",
            "currency": "$",
            "i_flag": 1, // 1 = internal, 2 = street-dynamic, 3 = street-static
            "reservations": [],
            "polyline": "mlraHnpuiViCgD",
            "address": "Virginia St from 4th Ave to 5th Ave",
            "pmtTypes": [
                "Mc/Visa",
                "Amex",
                "Checks",
                "Discover"
            ],
            "photoThumbs": [
                "https://d13esfgglb25od.cloudfront.net/realtimeparking_media/core/img/default.png"
            ]
        }
     ]
}
Name Type Additional Info
m_id String minlength: 36, maxlength: 36
name String
probability Number, null
reservations Array
reservations[].monthly Boolean
reservations[].source String
reservations[].link String format: uri
reservations[].rate_card String
reservations[].href String format: uri
pmtTypes String
photoThumbs String format: uri
segments Array
segments[].end Number
segments[].isOpen Boolean, null
segments[].rateCard String, null
segments[].rateCards String
segments[].start Number
segments[].polyline String
segments[].polyline6 String
segments[].structuredRates Array
segments[].structuredRates[].dow_start Integer
segments[].structuredRates[].rate Number, null
segments[].structuredRates[].dow_end Integer
segments[].structuredRates[].increment Integer
segments[].structuredRates[].time_in String
segments[].structuredRates[].time_out String
segments[].structuredRates[].repeats Boolean
segments[].structuredRates[].additional Integer
segments[].structuredRates[].min Integer
segments[].structuredRates[].max Integer
segments[].side String
segments[].calculatedRates Array, null
segments[].calculatedRates[].quoted_duration String
segments[].calculatedRates[].rate_cost Number
segments[].calculatedRates[].rate_type String
segments[].segmentID String
segments[].spacesTotal Number
segments[].amenities Array
segments[].amenities[].id Integer
segments[].amenities[].name String
distance Number
i_flag Integer, null
blockID String
bucket Number, null
streetID String
currency String
polyline String
address String
operator String, null
geojson.type String
geojson.coordinates Array
geojson.coordinatesgeojson.coordinates[] Array
geojson.coordinatesgeojson.coordinates[][] Number
note String
amenities Array
amenities[].id Integer
amenities[].name String
400 Bad request
401 invalid or expired token
404 instance not found

POST Update details of a block or segment in a given area.


Description

The On-Street Parking API is used to return metadata information on one or more city blocks. The API can return a single block or a list of blocks in a geographic region. Each block will have a list of one or more parking “segments”, which will include information about rates / hours that parking is available, as well as number of spaces. Returned results can be additionally filtered by their metadata.

The API is queried at a Block level, but each block will have several ‘Segments’, which are what ends up being drawn on the parking map.

Blocks can be queried in a variety of ways, either by specifying ID’s or by querying a specific geographic region.

A typical workflow would be:

  1. On-Street Parking API
    • Request /blocks filtered by geography, availability, etc.
    • Receive {block} metadata – address, rates, occupancy, reviews, etc.
  2. Client – Iterate through segments for each block

Usage

BLOCK QUERIES

Block queries can be made as follows:

  1. Querying a single block for a known block id
  2. Querying a list of blocks by block id
  3. Querying a geographic region
    1. by a bounded box defined by four points
    2. by a circle defined by a point and radius

FILTERING AND PAGINATION

A maximum number of results to be returned can be defined. The list of results can be paginated i.e. return second list of 20 results.

Additional filtering must be defined in client logic after results are returned. A wealth of metadata is returned for each lot that might be used to further filter results.

SPACES TOTAL

The spacesTotal field returned by the API is specific to each segment. The number of spaces returned here reflects the number of actual spaces in the seg,emt, this does not take into account whether the street is currently available, “isOpen”, “No Parking”, etc., but an absolute measurement of spaces.

Example /blocks request

GET http://parking-api.inrix.com/blocks?box=47.617867|-122.352635,47.6085|-122.327074&accesstoken=YOURACCESSTOKEN HTTP/1.1
Host: parking-api.inrix.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: Bearer
INRIXClientAgent: