Skip to main content
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": 123,
  "availId": "<string>"
}
'
{
  "booking": {
    "bookingId": "<string>",
    "availId": "<string>",
    "mediaBuyId": "<string>",
    "packageId": "<string>",
    "requestedImpressions": 123
  },
  "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>",
        "name": "<string>",
        "provider": "<string>",
        "contractId": "<string>",
        "contractVersion": "<string>",
        "contract": {
          "contractId": "<string>",
          "version": "<string>",
          "moduleType": "<string>",
          "displayName": "<string>",
          "description": "<string>",
          "constraints": [
            "<string>"
          ],
          "provider": "<string>"
        },
        "configuredFieldKeys": [
          "<string>"
        ],
        "missingSetupFieldsBySource": [
          {
            "fields": [
              {
                "key": "<string>",
                "label": "<string>",
                "description": "<string>",
                "required": true,
                "requiredFor": [],
                "mapsTo": "<string>",
                "enumValues": [
                  "<string>"
                ]
              }
            ]
          }
        ],
        "lifecycle": [
          {
            "description": "<string>",
            "outputKeys": [
              "<string>"
            ],
            "requiredFieldsBySource": [
              {
                "fields": [
                  {
                    "key": "<string>",
                    "label": "<string>",
                    "description": "<string>",
                    "required": true,
                    "requiredFor": [],
                    "mapsTo": "<string>",
                    "enumValues": [
                      "<string>"
                    ]
                  }
                ]
              }
            ],
            "missingSetupFieldsBySource": [
              {
                "fields": [
                  {
                    "key": "<string>",
                    "label": "<string>",
                    "description": "<string>",
                    "required": true,
                    "requiredFor": [],
                    "mapsTo": "<string>",
                    "enumValues": [
                      "<string>"
                    ]
                  }
                ]
              }
            ],
            "moduleConfigReady": true,
            "workItemKind": "<string>",
            "taskContract": {
              "taskId": "<string>",
              "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": [
      {
        "supported": true,
        "modes": [],
        "moduleInstanceIds": [
          "<string>"
        ],
        "moduleNames": [
          "<string>"
        ],
        "setupConfigured": true,
        "runtimeInputsRequired": true,
        "hitlRequired": true,
        "openWorkItemCount": 4503599627370495,
        "requiredRuntimeFieldSources": [],
        "missingSetupFieldsBySource": [
          {
            "fields": [
              {
                "key": "<string>",
                "label": "<string>",
                "description": "<string>",
                "required": true,
                "requiredFor": [],
                "mapsTo": "<string>",
                "enumValues": [
                  "<string>"
                ]
              }
            ]
          }
        ],
        "issues": [
          "<string>"
        ]
      }
    ],
    "openWorkItemCount": 4503599627370495,
    "activeAvailCount": 4503599627370495
  },
  "cadentCampaign": {},
  "cadentRequestXml": "<string>"
}

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

sourceId
string
required

Inventory source ID

Minimum string length: 1

Body

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.

mediaBuyId
string
required
Minimum string length: 1
buyerCustomerId
integer
required
Required range: x <= 9007199254740991
availId
string
required
Minimum string length: 1
packageId
string
campaignName
string
advertiserName
string
advertiserExternalRef
string
creative
object

Response

Prepare modular booking handoff

booking
object
required
workItems
object[]
required
projection
object
required

Operator-facing setup-state projection for a modular inventory source.

executionStatus
enum<string>
Available options:
PENDING_TRAFFICKING,
BOOKED
cadentCampaign
object
cadentRequestXml
string