Programs
List all programs known to the server. May filter results by targetType and targetValues as query params. Use skip and pagination query params to limit response size.
Indicates targeting type, e.g. GROUP
List of target values, e.g. group names
number of records to skip for pagination.
maximum number of records to return.
OK.
Bad Request.
Forbidden.
Internal Server Error.
GET /api/openadr/v1/programs HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
[
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
Create a new program in the server.
Provides program specific metadata from VTN to VEN.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
datetime in ISO 8601 format
2023-06-15T09:30:00Z
datetime in ISO 8601 format
2023-06-15T09:30:00Z
Used as discriminator
Short name to uniquely identify program.
ResTOU
Long name of program for human readability.
null
Example: Residential Time of Use-A
Short name of energy retailer providing the program.
null
Example: ACME
Long name of energy retailer for human readability.
null
Example: ACME Electric Inc.
A program defined categorization.
null
Example: PRICING_TARIFF
Alpha-2 code per ISO 3166-1.
null
Example: US
Coding per ISO 3166-2. E.g. state in US.
null
Example: CO
duration in ISO 8601 format
PT0S
Example: PT1H
Pattern: ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
True if events are fixed once transmitted.
null
Example: false
True if events have been adapted from a grid event.
null
Example: false
Created.
Bad Request.
Forbidden.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
POST /api/openadr/v1/programs HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 679
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Fetch the program specified by the programID in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
OK.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
GET /api/openadr/v1/programs/{programID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Update an existing program with the programID in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
Provides program specific metadata from VTN to VEN.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
datetime in ISO 8601 format
2023-06-15T09:30:00Z
datetime in ISO 8601 format
2023-06-15T09:30:00Z
Used as discriminator
Short name to uniquely identify program.
ResTOU
Long name of program for human readability.
null
Example: Residential Time of Use-A
Short name of energy retailer providing the program.
null
Example: ACME
Long name of energy retailer for human readability.
null
Example: ACME Electric Inc.
A program defined categorization.
null
Example: PRICING_TARIFF
Alpha-2 code per ISO 3166-1.
null
Example: US
Coding per ISO 3166-2. E.g. state in US.
null
Example: CO
duration in ISO 8601 format
PT0S
Example: PT1H
Pattern: ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
True if events are fixed once transmitted.
null
Example: false
True if events have been adapted from a grid event.
null
Example: false
OK.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
PUT /api/openadr/v1/programs/{programID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 679
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Delete an existing program with the programID in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
OK.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
DELETE /api/openadr/v1/programs/{programID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "PROGRAM",
"programName": "ResTOU",
"programLongName": "Residential Time of Use-A",
"retailerName": "ACME",
"retailerLongName": "ACME Electric Inc.",
"programType": "PRICING_TARIFF",
"country": "US",
"principalSubdivision": "CO",
"timeZoneOffset": "PT1H",
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"programDescriptions": [],
"bindingEvents": false,
"localPrice": false,
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Was this helpful?