curl --request POST \
--url https://api.interchange.io/api/v2/storefront/acceptance-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/acceptance-policy"
payload = { "content": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/acceptance-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "42",
"storefrontId": "1234",
"version": 3,
"content": "<string>",
"notes": "<string>",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}{
"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": {}
}
}Create a new acceptance-policy version
Author a new immutable acceptance-policy version. Version allocation is serialized per storefront. Pass activate: true to create the version and swap the storefront’s active-policy pointer atomically; otherwise the active version is unchanged.
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/acceptance-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/acceptance-policy"
payload = { "content": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/acceptance-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "42",
"storefrontId": "1234",
"version": 3,
"content": "<string>",
"notes": "<string>",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}{
"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
Body
Request body for creating a new acceptance-policy version and optionally activating it atomically.
Markdown acceptance policy used to evaluate advertiser categories, buyer-submitted creatives, and approval workflow requirements.
1 - 50000Operator note describing why this version was created. Not surfaced to buyers.
2000When true, atomically make the new version active as part of the create. Defaults to false.
Response
Create a new acceptance-policy version
A single acceptance-policy version for a storefront. Versions are immutable; updates produce a new row.
Surrogate id of the version row (BIGINT serialized).
"42"
Storefront the version belongs to (BIGINT serialized as string).
"1234"
Per-storefront version number.
1 <= x <= 90071992547409913
Markdown acceptance policy.
Operator note about why this version was authored.
Whether this version is the Storefront's active acceptance policy.
Creation timestamp (ISO 8601).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$User id of the operator who authored the version (BIGINT serialized as string). Null when authored by a system or service-token caller.