Dutch Bros API

Signup Dutch Bros loyalty accounts and place the free welcome-reward drink order over a unified REST API. Synchronous — no polling, just one call per step. Half-credit pricing with automatic refunds on failure.

Overview

Three synchronous endpoints: signup a fresh Dutch Bros loyalty account, place an order with an existing one, or do both in a single call. Each successful signup and each successful placement costs 0.5 credits; the end-to-end /v1/full flow totals 1 credit. Failures are automatically refunded.

Base URL

https://automunch.site/db

EndpointPurposeCostResponse time
GET /v1/stores?zip=…Find Dutch Bros stores near a zip (code, nickname, address, DT/WU, open-now)free~1–3s
GET /v1/menu?store_code=…Full menu (categories → products) for a storefree~2–4s
GET /v1/menu/modifiers?store_code=…&product_id=…Modifier tree for one product (sizes, milk, flavors…)free~1–2s
GET /v1/accountsYour accounts with live Welcome / Birthday reward state — filter by which reward is still availablefree<0.5s
POST /v1/accounts/scanForce a one-off rescan of every account you own (fire-and-forget) — bypasses the 12h schedulerfree<0.5s (returns PID + ETA)
POST /v1/genFresh account signup — response includes pass_url, a shareable loyalty-card page$0.10~30–60s
POST /v1/orderPlace a free-drink order with an existing account$0.10~20–40s
POST /v1/fullSignup + place in one call$0.20~60–90s

Typical API flow: POST /v1/gen to create an account → GET /v1/stores?zip=… to find a store → GET /v1/menu?store_code=… to list drinks → GET /v1/menu/modifiers?product_id=…&store_code=… to see required sizes/options → POST /v1/order with your chosen product_id and options CSV.

Authentication

Bearer token in the Authorization header. Keys are prefixed am_live_ — the same key you use for every other AutoMunch brand API — and are minted with /api_key action:Create on Discord.

Authorization Header
Authorization: Bearer am_live_your_key_here

Pricing & Refunds

Credits are charged when a step succeeds, not when it starts. If the signup fails, the 0.5 credit is refunded. If the order fails, its 0.5 credit is refunded. If you use /v1/full and only the signup succeeds, you're charged 0.5 credit (the account itself is still yours to use via /v1/order later).

Internally this uses a half-credit overage mechanism on the wallet — the first half-charge debits a whole credit and banks the leftover half; the next half-charge consumes the banked half with no new debit. Refunds reverse the overage symmetrically.

Health

GET /db/health Service & module status
Request
curl https://automunch.site/db/health
200 Response
{ "ok": true, "service": "db_api",
  "signup": true, "engine": true, "receipt": true }

Find Stores Near a Zip

GET /db/v1/stores Nearby active stores — free, read-only

Uses your latest saved DB account to hit the Dutch Bros store locator. Pass ?email= to use a specific account.

QueryRequiredNotes
zipYesUS zip code (e.g. 32822)
radiusNoMiles (default 20)
emailNoSpecific DB account to use for the lookup
include_closedNoSet 1 to also return stores that are currently closed per their posted hours. Default hides them so the top result is always a candidate for /v1/order.
Request
curl -H "Authorization: Bearer am_live_..." \
  "https://automunch.site/db/v1/stores?zip=32822"
200 Response
{
  "stores": [
    { "store_code": "FL0104",
      "nickname": "Lake Nona",
      "address": "10609 Narcoossee Rd",
      "city": "Orlando", "state": "FL", "zip": "32832",
      "drive_thru": true, "walk_up": true,
      "hours": "Sun-Thu: 05am-10pm, Fri-Sat: 05am-11pm",
      "is_open_now": true,
      "hours_detail": "Open · closes 10pm" },
    { "store_code": "FL0102", ... }
  ],
  "count": 8,
  "hidden_closed_count": 2
}

Pickup-order tip: when auto-picking a store from /v1/order or /v1/full (no explicit store_code), the server filters this list to stores where is_open_now != false AND walk_up == true. Stores with walk_up: false only accept drive-thru orders and will reject the engine’s pickup request. Use include_closed=1 here to see the raw list including after-hours stores.

