# List programs

By default, this endpoint returns all programs in our system and does not require authentication. The `coordinates`, `postal_code` and `country_code` query parameters can be used to narrow the list down to just programs eligible for particular locations. Coordinates and postal code searching are mutually exclusive and mixing the query parameters will result in a 400 error response.
If the client is authenticated as a specific user (either via Authorisation Code grant type or the `EvEnergy-User` header) it will return only programs that user is possibly eligible for, based on the location information we have for them.
Programs flagged `hidden` (test, internal, ended or mothballed programs) are omitted for anonymous and user-scoped requests. Organisation-scoped clients (Client Credentials grant linked to an organisation) receive every program, each carrying its `hidden` value. A hidden program can still be retrieved by ID.

Endpoint: GET /programs
Version: 2.0
Security: oauth2

## Query parameters:

  - `coordinates` (string)
    Filter the returned programs to only those available to someone who primarily charges their vehicles at these coordinates.

  - `postal_code` (string)
    Filter the returned programs to only those available to someone someone who primarily charges their vehicles in this postal code area. The postal code needs to be in the correct format for the country specified by `country_code`.

  - `country_code` (string)
    Specify the country the postal code is within. Required if postal_code is used.

## Header parameters:

  - `EvEnergy-Version` (number)
    Specify the version of this endpoint to use.

  - `EvEnergy-User` (string)
    If the client is authenticated using Client Credentials, setting EvEnergy-User to a valid user ID allows requests to be made as if you were directly authenticated as that user.

## Response 200:

  - `200` (unknown)
    Returns 0 or more Programs.

## Response 200 fields (application/json):

  - `id` (string)
    Example: prog01JCK1HPNAANB8WN253G27SFPC

  - `url` (string)
    Example: https://api.ev.energy/v2/programs/prog01JCK1HPNAANB8WN253G27SFPC

  - `name` (string)
    A human-friendly name for the Program.
    Example: CoolCharge

  - `description` (string)
    A plain text description of the program's incentives and requirements.
    Example: A program which incentivises charging when it's coolest to charge your EV

  - `logo` (string | null)
    URL to download a logo image for the Program.

  - `sponsor_name` (string)
    The name of the organisation which sponsors the program. Often, but not always, a utility company.
    Example: Cool Power

  - `external_url` (string)
    A publicly accessible URL where individuals can enroll in the program.
    Example: https://www.example.com/coolcharge

  - `sign_up_url` (string | null)
    URL of the registration form for this specific program, where one exists.
    Example: https://www.example.com/coolcharge/sign-up

  - `eligibility_criteria` (string | null)
    HTML description of who is eligible to join the program.
    Example: <html><p>Residential customers of Cool Power with a compatible EV or home charger.</p></html>

  - `benefits` (string | null)
    HTML description of the benefits of joining the program.
    Example: <html><p>Earn a monthly bill credit for charging off-peak.</p></html>

  - `country` (string)
    ISO 3166-1 alpha-2 code of the country the program operates in.
    Example: US

  - `faqs_url` (string | null)
    URL of the program's FAQ page, where one exists.
    Example: https://www.example.com/coolcharge/faqs

  - `support_email` (string)
    Customer support email address for this program.
    Example: support@ev.energy

  - `payment_frequency` (string | null)
    How often incentive payments are made, where the program pays incentives.
    Enum: "WEEKLY", "MONTHLY", "QUARTERLY", "null"

  - `payment_day_of_month` (integer | null)
    Day of the month incentive payments are made, for monthly or quarterly programs. 31 means the last day of the month. Null when the program has no payment day configured.
    Example: 15

  - `payment_weekday` (string | null)
    Day of the week incentive payments are made, for weekly programs. Null when the program has no payment weekday configured.
    Enum: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", "null"

  - `hidden` (boolean)
    Whether the program is hidden from public program lists. Hidden programs (test, internal, ended or mothballed) are omitted from the list endpoint for anonymous and driver-scoped requests, but are still returned by ID and are always listed for organisation-scoped API clients.
    Example: false

## Response 200 headers (application/json):

  - `Link` (string)
    Provides links to the previous and next pages of data, if they exist.
    Example: <https://api.ev.energy/v2/vehicles?page_size=25&page_before=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H>; rel="previous", <https://api.ev.energy/v2/vehicles?page_size=25&page_after=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H>;…

  - `EvEnergy-Version` (number)
    Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.
    Enum: "2"

  - `X-RateLimit-Limit` (number)
    The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

  - `X-RateLimit-Remaining` (number)
    The number of requests remaining until this client's rate limit is reached.

  - `RetryAfter` (number)
    The number of seconds until this client's requests will not be rate limited.

## Response 400:

  - `400` (unknown)
    A problem with the request's parameters prevented it being fulfilled.

