Skip to content

Get product using its display name

Returns a product if its display name matches with the given string.

Authentication not required

products does not require authentication.

Arguments

  • displayName: String

Returns

query getProductUsingDisplayName($displayName:String!){
    products(displayName:$displayName){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}

Example

query getProductUsingDisplayName($displayName:String!){
    products(displayName:$displayName){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}
1
2
3
4
# Input Variables
{
  "displayName":"Octo 36"
}
import pprint

import requests

# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # Prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # Test
HEADERS = {}

QUERY = """
query getProductUsingDisplayName($displayName:String!){
    products(displayName:$displayName){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}
"""

VARIABLES = {"displayName": "Octo 36"}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())
const axios = require("axios")

// const API_URL = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
let headers = {'content-type': 'application/json'}

const query = `
  query getProductUsingDisplayName($displayName:String!){
      products(displayName:$displayName){
          id
          availableFrom
          availableTo
          availabilityStatus
          autoTopUpDefaultAmount
          autoTopUpMinimumAmount
          basedOnTimeOfUse
          code
          description
          displayName
          fullName
          generationCredit
          isWholesale
          marketName
          notes
          prepay
          term
          termsContractType
      }
  }
`
const variables = {
  "displayName":"Octo 36"
}

axios({
  url: apiUrl,
  method: "post",
  data: {
    query: query,
    variables: variables,
  },
  headers: headers,
}).then((response) => {
  console.log(JSON.stringify(response.data, null, 4));
});
import axios from 'axios';

// const API_URL = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
export const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
let headers = {'content-type': 'application/json'}

export const query = `
  query getProductUsingDisplayName($displayName:String!){
      products(displayName:$displayName){
          id
          availableFrom
          availableTo
          availabilityStatus
          autoTopUpDefaultAmount
          autoTopUpMinimumAmount
          basedOnTimeOfUse
          code
          description
          displayName
          fullName
          generationCredit
          isWholesale
          marketName
          notes
          prepay
          term
          termsContractType
      }
  }
`

export const variables = {
    "displayName": "Octo 36"
}

axios({
  url: apiUrl,
  method: "post",
  data: {
    query: query,
    variables: variables,
  },
  headers: headers,
}).then((response) => {
  console.log(JSON.stringify(response.data, null, 4));
});
{
    "data": {
        "products": [
            {
                "id": "36",
                "availableFrom": "2021-12-10T00:00:00-06:00",
                "availableTo": null,
                "availabilityStatus": "PUBLIC",
                "autoTopUpDefaultAmount": null,
                "autoTopUpMinimumAmount": null,
                "basedOnTimeOfUse": false,
                "code": "OCTOPLUS-36M",
                "description": "Prepaid plan 36-months fixed-rate, no exit fees",
                "displayName": "Octo 36",
                "fullName": "Octo 36",
                "generationCredit": false,
                "isWholesale": false,
                "marketName": "USA_ERCOT_ELECTRICITY",
                "notes": "",
                "prepay": false,
                "term": 36,
                "termsContractType": ""
            }
        ]
    }
}
Back to top