Maintenance Windows

GET /api/maintenance-windows

Retrieve a paginated list of maintenance windows across your chargers. For parent organization API keys, this returns maintenance windows for all child organizations.

Parameters

Parameters should be passed as query parameters on the URL.

  • afterTimestamp - ISO 8601 date string. Returns maintenance windows that overlap with the time after this point (i.e. windows whose end time is after this timestamp)

  • beforeTimestamp - ISO 8601 date string. Returns maintenance windows that overlap with the time before this point (i.e. windows whose start time is before this timestamp). When used together with afterTimestamp, returns windows overlapping the [afterTimestamp, beforeTimestamp] range.

  • chargerIds - Filter to maintenance windows for specific charger IDs. To filter by multiple chargers, repeat the parameter: &chargerIds=1&chargerIds=2. When combined with siteIds, only chargers matching both filters are returned.

  • siteIds - Filter to maintenance windows for chargers at specific site IDs. To filter by multiple sites, repeat the parameter: &siteIds=1&siteIds=2. When combined with chargerIds, only chargers matching both filters are returned.

  • organizationIds - Filter to maintenance windows for specific organization IDs (only applicable for parent organization API keys). To filter by multiple organizations, repeat the parameter: &organizationIds=1&organizationIds=2. Requested IDs are intersected with the organizations accessible by the API key.

  • nextPageCursor - When the filters match more than one page of data, pass this parameter to fetch the next page

Response

The JSON response will contain a data field with a list of maintenance windows matching the filters (up to 50 per page), and a pagination field containing pagination details.

{
  data: {
    id: number;
    startTimestamp: string; // ISO 8601 format
    endTimestamp: string; // ISO 8601 format
    comment: string | null;
    userEmail: string; // Email of the user who created the window
    createdAt: string; // ISO 8601 format
    updatedAt: string; // ISO 8601 format
    charger: {
      id: number;
      name: string;
      manufacturer: string | null;
      model: string | null;
      networkServiceProvider: string;
      chargerType: string;
      serialNumber: string | null;
      numberOfPorts: number;
      latitude: number | null;
      longitude: number | null;
      externalId: string | null;
      ocppId: string | null;
    };
    site: {
      id: number;
      name: string;
      locationId: string | null;
    };
    organization: {
      id: number;
      name: string;
    };
  }[];
  pagination: {
    hasNextPage: boolean;
    nextPageCursor: string | null;
  };
}

Example request and response

Request all maintenance windows:

Request maintenance windows overlapping a date range:

Request maintenance windows for specific chargers:

Request maintenance windows for a specific child organization (parent org API key):

Response:

Last updated