Unsubscribe a directed-campaign account
curl --request DELETE \
--url https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subscription": {
"id": "<string>",
"customerId": 4503599627370495,
"advertiserId": "<string>",
"connectionId": "<string>",
"accountId": "<string>",
"sourceId": "<string>",
"providerType": "<string>",
"status": "ACTIVE",
"backfillStart": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"lastSyncStatus": "SUCCESS",
"lastSyncError": "Connected provider account could not be synchronized.",
"errorCode": "NOT_FOUND",
"errorField": "account.account_id",
"errorReason": "account_scope_mismatch",
"upstreamCode": "ACCOUNT_NOT_AUTHORIZED",
"lastPresenceSyncedAt": "2023-11-07T05:31:56Z",
"lastPresenceSyncStatus": "SUCCESS",
"lastPresenceSyncError": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
},
"retired": 4503599627370495
}{
"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": {}
}
}Storefronts
Unsubscribe a directed-campaign account
Stop account mirroring and retire its directed campaign mirrors.
DELETE
/
storefront-connections
/
{connectionId}
/
accounts
/
{accountId}
/
directed-campaigns
/
subscription
Unsubscribe a directed-campaign account
curl --request DELETE \
--url https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subscription": {
"id": "<string>",
"customerId": 4503599627370495,
"advertiserId": "<string>",
"connectionId": "<string>",
"accountId": "<string>",
"sourceId": "<string>",
"providerType": "<string>",
"status": "ACTIVE",
"backfillStart": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"lastSyncStatus": "SUCCESS",
"lastSyncError": "Connected provider account could not be synchronized.",
"errorCode": "NOT_FOUND",
"errorField": "account.account_id",
"errorReason": "account_scope_mismatch",
"upstreamCode": "ACCOUNT_NOT_AUTHORIZED",
"lastPresenceSyncedAt": "2023-11-07T05:31:56Z",
"lastPresenceSyncStatus": "SUCCESS",
"lastPresenceSyncError": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
},
"retired": 4503599627370495
}{
"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
Storefront connection ID
Storefront connection account ID
Response
Unsubscribe a directed-campaign account