API reference

Orders

Create orders and follow them to a ticket.

Create an order#

POST/v1/orders

Stores the order and starts booking: passenger checks, price re-check, seat hold, payment, ticketing. Returns at once; follow progress with GET /v1/orders/{id} or the timeline. Safe to retry: the same idempotencyKey returns the first order. All validation problems are returned together in issues. scenario is accepted in test mode only.

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:write
Operation id
post_orders

Request body application/json required

FieldTypeDescription
offerrequiredobject
offerId (in offer)requiredstring
length: 1–100
supplier (in offer)requiredstring
length: 1–50
searchId (in offer)requiredstring
length: 1–100
mix (in offer)requiredobject
adults (in offer.mix)requiredinteger
range: 1–9
children (in offer.mix)requiredinteger
range: 0–8
infants (in offer.mix)requiredinteger
range: 0–9
segments (in offer)requiredarray<object>
items: 1–8
from (in offer.segments)requiredstring
pattern: ^[A-Z]{3}$
to (in offer.segments)requiredstring
pattern: ^[A-Z]{3}$
departAt (in offer.segments)requiredstring
pattern: ^\d{4}-\d{2}-\d{2}T([01]\d|2[0-3]):[0-5]\d$
arriveAt (in offer.segments)requiredstring
pattern: ^\d{4}-\d{2}-\d{2}T([01]\d|2[0-3]):[0-5]\d$
carrier (in offer.segments)requiredstring
pattern: ^[A-Z0-9]{2,3}$
flightNumber (in offer.segments)requiredstring
pattern: ^[A-Z0-9]{2,3}\d{1,4}[A-Z]?$
fareBrand (in offer)string
length: 1–40default: "Standard"
price (in offer)requiredobject
amountMinor (in offer.price)requiredinteger
≤ 1000000000000> 0
currency (in offer.price)requiredstring
one of: "UZS", "USD", "EUR"
passengersrequiredarray<object>
items: 1–9
type (in passengers)requiredstring
one of: "ADT", "CHD", "INF"
firstName (in passengers)requiredstring
pattern: ^[A-Za-z]+(?:[ '-][A-Za-z]+)*$length: 1–60
lastName (in passengers)requiredstring
pattern: ^[A-Za-z]+(?:[ '-][A-Za-z]+)*$length: 1–60
birthDate (in passengers)requiredstring
pattern: ^\d{4}-\d{2}-\d{2}$
gender (in passengers)requiredstring
one of: "M", "F"
citizenship (in passengers)requiredstring
pattern: ^[A-Z]{2}$
documentNumber (in passengers)requiredstring
pattern: ^[A-Z0-9]{5,20}$
documentExpiry (in passengers)requiredstring
pattern: ^\d{4}-\d{2}-\d{2}$
contactrequiredobject
email (in contact)requiredstring (email)
pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$max length: 254
phone (in contact)requiredstring
pattern: ^\+[1-9]\d{6,14}$
channelstring
one of: "web", "api", "mcp", "admin", "job"default: "web"
accountIdstring
idempotencyKeyrequiredstring
pattern: ^[A-Za-z0-9._:-]{8,100}$
scenariostring
one of: "happy", "flaky_supplier", "price_up", "sold_out", "payment_declined", "payment_timeout", "issue_fail", "issue_unknown", "notify_fail"
Example request body
{
  "idempotencyKey": "checkout-7f3a9c2e",
  "contact": {
    "email": "aziz@example.uz",
    "phone": "+998901234567"
  },
  "offer": {
    "offerId": "off_9d1c",
    "supplier": "hy-ndc",
    "searchId": "srch_51ab",
    "fareBrand": "Standard",
    "mix": {
      "adults": 1,
      "children": 0,
      "infants": 0
    },
    "price": {
      "amountMinor": 398000000,
      "currency": "UZS"
    },
    "segments": [
      {
        "from": "TAS",
        "to": "IST",
        "departAt": "2027-03-12T07:40",
        "arriveAt": "2027-03-12T10:05",
        "carrier": "HY",
        "flightNumber": "HY271"
      },
      {
        "from": "IST",
        "to": "TAS",
        "departAt": "2027-03-19T13:20",
        "arriveAt": "2027-03-19T19:30",
        "carrier": "HY",
        "flightNumber": "HY272"
      }
    ]
  },
  "passengers": [
    {
      "type": "ADT",
      "firstName": "AZIZ",
      "lastName": "KARIMOV",
      "birthDate": "1990-04-02",
      "gender": "M",
      "citizenship": "UZ",
      "documentNumber": "FA1234567",
      "documentExpiry": "2030-01-01"
    }
  ],
  "scenario": "happy"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/orders' \
  -H "Authorization: Bearer $ONEFLY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "idempotencyKey": "checkout-7f3a9c2e",
  "contact": {
    "email": "aziz@example.uz",
    "phone": "+998901234567"
  },
  "offer": {
    "offerId": "off_9d1c",
    "supplier": "hy-ndc",
    "searchId": "srch_51ab",
    "fareBrand": "Standard",
    "mix": {
      "adults": 1,
      "children": 0,
      "infants": 0
    },
    "price": {
      "amountMinor": 398000000,
      "currency": "UZS"
    },
    "segments": [
      {
        "from": "TAS",
        "to": "IST",
        "departAt": "2027-03-12T07:40",
        "arriveAt": "2027-03-12T10:05",
        "carrier": "HY",
        "flightNumber": "HY271"
      },
      {
        "from": "IST",
        "to": "TAS",
        "departAt": "2027-03-19T13:20",
        "arriveAt": "2027-03-19T19:30",
        "carrier": "HY",
        "flightNumber": "HY272"
      }
    ]
  },
  "passengers": [
    {
      "type": "ADT",
      "firstName": "AZIZ",
      "lastName": "KARIMOV",
      "birthDate": "1990-04-02",
      "gender": "M",
      "citizenship": "UZ",
      "documentNumber": "FA1234567",
      "documentExpiry": "2030-01-01"
    }
  ],
  "scenario": "happy"
}'

Responses

200Order created (or the existing order for this idempotency key).
Example response
{
  "order": {
    "id": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
    "reference": "K7QX2P",
    "status": "draft"
  },
  "created": true
}
400Validation failed.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Example response
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Some fields are missing or invalid.",
    "requestId": "5b0c…",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "invalid_format",
        "message": "Last name: use Latin letters A–Z exactly as in the passport (spaces, hyphens and apostrophes allowed, no accents or Cyrillic)."
      }
    ]
  }
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403Account suspended, missing scope, or live mode not yet available.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
429Monthly order quota or rate limit reached.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

List orders#

GET/v1/orders

Newest first, for the authenticated account.

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:read
Operation id
get_orders

Parameters

Query parameters

NameTypeDescription
statusstring
one of: "draft", "validating", "price_check", "awaiting_price_confirmation", "booking", "awaiting_payment", "paid_hold", "issuing", "issued", "expired", "failed", "cancelled"
limitinteger
range: 1–200default: 50
offsetinteger
range: 0–9007199254740991default: 0

Code samples

curl 'https://api.1fly.uz/v1/orders' \
  -H "Authorization: Bearer $ONEFLY_API_KEY"

Responses

200A page of orders.
Example response
{
  "rows": [
    {
      "id": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
      "reference": "K7QX2P",
      "status": "awaiting_payment",
      "mode": "test",
      "channel": "api",
      "accountId": "acc_3e1f…",
      "origin": "TAS",
      "destination": "IST",
      "departDate": "2027-03-12",
      "returnDate": "2027-03-19",
      "adults": 1,
      "children": 0,
      "infants": 0,
      "supplier": "hy-ndc",
      "amountMinor": 398000000,
      "currency": "UZS",
      "pnr": "MVTVRK",
      "failureCode": null,
      "failureStep": null,
      "holdExpiresAt": "2026-11-17T10:15:00.000Z",
      "createdAt": "2026-11-17T10:00:00.000Z",
      "updatedAt": "2026-11-17T10:00:04.000Z",
      "issuedAt": null
    }
  ],
  "total": 1
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403The key lacks a required scope, or the account is suspended.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Get an order#

GET/v1/orders/{id}

Order, passengers (passport numbers masked), payments, tickets and, while the booking runs, its live state (current step, hold deadline, payment link, new price awaiting confirmation).

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:read
Operation id
get_orders_id

Parameters

Path parameters

NameTypeDescription
idrequiredstring

Order id, e.g. ord_7c2f… (32 hex characters).

pattern: ^ord_[a-f0-9]{32}$

Code samples

curl 'https://api.1fly.uz/v1/orders/ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10' \
  -H "Authorization: Bearer $ONEFLY_API_KEY"

Responses

200The order.
Example response
{
  "order": {
    "id": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
    "reference": "K7QX2P",
    "status": "awaiting_payment",
    "mode": "test",
    "channel": "api",
    "accountId": "acc_3e1f…",
    "origin": "TAS",
    "destination": "IST",
    "departDate": "2027-03-12",
    "returnDate": "2027-03-19",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "supplier": "hy-ndc",
    "amountMinor": 398000000,
    "currency": "UZS",
    "pnr": "MVTVRK",
    "failureCode": null,
    "failureStep": null,
    "holdExpiresAt": "2026-11-17T10:15:00.000Z",
    "createdAt": "2026-11-17T10:00:00.000Z",
    "updatedAt": "2026-11-17T10:00:04.000Z",
    "issuedAt": null
  },
  "passengers": [],
  "payments": [],
  "tickets": [],
  "live": {
    "status": "awaiting_payment",
    "currentStep": "await_payment",
    "pnr": "MVTVRK",
    "holdExpiresAt": "2026-11-17T10:15:00.000Z",
    "payUrl": "https://pay.example/…",
    "newPriceMinor": null,
    "failure": null,
    "tickets": []
  }
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403The key lacks a required scope, or the account is suspended.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
404No such order in this account.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Get the order timeline#

GET/v1/orders/{id}/timeline

The full chronology: every attempt of every step (started, succeeded, failed with error code, category and hint), status changes, webhooks and decisions, oldest first, plus a per-step summary.

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:read
Operation id
get_orders_id_timeline

Parameters

Path parameters

NameTypeDescription
idrequiredstring

Order id, e.g. ord_7c2f… (32 hex characters).

pattern: ^ord_[a-f0-9]{32}$

Code samples

curl 'https://api.1fly.uz/v1/orders/ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10/timeline' \
  -H "Authorization: Bearer $ONEFLY_API_KEY"

Responses

200Timeline.
Example response
{
  "orderId": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
  "events": [
    {
      "seq": 41,
      "occurredAt": "2026-11-17T10:00:01.245Z",
      "type": "step.failed",
      "step": "book_seats",
      "status": "failed",
      "attempt": 1,
      "durationMs": 252,
      "actorType": "system",
      "channel": "api",
      "message": "Hold seats at the airline failed: Supplier did not answer within 30 s",
      "errorCode": "SUPPLIER_TIMEOUT",
      "errorCategory": "supplier",
      "errorRetryable": true,
      "errorHint": "The supplier did not answer in time; retried automatically.",
      "data": {
        "willRetry": true
      }
    }
  ],
  "steps": [
    {
      "step": "book_seats",
      "label": "Hold seats at the airline",
      "state": "succeeded",
      "attempts": 3,
      "failures": 2,
      "totalDurationMs": 757,
      "lastError": {
        "code": "SUPPLIER_TIMEOUT",
        "category": "supplier",
        "message": "…",
        "hint": "…"
      }
    }
  ]
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403The key lacks a required scope, or the account is suspended.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Accept or decline a price change#

POST/v1/orders/{id}/price-decision

Only while the order is awaiting_price_confirmation. Declining cancels the order before any seats are held.

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:write
Operation id
post_orders_id_price_decision

Parameters

Path parameters

NameTypeDescription
idrequiredstring

Order id, e.g. ord_7c2f… (32 hex characters).

pattern: ^ord_[a-f0-9]{32}$

Request body application/json required

FieldTypeDescription
acceptrequiredboolean
Example request body
{
  "accept": true
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/orders/ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10/price-decision' \
  -H "Authorization: Bearer $ONEFLY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "accept": true
}'

Responses

202Decision sent.
Example response
{
  "accepted": true
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403The key lacks a required scope, or the account is suspended.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
409The order is not waiting for a price decision.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Cancel an order#

POST/v1/orders/{id}/cancel

Before payment only. Any seat hold is cancelled at the airline and any payment authorisation released.

Auth
API key (Authorization: Bearer 1fly_test_… or 1fly_live_…)Session (Cookie onefly_session)(any one)
Scopes
orders:write
Operation id
post_orders_id_cancel

Parameters

Path parameters

NameTypeDescription
idrequiredstring

Order id, e.g. ord_7c2f… (32 hex characters).

pattern: ^ord_[a-f0-9]{32}$

Request body application/json required

FieldTypeDescription
reasonstring
max length: 300
Example request body
{
  "reason": "Traveller changed plans"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/orders/ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10/cancel' \
  -H "Authorization: Bearer $ONEFLY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "Traveller changed plans"
}'

Responses

202Cancellation requested.
Example response
{
  "accepted": true
}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
403The key lacks a required scope, or the account is suspended.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
409Too late to cancel (payment already held or order finished).
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
API version v0.0.1 · Spec generated from source on 2026-11-22Changelog · Prices in so‘m (UZS)