Skip to content

Add credit score for an account

Authentication Required

Requires CAN_CREATE_SHELL_ACCOUNTS and CAN_ADD_PROPERTIES_TO_SHELL_ACCOUNTS permissions.

Arguments

Returns

1
2
3
4
5
mutation storeCreditScore($input: StoreCreditScoreInputType!) {
    storeCreditScore(input: $input) {
        result
    }
}
# Input variables
{
    "input": {
        "accountNumber": "",
        "score": ,
        "fraudDetectionHash:""
        "fraudAlerts":[{code:"", description:""}]
        "riskBracket": ""
    }
}

Example

1
2
3
4
5
mutation storeCreditScore($input: StoreCreditScoreInputType!) {
    storeCreditScore(input: $input) {
        result
    }
}
# Input variables
{
    "input": {
        "accountNumber": "A-123ABCDEF",
        "score": 760,
        "fraudDetectionHash:""
        "fraudAlerts":[{code:"123", description:"Some description"}]
        "riskBracket": "LOW"
    }
}
import pprint

import requests

# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # test
JWT_TOKEN = "PLACE_JWT_TOKEN_HERE"
HEADERS = {
    "Authorization": f"JWT {JWT_TOKEN}"
}

MUTATION = """
    mutation storeCreditScore($input: StoreCreditScoreInputType!) {
        storeCreditScore(input: $input) {
            result
        }
    }
"""

VARIABLES = {
    "input": {
        "accountNumber": "A-123ABCDEF",
        "score": 760,
        "fraudDetectionHash:"abc"
        "fraudAlerts":[{code:"123", description:"Some description"}]
        "riskBracket": "LOW"
    }
}

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
{
    "data":{
        "storeCreditScore": {
            "result": True
         }
    }
}
Back to top