List the Menu

GET /db/v1/menu Full menu for a store — categories → products

Every product carries an id field — that's what you pass as product_id in POST /v1/order or POST /v1/full.

QueryRequiredNotes
store_codeEitherFrom /v1/stores (e.g. FL0104)
zipEitherFalls back to the nearest active store
emailNoSpecific DB account to use
Request
curl -H "Authorization: Bearer am_live_..." \
  "https://automunch.site/db/v1/menu?store_code=FL0104"
200 Response (truncated)
{
  "store": {
    "code": "FL0104", "nickname": "Lake Nona",
    "address": "10609 Narcoossee Rd, Orlando, FL 32832"
  },
  "categories": [
    {
      "name": "Iced Dutch Faves",
      "products": [
        { "id": 118275906,
          "name": "Golden Eagle",
          "cost": 5.95,
          "image_url": "https://olo-images-live.imgix.net/94/...",
          "description": "Vanilla, caramel, half-and-half & espresso" },
        { "id": 118275907, "name": "Caramelizer", ... }
      ]
    },
    { "name": "Hot Dutch Faves", "products": [...] },
    ...
  ],
  "category_count": 24,
  "product_count": 187
}

Get Modifiers for a Product

GET /db/v1/menu/modifiers Option groups (Size, Milk, Flavor…) for one product

For every group with min >= 1, include at least min option ids in the options CSV you pass to /v1/order. Walk the tree if an option has has_children: true (nested modifiers unlocked by that pick).

QueryRequiredNotes
product_idYesFrom /v1/menu (integer)
store_code or zipEitherNeeded to warm the session
emailNoSpecific DB account to use
Request
curl -H "Authorization: Bearer am_live_..." \
  "https://automunch.site/db/v1/menu/modifiers?store_code=FL0104&product_id=118275906"
200 Response
{
  "product_id": 118275906,
  "store_code": "FL0104",
  "required_group_count": 2,
  "groups": [
    {
      "id": 44231, "description": "Size",
      "min": 1, "max": 1,
      "options": [
        { "id": 111001, "name": "Small (16oz)",   "cost": 0,
          "isdefault": false, "has_children": true },
        { "id": 111002, "name": "Medium (24oz)",  "cost": 0,
          "isdefault": true,  "has_children": true },
        { "id": 111003, "name": "Large (32oz)",   "cost": 0,
          "isdefault": false, "has_children": true }
      ]
    },
    {
      "id": 44232, "description": "Milk",
      "min": 1, "max": 1,
      "options": [
        { "id": 112001, "name": "Whole Milk",    "cost": 0, "isdefault": true,  "has_children": false },
        { "id": 112002, "name": "Oat Milk",      "cost": 0.70 },
        { "id": 112003, "name": "Almond Milk",   "cost": 0.70 }
      ]
    }
  ]
}

Example options CSV to pair with product_id=118275906: options=111002,112001 (Medium + Whole Milk).

Signup Account

POST /db/v1/gen Fresh Dutch Bros signup

SMS provider (GetAText or OhMyOTP) + key are pulled from your Discord /settings (DB → SMS Config). No body fields required.

Request
curl -X POST \
  -H "Authorization: Bearer am_live_..." \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://automunch.site/db/v1/gen
Python
import requests
H = {"Authorization": "Bearer am_live_..."}
r = requests.post("https://automunch.site/db/v1/gen",
                  headers=H, json={}, timeout=120)
print(r.json()["email"], r.json()["id_token"][:12] + "...")
200 Response
{
  "ok": true,
  "email": "casey.smith.ab12@hotmail.com",
  "phone": "+13055550123",
  "first_name": "Casey", "last_name": "Smith",
  "cognito_username": "cu-abc-123",
  "id_token": "eyJraWQ...",
  "refresh_token": "eyJjdHk...",
  "device_id": "AF:A3:...",
  "primary_card_number": "6039500012345678",
  "pass_url": "https://ext.automunch.site/dbros/edde75485b53dbc9.html",
  "credits_charged": 0.5,
  "credits_remaining": 4.5
}

