Prepare modular booking handoff
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaBuyId": "<string>",
"buyerCustomerId": 4503599627370495,
"availId": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize"
payload = {
"mediaBuyId": "<string>",
"buyerCustomerId": 4503599627370495,
"availId": "<string>"
}
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({mediaBuyId: '<string>', buyerCustomerId: 4503599627370495, availId: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"booking": {
"bookingId": "<string>",
"availId": "<string>",
"mediaBuyId": "<string>",
"packageId": "<string>",
"requestedImpressions": 4503599627370495,
"status": "HELD"
},
"workItems": [
{}
],
"projection": {
"inventorySource": {
"id": "<string>",
"storefrontId": "<string>",
"sourceId": "<string>",
"name": "<string>",
"executionType": "MODULAR_SOURCE",
"status": "<string>",
"healthStatus": "<string>",
"lastError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z"
},
"modules": [
{
"moduleRowId": "<string>",
"inventorySourceId": "<string>",
"moduleInstanceId": "<string>",
"kind": "INVENTORY_FEED",
"name": "<string>",
"provider": "<string>",
"status": "CONFIGURING",
"contractId": "<string>",
"contractVersion": "<string>",
"contract": {
"contractId": "<string>",
"version": "<string>",
"moduleType": "<string>",
"primaryKind": "INVENTORY_FEED",
"displayName": "<string>",
"description": "<string>",
"constraints": [
"<string>"
],
"provider": "<string>",
"maturity": "sandbox"
},
"configuredFieldKeys": [
"<string>"
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"lifecycle": [
{
"stage": "LIST_ACCOUNTS",
"mode": "AUTOMATED",
"description": "<string>",
"outputKeys": [
"<string>"
],
"requiredFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"moduleConfigReady": true,
"workItemKind": "<string>",
"taskContract": {
"taskId": "<string>",
"stage": "LIST_ACCOUNTS",
"automationMode": "AUTOMATED",
"completionPolicy": "NO_TASK",
"defaultActor": "system",
"requiredInputKeys": [
"<string>"
],
"requiredResultKeys": [
"<string>"
],
"outputKeys": [
"<string>"
],
"retryable": true,
"blocksStage": true,
"workItemKind": "<string>",
"fallbackWorkItemKind": "<string>",
"operatorAction": "<string>",
"idempotencyKeyFields": [
"<string>"
]
}
}
],
"openWorkItemCount": 4503599627370495,
"openWorkItemCountsByKind": {},
"lastError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"issues": [
"<string>"
]
}
],
"lifecycleSummary": [
{
"stage": "LIST_ACCOUNTS",
"supported": true,
"status": "UNSUPPORTED",
"modes": [
"AUTOMATED"
],
"moduleInstanceIds": [
"<string>"
],
"moduleNames": [
"<string>"
],
"setupConfigured": true,
"runtimeInputsRequired": true,
"hitlRequired": true,
"openWorkItemCount": 4503599627370495,
"requiredRuntimeFieldSources": [
"MODULE_CONFIG"
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"issues": [
"<string>"
]
}
],
"openWorkItemCount": 4503599627370495,
"activeAvailCount": 4503599627370495,
"catalogMappingReadiness": {
"sections": [
{
"id": "SET_UP_INVENTORY",
"title": "Set up inventory",
"rows": [
{
"id": "<string>",
"title": "<string>",
"requirement": "REQUIRED",
"status": "NOT_STARTED",
"evidence": [
{
"code": "<string>",
"summary": "<string>",
"observedAt": "2023-11-07T05:31:56Z",
"value": "<string>"
}
],
"freshness": {
"state": "FRESH",
"observedAt": "2023-11-07T05:31:56Z"
},
"sourceOfTruth": "INVENTORY_SOURCE",
"action": {
"operation": "open_modular_avails_commit",
"arguments": {
"sourceId": "<string>"
}
},
"externalOwner": "PUBLISHER",
"diagnostics": [
{
"code": "<string>",
"message": "<string>"
}
]
}
]
}
],
"progress": {
"ready": 4503599627370495,
"applicable": 4503599627370495,
"percent": 50
},
"nextAction": {
"operation": "open_modular_avails_commit",
"arguments": {
"sourceId": "<string>"
}
}
}
},
"executionStatus": "PENDING_TRAFFICKING",
"cadentCampaign": {},
"cadentRequestXml": "<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
Prepare modular booking handoff
Prepare a held modular inventory reservation for source execution: render Cadent XML for Cadent demo sources or create FreeWheel source-side HITL work items for FreeWheel modular sources. The ledger remains HELD until upstream booking work succeeds.
POST
/
inventory-sources
/
{sourceId}
/
modular
/
bookings
/
finalize
Prepare modular booking handoff
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaBuyId": "<string>",
"buyerCustomerId": 4503599627370495,
"availId": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize"
payload = {
"mediaBuyId": "<string>",
"buyerCustomerId": 4503599627370495,
"availId": "<string>"
}
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({mediaBuyId: '<string>', buyerCustomerId: 4503599627370495, availId: '<string>'})
};
fetch('https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/bookings/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"booking": {
"bookingId": "<string>",
"availId": "<string>",
"mediaBuyId": "<string>",
"packageId": "<string>",
"requestedImpressions": 4503599627370495,
"status": "HELD"
},
"workItems": [
{}
],
"projection": {
"inventorySource": {
"id": "<string>",
"storefrontId": "<string>",
"sourceId": "<string>",
"name": "<string>",
"executionType": "MODULAR_SOURCE",
"status": "<string>",
"healthStatus": "<string>",
"lastError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z"
},
"modules": [
{
"moduleRowId": "<string>",
"inventorySourceId": "<string>",
"moduleInstanceId": "<string>",
"kind": "INVENTORY_FEED",
"name": "<string>",
"provider": "<string>",
"status": "CONFIGURING",
"contractId": "<string>",
"contractVersion": "<string>",
"contract": {
"contractId": "<string>",
"version": "<string>",
"moduleType": "<string>",
"primaryKind": "INVENTORY_FEED",
"displayName": "<string>",
"description": "<string>",
"constraints": [
"<string>"
],
"provider": "<string>",
"maturity": "sandbox"
},
"configuredFieldKeys": [
"<string>"
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"lifecycle": [
{
"stage": "LIST_ACCOUNTS",
"mode": "AUTOMATED",
"description": "<string>",
"outputKeys": [
"<string>"
],
"requiredFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"moduleConfigReady": true,
"workItemKind": "<string>",
"taskContract": {
"taskId": "<string>",
"stage": "LIST_ACCOUNTS",
"automationMode": "AUTOMATED",
"completionPolicy": "NO_TASK",
"defaultActor": "system",
"requiredInputKeys": [
"<string>"
],
"requiredResultKeys": [
"<string>"
],
"outputKeys": [
"<string>"
],
"retryable": true,
"blocksStage": true,
"workItemKind": "<string>",
"fallbackWorkItemKind": "<string>",
"operatorAction": "<string>",
"idempotencyKeyFields": [
"<string>"
]
}
}
],
"openWorkItemCount": 4503599627370495,
"openWorkItemCountsByKind": {},
"lastError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"issues": [
"<string>"
]
}
],
"lifecycleSummary": [
{
"stage": "LIST_ACCOUNTS",
"supported": true,
"status": "UNSUPPORTED",
"modes": [
"AUTOMATED"
],
"moduleInstanceIds": [
"<string>"
],
"moduleNames": [
"<string>"
],
"setupConfigured": true,
"runtimeInputsRequired": true,
"hitlRequired": true,
"openWorkItemCount": 4503599627370495,
"requiredRuntimeFieldSources": [
"MODULE_CONFIG"
],
"missingSetupFieldsBySource": [
{
"source": "MODULE_CONFIG",
"fields": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"source": "MODULE_CONFIG",
"valueType": "STRING",
"required": true,
"requiredFor": [
"LIST_ACCOUNTS"
],
"mapsTo": "<string>",
"enumValues": [
"<string>"
]
}
]
}
],
"issues": [
"<string>"
]
}
],
"openWorkItemCount": 4503599627370495,
"activeAvailCount": 4503599627370495,
"catalogMappingReadiness": {
"sections": [
{
"id": "SET_UP_INVENTORY",
"title": "Set up inventory",
"rows": [
{
"id": "<string>",
"title": "<string>",
"requirement": "REQUIRED",
"status": "NOT_STARTED",
"evidence": [
{
"code": "<string>",
"summary": "<string>",
"observedAt": "2023-11-07T05:31:56Z",
"value": "<string>"
}
],
"freshness": {
"state": "FRESH",
"observedAt": "2023-11-07T05:31:56Z"
},
"sourceOfTruth": "INVENTORY_SOURCE",
"action": {
"operation": "open_modular_avails_commit",
"arguments": {
"sourceId": "<string>"
}
},
"externalOwner": "PUBLISHER",
"diagnostics": [
{
"code": "<string>",
"message": "<string>"
}
]
}
]
}
],
"progress": {
"ready": 4503599627370495,
"applicable": 4503599627370495,
"percent": 50
},
"nextAction": {
"operation": "open_modular_avails_commit",
"arguments": {
"sourceId": "<string>"
}
}
}
},
"executionStatus": "PENDING_TRAFFICKING",
"cadentCampaign": {},
"cadentRequestXml": "<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
application/json
Prepares a held modular inventory reservation for the source execution handoff. Cadent sources render Cadent XML; FreeWheel sources create source-side HITL work items.
Response
Prepare modular booking handoff
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Operator-facing setup-state projection for a modular inventory source.
Show child attributes
Show child attributes
Available options:
PENDING_TRAFFICKING, BOOKED Show child attributes
Show child attributes