API REFERENCE

Driver login

POST/api/v1/driver/login

Separate driver identity; administrator session cannot perform driver work. Business-specific access/activation; no public driver registration. Rate limited. If business_id omitted, backend resolves authorized driver identity/business choices.

Authentication

No bearer token required. This does not remove validation or rate limits.

Parameters

No path or query parameters.

Request

FieldTypeDescription & constraints
emailRequiredstringAccount email address.Format: email
passwordRequiredstringPrivate chosen password; never expose it in client bundles or logs.
business_idstringResource-specific value; see the related workflow and schema.Format: uuid

Example JSON body

{
  "email": "dispatcher@example.com",
  "password": "Example-passphrase-42!",
  "business_id": "11111111-1111-4111-8111-111111111111"
}
Request schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "format": "email"
    },
    "password": {
      "type": "string"
    },
    "business_id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "email",
    "password"
  ]
}

Example request

Replace synthetic identifiers and credentials. Example dates, coordinates, revisions, and IDs are not production defaults. Read the workflow guide before making a write.

curl --request POST 'https://route-api.okok.space/api/v1/driver/login' \
  --header 'Content-Type: application/json' \
  --data '{"email":"dispatcher@example.com","password":"Example-passphrase-42!","business_id":"11111111-1111-4111-8111-111111111111"}'

Responses

Examples illustrate the documented shape; optional fields and current state can differ. JSON extraction/body-limit errors may be plain text.

200 · Successful response

application/json

FieldTypeDescription & constraints
tokenRequiredstringOpaque driver bearer token. Keep private.
business_idRequiredstringResource-specific value; see the related workflow and schema.Format: uuid
driverRequiredobjectResource-specific value; see the related workflow and schema.
expires_atstringLatest instant this temporary offer or session remains valid.Format: date-time
driver fields
FieldTypeDescription & constraints
driver.idstringIdentifier unique within its authorized business. Some create operations generate it when omitted.
driver.nameRequiredstringHuman-readable name shown in the workspace.
driver.emailRequiredstringAccount email address.Format: email
driver.activebooleanWhether this account or integration is enabled.
driver.duty_statusonline | offlineResource-specific value; see the related workflow and schema.
driver.locationobject | nullService or record location, using latitude/longitude in decimal degrees.
driver.duty_started_atstring | nullResource-specific value; see the related workflow and schema.
driver.activation_codestringReturned once during provisioning/reset; administrator delivers it to driver.Response only
FieldTypeDescription & constraints
requires_business_selectionRequiredtrueResource-specific value; see the related workflow and schema.
businessesRequiredarray<object>Resource-specific value; see the related workflow and schema.
reauthenticate_on_selectionRequiredtrueResource-specific value; see the related workflow and schema.
businesses[] fields
FieldTypeDescription & constraints
businesses.business_idRequiredstringResource-specific value; see the related workflow and schema.Format: uuid
businesses.nameRequiredstringHuman-readable name shown in the workspace.
Illustrative response
{
  "token": "REPLACE_WITH_TOKEN",
  "business_id": "11111111-1111-4111-8111-111111111111",
  "driver": {
    "id": "example-id",
    "name": "Example Services",
    "email": "dispatcher@example.com",
    "active": true,
    "duty_status": "online",
    "location": {
      "latitude": 52.2297,
      "longitude": 21.0122
    },
    "duty_started_at": "2026-11-02T09:00:00Z",
    "activation_code": "example"
  },
  "expires_at": "2026-11-02T09:00:00Z"
}
Response schema
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/DriverSessionResponse"
    },
    {
      "$ref": "#/components/schemas/DriverBusinessChoices"
    }
  ]
}

401 · Missing/invalid/revoked token

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unauthorized",
    "message": "Missing/invalid/revoked token"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

403 · Business membership or required API-key scope denied

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unauthorized",
    "message": "Business membership or required API-key scope denied"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

404 · Record not found in authorized business

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "not_found",
    "message": "Record not found in authorized business"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

409 · Duplicate identifier, stale revision, expired reservation, protected publication or unavailable capacity

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "conflict",
    "message": "Duplicate identifier, stale revision, expired reservation, protected publication or unavailable capacity"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

422 · Domain validation rejected the operation

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "validation",
    "message": "Domain validation rejected the operation"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

503 · Required persistence, map/routing or other infrastructure unavailable

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unavailable",
    "message": "Required persistence, map/routing or other infrastructure unavailable"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}
← All endpointsIntegration workflows →