curl --request PATCH \
--url https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"connectionId": "<string>",
"credentialId": "<string>",
"externalAccountId": "<string>",
"name": "<string>",
"advertiser": "<string>",
"currency": "<string>",
"effectiveTimezone": "<string>",
"status": "PENDING",
"providerStatus": "active",
"providerRawStatus": "<string>",
"accountType": null,
"amazonSponsoredAds": {
"marketplaceId": "<string>",
"validPaymentMethod": true,
"countryCode": "<string>"
},
"parentExternalId": null,
"parentName": null,
"isDefault": true,
"isSelected": true,
"enhancedReporting": {
"eligible": true,
"enabled": true,
"activatedAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z",
"billingCustomerId": 4503599627370495,
"ineligibleReason": "listing_account",
"canEnable": true
},
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"mappedAdvertisers": [],
"campaignRollup": {
"campaignsTracked": 4503599627370495,
"campaignsActive": 4503599627370495,
"trackedSpend": 1,
"managedSpend": 1,
"managedShare": 0.5,
"currency": "<string>",
"windowDays": 4503599627370495
},
"campaignCoverage": {
"state": "full",
"platformCount": 4503599627370495,
"platformActiveCount": 4503599627370495,
"mirroredCount": 4503599627370495,
"leftOut": {
"total": 4503599627370495,
"byReason": {},
"entries": [
{
"reason": "provider_read_failed",
"campaignId": "<string>",
"field": "<string>"
}
],
"byField": {}
},
"syncedAt": "2023-11-07T05:31:56Z",
"cause": {
"class": "credential_unusable",
"owner": "customer",
"action": "reconnect"
}
}
}{
"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": {}
}
}Select integration external account
Mark one discovered external provider account as the selected account for a buyer integration connection.
curl --request PATCH \
--url https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/buyer/storefront-connections/{connectionId}/accounts/{accountId}/select', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"connectionId": "<string>",
"credentialId": "<string>",
"externalAccountId": "<string>",
"name": "<string>",
"advertiser": "<string>",
"currency": "<string>",
"effectiveTimezone": "<string>",
"status": "PENDING",
"providerStatus": "active",
"providerRawStatus": "<string>",
"accountType": null,
"amazonSponsoredAds": {
"marketplaceId": "<string>",
"validPaymentMethod": true,
"countryCode": "<string>"
},
"parentExternalId": null,
"parentName": null,
"isDefault": true,
"isSelected": true,
"enhancedReporting": {
"eligible": true,
"enabled": true,
"activatedAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z",
"billingCustomerId": 4503599627370495,
"ineligibleReason": "listing_account",
"canEnable": true
},
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"mappedAdvertisers": [],
"campaignRollup": {
"campaignsTracked": 4503599627370495,
"campaignsActive": 4503599627370495,
"trackedSpend": 1,
"managedSpend": 1,
"managedShare": 0.5,
"currency": "<string>",
"windowDays": 4503599627370495
},
"campaignCoverage": {
"state": "full",
"platformCount": 4503599627370495,
"platformActiveCount": 4503599627370495,
"mirroredCount": 4503599627370495,
"leftOut": {
"total": 4503599627370495,
"byReason": {},
"entries": [
{
"reason": "provider_read_failed",
"campaignId": "<string>",
"field": "<string>"
}
],
"byField": {}
},
"syncedAt": "2023-11-07T05:31:56Z",
"cause": {
"class": "credential_unusable",
"owner": "customer",
"action": "reconnect"
}
}
}{
"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": {}
}
}Path Parameters
Response
Select integration external account
Provider account discovered for a buyer storefront connection.
Account hierarchy classification from the platform adapter: 'advertiser' (buyable leaf), 'organization' (manager container — never mappable or buyable), or a platform subtype such as 'sponsored_ads', 'dsp', or 'publisher_identity'. Null for legacy rows, treated as a leaf account.
External id of the parent account, when known: a manager container (Meta Business Manager, Google MCC, Snap Organization, …), or where the platform has no manager surface, the owning entity (LinkedIn organization; the owning advertiser account for TikTok channel identities). Id format is platform-native and may differ from the account's own id format.
^(?:(?:\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))$^(?:(?:\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))$^(?:(?:\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))$