pass_url is a shareable, no-login page that renders the account’s Dutch Bros loyalty card as a scannable QR plus a live countdown of its two free-drink rewards (Welcome Medium Drink — expires 14 days from signup; Birthday Drink — 31 days, any size up to Large). The URL hash is a stable function of primary_card_number + phone, so it never changes for a given account and can be bookmarked or DM’d straight to the end user. primary_card_number is the 16-digit loyalty card itself — keep it if you want to build your own pass or scan at the counter.

Place Order

POST /db/v1/order Free-drink order with an existing account

Identify the account to use via either email (DB lookup) or by supplying id_token & cognito_username directly from a prior /v1/gen response.

FieldTypeRequiredNotes
zipstringYesUS zip — resolves to the nearest active store
emailstringEitherLooked up in dbros_accounts
id_tokenstringEitherFrom a previous /v1/gen response
cognito_usernamestringWith id_tokene.g. cu-abc-123
phone, first_name, last_namestringWith id_tokenFrom the signup response
store_codestringNoSkip the zip picker (e.g. FL0104)
product_idintegerNoSpecific drink from /v1/menu. Omitting it auto-picks the cheapest qualifying free drink.
product_namestringNoDisplay-name hint for product_id. If omitted, resolved from the store menu so the success feed shows the real drink name (e.g. "Golden Eagle") rather than "Product 118275906". Passing it saves one menu round-trip.
optionsstringWith product_idCSV of option ids from /v1/menu/modifiers, e.g. "111002,112001". Must satisfy every min >= 1 modifier group of the chosen product.
place_twicebooleanNoPlace the same drink twice back-to-back if the account has 2+ qualifying rewards (Welcome + Birthday). Doubles the cost to $0.20; any unused half is refunded if only one lands.
Request (with email)
curl -X POST \
  -H "Authorization: Bearer am_live_..." \
  -H "Content-Type: application/json" \
  -d '{"zip":"32822","email":"casey.smith.ab12@hotmail.com"}' \
  https://automunch.site/db/v1/order
200 Response
{
  "ok": true,
  "orders_placed": 1,
  "order_id": "202497",
  "olo_id": "5fbfbe8f-9904-4c4b-b002-...",
  "total": 0.0, "subtotal": 5.95,
  "store_code": "FL0104",
  "store_nickname": "Lake Nona",
  "store_address": "10609 Narcoossee Rd, Orlando, FL 32832",
  "pickup_time_str": "8:54 PM",
  "product_name": "Golden Eagle",
  "product_size": "Medium (24oz)",
  "reward_applied": "Welcome Medium Drink",
  "orders": [
    {
      "order_id": "202497",
      "olo_id": "5fbfbe8f-...",
      "reward_applied": "Welcome Medium Drink",
      "reward_reference": "666",
      "total": 0.0, "subtotal": 5.95, "discount": 5.95,
      "product_name": "Golden Eagle",
      "product_size": "Medium (24oz)",
      "pickup_time_str": "8:54 PM"
    }
  ],
  "amount_charged": 0.10,
  "balance_remaining": 4.00
}

Signup + Order

POST /db/v1/full One call, atomic

Does signup + order in a single synchronous call. $0.10 at signup success, $0.10 at order success — either leg’s failure refunds its own half. Accepts the same optional ordering fields as /v1/order: store_code, product_id, product_name, options, place_twice.

Request
curl -X POST \
  -H "Authorization: Bearer am_live_..." \
  -H "Content-Type: application/json" \
  -d '{"zip":"32822"}' \
  https://automunch.site/db/v1/full
200 Response (merged envelopes)
{
  "ok": true,
  "signup": {
    "email": "...", "phone": "...", "id_token": "...",
    "primary_card_number": "6039500012345678",
    "pass_url": "https://ext.automunch.site/dbros/edde75485b53dbc9.html",
    ...
  },
  "order":  { "order_id": "202497", "total": 0.0,
              "pickup_time_str": "4:54 PM", ... },
  "credits_charged": 1.0,
  "credits_remaining": 4.0
}

List Your Accounts with Reward State