## Response 400 fields (application/problem+json):

  - `type` (string)
    Example: https://api.ev.energy/v2/problems/example-problem/

  - `status` (number)
    Example: 400

  - `title` (string, required)
    Example: Short description

  - `detail` (string, required)
    Example: Long, more specific description.

  - `instance` (string)
    Example: https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E

  - `notification` (object)
    Something that the user should be informed about.

  - `notification.id` (string, required)
    Unique identifier for the Notification
    Example: notf67O36PLTFDB57M0E5L33JZLGM0

  - `notification.url` (string, required)
    Example: https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0

  - `notification.message_id` (string, required)
    Internal identifier for this notification type. E.g. 'ERR0023'

  - `notification.category` (string, required)
    Category of this notification type
    Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL"

  - `notification.event_time` (string, required)
    The timestamp of the event described by this notification

  - `notification.short_text_title` (string, required)
    Short title for the notification

  - `notification.short_text_body` (string, required)
    Short description of the event being notified

  - `notification.detail_page_title` (string, required)
    Title of a help page giving more information about this notification

  - `notification.detail_page_body` (string, required)
    Text of a help page giving more information about this notification

  - `notification.external_link` (string | null, required)
    URL of a web page giving further information about this notification

  - `notification.external_button_label` (string, required)
    Text to be displayed on a button leading to the external_link location

  - `notification.read_at` (string)
    When the user examined the contents of this notification

  - `notification.resolved_at` (string)
    When the problem associated with this notification was resolved

## Response 400 headers (application/problem+json):

  - `EvEnergy-Version` (number)
    Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.
    Enum: "2"

  - `X-RateLimit-Limit` (number)
    The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

  - `X-RateLimit-Remaining` (number)
    The number of requests remaining until this client's rate limit is reached.

  - `RetryAfter` (number)
    The number of seconds until this client's requests will not be rate limited.

## Response 401:

  - `401` (unknown)
    You need to authorise requests to access this resource.

## Response 401 fields (application/problem+json):

  - `status` (number)
    Example: 401

  - `title` (string, required)
    Example: Unauthorized

  - `detail` (string, required)
    Example: Authentication credentials were not provided.

## Response 401 headers (application/problem+json):

  - `EvEnergy-Version` (number)
    Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.
    Enum: "2"

  - `X-RateLimit-Limit` (number)
    The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

  - `X-RateLimit-Remaining` (number)
    The number of requests remaining until this client's rate limit is reached.

  - `RetryAfter` (number)
    The number of seconds until this client's requests will not be rate limited.

## Response 403:

  - `403` (unknown)
    You do not have permission to perform this action.

## Response 403 fields (application/problem+json):

  - `status` (number)
    Example: 403

  - `title` (string, required)
    Example: Forbidden

  - `detail` (string, required)
    Example: You do not have permission to perform this action.

## Response 403 headers (application/problem+json):

  - `EvEnergy-Version` (number)
    Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.
    Enum: "2"

  - `X-RateLimit-Limit` (number)
    The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

  - `X-RateLimit-Remaining` (number)
    The number of requests remaining until this client's rate limit is reached.

  - `RetryAfter` (number)
    The number of seconds until this client's requests will not be rate limited.

## Response 429:

  - `429` (unknown)
    The client has exceeded its rate limit.

## Response 429 fields (application/problem+json):

  - `type` (string)
    Example: https://api.ev.energy/v2/problems/example-problem/

  - `status` (number)
    Example: 400

  - `title` (string, required)
    Example: Short description

  - `detail` (string, required)
    Example: Long, more specific description.

  - `instance` (string)
    Example: https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E

  - `notification` (object)
    Something that the user should be informed about.

  - `notification.id` (string, required)
    Unique identifier for the Notification
    Example: notf67O36PLTFDB57M0E5L33JZLGM0

  - `notification.url` (string, required)
    Example: https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0

  - `notification.message_id` (string, required)
    Internal identifier for this notification type. E.g. 'ERR0023'

  - `notification.category` (string, required)
    Category of this notification type
    Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL"

  - `notification.event_time` (string, required)
    The timestamp of the event described by this notification

  - `notification.short_text_title` (string, required)
    Short title for the notification

  - `notification.short_text_body` (string, required)
    Short description of the event being notified

  - `notification.detail_page_title` (string, required)
    Title of a help page giving more information about this notification

  - `notification.detail_page_body` (string, required)
    Text of a help page giving more information about this notification

  - `notification.external_link` (string | null, required)
    URL of a web page giving further information about this notification

  - `notification.external_button_label` (string, required)
    Text to be displayed on a button leading to the external_link location

  - `notification.read_at` (string)
    When the user examined the contents of this notification

  - `notification.resolved_at` (string)
    When the problem associated with this notification was resolved

## Response 429 headers (application/problem+json):

  - `EvEnergy-Version` (number)
    Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.
    Enum: "2"

  - `Retry-After` (number)
    The number of seconds until this client's requests will not be rate limited.

  - `X-RateLimit-Limit` (number)
    The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

  - `X-RateLimit-Remaining` (number)
    The number of requests remaining until this client's rate limit is reached.

## Response 400 examples:

  - `Invalid Pagination Parameter` (unknown)

  - `Unsupported Version` (unknown)

## Response 429 examples:

  - `Example 1` (unknown)

