Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can find more information about the Parking session duration API here.

Working Hours

Working hours are the hours of operation for a given zone. Different zones can have different hours of operation for their parking spaces. Working hours are necessary to define the time boundaries for calculating analytics. Working hours API provides a way of retrieving and updating working hours.

Updating working hours

In order to update the working hours of the zone, you need to provide a list of days as well as the start and finish of the working hours period.

Example of request that updates working hours for zone with id 3:

Code Block
languagebash
curl -v \
  -H 'x-Auth-Token: 1234567890ABCDEF' \
  -X POST \
  -d '{"day_of_week": ["mon"], "start_hours": "08:00:00", "finish_hours": "20:00:00"}' \
  'https://api.nwave.io/analytics/v1/working_hours/3'

Response

Code Block
languagejson
{
  "day_of_week": ["mon"], 
  "start_hours": "08:00:00", 
  "finish_hours": "20:00:00"
}

You can find more information about the Working Hours API here.

Getting working hours

There are two ways you can retrieve working hours.

  1. For an individual zone

  2. For a list a filtered list of zones

Getting working hours for a zone

Example of retrieving working hours for zone with id 3:

Code Block
languagebash
curl -v \
  -H 'x-Auth-Token: 1234567890ABCDEF' \
  'https://api.nwave.io/analytics/v1/working_hours/3'

Response

Code Block
languagejson
{
  "day_of_week": ["mon"], 
  "start_hours": "08:00:00", 
  "finish_hours": "20:00:00"
}

Getting working hours with filters

API provides the following optional filters:

  • Project

    • Project ID

  • Zone

    • Zone ID

Example request that filter by project with id 1 and zone with 2:

Code Block
languagebash
curl -v \
  -H 'x-Auth-Token: 1234567890ABCDEF' \
  'https://api.nwave.io/analytics/v1/working_hours?proect_id=1&zone_id=2'

Response

Code Block
languagejson
{
  "zone_id": 314,
  "day_of_week": ["mon"], 
  "start_hours": "08:00:00", 
  "finish_hours": "20:00:00"
}

You can find more information about the Working Hours API here.