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.
https://automunch.site/db
| Endpoint | Purpose | Cost | Response 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 store | free | ~2–4s |
GET /v1/menu/modifiers?store_code=…&product_id=… | Modifier tree for one product (sizes, milk, flavors…) | free | ~1–2s |
GET /v1/accounts | Your accounts with live Welcome / Birthday reward state — filter by which reward is still available | free | <0.5s |
POST /v1/accounts/scan | Force a one-off rescan of every account you own (fire-and-forget) — bypasses the 12h scheduler | free | <0.5s (returns PID + ETA) |
POST /v1/gen | Fresh account signup — response includes pass_url, a shareable loyalty-card page | $0.10 | ~30–60s |
POST /v1/order | Place a free-drink order with an existing account | $0.10 | ~20–40s |
POST /v1/full | Signup + 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: 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
curl https://automunch.site/db/health
{ "ok": true, "service": "db_api",
"signup": true, "engine": true, "receipt": true }
Find Stores Near a Zip
Uses your latest saved DB account to hit the Dutch Bros store locator. Pass ?email= to use a specific account.
| Query | Required | Notes |
|---|---|---|
zip | Yes | US zip code (e.g. 32822) |
radius | No | Miles (default 20) |
email | No | Specific DB account to use for the lookup |
include_closed | No | Set 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. |
curl -H "Authorization: Bearer am_live_..." \ "https://automunch.site/db/v1/stores?zip=32822"
{
"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.
Get Modifiers for a 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).
| Query | Required | Notes |
|---|---|---|
product_id | Yes | From /v1/menu (integer) |
store_code or zip | Either | Needed to warm the session |
email | No | Specific DB account to use |
curl -H "Authorization: Bearer am_live_..." \ "https://automunch.site/db/v1/menu/modifiers?store_code=FL0104&product_id=118275906"
{
"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
SMS provider (GetAText or OhMyOTP) + key are pulled from your Discord /settings (DB → SMS Config). No body fields required.
curl -X POST \
-H "Authorization: Bearer am_live_..." \
-H "Content-Type: application/json" \
-d '{}' \
https://automunch.site/db/v1/gen
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] + "...")
{
"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
Identify the account to use via either email (DB lookup) or by supplying id_token & cognito_username directly from a prior /v1/gen response.
| Field | Type | Required | Notes |
|---|---|---|---|
zip | string | Yes | US zip — resolves to the nearest active store |
email | string | Either | Looked up in dbros_accounts |
id_token | string | Either | From a previous /v1/gen response |
cognito_username | string | With id_token | e.g. cu-abc-123 |
phone, first_name, last_name | string | With id_token | From the signup response |
store_code | string | No | Skip the zip picker (e.g. FL0104) |
product_id | integer | No | Specific drink from /v1/menu. Omitting it auto-picks the cheapest qualifying free drink. |
product_name | string | No | Display-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. |
options | string | With product_id | CSV of option ids from /v1/menu/modifiers, e.g. "111002,112001". Must satisfy every min >= 1 modifier group of the chosen product. |
place_twice | boolean | No | Place 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. |
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
{
"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
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.
curl -X POST \
-H "Authorization: Bearer am_live_..." \
-H "Content-Type: application/json" \
-d '{"zip":"32822"}' \
https://automunch.site/db/v1/full
{
"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
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.
| Query | Required | Notes |
|---|---|---|
reward | No | Filter to accounts with a specific reward live. Values: welcome (Medium drinks), birthday (Large drinks), or any (at least one live reward). |
only_live | No | Set 1 to hide accounts whose rewards are all spent or who have never been scanned. Default 0. |
include_cli | No | Set 1 to also include the shared CLI account pool alongside yours. Default 0. |
limit | No | Max accounts returned (default 100, max 500). The summary counts cover every matching account regardless of limit. |
curl -H "Authorization: Bearer am_live_..." \ "https://automunch.site/db/v1/accounts?reward=welcome"
{
"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 Largeproduct_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 returns402 paytronix_balanceif 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
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.
| Field | Type | Required | Notes |
|---|---|---|---|
limit | integer | No | Max 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. |
curl -X POST \
-H "Authorization: Bearer am_live_..." \
-H "Content-Type: application/json" \
-d '{}' \
https://automunch.site/db/v1/accounts/scan
{
"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."
}
{
"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 populatesrewards_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/orderor/v1/fullimmediately flips the burned reward’s entry toapplied: truewithquantityavailable: 0,applied_at: <UTC ISO>, andapplied_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
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.
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.
| Status | error_code | Meaning / recovery |
|---|---|---|
400 | — | Bad request body (missing zip, no SMS key in /settings). |
400 | vendor_no_pickup | Target 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). |
402 | paytronix_balance | The 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. |
503 | store_closed | Dutch 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). |
