curl --request GET \
--url https://api.interchange.io/api/v2/buyer-agent-principals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"operator": {
"principalId": "<string>",
"principalKind": "operator",
"displayName": "<string>",
"lifecycleState": "active",
"registeredAt": "2023-11-07T05:31:56Z",
"authority": {
"advertiserAccountIds": [
"<unknown>"
],
"permissions": [
"<unknown>"
]
}
},
"buyerAgents": [
{
"principalId": "<string>",
"principalKind": "buyer_agent",
"displayName": "<string>",
"lifecycleState": "active",
"registeredAt": "2023-11-07T05:31:56Z",
"activeCredentialCount": 4503599627370495,
"credentials": [
{
"credentialRef": "<string>",
"credentialType": "workos_m2m",
"bindingState": "active",
"administrationHandle": {
"type": "workos_m2m",
"subject": "<string>"
},
"boundAt": "2023-11-07T05:31:56Z",
"lastVerifiedAt": "2023-11-07T05:31:56Z",
"retiredAt": "2023-11-07T05:31:56Z"
}
],
"authority": {
"advertiserAccountIds": [
"<unknown>"
],
"permissions": [
"<unknown>"
]
},
"access": {
"accessRevision": 4503599627370495,
"advertisers": [
{
"advertiserId": "<string>",
"name": "<string>",
"role": "READ"
}
]
}
}
]
},
"error": null
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}List the organization's Interchange principals
Return the organization’s operator principal and every buyer-agent principal it owns, with each buyer agent’s safe credential facts and exact active advertiser access. A directly authenticated WorkOS organization administrator is required; impersonated, simulated, delegated, service-credential, advertiser-scoped, and cross-organization callers are refused. The organization boundary is derived from the authenticated context, never from the request. No credential secret is returned, and issuer URLs, WorkOS organization IDs, access client IDs, operator domains, brand.json/JWKS URLs, key IDs, and key fingerprints are credential facts that are never principal identity and are not returned here. Operator and buyer-agent principals are separate collections, and the operator carries no credentials, so no credential lifecycle action can be expressed against it. Registration and credential facts do not grant advertiser, account, spend, payment, or Terms access.
curl --request GET \
--url https://api.interchange.io/api/v2/buyer-agent-principals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"operator": {
"principalId": "<string>",
"principalKind": "operator",
"displayName": "<string>",
"lifecycleState": "active",
"registeredAt": "2023-11-07T05:31:56Z",
"authority": {
"advertiserAccountIds": [
"<unknown>"
],
"permissions": [
"<unknown>"
]
}
},
"buyerAgents": [
{
"principalId": "<string>",
"principalKind": "buyer_agent",
"displayName": "<string>",
"lifecycleState": "active",
"registeredAt": "2023-11-07T05:31:56Z",
"activeCredentialCount": 4503599627370495,
"credentials": [
{
"credentialRef": "<string>",
"credentialType": "workos_m2m",
"bindingState": "active",
"administrationHandle": {
"type": "workos_m2m",
"subject": "<string>"
},
"boundAt": "2023-11-07T05:31:56Z",
"lastVerifiedAt": "2023-11-07T05:31:56Z",
"retiredAt": "2023-11-07T05:31:56Z"
}
],
"authority": {
"advertiserAccountIds": [
"<unknown>"
],
"permissions": [
"<unknown>"
]
},
"access": {
"accessRevision": 4503599627370495,
"advertisers": [
{
"advertiserId": "<string>",
"name": "<string>",
"role": "READ"
}
]
}
}
]
},
"error": null
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}