{
  "openapi": "3.1.0",
  "info": {
    "title": "Voyant Operator API",
    "version": "0.0.0",
    "description": "Generated from the composed operator app. Do not edit by hand."
  },
  "servers": [
    {
      "url": "/",
      "description": "This deployment (same origin)"
    }
  ],
  "components": {
    "schemas": {
      "CatalogSearchFilter": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["eq"]
              },
              "field": {
                "type": "string",
                "minLength": 1
              },
              "value": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              }
            },
            "required": ["kind", "field", "value"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["in"]
              },
              "field": {
                "type": "string",
                "minLength": 1
              },
              "values": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              }
            },
            "required": ["kind", "field", "values"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["range"]
              },
              "field": {
                "type": "string",
                "minLength": 1
              },
              "gte": {
                "type": "number"
              },
              "lte": {
                "type": "number"
              }
            },
            "required": ["kind", "field"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["and"]
              },
              "clauses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogSearchFilter"
                }
              }
            },
            "required": ["kind", "clauses"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["or"]
              },
              "clauses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogSearchFilter"
                }
              }
            },
            "required": ["kind", "clauses"]
          }
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/v1/public/catalog/search": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vertical": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": ["keyword", "semantic", "hybrid"]
                  },
                  "sort": {
                    "type": "string",
                    "enum": ["relevance", "price-asc", "price-desc", "departure-asc", "newest"]
                  },
                  "projection": {
                    "type": "string",
                    "enum": ["raw", "storefront-card"]
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/CatalogSearchFilter"
                    }
                  },
                  "facets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "minLength": 1
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": ["field"]
                    }
                  },
                  "pagination": {
                    "type": "object",
                    "properties": {
                      "limit": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "cursor": {
                        "type": "string"
                      }
                    }
                  },
                  "alpha": {
                    "type": "number"
                  },
                  "distance_threshold": {
                    "type": "number"
                  },
                  "query_embedding": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "market": {
                    "type": "string",
                    "minLength": 1
                  },
                  "locale": {
                    "type": "string",
                    "minLength": 1
                  },
                  "channel": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search results for the requested vertical slice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vertical": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string",
                      "enum": ["keyword", "semantic", "hybrid"]
                    },
                    "total": {
                      "type": "number"
                    },
                    "totalRelation": {
                      "type": "string",
                      "enum": ["eq", "gte"]
                    },
                    "next_cursor": {
                      "type": "string"
                    },
                    "hits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number"
                          },
                          "document": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "fields": {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              "embeddings": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                }
                              },
                              "embedding_model_id": {
                                "type": "string"
                              }
                            },
                            "required": ["id", "fields"]
                          }
                        },
                        "required": ["id", "score", "document"]
                      }
                    },
                    "cards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": ["string", "null"]
                          },
                          "slug": {
                            "type": ["string", "null"]
                          },
                          "primaryCategory": {
                            "type": ["object", "null"],
                            "properties": {
                              "id": {
                                "type": ["string", "null"]
                              },
                              "name": {
                                "type": ["string", "null"]
                              },
                              "slug": {
                                "type": ["string", "null"]
                              }
                            },
                            "required": ["id", "name", "slug"]
                          },
                          "media": {
                            "type": "object",
                            "properties": {
                              "thumbnailUrl": {
                                "type": ["string", "null"]
                              },
                              "coverMediaUrl": {
                                "type": ["string", "null"]
                              }
                            },
                            "required": ["thumbnailUrl", "coverMediaUrl"]
                          },
                          "priceFrom": {
                            "type": ["object", "null"],
                            "properties": {
                              "amountCents": {
                                "type": "number"
                              },
                              "currency": {
                                "type": ["string", "null"]
                              },
                              "originalAmountCents": {
                                "type": ["number", "null"]
                              }
                            },
                            "required": ["amountCents", "currency", "originalAmountCents"]
                          },
                          "offerBadges": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": ["string", "null"]
                                },
                                "name": {
                                  "type": ["string", "null"]
                                },
                                "discountKind": {
                                  "type": ["string", "null"]
                                },
                                "discountPercent": {
                                  "type": ["number", "null"]
                                },
                                "discountAmountCents": {
                                  "type": ["number", "null"]
                                },
                                "minPax": {
                                  "type": ["number", "null"]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "discountKind",
                                "discountPercent",
                                "discountAmountCents"
                              ]
                            }
                          },
                          "departures": {
                            "type": "object",
                            "properties": {
                              "upcomingCount": {
                                "type": ["number", "null"]
                              },
                              "nextDepartureAt": {
                                "type": ["string", "null"]
                              },
                              "nextDepartureDate": {
                                "type": ["string", "null"]
                              },
                              "months": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "dates": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "upcomingCount",
                              "nextDepartureAt",
                              "nextDepartureDate",
                              "months",
                              "dates"
                            ]
                          },
                          "destinations": {
                            "type": "object",
                            "properties": {
                              "regions": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "countries": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "cities": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "slugs": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": ["regions", "countries", "cities", "ids", "slugs"]
                          },
                          "coordinates": {
                            "type": ["object", "null"],
                            "properties": {
                              "latitude": {
                                "type": "number"
                              },
                              "longitude": {
                                "type": "number"
                              }
                            },
                            "required": ["latitude", "longitude"]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "primaryCategory",
                          "media",
                          "priceFrom",
                          "offerBadges",
                          "departures",
                          "destinations",
                          "coordinates"
                        ]
                      }
                    },
                    "facets": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            "count": {
                              "type": "number"
                            }
                          },
                          "required": ["value", "count"]
                        }
                      }
                    }
                  },
                  "required": ["vertical", "mode", "total", "hits", "facets"]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request \u2014 body failed validation, or `vertical` is missing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "500": {
            "description": "Search execution failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "503": {
            "description": "Search indexer is not configured for this deployment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        },
        "operationId": "postPublicCatalogSearch",
        "summary": "POST /v1/public/catalog/search",
        "tags": ["catalog"],
        "x-voyant-module": "catalog",
        "x-voyant-surface": "storefront"
      }
    },
    "/v1/public/catalog/checkout/start": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bookingId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "paymentIntent": {
                    "type": "string",
                    "enum": ["card", "bank_transfer", "hold", "inquiry"]
                  },
                  "contractAcceptance": {
                    "type": "object",
                    "properties": {
                      "templateId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "templateSlug": {
                        "type": "string",
                        "minLength": 1
                      },
                      "acceptedTerms": {
                        "type": "boolean",
                        "enum": [true]
                      },
                      "acceptedMarketing": {
                        "type": "boolean"
                      },
                      "acceptedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "renderedHtml": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "templateId",
                      "templateSlug",
                      "acceptedTerms",
                      "acceptedMarketing",
                      "acceptedAt",
                      "renderedHtml"
                    ]
                  },
                  "payerEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "payerName": {
                    "type": "string"
                  },
                  "returnOrigin": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": ["bookingId", "paymentIntent"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout started \u2014 card redirect, bank-transfer, inquiry, or hold outcome",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": ["card_redirect"]
                        },
                        "bookingId": {
                          "type": "string"
                        },
                        "paymentSessionId": {
                          "type": "string"
                        },
                        "redirectUrl": {
                          "type": ["string", "null"]
                        },
                        "note": {
                          "type": "string"
                        }
                      },
                      "required": ["kind", "bookingId", "paymentSessionId", "redirectUrl"]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": ["bank_transfer_instructions"]
                        },
                        "bookingId": {
                          "type": "string"
                        },
                        "proformaId": {
                          "type": ["string", "null"]
                        },
                        "proformaNumber": {
                          "type": ["string", "null"]
                        },
                        "paymentSessionId": {
                          "type": ["string", "null"]
                        },
                        "instructions": {
                          "type": "object",
                          "properties": {
                            "beneficiary": {
                              "type": "string"
                            },
                            "iban": {
                              "type": "string"
                            },
                            "bankName": {
                              "type": "string"
                            },
                            "reference": {
                              "type": "string"
                            },
                            "amountCents": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string"
                            },
                            "dueAt": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "beneficiary",
                            "iban",
                            "bankName",
                            "reference",
                            "amountCents",
                            "currency",
                            "dueAt"
                          ]
                        }
                      },
                      "required": [
                        "kind",
                        "bookingId",
                        "proformaId",
                        "proformaNumber",
                        "paymentSessionId",
                        "instructions"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": ["inquiry_received"]
                        },
                        "bookingId": {
                          "type": "string"
                        },
                        "inquiryId": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string"
                        }
                      },
                      "required": ["kind", "bookingId", "inquiryId"]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": ["hold_placed"]
                        },
                        "bookingId": {
                          "type": "string"
                        }
                      },
                      "required": ["kind", "bookingId"]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Booking not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Hold expired",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "422": {
            "description": "Checkout setup is incomplete",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "500": {
            "description": "Could not create payment session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "502": {
            "description": "Payment provider failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Missing checkout session capability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Capability was issued for a different booking or lacks payment:start",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        },
        "operationId": "postPublicCatalogCheckoutStart",
        "summary": "POST /v1/public/catalog/checkout/start",
        "tags": ["catalog"],
        "x-voyant-module": "catalog",
        "x-voyant-surface": "storefront",
        "parameters": [
          {
            "name": "X-Voyant-Checkout-Capability",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Booking-scoped checkout capability granting payment:start, as issued by booking creation. May also be presented as the voyant_checkout_session cookie."
          }
        ]
      }
    }
  },
  "webhooks": {}
}