GET /db/v1/accounts Live reward state per account — free

Each Dutch Bros account earns two free-drink rewards at signup: Welcome Medium Drink (covers Medium-size drinks) and No way! It’s your b-day! (covers Large). This endpoint tells you which of your accounts still have which reward live, so you can pick the right account for the size you want.

Reward state is refreshed by a 12-hour scanner and written back instantly whenever any /v1/order or /v1/full succeeds — so a reward you just burned shows as spent within a second, no polling required. See Reward Tracking below for the write-back contract.

QueryRequiredNotes
rewardNoFilter to accounts with a specific reward live. Values: welcome (Medium drinks), birthday (Large drinks), or any (at least one live reward).
only_liveNoSet 1 to hide accounts whose rewards are all spent or who have never been scanned. Default 0.
include_cliNoSet 1 to also include the shared CLI account pool alongside yours. Default 0.
limitNoMax accounts returned (default 100, max 500). The summary counts cover every matching account regardless of limit.
Request — accounts with Welcome (Medium) still live
curl -H "Authorization: Bearer am_live_..." \
  "https://automunch.site/db/v1/accounts?reward=welcome"
200 Response
{
  "accounts": [
    {
      "id": 86,
      "email": "SallyLakeoq@yahoo.com",
      "postal_code": "59601",
      "created_at": "2026-11-26 03:18:40",
      "rewards_updated_at": "2026-12-03 22:46:39",
      "scan_age_hours": 5.72,
      "welcome_live": true,
      "birthday_live": true,
      "live_rewards": [
        { "label": "Welcome Medium Drink",
          "reference": "666", "size_hint": "Medium only" },
        { "label": "No way! It's your b-day!",
          "reference": "29",  "size_hint": "Any (up to Large)" }
      ]
    },
    { "id": 62, "email": "SallyJones1gz@proton.me", ... }
  ],
  "returned": 3,
  "total_matched": 3,
  "summary": {
    "total_accounts": 4,
    "welcome_live": 3,
    "birthday_live": 3,
    "both_live": 3,
    "no_live_rewards": 1,
    "never_scanned": 0
  },
  "scope": {
    "user_ids": ["393352062848729088"],
    "reward_filter": "welcome",
    "only_live": false,
    "limit": 100
  }
}

Reward → size semantics:

  • Welcome Medium Drink — strictly Medium (24oz). Dutch Bros rejects it against any other size, so pairing it with a Large product_id/options will fail at validate.
  • No way! It’s your b-day! — dollar-capped free-drink coupon, roughly tuned to Large’s retail. Works on Small / Medium / Large, but at premium markets (e.g. LA) a Large can exceed the cap — the shortfall falls through to Paytronix and returns 402 paytronix_balance if the account’s gift-card balance is $0.

The size_hint field returned in live_rewards[] captures this: "Medium only" for Welcome, "Any (up to Large)" for Birthday.

Force-Scan Your Accounts

POST /db/v1/accounts/scan Fire-and-forget rescan of every account you own — free

Kicks the reward-snapshot scanner for every dbros_accounts row belonging to you — right now, without waiting up to 12h for the scheduled sweep. Useful right after a batch of /v1/gen calls when you want /v1/accounts to reflect their live Welcome/Birthday state in seconds instead of hours.

The call is fire-and-forget: the HTTP response returns immediately with a PID and a rough ETA. The scanner runs in a detached process (5-worker concurrency, ~1s per account) and writes each result into dbros_accounts.rewards_json + rewards_updated_at as it goes. Poll GET /v1/accounts to watch rows flip from never_scanned → live counts.

FieldTypeRequiredNotes
limitintegerNoMax accounts to rescan in this run. Default 1000 (effectively unlimited for most callers). Capped server-side at 500 accounts per call — if you have more, call again after the first batch finishes.
Request
curl -X POST \
  -H "Authorization: Bearer am_live_..." \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://automunch.site/db/v1/accounts/scan
