Skip to content

Get Account Created By Affiliate

Returns basic information related to the account that was created by the affiliate.

Authentication Required

Requires CAN_CREATE_ACCOUNTS permission.

Arguments

Returns

1
2
3
4
5
6
7
query getAccountCreatedByAffiliateInformation($input:AccountCreatedByAffiliateInput!){
    getAccountCreatedByAffiliate(input:$input){
        accountNumber
        emailAddress
        meterPointStatus
    }
}
1
2
3
4
5
# Input variables
{
  "accountNumber":"",
  "emailAddress":"",
}

Using account number

1
2
3
4
5
6
7
query getAccountCreatedByAffiliateInformation($input:AccountCreatedByAffiliateInput!){
    getAccountCreatedByAffiliate(input:$input){
        accountNumber
        emailAddress
        meterPointStatus
    }
}
1
2
3
4
# Input variables
{
  "accountNumber":"A-12345"
}
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 getAccountCreatedByAffiliateInformation($input:AccountCreatedByAffiliateInput!){
        getAccountCreatedByAffiliate(input:$input){
            accountNumber
            emailAddress
            meterPointStatus
        }
    }
"""

VARIABLES = {
    "accountNumber": "A-12345"
}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())
1
2
3
4
5
6
7
8
9
{
    "data": {
        "getAccountCreatedByAffiliate": {
            "accountNumber": "A-12345",
            "emailAddress":"user@example.com",
            "meterPointStatus": "ON_SUPPLY"
        }
    }
}

Using email address

1
2
3
4
5
6
7
query getAccountCreatedByAffiliateInformation($input:AccountCreatedByAffiliateInput!){
    getAccountCreatedByAffiliate(input:$input){
        accountNumber
        emailAddress
        meterPointStatus
    }
}
1
2
3
4
# Input variables
{
  "emailAddress":"user@example.com"
}
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 getAccountCreatedByAffiliateInformation($input:AccountCreatedByAffiliateInput!){
        getAccountCreatedByAffiliate(input:$input){
            accountNumber
            emailAddress
            meterPointStatus
        }
    }
"""

VARIABLES = {
    "emailAddress": "user@example.com"
}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())
1
2
3
4
5
6
7
8
9
{
    "data": {
        "getAccountCreatedByAffiliate": {
            "accountNumber": "A-12345",
            "emailAddress":"user@example.com",
            "meterPointStatus": "ON_SUPPLY"
        }
    }
}
Expected error messages
  • UNAUTHORIZED
    • If the given account number or email address invalid/not found.
  • You do not have the permission to access this account's details.
    • If your organization does not have access to view this account's information.
Back to top