{
  "openapi": "3.0.1",
  "info": {
    "title": "Business & First Class Deal Validator",
    "description": "Find the catches in a premium-cabin itinerary before you choose. Review mixed cabins, price details and connection timing using flight options you already have.",
    "version": "0.2",
    "x-build-id": "HIJ9VS4vLwfX2lJgZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/critd~premium-cabin-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-critd-premium-cabin-validator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/critd~premium-cabin-validator/runs": {
      "post": {
        "operationId": "runs-sync-critd-premium-cabin-validator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/critd~premium-cabin-validator/run-sync": {
      "post": {
        "operationId": "run-sync-critd-premium-cabin-validator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Review mode",
            "enum": [
              "demo",
              "evaluate",
              "monitor"
            ],
            "type": "string",
            "description": "Use Demo for fictional examples, or select the customer workflow for your supplied input.",
            "default": "demo"
          },
          "datasetId": {
            "title": "Existing compatible Dataset ID",
            "type": "string",
            "description": "Optional compatible export route: use a completed Dataset you are permitted to analyze. This Actor does not collect fares or grant collection rights."
          },
          "sourceProfile": {
            "title": "Dataset/export format",
            "enum": [
              "poidata-google-flights-0.1.70"
            ],
            "type": "string",
            "description": "Poidata Google Flights 0.1.70 format; one adult, no children or infants.",
            "default": "poidata-google-flights-0.1.70"
          },
          "datasetJson": {
            "title": "Or paste the Dataset JSON export",
            "type": "string",
            "description": "Paste the exported JSON array unchanged; choose this or Dataset ID, not both. Up to 100 records / 4 MiB."
          },
          "sourceObservedAt": {
            "title": "When were these prices collected? (optional)",
            "type": "string",
            "description": "ISO timestamp with timezone, for example 2026-09-25T12:00:00Z. Leave blank if unknown; never substitute the time you uploaded the file."
          },
          "sourcePointOfSale": {
            "title": "Point of sale country (optional)",
            "pattern": "^([A-Z]{2})?$",
            "type": "string",
            "description": "Optional two-letter country code for the supplied source point of sale. Leave empty if unknown."
          },
          "offersCsv": {
            "title": "Start with the segment CSV template",
            "type": "string",
            "description": "Paste the documented segment CSV using data you already have and are permitted to analyze. Rows with the same customer ID form one complete itinerary."
          },
          "offers": {
            "title": "Or supply complete normalized offers",
            "maxItems": 100,
            "type": "array",
            "description": "Complete normalized supplied itineraries; at most 100.",
            "items": {
              "type": "object"
            }
          },
          "policy": {
            "title": "Selected requirements",
            "type": "object",
            "description": "Requirements used to evaluate the supplied itineraries. Missing evidence remains unknown.",
            "properties": {
              "maxNonrequestedPercent": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "default": 15,
                "title": "Max nonrequested percent",
                "description": "Max nonrequested percent supplied for this review.",
                "editor": "number"
              },
              "maxUnknownPercent": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "default": 0,
                "title": "Max unknown percent",
                "description": "Max unknown percent supplied for this review.",
                "editor": "number"
              },
              "requireLieFlat": {
                "type": "boolean",
                "default": false,
                "title": "Require lie flat",
                "description": "Require lie flat supplied for this review.",
                "editor": "checkbox"
              },
              "maxStopsPerDirection": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8,
                "default": 2,
                "title": "Max stops per direction",
                "description": "Max stops per direction supplied for this review.",
                "editor": "number"
              },
              "minConnectionMinutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10080,
                "title": "Min connection minutes",
                "description": "Min connection minutes supplied for this review.",
                "nullable": true,
                "editor": "number"
              },
              "maxConnectionMinutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10080,
                "title": "Max connection minutes",
                "description": "Max connection minutes supplied for this review.",
                "nullable": true,
                "editor": "number"
              },
              "maxElapsedMinutesPerDirection": {
                "type": "integer",
                "minimum": 1,
                "maximum": 20160,
                "title": "Max elapsed minutes per direction",
                "description": "Max elapsed minutes per direction supplied for this review.",
                "nullable": true,
                "editor": "number"
              },
              "target": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "amount",
                  "currency",
                  "basis"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "title": "Amount",
                    "description": "Amount supplied for this review.",
                    "editor": "textfield"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "title": "Currency",
                    "description": "Currency supplied for this review.",
                    "editor": "textfield"
                  },
                  "basis": {
                    "type": "string",
                    "enum": [
                      "whole_party",
                      "per_adult"
                    ],
                    "title": "Basis",
                    "description": "Basis supplied for this review.",
                    "editor": "select"
                  }
                },
                "title": "Target",
                "description": "Prepared target reference pack with retained source provenance; omit to use the bundled edition.",
                "nullable": true,
                "editor": "json"
              }
            },
            "additionalProperties": false
          },
          "state": {
            "title": "Named history store (monitor only)",
            "required": [
              "scopeId"
            ],
            "type": "object",
            "description": "Monitor scope and optional exact baseline. Select the history store in historyStoreId for hosted runs.",
            "properties": {
              "storeId": {
                "type": "string",
                "title": "Store id",
                "description": "History key-value store to read and update across monitor runs.",
                "editor": "textfield",
                "resourceType": "keyValueStore",
                "resourcePermissions": [
                  "READ",
                  "WRITE"
                ]
              },
              "scopeId": {
                "type": "string",
                "title": "Scope id",
                "description": "Stable name for this comparison scope. Use the same value in subsequent monitor runs.",
                "editor": "textfield"
              },
              "baselineSnapshotId": {
                "type": "string",
                "title": "Baseline snapshot id",
                "description": "Optional exact snapshot to compare with instead of the stored history head.",
                "nullable": true,
                "editor": "textfield"
              },
              "recoverySnapshotIds": {
                "type": "array",
                "maxItems": 5,
                "items": {
                  "type": "string"
                },
                "title": "Recovery snapshot ids",
                "description": "Optional retained snapshot IDs for explicit recovery; at most five.",
                "editor": "json"
              }
            },
            "additionalProperties": false
          },
          "dataset": {
            "title": "Completed customer-owned Apify Dataset",
            "required": [
              "datasetId",
              "sourceProfile"
            ],
            "type": "object",
            "description": "Advanced completed Dataset/export input and explicit source-profile metadata.",
            "properties": {
              "datasetId": {
                "type": "string",
                "title": "Dataset id",
                "description": "Dataset id supplied for this review.",
                "editor": "textfield",
                "resourceType": "dataset",
                "resourcePermissions": [
                  "READ"
                ]
              },
              "sourceProfile": {
                "type": "string",
                "enum": [
                  "poidata-google-flights-0.1.70"
                ],
                "title": "Source profile",
                "description": "Source profile supplied for this review.",
                "editor": "select"
              },
              "observedAt": {
                "type": "string",
                "title": "Observed at",
                "description": "Observed at supplied for this review.",
                "nullable": true,
                "editor": "textfield"
              },
              "pointOfSale": {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "title": "Point of sale",
                "description": "Point of sale supplied for this review.",
                "nullable": true,
                "editor": "textfield"
              }
            },
            "additionalProperties": false
          },
          "historyStoreId": {
            "title": "History store",
            "type": "string",
            "description": "For monitor runs, select the history key-value store here and set state.scopeId. If state.storeId is also supplied, it must match."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}