Get information about an affiliate link¶
Returns information about an affiliate link.
Authentication Required
Requires CAN_QUERY_AFFILIATE_LINKS
permission.
-
Arguments
subdomain
:graphene.String!
-
Returns
Example¶
const axios = require("axios")
// const apiUrl = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
const jwtToken = "PLACE_JWT_TOKEN_HERE"
let headers = {
"Authorization": `JWT ${jwtToken}`
}
const query = `
query getAffiliateLink($subdomain: String!) {
affiliateLink(subdomain: $subdomain) {
subdomain
contactName
contactEmail
landingUrl
organisation {
name
salesChannel
}
}
}
`
const variables = {
"subdomain": "testUser"
}
axios({
url: apiUrl,
method: "post",
data: {
query: query,
variables: variables,
},
headers: headers,
}).then((response) => {
console.log(JSON.stringify(response.data, null, 4));
});