Skip to main content
PATCH
/
storefronts
/
{storefrontId}
/
connection-policy
Update storefront connection policy
curl --request PATCH \
  --url https://api.interchange.io/api/v2/buyer/storefronts/{storefrontId}/connection-policy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "buyEnabled": true,
  "eventsEnabled": true,
  "feedsEnabled": true
}
'
import requests

url = "https://api.interchange.io/api/v2/buyer/storefronts/{storefrontId}/connection-policy"

payload = {
"buyEnabled": True,
"eventsEnabled": True,
"feedsEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({buyEnabled: true, eventsEnabled: true, feedsEnabled: true})
};

fetch('https://api.interchange.io/api/v2/buyer/storefronts/{storefrontId}/connection-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "buyEnabled": true,
  "eventsEnabled": true,
  "feedsEnabled": true,
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"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

Authorization
string
header
required

API key or access token

Path Parameters

storefrontId
integer
required

Storefront ID

Required range: 1 <= x <= 9007199254740991

Body

application/json
buyEnabled
boolean

Whether this buyer account should buy through this integration.

eventsEnabled
boolean

Whether this integration should receive buyer event/CAPI signals.

feedsEnabled
boolean

Whether buyer audience and feed data should be shared with this integration.

Response

Update storefront connection policy

Buyer-controlled feature policy for a storefront connection row.

buyEnabled
boolean
required

Whether this buyer account should buy through this integration.

eventsEnabled
boolean
required

Whether this integration should receive buyer event/CAPI signals.

feedsEnabled
boolean
required

Whether buyer audience and feed data should be shared with this integration.

updatedAt
string<date-time> | null
required

When the buyer last customized this policy, or null when defaults apply.

Pattern: ^(?:(?:\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))$