Quickstart

Run the server locally, set your API key, and call the API. Every example below works against the real product.

1. Start the server

pip install -r requirements.txt
python app.py

2. Set your API key

export DOTREADY_API_KEY="your-key-here"   # see .env.example

When the key is set, programmatic /api/* calls require an X-API-Key header. Full endpoint reference: OPENAPI.md in the repo.

3. Try it

Add a driver

curl -s -X POST localhost:5000/api/drivers -H "Content-Type: application/json" -H "X-API-Key: $DOTREADY_API_KEY" -d '{"name":"Maria Lopez","cdl_state":"FL"}'

Mark a DQ item complete

curl -s -X POST localhost:5000/api/drivers/DRIVER_ID/items -H "Content-Type: application/json" -H "X-API-Key: $DOTREADY_API_KEY" -d '{"item":"medical_card","status":"complete","expiry":"2027-03-01"}'

Log HOS hours

curl -s -X POST localhost:5000/api/hos -H "Content-Type: application/json" -H "X-API-Key: $DOTREADY_API_KEY" -d '{"driver_id":"DRIVER_ID","day":"2026-10-15","drive_hrs":8.5,"onduty_hrs":10}'

Nightly expiry scan

python -m expiry_scan   # run via cron; flags expiring/lapsed items