200 Response
{
  "ok": true,
  "accounts_queued": 104,
  "estimated_duration_s": 34,
  "pid": 25991,
  "log_path": "/tmp/dbros_scan_<your_uid>_<ts>.log",
  "message": "Scan running for ~34s on 104 account(s). Poll GET /v1/accounts — rows flip from never_scanned → live_rewards as the scanner finishes each one."
}
200 Response — no accounts to scan
{
  "ok": true,
  "accounts_queued": 0,
  "estimated_duration_s": 0,
  "pid": 0,
  "log_path": "",
  "message": "No accounts belong to you yet — nothing to scan."
}

Concurrency safety: you can call this repeatedly — each call spawns its own scanner process with a unique PID and log file. If you launch a second scan while the first is still running, they both run in parallel (5 workers each, 10 total) and both update the same rows safely; the last writer wins per account.

What gets refreshed: for each account we hit Dutch Bros’ Rockta loyalty endpoint directly, pull the full list of qualifying rewards (name, description, days-until-expiry, applied/unapplied state), and overwrite rewards_json with the fresh snapshot. Accounts whose Cognito refresh-token has expired are skipped and left in their prior state. Scan is read-only on Dutch Bros’ side — it never burns or claims a reward.

Reward Tracking

Every Dutch Bros account carries a cached snapshot of its live qualifying rewards in dbros_accounts.rewards_json. The snapshot is kept fresh by two complementary mechanisms:

  • 12-hour background scanner — walks every account, hits Dutch Bros’ Rockta loyalty endpoint, writes the full reward list back to rewards_json. Also populates rewards_updated_at.
  • On-demand scan — POST /v1/accounts/scan (see above) kicks the same scanner for every account you own right now, so freshly minted accounts show live reward state within seconds instead of waiting for the next sweep. Free, fire-and-forget.
  • Instant write-back on burn — every successful /v1/order or /v1/full immediately flips the burned reward’s entry to applied: true with quantityavailable: 0, applied_at: <UTC ISO>, and applied_source: "api_order" (or "api_full", or "discord_order" for Discord picker orders).

Which means: after you call POST /v1/order, a follow-up GET /v1/accounts on the same account will immediately reflect the burn — no need to wait for the next scanner pass. The per-order reward_reference (e.g. "666" for Welcome, "29" for Birthday) is included on every order record so you can match the burn precisely.

Staleness caveat: if an account’s reward was burned outside this API (e.g. through the official Dutch Bros app) between scans, /v1/accounts will keep showing it as live until the next 12h scan catches it. In that case, /v1/order on that account returns a clean 502 and refunds your credit automatically.

JSON Schema

GET /db/v1/schema Machine-readable endpoint shapes

Per-endpoint schemas are also available: /db/v1/schema/gen, /db/v1/schema/order, /db/v1/schema/full, /db/v1/schema/stores, /db/v1/schema/menu, /db/v1/schema/modifiers, /db/v1/schema/accounts.

Request
curl https://automunch.site/db/v1/schema

Error Codes

Order errors carry a structured error_code field on top of the HTTP status when the engine can pin down the cause. This lets you auto-retry the right thing (another store, a different size) instead of guessing.

Statuserror_codeMeaning / recovery
400—Bad request body (missing zip, no SMS key in /settings).
400vendor_no_pickupTarget store has walk-up disabled. ineligible_stores[] lists which stores near the zip are drive-thru only — pick a different store_code. Retriable.
401—Missing or invalid API key.
402—Insufficient balance ($0.10 for /v1/order, $0.20 for /v1/full, $0.20 / $0.30 with place_twice).
402paytronix_balanceThe reward didn’t fully cover the drink and the account’s gift-card balance is $0. Common when ordering a Large drink against the Welcome Medium reward — use /v1/accounts?reward=birthday to find an account with the Large reward live, or pick a Medium drink. Not retriable on the same account/size.
404—No DB account for the email, or no stores online-ordering near the zip.
502—Signup or order engine failed in an uncategorised way. Credit already refunded.
503store_closedDutch Bros returned num:218 "currently closed" at validate time (store posted-hours said open but DB’s own ordering window had just shut). Retriable at a different store — pass a different store_code.
503—Server-side signup/engine module unavailable (contact support).