Replace inventory property mappings
curl --request PUT \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"grain": "property",
"propertyExternalId": "<string>",
"publisherDomain": "<string>",
"tag": "<string>",
"targetKind": "key_value",
"signalKey": "<string>",
"signalValue": "<string>",
"selectorExternalId": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings"
payload = { "mappings": [
{
"grain": "property",
"propertyExternalId": "<string>",
"publisherDomain": "<string>",
"tag": "<string>",
"targetKind": "key_value",
"signalKey": "<string>",
"signalValue": "<string>",
"selectorExternalId": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mappings: [
{
grain: 'property',
propertyExternalId: '<string>',
publisherDomain: '<string>',
tag: '<string>',
targetKind: 'key_value',
signalKey: '<string>',
signalValue: '<string>',
selectorExternalId: '<string>'
}
]
})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"dryRun": true,
"valid": true,
"mapped": [
{
"rowIndex": 4503599627370496,
"propertyExternalId": "<string>",
"tag": "<string>",
"mapped": true,
"reason": "<string>"
}
],
"unmapped": [
{
"rowIndex": 4503599627370496,
"propertyExternalId": "<string>",
"tag": "<string>",
"mapped": true,
"reason": "<string>"
}
],
"keyValueValidation": [
{
"rowIndex": 4503599627370496,
"signalKey": "<string>",
"signalValue": "<string>",
"valid": true,
"reason": "<string>"
}
],
"selectorValidation": [
{
"rowIndex": 4503599627370496,
"selectorExternalId": "<string>",
"valid": true,
"reason": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Storefront
Replace inventory property mappings
Dry-run or atomically replace all seller-authored property and tag mappings for a managed sales-agent inventory source. Use the preview body only with dry_run=true. When dry_run is false or omitted, the replacement body requires confirmed=true and provenance.
PUT
/
inventory-sources
/
{sourceId}
/
property-mappings
Replace inventory property mappings
curl --request PUT \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"grain": "property",
"propertyExternalId": "<string>",
"publisherDomain": "<string>",
"tag": "<string>",
"targetKind": "key_value",
"signalKey": "<string>",
"signalValue": "<string>",
"selectorExternalId": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings"
payload = { "mappings": [
{
"grain": "property",
"propertyExternalId": "<string>",
"publisherDomain": "<string>",
"tag": "<string>",
"targetKind": "key_value",
"signalKey": "<string>",
"signalValue": "<string>",
"selectorExternalId": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mappings: [
{
grain: 'property',
propertyExternalId: '<string>',
publisherDomain: '<string>',
tag: '<string>',
targetKind: 'key_value',
signalKey: '<string>',
signalValue: '<string>',
selectorExternalId: '<string>'
}
]
})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/property-mappings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"dryRun": true,
"valid": true,
"mapped": [
{
"rowIndex": 4503599627370496,
"propertyExternalId": "<string>",
"tag": "<string>",
"mapped": true,
"reason": "<string>"
}
],
"unmapped": [
{
"rowIndex": 4503599627370496,
"propertyExternalId": "<string>",
"tag": "<string>",
"mapped": true,
"reason": "<string>"
}
],
"keyValueValidation": [
{
"rowIndex": 4503599627370496,
"signalKey": "<string>",
"signalValue": "<string>",
"valid": true,
"reason": "<string>"
}
],
"selectorValidation": [
{
"rowIndex": 4503599627370496,
"selectorExternalId": "<string>",
"valid": true,
"reason": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Inventory source ID
Minimum string length:
1Query Parameters
Available options:
true, false Body
application/json
Response
Replace inventory property mappings
⌘I