← Developer home

Doeh POS — Rider API (1.0.0)

Download OpenAPI specification:

Public rider API, served by the edge gateway. Bearer-token auth; shop scope derived from the token. A job is claimed (accepted) by exactly one rider — concurrent claims are resolved atomically. Only the assigned rider may advance the job (actor-ownership).

Rider

Create a delivery job (offered)

Authorizations:
MerchantAuth
header Parameters
Idempotency-Key
string <= 200 characters
Trace-Id
string
Request Body schema: application/json
required
pickup
required
string non-empty
dropoff
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "pickup": "string",
  • "dropoff": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "job": {
    }
}

Read a job

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Trace-Id
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "job": {
    }
}

Claim a job (exclusive)

First rider to accept wins. Subsequent claims are rejected as already assigned.

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Idempotency-Key
string <= 200 characters
Trace-Id
string
Request Body schema: application/json
required
rider_id
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "rider_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "job": {
    }
}

Advance a job's status (owning rider only)

Only the assigned rider may advance. Idempotent by target state. Illegal transitions are rejected. accepted -> picked_up -> delivered.

Authorizations:
MerchantAuth
path Parameters
id
required
string^[A-Za-z0-9_]+$
header Parameters
Trace-Id
string
Request Body schema: application/json
required
rider_id
required
string non-empty
to
required
string (JobStatus)
Enum: "offered" "accepted" "picked_up" "delivered" "cancelled"

Responses

Request samples

Content type
application/json
{
  • "rider_id": "string",
  • "to": "offered"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "idempotent": true,
  • "job": {
    }
}