API reference
Analytics
Booking funnel, step health and errors.
Booking overview#
Orders, issued, failed, conversion, revenue and median / p95 time to ticket for the period.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
from | string (date-time) | Start, ISO 8601. Default: 7 days before pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | End, ISO 8601. Default: now. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
Code samples
curl 'https://api.1fly.uz/v1/analytics/overview' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/analytics/overview', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/analytics/overview",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Analytics.
{
"orders": 26,
"issued": 18,
"failed": 5,
"expired": 2,
"cancelled": 1,
"inProgress": 0,
"conversionRate": 0.69,
"revenueMinor": 7669000000,
"currency": "UZS",
"medianTimeToTicketMs": 4900,
"p95TimeToTicketMs": 8000
}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}Funnel by step#
How many orders reached and passed each step.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
from | string (date-time) | Start, ISO 8601. Default: 7 days before pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | End, ISO 8601. Default: now. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
Code samples
curl 'https://api.1fly.uz/v1/analytics/funnel' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/analytics/funnel', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/analytics/funnel",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Analytics.
{}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}Step health#
Per step: attempts, failures, retries, failure rate, p50 / p95 duration and top error codes.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
from | string (date-time) | Start, ISO 8601. Default: 7 days before pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | End, ISO 8601. Default: now. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
Code samples
curl 'https://api.1fly.uz/v1/analytics/steps' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/analytics/steps', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/analytics/steps",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Analytics.
{}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}Errors by who must act#
Failures grouped by category (customer, supplier, payment, system) and by error code with hints and the last affected order.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
from | string (date-time) | Start, ISO 8601. Default: 7 days before pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | End, ISO 8601. Default: now. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
Code samples
curl 'https://api.1fly.uz/v1/analytics/errors' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/analytics/errors', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/analytics/errors",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Analytics.
{}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}Orders over time#
Orders, issued and failed per hour or day.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
from | string (date-time) | Start, ISO 8601. Default: 7 days before pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | End, ISO 8601. Default: now. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
bucket | string | one of: "hour", "day" |
Code samples
curl 'https://api.1fly.uz/v1/analytics/timeseries' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/analytics/timeseries', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/analytics/timeseries",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Analytics.
{}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"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.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | 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 |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}