API REFERENCE

Register APNs/FCM device for published-plan notifications

POST/api/v1/driver/push-devices

Driver session only; APNs token requires even-length hexadecimal. Push transport requires deployment credentials; registering a token is not proof of delivery/receipt. Driver refresh remains authoritative.

Authentication

Requires a driver bearer session. Administrator sessions and integration keys cannot perform this driver action.

Parameters

No path or query parameters.

Request

FieldTypeDescription & constraints
providerRequiredapns | fcmResource-specific value; see the related workflow and schema.
device_tokenRequiredstringResource-specific value; see the related workflow and schema.Max length: 4096

Example JSON body

{
  "provider": "apns",
  "device_token": "example"
}
Request schema
{
  "type": "object",
  "properties": {
    "provider": {
      "enum": [
        "apns",
        "fcm"
      ]
    },
    "device_token": {
      "type": "string",
      "maxLength": 4096
    }
  },
  "required": [
    "provider",
    "device_token"
  ]
}

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/push-devices' \
  --header 'Authorization: Bearer REPLACE_WITH_DRIVER_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"provider":"apns","device_token":"example"}'

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
idstringIdentifier unique within its authorized business. Some create operations generate it when omitted.
created_atstringRFC3339 UTC instant or explicit offset; business wall times are resolved separately.Format: date-time
updated_atstringRFC3339 UTC instant or explicit offset; business wall times are resolved separately.Format: date-time
revisionintegerCurrent version used to detect stale edits or publication.
deleted_atstring | nullSystem-managed UTC soft-deletion instant; null for active records.Format: date-time
deleted_bystring | nullDeletion actor retained for history.Format: uuid
Illustrative response
{
  "id": "example-id",
  "created_at": "2026-11-02T09:00:00Z",
  "updated_at": "2026-11-02T09:00:00Z",
  "revision": 1,
  "deleted_at": "2026-11-02T09:00:00Z",
  "deleted_by": "11111111-1111-4111-8111-111111111111"
}
Response schema
{
  "$ref": "#/components/schemas/Record"
}

401 · Invalid/revoked driver session

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": "Invalid/revoked driver session"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

403 · Required driver permission 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": "Required driver permission denied"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

404 · Not found in own 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": "Not found in own business"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

422 · Validation failed

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": "Validation failed"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

503 · Required 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 infrastructure unavailable"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}
← All endpointsIntegration workflows →