Decide one buyer account source mapping
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 1073741823,
"decision": "not_required"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision"
payload = {
"expectedVersion": 1073741823,
"decision": "not_required"
}
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({expectedVersion: 1073741823, decision: 'not_required'})
};
fetch('https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "<string>",
"inventorySourceKey": "<string>",
"decision": "bound",
"sourceExternalAccountId": "<string>",
"version": 4503599627370496
}{
"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": {}
}
}Storefront
Decide one buyer account source mapping
Create or replace the version-guarded source decision for one approved account relationship. Bind a source-native account, or explicitly confirm not_required when the source contract is unscoped.
POST
/
account-mappings
/
accounts
/
{accountId}
/
sources
/
{inventorySourceKey}
/
decision
Decide one buyer account source mapping
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 1073741823,
"decision": "not_required"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision"
payload = {
"expectedVersion": 1073741823,
"decision": "not_required"
}
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({expectedVersion: 1073741823, decision: 'not_required'})
};
fetch('https://api.interchange.io/api/v2/storefront/account-mappings/accounts/{accountId}/sources/{inventorySourceKey}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "<string>",
"inventorySourceKey": "<string>",
"decision": "bound",
"sourceExternalAccountId": "<string>",
"version": 4503599627370496
}{
"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
Path Parameters
Required string length:
1 - 255Required string length:
1 - 255Body
application/json
- Option 1
- Option 2
- Option 3
Map one approved seller account relationship to a source-native account (dedicated or the shared Interchange default), or explicitly confirm that the source contract does not require one. expectedVersion is 0 for the first decision and the current binding version for a replacement.