Skip to main content
POST
Cancel a hotel AI search task
Cancels a task that has not ended. A task that already ended answers 409 CONFLICT.
A new message in the conversation already replaces a search that is still running. See Waiting for results.

Authorizations

X-API-Key
string
header
required

Path Parameters

task_id
string
required
Required string length: 1 - 100
Example:

"atk_example"

Response

The task, now canceled.

context_id
string | null
required

The conversation; send it with the next message to continue.

Example:

"ctx_example"

task_id
string
required
Example:

"atk_example"

status
enum<string>
required

working: the search is still running, read the task again. input_required: the message asks a question; answer it in the same conversation. completed: the hotels are in the answer. failed: see error. canceled: a later message or a cancel replaced it.

Available options:
working,
input_required,
completed,
failed,
canceled
message
string

The reply to show the traveller.

Example:

"Found 37 hotels in Paris for Oct 24–25 (1 night, 2 adults, 1 room)."

question
string

What the reply asks for, when status is input_required.

Example:

"dates"

criteria
object

The search the request was understood as, in the hotel_search request fields, plus board_types and refundable_only for the rate filters applied to the results.

notes
object[]

Assumptions and adjustments made while understanding the request.

hotels
object[]
has_more
boolean

More hotels are available; ask for more in the same conversation.

reference
boolean

The hotels are a 1-night reference search shown while the check-out date is asked.

error
object

Why the task failed, when status is failed.

superseded_by
string

The task that replaced this one, when status is canceled.

charge
object

What a turn was charged to the organization's balance, once the turn has ended (completed, input_required, failed or canceled); every amount is 0 when the turn cost nothing. Absent while the task is working. Carried on JSON answers only: an event stream does not carry it, so read it with GET /v1/hotel_ai_search/tasks/{task_id}.