Preview a modular avails file
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"previewOnly": true,
"inputSource": "<string>",
"parsedAvailCount": 4503599627370495,
"rejectedRowCount": 4503599627370495,
"warningCount": 4503599627370495,
"avails": [
{
"collectionId": "<string>",
"collectionName": "<string>",
"formatOptions": [
{
"format_kind": "image",
"params": {},
"format_option_id": "<string>",
"publisher_domain": "<string>"
}
],
"publisherProperties": [
{
"selection_type": "all",
"publisher_domain": "<string>",
"publisher_domains": [
"<string>"
]
}
],
"availId": "<string>",
"name": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"impressionsCapacity": 4503599627370495,
"collectionDescription": "<string>",
"channel": "<string>",
"upstreamBookedImpressions": 4503599627370495,
"cpm": 1,
"currency": "<string>",
"targeting": {},
"sourceMetadata": {}
}
],
"rejectedRows": [
{
"rowNumber": 4503599627370495,
"rawRow": {},
"diagnostics": [
{
"rowNumber": 4503599627370495,
"code": "REQUIRED_FIELD_MISSING",
"message": "<string>",
"field": "<string>"
}
]
}
],
"warnings": [
{
"rowNumber": 4503599627370495,
"code": "REQUIRED_FIELD_MISSING",
"message": "<string>",
"field": "<string>"
}
],
"note": "<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": {}
}
}Storefront
Preview a modular avails file
Parse a CSV, JSON, XLS, or XLSX modular avails file and return normalized rows and stable row-level diagnostics. This endpoint never commits inventory; submit the returned avails to the JSON avails-feed endpoint with confirmed=true after operator review.
POST
/
inventory-sources
/
{sourceId}
/
modular
/
avails-feed
/
upload
Preview a modular avails file
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"previewOnly": true,
"inputSource": "<string>",
"parsedAvailCount": 4503599627370495,
"rejectedRowCount": 4503599627370495,
"warningCount": 4503599627370495,
"avails": [
{
"collectionId": "<string>",
"collectionName": "<string>",
"formatOptions": [
{
"format_kind": "image",
"params": {},
"format_option_id": "<string>",
"publisher_domain": "<string>"
}
],
"publisherProperties": [
{
"selection_type": "all",
"publisher_domain": "<string>",
"publisher_domains": [
"<string>"
]
}
],
"availId": "<string>",
"name": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"impressionsCapacity": 4503599627370495,
"collectionDescription": "<string>",
"channel": "<string>",
"upstreamBookedImpressions": 4503599627370495,
"cpm": 1,
"currency": "<string>",
"targeting": {},
"sourceMetadata": {}
}
],
"rejectedRows": [
{
"rowNumber": 4503599627370495,
"rawRow": {},
"diagnostics": [
{
"rowNumber": 4503599627370495,
"code": "REQUIRED_FIELD_MISSING",
"message": "<string>",
"field": "<string>"
}
]
}
],
"warnings": [
{
"rowNumber": 4503599627370495,
"code": "REQUIRED_FIELD_MISSING",
"message": "<string>",
"field": "<string>"
}
],
"note": "<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": {}
}
}Authorizations
API key or access token
Path Parameters
Inventory source ID
Minimum string length:
1Body
multipart/form-data
CSV, JSON, XLS, or XLSX file, up to 10 MB.
Response
Preview a modular avails file
Available options:
true Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes