Skip to content

Schedules

Manage driving schedules for vehicles.

Get List of Schedules

List of vehicle schedules available in account. Schedules are attached to vehicles and trigger permitted driving notifications, if enabled. A schedule can be any set of start/end times across a week. The recommended schedule is a weekday/weekend schedule.

GET

http
https://api.zubiecar.com/api/v2/zinc/schedules

Query Parameters

PropertyTypeDescription
cursorstringThe cursor string used for pagination, signifying the object ID where to start the results.
sizestringThe number of results to return per call. Defaults to 100 if not provided.
Sample response 200
json
{
  "schedules": [
    {
      "key": "SampleKey",
      "created": "2018-02-20 12:00:00",
      "updated": "2018-02-20 12:00:00",
      "category": "working_hours",
      "name": "Afternoons",
      "periods": [
        {
          "start": "2018-02-20 12:00:00",
          "end": "2018-02-20 18:00:00",
          "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
        }
      ]
    }
  ]
}

Create Schedule

Create a new schedule.

POST

http
https://api.zubiecar.com/api/v2/zinc/schedules

Request Body Schema

PropertyTypeDescription
categorystringType of schedule. Currently working_hours is supported.
namestringOptional name for this schedule. If not provided, will default to New Schedule.
periodsArray of objects requiredA list of objects that define a set of days/times for the schedule. Required to have 1 or more periods.
Sample request body
json
{
  "category": "working_hours",
  "name": "Afternoons",
  "periods": [
    {
      "start": "2018-02-20 12:00:00",
      "end": "2018-02-20 18:00:00",
      "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
    }
  ]
}

Get a Schedule

Retrieve a specific schedule.

GET POST

http
https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

Path Parameters

PropertyTypeDescription
schedule_keyrequiredUnique schedule key.
Sample response 200
json
{
  "key": "SampleKey",
  "created": "2018-02-20 12:00:00",
  "updated": "2018-02-20 12:00:00",
  "category": "working_hours",
  "name": "Afternoons",
  "periods": [
    {
      "start": "2018-02-20 12:00:00",
      "end": "2018-02-20 18:00:00",
      "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
    }
  ]
}

Update Schedule

Update a Schedule.

POST

http
https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

Path Parameters

PropertyTypeDescription
schedule_keyrequiredUnique schedule key.

Request Body Schema

PropertyTypeDescription
categorystringType of schedule. Currently working_hours is supported.
namestringOptional name for this schedule. If not provided, will default to New Schedule.
periodsArray of objects requiredA list of objects that define a set of days/times for the schedule. Required to have 1 or more periods.
Sample request body
json
{
  "category": "working_hours",
  "name": "Afternoons",
  "periods": [
    {
      "start": "2018-02-20 12:00:00",
      "end": "2018-02-20 18:00:00",
      "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
    }
  ]
}

Delete Schedule

Deactivates a schedule. Schedule should be removed from vehicles first.

DELETE

http
https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

Path Parameters

PropertyTypeDescription
schedule_keyrequiredUnique schedule key.