Refresh a hosted buyer-agent runtime token
curl --request POST \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Hosted-Buyer-Agent-Orchestrator: <api-key>' \
--data '
{
"installationId": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh"
payload = {
"installationId": "<string>",
"generation": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"X-Hosted-Buyer-Agent-Orchestrator": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Hosted-Buyer-Agent-Orchestrator': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({installationId: '<string>', generation: '<string>'})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"accessToken": "<string>",
"tokenType": "Bearer",
"expiresAt": "2023-11-07T05:31:56Z"
},
"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": {}
}
}Buyer Agent Principals
Refresh a hosted buyer-agent runtime token
The deployment-authenticated hosted runtime orchestrator replaces a short-lived identity-only runtime token for an active buyer-agent principal. It has the same claim restrictions and lifetime as minting.
POST
/
buyer-agent-principals
/
{principalId}
/
runtime-token
/
refresh
Refresh a hosted buyer-agent runtime token
curl --request POST \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Hosted-Buyer-Agent-Orchestrator: <api-key>' \
--data '
{
"installationId": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh"
payload = {
"installationId": "<string>",
"generation": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"X-Hosted-Buyer-Agent-Orchestrator": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Hosted-Buyer-Agent-Orchestrator': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({installationId: '<string>', generation: '<string>'})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"accessToken": "<string>",
"tokenType": "Bearer",
"expiresAt": "2023-11-07T05:31:56Z"
},
"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": {}
}
}Authorizations
API key or access token
Deployment-injected hosted runtime orchestrator credential.
Path Parameters
Pattern:
^prin_[A-Za-z0-9_-]{32}$Body
application/json