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 YOUR_SECRET_TOKEN
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-999Pattern: ^[a-zA-Z0-9_-]*$datetime in ISO 8601 format
2023-06-15T09:30:00Zdatetime in ISO 8601 format
2023-06-15T09:30:00ZUsed as discriminator
Short name to uniquely identify program.
ResTOULong name of program for human readability.
nullExample: Residential Time of Use-AShort name of energy retailer providing the program.
nullExample: ACMELong name of energy retailer for human readability.
nullExample: ACME Electric Inc.A program defined categorization.
nullExample: PRICING_TARIFFAlpha-2 code per ISO 3166-1.
nullExample: USCoding per ISO 3166-2. E.g. state in US.
nullExample: COduration in ISO 8601 format
PT0SExample: PT1HPattern: ^(-?)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.
nullExample: falseTrue if events have been adapted from a grid event.
nullExample: falseCreated.
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 YOUR_SECRET_TOKEN
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-999Pattern: ^[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 YOUR_SECRET_TOKEN
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-999Pattern: ^[a-zA-Z0-9_-]*$Provides program specific metadata from VTN to VEN.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$datetime in ISO 8601 format
2023-06-15T09:30:00Zdatetime in ISO 8601 format
2023-06-15T09:30:00ZUsed as discriminator
Short name to uniquely identify program.
ResTOULong name of program for human readability.
nullExample: Residential Time of Use-AShort name of energy retailer providing the program.
nullExample: ACMELong name of energy retailer for human readability.
nullExample: ACME Electric Inc.A program defined categorization.
nullExample: PRICING_TARIFFAlpha-2 code per ISO 3166-1.
nullExample: USCoding per ISO 3166-2. E.g. state in US.
nullExample: COduration in ISO 8601 format
PT0SExample: PT1HPattern: ^(-?)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.
nullExample: falseTrue if events have been adapted from a grid event.
nullExample: falseOK.
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 YOUR_SECRET_TOKEN
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-999Pattern: ^[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 YOUR_SECRET_TOKEN
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?