Replace exact advertiser access for a buyer agent
curl --request PUT \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedAccessRevision": 4503599627370495,
"advertisers": [
{
"advertiserId": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access"
payload = {
"expectedAccessRevision": 4503599627370495,
"advertisers": [{ "advertiserId": "<string>" }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedAccessRevision: 4503599627370495,
advertisers: [{advertiserId: '<string>'}]
})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"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": {}
}
}{
"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": {}
}
}Buyer Agent Principals
Replace exact advertiser access for a buyer agent
Reconcile the buyer agent’s exact advertiser list. Missing advertisers are revoked and role changes revoke then create a new append-only grant row. Only a directly authenticated WorkOS organization administrator may call this endpoint; registration, credentials, membership, domains, and operator identity grant no advertiser access.
PUT
/
buyer-agent-principals
/
{principalId}
/
access
Replace exact advertiser access for a buyer agent
curl --request PUT \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedAccessRevision": 4503599627370495,
"advertisers": [
{
"advertiserId": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access"
payload = {
"expectedAccessRevision": 4503599627370495,
"advertisers": [{ "advertiserId": "<string>" }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedAccessRevision: 4503599627370495,
advertisers: [{advertiserId: '<string>'}]
})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"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": {}
}
}{
"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": {}
}
}Authorizations
API key or access token
Path Parameters
Pattern:
^prin_[A-Za-z0-9_-]{32}$Body
application/json