Skip to main content
POST
/
inventory-sources
/
{sourceId}
/
modular
/
avails-feed
Ingest modular avails feed
curl --request POST \
  --url https://api.interchange.io/api/v2/storefront/inventory-sources/{sourceId}/modular/avails-feed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "previewOnly": true,
  "inputSource": "<string>",
  "parsedAvailCount": 4503599627370495,
  "avails": [
    {
      "collectionId": "<string>",
      "collectionName": "<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": {}
    }
  ],
  "ingestedAvailCount": 4503599627370495,
  "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
  },
  "products": [
    {
      "productId": "<string>",
      "availId": "<string>",
      "collectionId": "<string>",
      "collectionName": "<string>",
      "name": "<string>",
      "description": "<string>",
      "channel": "<string>",
      "startTime": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z",
      "impressionsCapacity": 4503599627370495,
      "heldImpressions": 4503599627370495,
      "bookedImpressions": 4503599627370495,
      "availableImpressions": 4503599627370495,
      "cpm": 123,
      "currency": "<string>",
      "targeting": {},
      "sourceMetadata": {},
      "cadent": {
        "campaignDeliveryType": "<string>",
        "lineDeliveryType": "<string>",
        "adType": "<string>",
        "adClass": "<string>",
        "targets": [
          {
            "targetType": "<string>",
            "values": [
              "<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

Previews or upserts avails into a modular inventory source static feed. Normalized avails require confirmed=true; rawRows, csvText, and jsonText can be previewed before confirmation.

confirmed
enum<boolean>
Available options:
true
avails
object[]
Minimum array length: 1
rawRows
object[]
Minimum array length: 1
csvText
string
Required string length: 1 - 2000000
jsonText
string
Required string length: 1 - 2000000
defaultCollectionId
string
Required string length: 1 - 255
defaultCollectionName
string
Required string length: 1 - 255
defaultCollectionDescription
string
Required string length: 1 - 2000
defaultChannel
string
Required string length: 1 - 80
defaultStartTime
string
Required string length: 1 - 80
defaultEndTime
string
Required string length: 1 - 80

Response

Ingest modular avails feed

previewOnly
boolean
inputSource
string
parsedAvailCount
integer
Required range: 0 <= x <= 9007199254740991
avails
object[]
ingestedAvailCount
integer
Required range: 0 <= x <= 9007199254740991
projection
object

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

products
object[]