Find and buy products, tickets, bookings and subscriptions for the user at supported stores. Start with search { query } to find the item and merchant page using Vaaya OneSearch (5¢ per search); the user can describe what they need without supplying a link. Before checkout, use setup to check payment and shipping readiness; resolve missing setup once. Persistent merchant accounts are managed at /store-connections. Use store connection id to select an account. Passwords and verification codes belong only on the merchant page, never in chat. PRODUCT DISCOVERY: if the user describes what to buy b
Показать схему аргументов
{
"type": "object",
"required": [
"command"
],
"properties": {
"url": {
"type": "string",
"description": "The exact product page the item came from — the driver starts there (`purchase`, `propose`)."
},
"city": {
"type": "string",
"description": "City (`address`)."
},
"item": {
"type": "string",
"description": "What exactly is being bought, in the user's words — variant, size, quantity (`purchase`, `propose`)."
},
"name": {
"type": "string",
"description": "Full name for shipping (`address`)."
},
"email": {
"type": "string",
"description": "Contact email for the order; defaults to the account email (`address`)."
},
"line1": {
"type": "string",
"description": "Street address (`address`)."
},
"line2": {
"type": "string",
"description": "Apartment / unit (`address`)."
},
"notes": {
"type": "string",
"description": "One line for the driver/user: variant, size, colour, quantity, delivery window."
},
"phone": {
"type": "string",
"description": "Contact phone for delivery (`address`)."
},
"query": {
"type": "string",
"description": "Describe the product, variant, budget and preferred store if any. `search` uses OneSearch to find matching items and merchant pages (5¢)."
},
"state": {
"type": "string",
"description": "State / region (`address`)."
},
"params": {
"type": "object",
"description": "The merchant's own purchase body (product id, quantity, email, shipping) for a protocol merchant (`purchase`, `checkout`).",
"additionalProperties": true
},
"booking": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"travelers",
"segments",
"baggage",
"changeCancellationTerms"
],
"properties": {
"kind": {
"type": "string",
"const": "flight"
},
"baggage": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"segments": {
"type": "array",
"items": {
"type": "object",
"required": [
"origin",
"destination",
"departureDate",
"departureTime",
"flightNumber",
"cabin",
"fare"
],
"properties": {
"fare": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"cabin": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"origin": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"destination": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"flightNumber": {
"type": "string",
"maxLength": 500,
"minLength": 1
},
"departureDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"departureTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
}
},
"additionalProperties": false
},
"maxItems": 8,
"minItems": 1
},
"travelers": {
"type": "integer",
"maximum": 9,
"minimum": 1
},
"changeCancellationTerms": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"property",
"address",
"checkIn",
"checkOut",
"rooms",
"adults",
"children",
"roomType",
"ratePlan",
"cancellationTerms",
"paymentTiming",
"mandatoryFeesCents"
],
"properties": {
"kind": {
"type": "string",
"const": "hotel"
},
"rooms": {
"type": "integer",
"maximum": 9,
"minimum": 1
},
"adults": {
"type": "integer",
"maximum": 30,
"minimum": 1
},
"address": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"checkIn": {
"$ref": "#/anyOf/0/properties/segments/items/properties/departureDate"
},
"checkOut": {
"$ref": "#/anyOf/0/properties/segments/items/properties/departureDate"
},
"children": {
"type": "integer",
"maximum": 30,
"minimum": 0
},
"property": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"ratePlan": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"roomType": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"paymentTiming": {
"enum": [
"pay_now",
"pay_at_property",
"deposit"
],
"type": "string"
},
"cancellationTerms": {
"$ref": "#/anyOf/0/properties/segments/items/properties/flightNumber"
},
"mandatoryFeesCents": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Required for Expedia flights and Booking.com hotels: exact itinerary/stay, counts, fare/room, baggage/cancellation and payment terms. These are shown for approval and cannot be substituted. Traveler identity documents are entered directly on the merchant page, never in chat. Final booking review requires the authenticated handoff page."
},
"command": {
"enum": [
"setup",
"search",
"purchase",
"propose",
"status",
"checkout",
"reconcile",
"address",
"credentials"
],
"type": "string",
"description": "Use `search` to find an item with OneSearch, `purchase` to buy an authorized item, and `status` to track it."
},
"country": {
"type": "string",
"description": "Two-letter country code, e.g. US (`address`)."
},
"currency": {
"type": "string",
"description": "ISO currency, default 'usd'."
},
"merchant": {
"type": "string",
"description": "Merchant host or URL, e.g. bombas.com (`purchase`, `propose`, `credentials`)."
},
"password": {
"type": "string",
"description": "Password at the merchant — stored encrypted, never returned (`credentials`)."
},
"retry_of": {
"type": "string",
"format": "uuid",
"description": "For propose only: the previous approval ID resolved by the owner as no order/payment. Use only when the user requests a new attempt; omit confirmed and show the fresh approval link. Never vary item text or confirmation to bypass replay or locks."
},
"username": {
"type": "string",
"description": "Email/username at the merchant (`credentials`)."
},
"confirmed": {
"type": "boolean",
"description": "true when the user has said yes to this exact item and total in the conversation (`purchase`, `propose`)."
},
"approval_id": {
"type": "string",
"description": "The approval returned by purchase/propose (`status`, `checkout`)."
},
"postal_code": {
"type": "string",
"description": "Postal / ZIP code (`address`)."
},
"total_cents": {
"type": "number",
"description": "The full total the user will pay, in cents (`purchase`, `propose`)."
},
"confirmation": {
"type": "string",
"description": "The user's own words approving it, verbatim (`purchase`, `propose`)."
},
"store_connection_id": {
"type": "string",
"description": "Merchant account connection ID from /store-connections. Required when multiple accounts are connected to the same store. Sign in and enter verification codes directly on that page, never in chat."
}
}
}