⚡ Quick Start
rk_...)X-API-Key on every requesthttps://polarmunch.comRate limit: 60 requests/min per key. Returns
429 with retry_after if exceeded.
🔒 Authentication
Every request requires your API key in the X-API-Key header.
curl -H "X-API-Key: rk_your_key_here" https://polarmunch.com/api/key/info
Invalid or missing keys return 401. Revoked keys return 403.
🔄 How It Works
1. Select service — Choose from Whataburger, Insomnia Cookies, DoorDash, Taco Bell, or Gas Rewards.
2. Create order — Use the service-specific API to build an order (e.g. /api/wb/order for Whataburger).
3. Collect payment — Charge your customer however you want (Stripe, PayPal, crypto, etc). This is entirely on your end.
4. Confirm — Confirm the order via the API. Wholesale cost is deducted from your balance.
5. Result — Your webhook gets order.completed or order.failed. On failure, balance is refunded automatically.
📡 General Endpoints
GET /api/key/info
Your account details, pricing tiers, and current balance.
{
"reseller": "Chef_Luka",
"guild_id": "1423071325974560780",
"server_name": "Max Eats",
"balance": 342.00,
"entree_price": 7.00,
"bulk_price": 6.00,
"bulk_threshold": 2,
"premium_entree_price": 8.00,
"premium_bulk_price": 7.00,
"max_entrees_per_order": 4,
"max_orders_per_day": 5,
"orders_today": 2,
"total_orders": 158,
"total_entrees": 235,
"webhook_url": "https://yoursite.com/webhook",
"webhook_active": true,
"active": true
}
GET /api/balance
Your balance breakdown. pending_holds = wholesale cost of parsed but not yet queued orders.
{
"balance": 342.00,
"pending_holds": 14.00,
"available": 328.00
}
🍔 Whataburger Endpoints
Order Whataburger entrees (burgers & chicken sandwiches) using linked accounts. WB orders execute immediately on confirmation — no scheduled checkout windows.
Order IDs:
WB-xxxxxxxx • Expires: 15 minutes after creation
GET /api/wb/stock
Check Whataburger account availability and pricing for your reseller tier.
{
"burger": {"available": 42, "in_stock": true, "price": 3.00},
"chickn": {"available": 18, "in_stock": true, "price": 3.00},
"max_entrees_per_order": 6,
"wb_enabled": true
}
POST /api/wb/stores
Search for Whataburger locations near a ZIP code. Use the id field when creating orders.
Request:
{
"zipcode": "77001",
"count": 5
}
Response:
{
"stores": [
{
"id": "1234",
"name": "Whataburger #1234",
"address": "123 Main St",
"city": "Houston",
"state": "TX",
"zip": "77001",
"phone": "713-555-1234"
}
]
}
POST /api/wb/order
Create a pending WB order. Reserves accounts and holds for 15 minutes. Nothing charged yet.
Request:
{
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"zipcode": "77001",
"store_id": "1234",
"items": [
{
"type": "burger",
"toppings": {"Tomato": 0, "Pickles": 3, "Mustard": 1}
},
{
"type": "burger"
},
{
"type": "chickn",
"toppings": {"Pickles": 3}
}
]
}
items is one entry per entree. Each has a type and optional toppings dict. Topping keys are names from /api/wb/menu, values are levels (0-3). Omitted toppings keep their default. Omit toppings entirely for a default build.
Response:
{
"order_id": "WB-a1b2c3d4",
"status": "pending_payment",
"store": {"id": "1234", "name": "Whataburger #1234", "address": "123 Main St, Houston, TX"},
"items": [
{"type": "burger", "toppings": {"Tomato": 0, "Pickles": 3, "Mustard": 1}},
{"type": "burger", "toppings": "default"},
{"type": "chickn", "toppings": {"Pickles": 3}}
],
"entree_count": 3,
"pricing": [
{"type": "burger", "qty": 2, "unit_price": 3.00, "subtotal": 6.00},
{"type": "chickn", "qty": 1, "unit_price": 3.00, "subtotal": 3.00}
],
"total_price": 9.00,
"wholesale_cost": 2.25,
"expires_at": "2026-08-22T18:30:00+00:00",
"balance_after": 47.75
}
| Error | Status | Reason |
|---|---|---|
| missing_field | 400 | Required field not provided |
| invalid_type | 400 | Item type must be "burger" or "chickn" |
| invalid_zipcode | 400 | Must be a valid 5-digit ZIP |
| limit_exceeded | 400 | Too many entrees for your tier |
| store_not_found | 400 | Store ID not found near given ZIP |
| insufficient_stock | 400 | Not enough accounts available |
| insufficient_balance | 402 | Not enough balance |
| wb_disabled | 403 | Whataburger not enabled for your key |
| stock_conflict | 409 | Stock changed during order — retry |
POST /api/wb/order/{order_id}/confirm
Confirm and execute the order. Wholesale cost is deducted. Orders are placed immediately (no scheduled checkout).
Request:
{
"discord_user_id": "123456789012345678"
}
discord_user_id is optional. All other fields come from the original order.
Response:
{
"order_id": "WB-a1b2c3d4",
"status": "processing",
"cost_deducted": 2.25,
"remaining_balance": 47.75,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| not_found | 404 | Order ID doesn't exist |
| forbidden | 403 | Order belongs to another reseller |
| already_processing | 409 | Already being placed |
| already_finished | 409 | Already completed or failed |
| order_expired | 410 | 15-minute window passed |
| insufficient_balance | 402 | Balance dropped since order creation |
GET /api/wb/order/{order_id}
Check WB order status. Extra fields depend on status:
| Status | Extra Fields |
|---|---|
| pending_payment | store, items, pricing, total_price, wholesale_cost, expires_at |
| processing | message |
| completed | store, order_numbers[], entrees[], entrees_delivered, entrees_failed, cost_deducted, refunded_amount, partial, failures[] |
| failed | reason, refunded_amount, failures[] |
| expired | message |
The entrees array gives per-entree detail: type, order_number, and pickup_time. The store object is included so you don't need to remember it from the creation step. When partial is true, some entrees succeeded and some failed — failed entrees are refunded automatically.
The failures array (present on failed and partial completed) gives per-item detail:
{
"failures": [
{
"item_index": 0,
"type": "burger",
"reason_code": "store_closed",
"reason": "Store is closed for online orders"
}
]
}
| reason_code | Meaning |
|---|---|
| store_closed | Store is closed or not accepting orders |
| out_of_stock | Item unavailable at this location |
| no_pickup_times | No pickup times / at capacity |
| no_stock | No accounts available (our side) |
| account_error | Account login/auth failure |
| store_error | General store/location issue |
| validation_failed | Order validation rejected |
| submit_failed | Order submission rejected |
| order_failed | Other/unknown failure |
🍪 Insomnia Cookies Endpoints
Order Insomnia Cookies for pickup using loyalty accounts. Like Whataburger, orders execute immediately on confirmation. One product (Classic Cookie), 11 flavors, up to 4 per order.
Order IDs:
IC-xxxxxxxx • Expires: 15 minutes after creation
GET /api/insom/stock
Check Insomnia Cookies availability, pricing, and available flavors.
{
"insom_enabled": true,
"cookies": {
"available": 42,
"in_stock": true,
"price": 2.00
},
"max_cookies_per_order": 4,
"flavors": {
"4": "Chocolate Chunk",
"3323": "Cookies 'N Cream",
"16": "Double Chocolate Chunk",
"5": "Oatmeal Raisin",
"13": "Snickerdoodle",
"11": "White Chocolate Macadamia",
"12": "Peanut Butter Chip",
"6": "Sugar",
"323": "VGF Chocolate Chip",
"1001": "Vegan Birthday Cake",
"1002": "Vegan Chocolate Chunk"
}
}
POST /api/insom/stores
Search for Insomnia Cookies locations near a ZIP code. Use the external_id when creating orders.
Request:
{
"zipcode": "10001"
}
Response:
{
"stores": [
{
"external_id": "73",
"name": "Insomnia Cookies - Greenwich Village",
"address": "164 Bleecker St",
"city": "New York",
"state": "NY",
"zip": "10012",
"lat": 40.7289,
"lng": -73.9997
}
]
}
| Error | Status | Reason |
|---|---|---|
| invalid_zipcode | 400 | Not a valid 5-digit US ZIP code |
| service_unavailable | 503 | Unable to search locations right now |
POST /api/insom/order
Create a pending Insomnia Cookies order. Reserves cookie accounts and holds for 15 minutes. Nothing charged yet.
Request:
{
"first_name": "Sarah",
"last_name": "Johnson",
"email": "[email protected]",
"zipcode": "10001",
"store_id": "73",
"cookies": [
{"flavor_id": "4"},
{"flavor_id": "3323"},
{"flavor_id": "4"}
]
}
store_id (or store_external_id) is the external_id from /api/insom/stores. Each cookie needs a flavor_id from the menu. You can order multiples of the same flavor.
Response:
{
"order_id": "IC-a8f3c123",
"status": "pending_payment",
"store": {
"external_id": "73",
"name": "Insomnia Cookies - Greenwich Village",
"address": "164 Bleecker St",
"city": "New York",
"state": "NY",
"zip": "10012"
},
"cookies": [
{"flavor_id": "4", "flavor_name": "Chocolate Chunk"},
{"flavor_id": "3323", "flavor_name": "Cookies 'N Cream"},
{"flavor_id": "4", "flavor_name": "Chocolate Chunk"}
],
"cookie_count": 3,
"pricing": {"qty": 3, "unit_price": 2.00, "subtotal": 6.00},
"total_price": 6.00,
"wholesale_cost": 1.50,
"expires_at": "2026-08-24T18:30:00+00:00",
"balance_after": 340.50
}
| Error | Status | Reason |
|---|---|---|
| missing_field | 400 | Required field not provided |
| invalid_zipcode | 400 | Not a valid 5-digit ZIP |
| invalid_flavor | 400 | Unknown flavor_id |
| limit_exceeded | 400 | Too many cookies for your tier |
| store_not_found | 400 | Store not found for given external_id |
| insufficient_stock | 400 | Not enough cookie accounts |
| insufficient_balance | 402 | Not enough balance |
| stock_conflict | 409 | Stock changed — retry |
| service_unavailable | 503 | Unable to verify store |
POST /api/insom/order/{order_id}/confirm
Confirm and execute the order. Wholesale cost is deducted. Cookies are placed immediately.
Request: Empty body {} is fine.
Response:
{
"order_id": "IC-a8f3c123",
"status": "processing",
"cost_deducted": 1.50,
"remaining_balance": 340.50,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| not_found | 404 | Order doesn't exist |
| forbidden | 403 | Order belongs to another reseller |
| invalid_order | 400 | Not an Insomnia Cookies order |
| already_processing | 409 | Already being placed |
| already_finished | 409 | Already completed or failed |
| order_expired | 410 | 15-minute window passed |
| insufficient_balance | 402 | Balance dropped since order creation |
GET /api/insom/order/{order_id}
Check Insomnia order status. Extra fields depend on status:
| Status | Extra Fields |
|---|---|
| pending_payment | store, cookies, cookie_count, pricing, total_price, wholesale_cost, expires_at |
| processing | message |
| completed | store, cookies[], cookies_delivered, cookies_failed, cost_deducted, refunded_amount, partial, failures[] |
| failed | reason, refunded_amount, failures[] |
| expired | message |
The cookies array gives per-cookie detail: flavor_name, flavor_id, and pickup_time. When partial is true, some cookies succeeded and some failed — failed cookies are refunded automatically.
The failures array (present on failed and partial completed) gives per-cookie detail:
{
"failures": [
{
"cookie_index": 0,
"flavor": "Chocolate Chunk",
"reason_code": "out_of_stock",
"reason": "Cookie currently unavailable at this location"
}
]
}
| reason_code | Meaning |
|---|---|
| store_closed | Store is closed or not accepting orders |
| out_of_stock | Cookie/item unavailable at this location |
| no_pickup_times | No pickup times / at capacity |
| no_stock | No accounts available (our side) |
| account_error | Account login/auth failure |
| payment_error | FreedomPay / payment processing error |
| reservation_failed | Account reservation conflict |
| order_failed | Other/unknown failure |
🚚 DoorDash Endpoints
Order DoorDash delivery via the API. Submit a DoorDash cart/share link, delivery address, and VCC card details. Orders execute immediately on confirmation. Setup takes 5–10 seconds per order (live session with DoorDash).
Order IDs:
DD-xxxxxxxx • Expires: 15 minutes after creation
GET /api/dd/stock
Check DoorDash account availability and pricing.
{
"dd_enabled": true,
"accounts": {"available": 120, "in_stock": true},
"fee": 8.00,
"cost_per_order": 0.00,
"max_subtotal": 25.00,
"max_tip": 20.00,
"blocked_stores": ["Chick-fil-A", "Raising Cane's"]
}
POST /api/dd/order
Create a pending DoorDash order. Takes 5–10 seconds (sets up a live session with DoorDash). Requires a cart/share link and VCC card details.
Request:
{
"group_link": "https://drd.sh/cart/ABC123/",
"address": "123 Main St, 90210",
"card_number": "4111111111111111",
"card_exp": "08/28",
"card_cvv": "123",
"card_zip": "90210",
"name": "John Doe",
"tip": 2.00,
"dasher_instructions": "Leave at door"
}
group_link, address, card_number, card_exp, card_cvv, card_zip are required. name, tip (default 0), and dasher_instructions are optional.
Response:
{
"order_id": "DD-a1b2c3d4",
"status": "pending_payment",
"store_name": "McDonald's",
"items": [
{"name": "Big Mac", "quantity": 1, "price": 5.99},
{"name": "Large Fries", "quantity": 1, "price": 3.49}
],
"items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
"pricing": {
"subtotal": 9.48,
"discount": 3.79,
"subtotal_after_discount": 5.69,
"tip": 2.00,
"service_fee": 8.00,
"total": 15.69
},
"promo_applied": true,
"dashpass_applied": true,
"name": "John Doe",
"address": "123 Main St, Los Angeles, CA 90210, USA",
"dasher_instructions": "Leave at door",
"expires_at": "2026-08-31T16:15:00+00:00",
"cost_to_confirm": 0.00,
"reseller_balance": 150.00
}
| Error | Status | Reason |
|---|---|---|
| dd_disabled | 403 | DoorDash not enabled for this reseller |
| concurrent_limit | 429 | Already 3 pending DD orders |
| missing_field | 400 | Required field missing |
| invalid_card | 400 | Card fails Luhn, expired, bad CVV/zip |
| invalid_tip | 400 | Tip exceeds max |
| invalid_link | 400 | Not a valid DoorDash URL |
| no_accounts | 503 | No DD accounts available |
| insufficient_balance | 402 | Balance too low |
| blocked_store | 400 | Store not supported (CFA, Canes) |
| invalid_address | 400 | Address couldn't be resolved |
| empty_cart | 400 | Cart has no items |
| cart_link_failed | 400 | Couldn't resolve the share link |
| subtotal_exceeded | 400 | Exceeds max subtotal |
| setup_failed | 500 | Generic setup failure |
POST /api/dd/order/{id}/update
Update name, tip, or dasher instructions before confirming. At least one field required.
Request:
{
"name": "Jane Doe",
"tip": 5.00,
"dasher_instructions": "Ring doorbell"
}
Response:
{
"order_id": "DD-a1b2c3d4",
"status": "pending_payment",
"name": "Jane Doe",
"tip": 5.00,
"dasher_instructions": "Ring doorbell",
"pricing": {
"subtotal": 9.48,
"discount": 3.79,
"subtotal_after_discount": 5.69,
"tip": 5.00,
"service_fee": 8.00,
"total": 18.69
}
}
POST /api/dd/order/{id}/confirm
Confirm the order. Deducts balance, submits to DoorDash. No request body needed.
Response:
{
"order_id": "DD-a1b2c3d4",
"status": "processing",
"cost_deducted": 0.00,
"remaining_balance": 150.00,
"message": "Order is being placed. Poll status or wait for webhook."
}
POST /api/dd/order/{id}/cancel
Cancel a pending DoorDash order before confirmation.
Response:
{
"order_id": "DD-a1b2c3d4",
"status": "cancelled"
}
GET /api/dd/order/{id}
Get DoorDash order status. Extra fields depend on status:
| Status | Extra Fields |
|---|---|
| pending_payment | store_name, items, items_summary, pricing, name, address, dasher_instructions, expires_at, cost_to_confirm |
| processing | message |
| completed | store_name, items_summary, tracking_url, pricing, elapsed_seconds, completed_at |
| failed | store_name, reason, reason_message, refunded, refunded_amount |
| cancelled | — |
Completed example:
{
"order_id": "DD-a1b2c3d4",
"status": "completed",
"store_name": "McDonald's",
"items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
"tracking_url": "https://doordash.com/orders/...",
"pricing": {"subtotal": 9.48, "discount": 3.79, "subtotal_after_discount": 5.69, "tip": 2.00, "service_fee": 8.00, "total": 15.69},
"elapsed_seconds": 28.4,
"completed_at": "2026-08-31T16:01:30+00:00"
}
Failed example:
{
"order_id": "DD-a1b2c3d4",
"status": "failed",
"store_name": "McDonald's",
"reason": "card_declined",
"reason_message": "The payment card was declined.",
"refunded": true,
"refunded_amount": 0.00
}
| reason | Meaning |
|---|---|
| card_declined | Payment card was declined |
| card_tokenization_failed | Card couldn't be tokenized |
| address_out_of_range | Delivery address outside store range |
| store_closed | Store is closed |
| order_rejected | Order rejected by store |
| payment_timeout | Payment processing timed out |
| session_error | DoorDash session error |
| unknown | Unknown failure |
🍳 Cook / Meal-Kit Endpoints
Order meal-kit brand codes (HelloFresh, Factor, Green Chef, EveryPlate, and more) via the API. Two checkout modes: Order (new account — address + payment card) and Credit (existing brand account credentials). Checkout runs in the background (30s–5min).
Order IDs:
CK-xxxxxxxx • Expires: 15 minutes after creation
GET /api/cook/catalog
List available meal-kit products and pricing for your reseller account. Results filtered by your enabled brands. Cached for 60 seconds.
Response:
{
"products": [
{
"slug": "hellofresh-2person-3recipe",
"name": "HelloFresh 2-Person 3-Recipe Box",
"brand": "hf-",
"description": "Free trial signup — 2 person, 3 recipes per week",
"wholesale_cost": 4.50,
"in_stock": true,
"stock": 48,
"supported_modes": ["order", "credit"]
}
]
}
POST /api/cook/order
Create a pending meal-kit order. Card/credentials are validated at creation and held in memory (never stored). Supports two modes:
Order mode request:
{
"product_slug": "hellofresh-2person-3recipe",
"mode": "order",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "5551234567",
"address": {
"line1": "123 Main St",
"line2": "Apt 4",
"city": "Austin",
"state": "TX",
"zip": "78701"
},
"card": {
"number": "4111111111111111",
"exp_month": "08",
"exp_year": "28",
"cvv": "123",
"zip": "78701"
}
}
Credit mode request:
{
"product_slug": "factor75-6meals",
"mode": "credit",
"brand_email": "[email protected]",
"brand_password": "myPassword123"
}
Response (both modes):
{
"order_id": "CK-A1B2C3D4",
"status": "pending_payment",
"mode": "order",
"product_slug": "hellofresh-2person-3recipe",
"brand": "hf-",
"wholesale_cost": 4.50,
"balance": 150.00,
"expires_at": "2026-10-18T16:15:00+00:00",
"message": "Order created. POST /api/cook/order/{id}/confirm to confirm and start checkout."
}
| Error | Status | Reason |
|---|---|---|
| not_enabled | 403 | Cook not enabled for this reseller |
| invalid_mode | 400 | Mode must be 'order' or 'credit' |
| invalid_product | 400 | Product slug not found |
| mode_not_supported | 400 | Product doesn't support this mode |
| out_of_stock | 409 | Product out of stock |
| missing_field | 400 | Required field missing |
| invalid_field | 400 | Validation failed (name length, phone, zip, state) |
| invalid_card | 400 | Card fails Luhn, expired, bad CVV |
| insufficient_balance | 402 | Balance too low (pre-check) |
POST /api/cook/order/{id}/confirm
Confirm the order. Deducts balance, purchases a code upstream, and starts the checkout session in the background. No request body needed.
Response:
{
"order_id": "CK-A1B2C3D4",
"status": "processing",
"cost_deducted": 4.50,
"remaining_balance": 145.50,
"message": "Checkout started. Poll GET /api/cook/order/{id} for status."
}
Confirm errors (order reverts to pending_payment, reseller can retry):
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance too low at confirm time |
| out_of_stock | 409 | Product OOS upstream (cache refreshed) |
| upstream_unavailable | 503 | Upstream service issue |
| upstream_rate_limited | 429 | Upstream rate limited |
| upstream_timeout | 504 | No upstream response |
| session_expired | 410 | Card/credentials lost (server restarted) |
GET /api/cook/order/{id}
Get cook order status. Extra fields depend on status:
| Status | Extra Fields |
|---|---|
| pending_payment | wholesale_cost, expires_at, last_confirm_error |
| processing | checkout_step, started_at, elapsed_s |
| completed | brand_email, brand_password (order mode only), code, instructions, cost_deducted, completed_at |
| failed | error_code, error_detail, error_stage, refunded, refunded_amount, refunded_at, retryable |
| expired | expired_at |
| cancelled | cancelled_at |
Completed example (order mode):
{
"order_id": "CK-A1B2C3D4",
"status": "completed",
"mode": "order",
"product_slug": "hellofresh-2person-3recipe",
"brand": "hf-",
"brand_email": "[email protected]",
"brand_password": "Welcome2024!",
"code": "HF-ABC123XYZ",
"instructions": "Go to hellofresh.com/activate to redeem",
"cost_deducted": 4.50,
"completed_at": "2026-10-18T16:02:15+00:00"
}
Failed example:
{
"order_id": "CK-A1B2C3D4",
"status": "failed",
"mode": "order",
"product_slug": "hellofresh-2person-3recipe",
"brand": "hf-",
"error_code": "card_declined",
"error_detail": "Card was declined by the processor",
"error_stage": "card_attach",
"refunded": true,
"refunded_amount": 4.50,
"refunded_at": "2026-10-18T16:01:45+00:00",
"retryable": false
}
| error_code | Stage | Refunded | Meaning |
|---|---|---|---|
| card_declined / (upstream verbatim) | card_attach | Yes | Card declined by processor |
| address_rejected | address | Yes | Address couldn't be verified |
| email_rejected | Yes | Email rejected by brand | |
| bad_credentials | credit | Yes | Wrong email/password |
| account_inactive | credit | Yes | Brand account is inactive |
| not_credit_code | credit | Yes | Code doesn't support credit mode |
| checkout_timeout | poll | Yes | Checkout timed out (5 min max) |
| checkout_timeout_unresolved | poll | No | Timeout after payment submitted — manual review |
| code_dead | session_start | Yes | Code was dead/expired |
| code_locked | session_start | Yes | Code locked in another session |
| internal_error | system | Conditional | Unexpected error |
POST /api/cook/order/{id}/cancel
Cancel a pending cook order. Only works on pending_payment status. Processing orders cannot be cancelled.
Response:
{
"order_id": "CK-A1B2C3D4",
"status": "cancelled"
}
| Error | Status | Reason |
|---|---|---|
| not_cancellable | 409 | Order is processing or already finished |
🍽 Restaurant Ordering Endpoints
Order from Wingstop, Five Guys, Carl's Jr, and Hardee's using the same unified API. All four services share identical endpoints — just swap the service code in the URL.
ws = Wingstop • fg = Five Guys • cj = Carl's Jr • hd = Hardee'sFlow: Find stores → Browse menu → (Optional) Get modifiers → Create order → Confirm → Poll status
Order IDs:
WS-xxxxxxxx, FG-xxxxxxxx, CJ-xxxxxxxx, HD-xxxxxxxxExpires: 15 minutes after creation • $40 subtotal cap • Max 10 items per order
Wholesale cost: 30% of subtotal (deducted on confirm)
| Code | Service | Order Prefix | Example Store |
|---|---|---|---|
| ws | Wingstop | WS- | /api/ws/stores |
| fg | Five Guys | FG- | /api/fg/stores |
| cj | Carl's Jr | CJ- | /api/cj/stores |
| hd | Hardee's | HD- | /api/hd/stores |
POST /api/{svc}/stores
Search for restaurants near a ZIP code. Returns a list of locations with IDs to use in menu and order calls.
Request:
{
"zipcode": "90210",
"radius": 25
}
| Param | Type | Required | Description |
|---|---|---|---|
| zipcode | string | Required | 5-digit US ZIP code |
| radius | int | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"service": "ws",
"service_name": "Wingstop",
"zipcode": "90210",
"coordinates": {"lat": 34.0901, "lng": -118.4065},
"stores": [
{
"id": "248671",
"name": "Wingstop - Beverly Hills",
"address": "123 Wilshire Blvd",
"city": "Beverly Hills",
"state": "CA",
"zip": "90210",
"phone": "310-555-1234",
"lat": 34.0736,
"lng": -118.4004
}
]
}
| Error | Status | Reason |
|---|---|---|
| invalid_zipcode | 400 | Not a valid 5-digit ZIP code |
| geocode_failed | 400 | Could not resolve zipcode to coordinates |
| invalid_service | 400 | Service code not one of: ws, fg, ss, cj, hd |
POST /api/{svc}/modifiers
Get modifier/option groups for a specific product. This tells you what customizations are available (e.g. flavors, sizes, sides). Use option id values when creating orders.
Request:
{
"product_id": "82965181"
}
Response:
{
"service": "ws",
"product_id": "82965181",
"optiongroups": [
{
"id": "43210001",
"name": "Flavor",
"mandatory": true,
"minselects": 1,
"maxselects": 1,
"options": [
{"id": "99001", "name": "Lemon Pepper", "cost": 0, "modifiers": []},
{"id": "99002", "name": "Mango Habanero", "cost": 0, "modifiers": []},
{"id": "99003", "name": "Garlic Parmesan", "cost": 0, "modifiers": [
{
"id": "55001",
"name": "Size",
"mandatory": true,
"minselects": 1,
"maxselects": 1,
"options": [
{"id": "55010", "name": "Regular", "cost": 0},
{"id": "55011", "name": "Extra", "cost": 0.50}
]
}
]}
]
}
]
}
id values of selected options as a comma-separated string in the item's options field. For mandatory groups, you must pick at least minselects options. If a product has no mandatory modifiers (or none at all), you can omit options.
POST /api/{svc}/order
Create a pending order. The system builds a basket, adds your items, and returns the order. Nothing is charged until you confirm. Subtotal must be under $40.
Request:
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "248671",
"items": [
{"product_id": "82965181", "quantity": 1, "options": "99001,55010"},
{"product_id": "82965200", "quantity": 2}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | 10+ digit phone number |
| vendor_id | string | Required | Store ID from /stores |
| items | array | Required | Items to order (max 10) |
| items[].product_id | string | Required | Product ID from /menu |
| items[].quantity | int | Optional | How many (default 1) |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "WS-a1b2c3d4",
"service": "ws",
"service_name": "Wingstop",
"status": "pending_payment",
"store": {"id": "248671", "name": "Wingstop - Beverly Hills"},
"items": [
{
"product_name": "10 Pc Wings",
"quantity": 1,
"totalcost": 15.99,
"choices": ["Lemon Pepper", "Regular"]
},
{
"product_name": "Triple Chocolate Chunk Brownie",
"quantity": 2,
"totalcost": 7.98,
"choices": []
}
],
"item_count": 3,
"subtotal": 23.97,
"wholesale_cost": 7.19,
"expires_at": "2026-11-21T18:30:00+00:00",
"balance_after": 134.81
}
| Error | Status | Reason |
|---|---|---|
| missing_field | 400 | Required field not provided |
| limit_exceeded | 400 | More than 10 items |
| basket_failed | 400 | Could not create basket (store closed or invalid) |
| all_items_failed | 400 | No items could be added to the basket |
| subtotal_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Not enough balance |
| invalid_service | 400 | Invalid service code |
POST /api/{svc}/order/{order_id}/confirm
Confirm and place the order. Wholesale cost (30% of subtotal) is deducted from your balance. The order is submitted to the restaurant in the background.
Request: Empty body {} is fine.
Response:
{
"order_id": "WS-a1b2c3d4",
"status": "processing",
"cost_deducted": 7.19,
"remaining_balance": 134.81,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| not_found | 404 | Order ID doesn't exist |
| forbidden | 403 | Order belongs to another reseller |
| already_processing | 409 | Already being placed |
| already_finished | 409 | Already completed or failed |
| order_expired | 410 | 15-minute window passed |
| insufficient_balance | 402 | Balance dropped since order creation |
GET /api/{svc}/order/{order_id}
Check order status. Extra fields depend on status:
| Status | Extra Fields |
|---|---|
| pending_payment | store, items, item_count, subtotal, wholesale_cost, expires_at |
| processing | message |
| completed | store, confirmation_number, items, item_count, subtotal, cost_deducted, completed_at |
| failed | reason, refunded_amount |
| expired | message |
Completed example:
{
"order_id": "WS-a1b2c3d4",
"service": "ws",
"status": "completed",
"store": {"id": "248671", "name": "Wingstop - Beverly Hills"},
"items": [
{"product_name": "10 Pc Wings", "quantity": 1, "totalcost": 15.99, "choices": ["Lemon Pepper"]},
{"product_name": "Triple Chocolate Chunk Brownie", "quantity": 2, "totalcost": 7.98, "choices": []}
],
"item_count": 3,
"subtotal": 23.97,
"cost_deducted": 7.19,
"confirmation_number": "98765432",
"completed_at": "2026-11-21T18:25:00+00:00"
}
Failed example:
{
"order_id": "FG-b2c3d4e5",
"service": "fg",
"status": "failed",
"reason": "Store is closed for online orders",
"refunded_amount": 5.40
}
🍕 Domino's Endpoints
Order custom Domino's pizzas for carryout via a hosted pizza builder. Unlike other endpoints, Domino's uses a web-based flow — you create a session, the customer builds their pizza on our page, then you confirm to place.
submitted → Confirm → DoneOrder IDs:
DOM-xxxxxxxx • Session expires: 30 minutes • Order expires: 45 minutes
GET /api/dom/stores?zip=10001
Search for Domino's locations near a ZIP code. Use the id field when creating orders (optional — the pizza builder also has a store picker).
Response:
{
"stores": [
{
"id": "4225",
"storeName": "Domino's Pizza",
"street": "123 Broadway",
"city": "New York",
"region": "NY",
"postalCode": "10001",
"etaMinutes": 25,
"isOpen": true,
"phone": "212-555-0100"
}
]
}
| Param | Type | Required | Description |
|---|---|---|---|
| zip | string | Required | 5-digit ZIP code |
POST /api/dom/order
Create a Domino's order session. Returns a pizza builder link that you give to your customer. The customer picks their store, builds their pizzas, and submits. Nothing is charged yet.
Request:
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "5551234567",
"store_id": "4225",
"callback_url": "https://your-site.com/dom-done"
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | 10-digit phone number (digits only, no dashes) |
| store_id | string | Optional | Pre-select a Domino's store on the builder page |
| callback_url | string | Optional | URL to redirect customer after they submit their pizza. We append ?order_submitted=true&order_id=...&pizzas=N&total=X |
Response:
{
"order_id": "DOM-a1b2c3d4",
"order_link": "https://wecookedforyou.com/dom/abc123...",
"status": "awaiting_submission",
"expires_at": "2026-09-05T14:15:00+00:00",
"max_pizzas": 3,
"price_per_pizza": 5.00,
"bulk_price": 4.50,
"bulk_threshold": 3
}
order_link to your customer. They'll see a full pizza builder with store picker, sauce/cheese/topping customization, and a submit button. Their name, email, and phone are pre-filled and locked. After they submit, poll GET /api/dom/order/{id} until status is submitted, then call /confirm.
| Error | Status | Reason |
|---|---|---|
| missing_field | 400 | Required field missing or invalid |
| insufficient_balance | 402 | Not enough balance for even 1 pizza |
| no_stock | 503 | No promo codes available |
| dom_disabled | 403 | Domino's not enabled for your key |
GET /api/dom/order/{order_id}
Check Domino's order status. The response grows richer as the order progresses.
| Status | Meaning |
|---|---|
| awaiting_submission | Link created, customer hasn't built their pizza yet |
| submitted | Customer picked store & built pizzas — ready to confirm |
| processing | Confirmed, pizzas being placed at Domino's |
| completed | All pizzas placed successfully |
| partial | Some pizzas placed, some failed (failed ones auto-refunded) |
| failed | All pizzas failed (full wholesale refund) |
| expired | Session expired before customer submitted |
Response when submitted:
{
"order_id": "DOM-a1b2c3d4",
"status": "submitted",
"dom_order_id": "uuid-of-dom-order",
"pizza_count": 2,
"store": {"id": "4225", "name": "Domino's Pizza"},
"total_customer": 10.00,
"total_wholesale": 7.00,
"pizzas": [
"Tomato sauce, Regular cheese, Pepperoni, Mushrooms",
"Honey BBQ sauce, Extra cheese, Chicken, Bacon"
]
}
Response when completed:
{
"order_id": "DOM-a1b2c3d4",
"status": "completed",
"pizza_count": 2,
"store": {"id": "4225", "name": "Domino's Pizza"},
"results": [
{
"pizza": 1,
"status": "success",
"dominos_order_id": "abc123",
"order_name": "John D",
"ready_lower": "3:45 PM",
"ready_upper": "3:55 PM"
},
{
"pizza": 2,
"status": "success",
"dominos_order_id": "def456",
"order_name": "John D",
"ready_lower": "3:45 PM",
"ready_upper": "3:55 PM"
}
],
"cost_deducted": 7.00,
"wholesale_refund": 0
}
When partial, the results array contains both success and failed entries. Failed entries include an error field. The wholesale cost for failed pizzas is automatically refunded to your balance (wholesale_refund shows the amount).
POST /api/dom/order/{order_id}/confirm
Confirm and place the Domino's order. Wholesale cost is deducted, promo codes reserved, and pizzas are placed in the background. Only call this after status is submitted.
Response:
{
"order_id": "DOM-a1b2c3d4",
"status": "processing",
"cost_deducted": 7.00,
"remaining_balance": 43.00,
"message": "Order is being placed. Poll GET /api/dom/order/{id} for status."
}
| Error | Status | Reason |
|---|---|---|
| not_found | 404 | Order ID doesn't exist |
| forbidden | 403 | Order belongs to another reseller |
| not_submitted | 409 | Customer hasn't submitted their pizza yet |
| already_processing | 409 | Already being placed |
| already_finished | 409 | Already completed/failed |
| already_confirmed | 409 | Payment already confirmed |
| order_expired | 410 | 45-minute window passed |
| insufficient_balance | 402 | Not enough balance for wholesale cost |
| no_stock | 503 | Not enough promo codes for pizza count |
🌮 Taco Bell Endpoints
Generate Taco Bell loyalty accounts and retrieve login OTP codes. Requires your own hotmail007 API key for email provisioning. Accounts come with any available sign-up rewards.
Concurrency: Up to 3 accounts generated in parallel per request • Max qty: 5 per call
POST /api/tb/gen
Generate new Taco Bell loyalty accounts. Each account gets a fresh email via hotmail007, registers with Taco Bell, and returns profile + rewards.
Request:
{
"first_name": "John",
"last_name": "Smith",
"birthday": "03/15",
"hotmail007_key": "25abf49c-62ab-4112-ba1e-...",
"qty": 2
}
| Param | Type | Description |
|---|---|---|
| first_name | required | First name for the account |
| last_name | required | Last name for the account |
| hotmail007_key | required | Your hotmail007.com API key |
| birthday | optional | MM/DD format (e.g. "03/15"). Randomized if omitted. |
| qty | optional | Number of accounts to generate (1–5, default 1) |
Response:
{
"ok": true,
"accounts": [
{
"email": "[email protected]",
"name": "John Smith",
"birthday": "03/15",
"customer_id": "abc123-def456",
"rewards": [
{"title": "Free Doritos Locos Tacos", "id": "reward_789"}
]
}
],
"failed": [
{"index": 1, "error": "hotmail007 out of stock (all mail types)"}
],
"summary": {"total": 2, "success": 1, "failed": 1}
}
| Error | Status | Reason |
|---|---|---|
| invalid_params | 400 | Missing name, bad birthday format, or missing hotmail007 key |
Each account in the failed array includes the index (0-based) and a specific error string describing what went wrong (e.g. email stock, OTP timeout, auth failure). The top-level ok is true if at least one account succeeded.
POST /api/tb/otp
Request a fresh login OTP for a previously generated Taco Bell account. Triggers an OTP send from Taco Bell and polls the email inbox for the 6-digit code (up to 60 seconds).
Request:
{
"email": "[email protected]",
"hotmail007_key": "25abf49c-62ab-4112-ba1e-..."
}
| Param | Type | Description |
|---|---|---|
| required | Email from a previously generated account | |
| hotmail007_key | required | Your hotmail007.com API key |
Response:
{
"ok": true,
"email": "[email protected]",
"otp": "482916"
}
| Error | Status | Reason |
|---|---|---|
| invalid_params | 400 | Missing email or hotmail007 key |
| not_found | 404 | Email not found in generated accounts |
| otp_request_failed | 502 | Failed to trigger OTP from Taco Bell |
| otp_timeout | 408 | OTP code not received within 60 seconds |
🌮 TacoACO (Taco Bell Ordering)
Order Taco Bell items using Welcome Reward accounts. Create an order with a quantity, the system gives your customer a checkout link where they pick their store and customize items, and the order is placed automatically on submit.
Status flow:
awaiting_submission → processing → completed, partial, or failedOrder IDs:
TACO-xxxxxxxx • Expires: 30 minutes after creationNo Discord server required. TacoACO works with standalone API keys.
Balance: Wholesale cost (taco_cost_per_item × qty) is deducted upfront when the order is created. If the order fails or expires, the balance is refunded automatically.
GET /api/taco/stock
Check reward account availability and pricing.
Response:
{
"available": true,
"reward_accounts": 47,
"max_qty": 10,
"price_per_item": 1.00
}
| Field | Description |
|---|---|
| available | true if at least 1 reward account is ready |
| reward_accounts | Number of active reward accounts in the pool |
| max_qty | Maximum items per order (set by operator) |
| price_per_item | Customer-facing price per item (set by operator) |
POST /api/taco/order
Create a new TacoACO order. Deducts wholesale cost from your balance immediately and returns a checkout link for the customer.
Request:
{
"customer_name": "John D",
"qty": 3,
"callback_url": "https://yoursite.com/webhook"
}
| Param | Type | Description |
|---|---|---|
| customer_name | required | Customer's pickup name |
| qty | optional | Number of items (default 1, max = max_qty) |
| callback_url | optional | Reserved for future webhook support |
Response:
{
"order_id": "TACO-a1b2c3d4",
"order_link": "https://wecookedforyou.com/taco/s/abc123...",
"status": "awaiting_submission",
"expires_at": "2024-01-15T12:30:00+00:00",
"qty": 3,
"price_per_item": 1.00,
"total_customer": 3.00,
"cost_deducted": 1.50,
"remaining_balance": 340.50,
"message": "Send the order_link to your customer..."
}
| Field | Description |
|---|---|
| order_link | Send this to your customer. They pick a store, choose items, customize, and submit. |
| cost_deducted | Wholesale cost deducted from your balance (taco_cost_per_item × qty) |
| remaining_balance | Your balance after the deduction |
| expires_at | Session expires 30 min after creation. Customer must submit before this. |
What happens on the checkout page:
- Customer opens the link
- Picks a nearby Taco Bell store
- Chooses items (Beefy 5-Layer Burrito, Soft Taco, Cantina Crispy Chicken Taco, etc.)
- Customizes each item (protein, toppings, style)
- Submits — the order is placed automatically using reward accounts
| Error | Status | Reason |
|---|---|---|
| missing_field | 400 | customer_name is required |
| invalid_params | 400 | qty is not a valid integer |
| insufficient_balance | 402 | Not enough balance for wholesale cost |
| no_stock | 503 | Not enough reward accounts available |
GET /api/taco/order/{order_id}
Poll order status. Call this after creating an order to check if the customer has submitted and whether checkout succeeded.
Response:
{
"order_id": "TACO-a1b2c3d4",
"status": "completed",
"expires_at": "2024-01-15T12:30:00+00:00",
"qty": 3,
"store_name": "Taco Bell #020165",
"store_id": "020165",
"pickup_name": "John D",
"completed_count": 3,
"results": [
{ "ok": true, "store": "Taco Bell #020165" },
{ "ok": true, "store": "Taco Bell #020165" },
{ "ok": true, "store": "Taco Bell #020165" }
]
}
| Status | Meaning |
|---|---|
| awaiting_submission | Customer hasn't submitted the checkout page yet |
| processing | Checkout is running (placing orders at Taco Bell) |
| completed | All items placed successfully |
| partial | Some items placed, some failed. Wholesale cost for failed items is refunded. |
| failed | All items failed. Full wholesale cost is refunded. |
| cancelled | You cancelled the order. Full wholesale cost is refunded. |
| expired | Customer didn't submit before the session expired. Wholesale cost is auto-refunded. |
Partial response example:
{
"status": "partial",
"completed_count": 2,
"failed_count": 1,
"error": "Cart failed: HTTP 400 — store closed"
}
POST /api/taco/order/{order_id}/cancel
Cancel a pending order. Only works if the order hasn't started checkout yet (awaiting_submission status). Refunds the wholesale cost to your balance.
Response:
{
"order_id": "TACO-a1b2c3d4",
"status": "cancelled",
"refunded": 1.50,
"message": "Order cancelled. $1.50 refunded to balance."
}
| Error | Status | Reason |
|---|---|---|
| already_finished | 409 | Order already completed/failed/partial |
| already_processing | 409 | Checkout is in progress, can't cancel |
🍗 Wingstop Endpoints
Full ordering pipeline for Wingstop. Wings, tenders, sides, and desserts — store lookup, browsable menu, item modifiers, basket-based ordering, and automatic placement.
Order IDs:
WS-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/ws/stores
Find Wingstop locations near a ZIP code.
Request:
{
"zipcode": "90001",
"radius": 10
}
| Field | Type | Required | Description |
|---|---|---|---|
| zipcode | string | Required | 5-digit US ZIP code |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"service": "ws",
"service_name": "Wingstop",
"zipcode": "90001",
"coordinates": {"lat": 33.94, "lng": -118.24},
"stores": [
{
"id": "248671",
"name": "Wingstop #1234",
"address": "123 Main St",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"phone": "213-555-1234"
}
]
}
POST /api/ws/modifiers
Get available modifiers (flavors, dips, sizes) for a specific Wingstop product. Use the option IDs in the options field when ordering.
Request:
{
"product_id": "82965181"
}
Response:
{
"service": "ws",
"product_id": "82965181",
"optiongroups": [
{
"id": "og_001",
"name": "Wing Flavor",
"mandatory": true,
"minselects": 1,
"maxselects": 1,
"options": [
{"id": "opt_001", "name": "Lemon Pepper", "cost": 0, "isdefault": false},
{"id": "opt_002", "name": "Louisiana Rub", "cost": 0, "isdefault": false},
{"id": "opt_003", "name": "Atomic", "cost": 0, "isdefault": false}
]
}
]
}
minselects options. Pass selected option IDs as a comma-separated string in options when ordering.Example:
"options": "opt_001,opt_005,opt_012"
POST /api/ws/order
Create a pending Wingstop order. Builds a basket, adds items, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "248671",
"items": [
{"product_id": "82965181", "quantity": 1, "options": "opt_001,opt_005"},
{"product_id": "82965200", "quantity": 2}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | Customer phone (10+ digits) |
| vendor_id | string | Required | Store ID from /stores |
| items | array | Required | Items to order (max 20) |
| items[].product_id | string | Required | Product ID from /menu |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "WS-a1b2c3d4",
"service": "ws",
"service_name": "Wingstop",
"status": "pending_payment",
"store": {"id": "248671", "name": "Wingstop #1234"},
"items": [
{"product_name": "10 PC Classic Wings", "quantity": 1, "totalcost": 12.99, "choices": ["Lemon Pepper"]},
{"product_name": "Triple Chocolate Chunk Brownie", "quantity": 2, "totalcost": 7.98, "choices": []}
],
"item_count": 2,
"subtotal": 20.97,
"wholesale_cost": 6.29,
"expires_at": "2026-11-21T18:30:00+00:00",
"balance_after": 43.71
}
| Error | Status | Reason |
|---|---|---|
| subtotal_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| basket_failed | 400 | Store may be closed or unavailable |
| all_items_failed | 400 | No items could be added to the basket |
POST /api/ws/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Wingstop.
Request body: empty {} (or optionally include "discord_user_id": "...")
Response:
{
"order_id": "WS-a1b2c3d4",
"service": "ws",
"status": "processing",
"cost_deducted": 6.29,
"remaining_balance": 43.71,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/ws/order/{order_id}
Check the status of a Wingstop order. Poll this after confirming to track progress.
Response:
{
"order_id": "WS-a1b2c3d4",
"service": "ws",
"service_name": "Wingstop",
"status": "completed",
"store": {"id": "248671", "name": "Wingstop #1234"},
"items": [...],
"subtotal": 20.97,
"wholesale_cost": 6.29,
"olo_reference": "12345678-abcd"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Wingstop |
| completed | Order successfully placed — olo_reference included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍔 Five Guys Endpoints
Full ordering pipeline for Five Guys. Burgers, dogs, sandwiches, fries, and milkshakes — store lookup, browsable menu, item modifiers, basket-based ordering, and automatic placement.
Order IDs:
FG-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/fg/stores
Find Five Guys locations near a ZIP code.
Request:
{
"zipcode": "22101",
"radius": 10
}
| Field | Type | Required | Description |
|---|---|---|---|
| zipcode | string | Required | 5-digit US ZIP code |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"service": "fg",
"service_name": "Five Guys",
"zipcode": "22101",
"coordinates": {"lat": 38.94, "lng": -77.17},
"stores": [
{
"id": "52483",
"name": "Five Guys McLean",
"address": "1433 Center St",
"city": "McLean",
"state": "VA",
"zip": "22101",
"phone": "703-555-1234"
}
]
}
POST /api/fg/modifiers
Get available modifiers (toppings, bun options) for a specific Five Guys product. All burger toppings are free. Use option IDs in the options field when ordering.
Request:
{
"product_id": "30456789"
}
Response:
{
"service": "fg",
"product_id": "30456789",
"optiongroups": [
{
"id": "og_001",
"name": "Toppings",
"mandatory": false,
"minselects": 0,
"maxselects": 15,
"options": [
{"id": "opt_001", "name": "Mayo", "cost": 0, "isdefault": false},
{"id": "opt_002", "name": "Lettuce", "cost": 0, "isdefault": false},
{"id": "opt_003", "name": "Pickles", "cost": 0, "isdefault": false},
{"id": "opt_004", "name": "Grilled Onions", "cost": 0, "isdefault": false}
]
}
]
}
minselects options. Pass selected option IDs as a comma-separated string in options when ordering.Example:
"options": "opt_001,opt_002,opt_004"
POST /api/fg/order
Create a pending Five Guys order. Builds a basket, adds items, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "52483",
"items": [
{"product_id": "30456789", "quantity": 1, "options": "opt_001,opt_002"},
{"product_id": "30456800", "quantity": 1}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | Customer phone (10+ digits) |
| vendor_id | string | Required | Store ID from /stores |
| items | array | Required | Items to order (max 20) |
| items[].product_id | string | Required | Product ID from /menu |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "FG-a1b2c3d4",
"service": "fg",
"service_name": "Five Guys",
"status": "pending_payment",
"store": {"id": "52483", "name": "Five Guys McLean"},
"items": [
{"product_name": "Cheeseburger", "quantity": 1, "totalcost": 11.69, "choices": ["Mayo", "Lettuce"]},
{"product_name": "Cajun Fries (Regular)", "quantity": 1, "totalcost": 5.69, "choices": []}
],
"item_count": 2,
"subtotal": 17.38,
"wholesale_cost": 5.21,
"expires_at": "2026-11-21T18:30:00+00:00",
"balance_after": 44.79
}
| Error | Status | Reason |
|---|---|---|
| subtotal_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| basket_failed | 400 | Store may be closed or unavailable |
| all_items_failed | 400 | No items could be added to the basket |
POST /api/fg/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Five Guys.
Request body: empty {} (or optionally include "discord_user_id": "...")
Response:
{
"order_id": "FG-a1b2c3d4",
"service": "fg",
"status": "processing",
"cost_deducted": 5.21,
"remaining_balance": 44.79,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/fg/order/{order_id}
Check the status of a Five Guys order. Poll this after confirming to track progress.
Response:
{
"order_id": "FG-a1b2c3d4",
"service": "fg",
"service_name": "Five Guys",
"status": "completed",
"store": {"id": "52483", "name": "Five Guys McLean"},
"items": [...],
"subtotal": 17.38,
"wholesale_cost": 5.21,
"olo_reference": "12345678-abcd"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Five Guys |
| completed | Order successfully placed — olo_reference included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍔 Carl's Jr Endpoints
Full ordering pipeline for Carl's Jr. Burgers, chicken tenders, biscuits, and sides — store lookup, browsable menu, item modifiers, basket-based ordering, and automatic placement.
Order IDs:
CJ-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/cj/stores
Find Carl's Jr locations near a ZIP code.
Request:
{
"zipcode": "90001",
"radius": 10
}
| Field | Type | Required | Description |
|---|---|---|---|
| zipcode | string | Required | 5-digit US ZIP code |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"service": "cj",
"service_name": "Carl's Jr",
"zipcode": "90001",
"coordinates": {"lat": 33.94, "lng": -118.24},
"stores": [
{
"id": "61094",
"name": "Carl's Jr #1092",
"address": "456 Broadway",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"phone": "323-555-5678"
}
]
}
POST /api/cj/modifiers
Get available modifiers (extras, drink sizes, combo sides) for a specific Carl's Jr product. Use the option IDs in the options field when ordering.
Request:
{
"product_id": "44567890"
}
Response:
{
"service": "cj",
"product_id": "44567890",
"optiongroups": [
{
"id": "og_001",
"name": "Make It a Combo",
"mandatory": false,
"minselects": 0,
"maxselects": 1,
"options": [
{"id": "opt_001", "name": "Medium Combo", "cost": 3.00, "isdefault": false},
{"id": "opt_002", "name": "Large Combo", "cost": 3.50, "isdefault": false}
]
}
]
}
minselects options. Pass selected option IDs as a comma-separated string in options when ordering.Example:
"options": "opt_001,opt_005"
POST /api/cj/order
Create a pending Carl's Jr order. Builds a basket, adds items, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "61094",
"items": [
{"product_id": "44567890", "quantity": 1, "options": "opt_001"},
{"product_id": "44567900", "quantity": 1}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | Customer phone (10+ digits) |
| vendor_id | string | Required | Store ID from /stores |
| items | array | Required | Items to order (max 20) |
| items[].product_id | string | Required | Product ID from /menu |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "CJ-a1b2c3d4",
"service": "cj",
"service_name": "Carl's Jr",
"status": "pending_payment",
"store": {"id": "61094", "name": "Carl's Jr #1092"},
"items": [
{"product_name": "Famous Star with Cheese", "quantity": 1, "totalcost": 9.49, "choices": ["Medium Combo"]},
{"product_name": "Natural-Cut Fries", "quantity": 1, "totalcost": 3.29, "choices": []}
],
"item_count": 2,
"subtotal": 12.78,
"wholesale_cost": 3.83,
"expires_at": "2026-11-21T18:30:00+00:00",
"balance_after": 46.17
}
| Error | Status | Reason |
|---|---|---|
| subtotal_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| basket_failed | 400 | Store may be closed or unavailable |
| all_items_failed | 400 | No items could be added to the basket |
POST /api/cj/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Carl's Jr.
Request body: empty {} (or optionally include "discord_user_id": "...")
Response:
{
"order_id": "CJ-a1b2c3d4",
"service": "cj",
"status": "processing",
"cost_deducted": 3.83,
"remaining_balance": 46.17,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/cj/order/{order_id}
Check the status of a Carl's Jr order. Poll this after confirming to track progress.
Response:
{
"order_id": "CJ-a1b2c3d4",
"service": "cj",
"service_name": "Carl's Jr",
"status": "completed",
"store": {"id": "61094", "name": "Carl's Jr #1092"},
"items": [...],
"subtotal": 12.78,
"wholesale_cost": 3.83,
"olo_reference": "12345678-abcd"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Carl's Jr |
| completed | Order successfully placed — olo_reference included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍔 Hardee's Endpoints
Full ordering pipeline for Hardee's. Thickburgers, chicken, biscuits, and sides — store lookup, browsable menu, item modifiers, basket-based ordering, and automatic placement.
Order IDs:
HD-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/hd/stores
Find Hardee's locations near a ZIP code.
Request:
{
"zipcode": "63101",
"radius": 10
}
| Field | Type | Required | Description |
|---|---|---|---|
| zipcode | string | Required | 5-digit US ZIP code |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"service": "hd",
"service_name": "Hardee's",
"zipcode": "63101",
"coordinates": {"lat": 38.63, "lng": -90.19},
"stores": [
{
"id": "75230",
"name": "Hardee's #3456",
"address": "789 Market St",
"city": "St. Louis",
"state": "MO",
"zip": "63101",
"phone": "314-555-9012"
}
]
}
POST /api/hd/modifiers
Get available modifiers (extras, drink sizes, combo sides) for a specific Hardee's product. Use the option IDs in the options field when ordering.
Request:
{
"product_id": "55678901"
}
Response:
{
"service": "hd",
"product_id": "55678901",
"optiongroups": [
{
"id": "og_001",
"name": "Make It a Combo",
"mandatory": false,
"minselects": 0,
"maxselects": 1,
"options": [
{"id": "opt_001", "name": "Medium Combo", "cost": 3.00, "isdefault": false},
{"id": "opt_002", "name": "Large Combo", "cost": 3.50, "isdefault": false}
]
}
]
}
minselects options. Pass selected option IDs as a comma-separated string in options when ordering.Example:
"options": "opt_001,opt_005"
POST /api/hd/order
Create a pending Hardee's order. Builds a basket, adds items, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "75230",
"items": [
{"product_id": "55678901", "quantity": 1, "options": "opt_001"},
{"product_id": "55678910", "quantity": 1}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Required | Customer phone (10+ digits) |
| vendor_id | string | Required | Store ID from /stores |
| items | array | Required | Items to order (max 20) |
| items[].product_id | string | Required | Product ID from /menu |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "HD-a1b2c3d4",
"service": "hd",
"service_name": "Hardee's",
"status": "pending_payment",
"store": {"id": "75230", "name": "Hardee's #3456"},
"items": [
{"product_name": "Original Thickburger", "quantity": 1, "totalcost": 9.99, "choices": ["Medium Combo"]},
{"product_name": "Natural-Cut Fries", "quantity": 1, "totalcost": 3.29, "choices": []}
],
"item_count": 2,
"subtotal": 13.28,
"wholesale_cost": 3.98,
"expires_at": "2026-11-21T18:30:00+00:00",
"balance_after": 46.02
}
| Error | Status | Reason |
|---|---|---|
| subtotal_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| basket_failed | 400 | Store may be closed or unavailable |
| all_items_failed | 400 | No items could be added to the basket |
POST /api/hd/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Hardee's.
Request body: empty {} (or optionally include "discord_user_id": "...")
Response:
{
"order_id": "HD-a1b2c3d4",
"service": "hd",
"status": "processing",
"cost_deducted": 3.98,
"remaining_balance": 46.02,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/hd/order/{order_id}
Check the status of a Hardee's order. Poll this after confirming to track progress.
Response:
{
"order_id": "HD-a1b2c3d4",
"service": "hd",
"service_name": "Hardee's",
"status": "completed",
"store": {"id": "75230", "name": "Hardee's #3456"},
"items": [...],
"subtotal": 13.28,
"wholesale_cost": 3.98,
"olo_reference": "12345678-abcd"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Hardee's |
| completed | Order successfully placed — olo_reference included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍸 Smoothie King Endpoints
Full ordering pipeline for Smoothie King. Smoothies, supplements, and more — store lookup by coordinates, full menu, product modifiers, basket-based ordering, and automatic placement.
Order IDs:
SK-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/sk/stores
Find Smoothie King locations near a set of coordinates.
Request:
{
"lat": 29.7604,
"lng": -95.3698,
"radius": 25
}
| Field | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"stores": [
{
"id": "12345",
"vendor_id": "12345",
"name": "Smoothie King #1234",
"address": "123 Main St",
"city": "Houston",
"state": "TX",
"zip": "77001",
"distance": 2.3
}
]
}
POST /api/sk/menu/modifiers
Get available modifiers (size, supplements, boosts) for a specific Smoothie King product. Use the option IDs in the options field when ordering.
Request:
{
"product_id": "67890"
}
Response:
{
"product_id": "67890",
"option_groups": [
{
"id": "og_001",
"name": "Size",
"mandatory": true,
"options": [
{"id": "opt_001", "name": "20 oz", "cost": 0.00},
{"id": "opt_002", "name": "32 oz", "cost": 2.00},
{"id": "opt_003", "name": "40 oz", "cost": 3.00}
]
},
{
"id": "og_002",
"name": "Enhancers",
"mandatory": false,
"options": [
{"id": "opt_010", "name": "Protein Boost", "cost": 1.99},
{"id": "opt_011", "name": "Collagen Boost", "cost": 1.99}
]
}
]
}
options when ordering.Example:
"options": "opt_002,opt_010"
POST /api/sk/order
Create a pending Smoothie King order. Builds a basket, adds items, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "Sarah",
"last_name": "Johnson",
"email": "[email protected]",
"phone": "5551234567",
"vendor_id": "12345",
"store_name": "Smoothie King #1234",
"items": [
{"product_id": "67890", "name": "Hulk Strawberry", "price": 8.99, "options": "opt_002,opt_010"},
{"product_id": "67891", "name": "Caribbean Way", "price": 7.49}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Optional | Customer phone (default: 5551234567) |
| vendor_id | string | Required | Vendor ID from /stores |
| store_name | string | Optional | Store name for display |
| items | array | Required | Items to order |
| items[].product_id | string | Required | Product ID from /menu |
| items[].name | string | Optional | Product name for display |
| items[].price | number | Required | Item price |
| items[].options | string | Optional | Comma-separated option IDs from /modifiers |
Response:
{
"order_id": "SK-a1b2c3d4",
"status": "pending_payment",
"store": {"id": "12345", "name": "Smoothie King #1234"},
"items": [
{"product_id": "67890", "name": "Hulk Strawberry", "price": 8.99, "options": "opt_002,opt_010"},
{"product_id": "67891", "name": "Caribbean Way", "price": 7.49, "options": ""}
],
"subtotal": 16.48,
"total_price": 8.24,
"wholesale_cost": 4.94,
"expires_at": "2026-11-25T18:30:00+00:00",
"balance_after": 337.06
}
| Error | Status | Reason |
|---|---|---|
| cap_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| missing_field | 400 | Required field not provided |
POST /api/sk/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Smoothie King.
Request body: empty {}
Response:
{
"order_id": "SK-a1b2c3d4",
"status": "processing",
"cost_deducted": 4.94,
"remaining_balance": 337.06,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/sk/order/{order_id}
Check the status of a Smoothie King order. Poll this after confirming to track progress.
Response:
{
"order_id": "SK-a1b2c3d4",
"status": "completed",
"store": {"id": "12345", "name": "Smoothie King #1234"},
"items": [...],
"subtotal": 16.48,
"wholesale_cost": 4.94,
"olo_order_id": "98765432",
"order_ref": "SK-REF-12345"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Smoothie King |
| completed | Order successfully placed — olo_order_id and order_ref included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍦 Cold Stone Creamery Endpoints
Full ordering pipeline for Cold Stone Creamery. Ice cream creations, cakes, shakes, and smoothies — store lookup by coordinates, full menu, product options, cart-based ordering with validation, and automatic placement.
Order IDs:
CS-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotal
POST /api/cs/stores
Find Cold Stone Creamery locations near a set of coordinates.
Request:
{
"lat": 33.4484,
"lng": -112.0740,
"radius": 25
}
| Field | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| radius | integer | Optional | Search radius in miles (default 25, max 50) |
Response:
{
"stores": [
{
"id": "54321",
"menu_id": "54321",
"name": "Cold Stone Creamery - Scottsdale",
"address": "7014 E Camelback Rd",
"city": "Scottsdale",
"state": "AZ",
"zip": "85251",
"distance": 3.1
}
]
}
menu_id (not id) when calling /api/cs/menu and /api/cs/order.
POST /api/cs/menu/options
Get available options (sizes, mix-ins, toppings) for a specific Cold Stone product.
Request:
{
"menu_id": "54321",
"product_id": "prod_001"
}
| Field | Type | Required | Description |
|---|---|---|---|
| menu_id | string | Required | Menu ID from /stores |
| product_id | string | Required | Product ID from /menu |
Response:
{
"menu_id": "54321",
"product_id": "prod_001",
"options": [
{
"id": "size_group",
"name": "Size",
"options": [
{"id": "sz_like", "name": "Like It", "cost": 0.00},
{"id": "sz_love", "name": "Love It", "cost": 1.00},
{"id": "sz_gotta", "name": "Gotta Have It", "cost": 2.00}
]
},
{
"id": "mixin_group",
"name": "Extra Mix-Ins",
"options": [
{"id": "mx_001", "name": "Oreo Cookies", "cost": 1.49},
{"id": "mx_002", "name": "Peanut Butter", "cost": 1.49}
]
}
]
}
POST /api/cs/order
Create a pending Cold Stone order. Creates a cart, adds items with customizations, and reserves the order. Nothing is charged until you confirm.
Request:
{
"first_name": "Mike",
"last_name": "Davis",
"email": "[email protected]",
"phone": "5551234567",
"menu_id": "54321",
"store_name": "Cold Stone Creamery - Scottsdale",
"items": [
{"product_id": "prod_001", "name": "Birthday Cake Remix", "price": 7.49, "quantity": 1, "choices": ["sz_love", "mx_001"]},
{"product_id": "prod_002", "name": "Peanut Butter Cup Perfection", "price": 7.49, "quantity": 2}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| phone | string | Optional | Customer phone (default: 5551234567) |
| menu_id | string | Required | Menu ID from /stores |
| store_name | string | Optional | Store name for display |
| items | array | Required | Items to order |
| items[].product_id | string | Required | Product ID from /menu |
| items[].name | string | Optional | Product name for display |
| items[].price | number | Required | Item price |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].choices | array | Optional | Selected option IDs from /options |
Response:
{
"order_id": "CS-e5f6g7h8",
"status": "pending_payment",
"store": {"id": "54321", "name": "Cold Stone Creamery - Scottsdale"},
"items": [
{"product_id": "prod_001", "name": "Birthday Cake Remix", "price": 7.49, "quantity": 1, "choices": ["sz_love", "mx_001"]},
{"product_id": "prod_002", "name": "Peanut Butter Cup Perfection", "price": 7.49, "quantity": 2, "choices": null}
],
"subtotal": 22.47,
"total_price": 11.24,
"wholesale_cost": 6.74,
"expires_at": "2026-11-25T18:30:00+00:00",
"balance_after": 335.26
}
| Error | Status | Reason |
|---|---|---|
| cap_exceeded | 400 | Subtotal exceeds $40 cap |
| insufficient_balance | 402 | Reseller balance too low |
| missing_field | 400 | Required field not provided |
POST /api/cs/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Cold Stone.
Request body: empty {}
Response:
{
"order_id": "CS-e5f6g7h8",
"status": "processing",
"cost_deducted": 6.74,
"remaining_balance": 335.26,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/cs/order/{order_id}
Check the status of a Cold Stone order. Poll this after confirming to track progress.
Response:
{
"order_id": "CS-e5f6g7h8",
"status": "completed",
"store": {"id": "54321", "name": "Cold Stone Creamery - Scottsdale"},
"items": [...],
"subtotal": 22.47,
"wholesale_cost": 6.74,
"cs_order_id": "CS-98765",
"order_num": "1234"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Cold Stone |
| completed | Order successfully placed — cs_order_id and order_num included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
🍪 Crumbl Cookies Endpoints
Full ordering pipeline for Crumbl Cookies. Weekly rotating flavors, party boxes, and 12-packs — store search by ZIP or city, weekly menu with modifier configuration for multi-flavor packs, and automatic placement with capture polling.
Order IDs:
CB-xxxxxxxx • Subtotal cap: $40 • Expires: 15 minutes • Wholesale: 30% of subtotalNote: Store search uses a text term (ZIP or city), not lat/lng.
POST /api/cb/stores
Search Crumbl Cookies locations by ZIP code or city name.
Request:
{
"term": "77001"
}
| Field | Type | Required | Description |
|---|---|---|---|
| term | string | Required | ZIP code, city name, or search query (also accepts zipcode or query) |
Response:
{
"stores": [
{
"store_id": "abc123",
"name": "Crumbl Cookies - River Oaks",
"address": "1985 W Gray St",
"city": "Houston",
"state": "TX",
"zip": "77019"
}
]
}
POST /api/cb/order
Create a pending Crumbl order. Nothing is charged until you confirm.
Request:
{
"first_name": "Alex",
"last_name": "Taylor",
"email": "[email protected]",
"store_id": "abc123",
"store_name": "Crumbl Cookies - River Oaks",
"source_id": "src_xyz789",
"pickup_at": "2026-11-25T18:00:00Z",
"items": [
{
"product_id": "prod_choc",
"name": "Chocolate Chip Cookie",
"price": 4.68,
"quantity": 2
},
{
"product_id": "prod_12pk",
"name": "12 Pack",
"price": 46.98,
"quantity": 1,
"modifiers": [
{"modifierId": "mod_flavors", "optionId": "opt_choc", "quantity": 6},
{"modifierId": "mod_flavors", "optionId": "opt_pink", "quantity": 3},
{"modifierId": "mod_flavors", "optionId": "opt_bday", "quantity": 3}
]
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Required | Customer first name |
| last_name | string | Required | Customer last name |
| string | Required | Customer email | |
| store_id | string | Required | Store ID from /stores |
| store_name | string | Optional | Store name for display |
| source_id | string | Optional | Source ID from /menu (auto-fetched if omitted) |
| pickup_at | string | Optional | Pickup time ISO string (auto-resolved if omitted) |
| items | array | Required | Items to order |
| items[].product_id | string | Required | Product ID from /menu |
| items[].name | string | Optional | Product name for display |
| items[].price | number | Required | Item price |
| items[].quantity | integer | Optional | Quantity (default 1) |
| items[].modifiers | array | Optional | Modifier selections for packs (each: modifierId, optionId, quantity) |
Response:
{
"order_id": "CB-m9n0p1q2",
"status": "pending_payment",
"store": {"store_id": "abc123", "name": "Crumbl Cookies - River Oaks"},
"items": [
{"product_id": "prod_choc", "name": "Chocolate Chip Cookie", "price": 4.68, "quantity": 2, "modifiers": null},
{"product_id": "prod_12pk", "name": "12 Pack", "price": 46.98, "quantity": 1, "modifiers": [...]}
],
"subtotal": 56.34,
"total_price": 28.17,
"wholesale_cost": 16.90,
"expires_at": "2026-11-25T18:30:00+00:00",
"balance_after": 325.10
}
sum(price × quantity) for each item. The $40 cap applies to subtotal (premium tier is $60). Modifier selections don't add to price — they're included in the product price.
| Error | Status | Reason |
|---|---|---|
| cap_exceeded | 400 | Subtotal exceeds cap ($40 standard / $60 premium) |
| insufficient_balance | 402 | Reseller balance too low |
| missing_field | 400 | Required field not provided |
POST /api/cb/order/{order_id}/confirm
Confirm and place a pending order. Deducts wholesale cost from your balance and submits the order to Crumbl. The system handles order creation, payment capture, and status polling (up to 60 seconds) automatically.
Request body: empty {}
Response:
{
"order_id": "CB-m9n0p1q2",
"status": "processing",
"cost_deducted": 16.90,
"remaining_balance": 325.10,
"message": "Order is being placed. Poll status or wait for webhook."
}
| Error | Status | Reason |
|---|---|---|
| insufficient_balance | 402 | Balance dropped since order creation |
| order_expired | 410 | Order passed 15-minute expiry |
| already_processing | 409 | Order already confirmed |
| already_finished | 409 | Order already completed or failed |
GET /api/cb/order/{order_id}
Check the status of a Crumbl order. Poll this after confirming to track progress.
Response:
{
"order_id": "CB-m9n0p1q2",
"status": "completed",
"store": {"store_id": "abc123", "name": "Crumbl Cookies - River Oaks"},
"items": [...],
"subtotal": 56.34,
"wholesale_cost": 16.90,
"cb_order_id": "ord_abcdef123456",
"receipt_id": "rec_xyz789"
}
| Status | Meaning |
|---|---|
| pending_payment | Order created, awaiting confirmation |
| processing | Order confirmed, being placed at Crumbl (includes capture polling) |
| completed | Order successfully placed — cb_order_id and receipt_id included |
| failed | Order failed — balance refunded automatically |
| expired | Order expired (not confirmed within 15 min) |
⛽ Gas Gen Endpoints
Generate Chevron / Texaco Rewards accounts with $1/gal savings on the next 5 fill-ups. Each account gets a fresh phone number via SMS verification, registers with Chevron, and returns the account details plus reward status.
Concurrency: Up to 3 accounts generated in parallel per request • Max qty: 5 per call • Cost: $4.00 per account (deducted from balance on success)
POST /api/gas/gen
Generate new Chevron/Texaco Rewards accounts. Each account gets a real US phone number, completes SMS verification, and registers a rewards profile. The phone number is what you enter at the pump to redeem rewards.
Request:
{
"qty": 2
}
| Param | Type | Description |
|---|---|---|
| qty | optional | Number of accounts to generate (1–5, default 1) |
Response:
{
"ok": true,
"accounts": [
{
"phone": "+12125551234",
"name": "James Wilson",
"email": "[email protected]",
"has_dollar_off": true
}
],
"failed": [
{"index": 1, "error": "No OTP received (timeout)"}
],
"summary": {"total": 2, "success": 1, "failed": 1}
}
| Error | Status | Reason |
|---|---|---|
| invalid_params | 400 | qty is not a valid integer |
| insufficient_balance | 402 | Not enough balance — $4.00 deducted per successful account |
Usage: The phone number is what you enter at the Chevron/Texaco pump to redeem the $1/gal savings. has_dollar_off indicates whether the welcome offer was confirmed. Each account in failed includes the index (0-based) and a specific error string. The top-level ok is true if at least one account succeeded.
🛒 Account Shop Endpoints
Buy pre-stocked Taco Bell, Pizza Hut, and Pizza Hut CA loyalty accounts loaded with rewards. Accounts come with login credentials and an OTP inbox link for retrieving login codes.
tacobell, pizzahut, ca_pizzahutPrice: $9.00 per account (deducted from balance on purchase) • Max qty: 5 per call
GET /api/acct/stock
Check available stock and pricing for each account type. Disabled products are excluded from the response.
Response:
{
"products": {
"tacobell": {"available": 42, "in_stock": true, "price": 9.00},
"pizzahut": {"available": 15, "in_stock": true, "price": 9.00},
"ca_pizzahut": {"available": 8, "in_stock": true, "price": 9.00}
}
}
Products that are temporarily disabled by the operator will not appear in the response.
POST /api/acct/buy
Purchase accounts from stock. Each account includes login email and an OTP inbox link for retrieving the login code. Balance is deducted only for accounts actually delivered.
Request:
{
"product": "pizzahut",
"qty": 2
}
| Param | Type | Description |
|---|---|---|
| product | required | Account type: tacobell, pizzahut, or ca_pizzahut |
| qty | optional | Number of accounts to buy (1–5, default 1) |
Response:
{
"ok": true,
"product": "pizzahut",
"accounts": [
{
"email": "[email protected]",
"password": "Xy8kP2mN",
"otp_link": "https://catchmail.io/mailbox/catchmail.io/ph4nibqhxl5q"
},
{
"email": "[email protected]",
"password": "Qz3vR7nW",
"otp_link": "https://catchmail.io/mailbox/catchmail.io/phw9fjrc3t7"
}
],
"summary": {
"requested": 2,
"delivered": 2,
"cost_per": 9.00,
"total_charged": 18.00
}
}
| Error | Status | Reason |
|---|---|---|
| invalid_params | 400 | Invalid product name or qty |
| product_disabled | 403 | Product is temporarily disabled |
| insufficient_balance | 402 | Not enough balance — $9.00 per account |
| out_of_stock | 409 | Not enough accounts in stock |
Usage: Open the otp_link in a browser to view the email inbox and retrieve the latest login OTP code. Use the email to sign in to the app (Pizza Hut, Taco Bell, etc.) and the OTP from the inbox link to complete login. Then redeem the rewards in the app.
👤 Customer Endpoints
Let your customers look up, cancel, or modify their orders. Your backend calls these — not the customer directly.
POST /api/customer/lookup
Look up an order by payment code and email. Response includes can_cancel and can_change_pickup flags.
{
"payment_code": "RS-X7K9M2",
"customer_email": "[email protected]"
}
POST /api/customer/cancel
Cancel a queued or pending order. Refunds wholesale cost to your balance. You handle refunding your customer.
// Request
{"payment_code": "RS-X7K9M2", "customer_email": "[email protected]"}
// Response
{"order_id": "WEB-a8f3c123", "status": "cancelled", "refunded": true, "refunded_amount": 6.00}
POST /api/customer/update-pickup
Change the pickup time for a queued order.
{"payment_code": "RS-X7K9M2", "customer_email": "[email protected]", "pickup_pref": "+120"}
🔔 Webhooks
POST /api/webhook/configure
Set your webhook endpoint. Must be HTTPS. A test ping is sent to verify. The webhook_secret is optional but recommended — if set, it's included as X-Webhook-Secret header on every delivery for verification.
{
"webhook_url": "https://yoursite.com/api/webhook",
"webhook_secret": "my_secret_key_123"
}
GET /api/webhook/log
Recent webhook deliveries for debugging. Accepts optional limit param (default 20).
Webhook Events
POST requests sent to your URL when orders finish. Verify with the X-Webhook-Secret header.
order.completed
{
"event": "order.completed",
"order_id": "WEB-a8f3c123",
"customer_email": "[email protected]",
"store": "Whataburger #1234",
"confirmation_code": "ABC123",
"pickup_time": "6:30 PM",
"cost_deducted": 6.00,
"completed_at": "2026-05-23T18:25:00+00:00",
"discord_user_id": 123456789012345678
}
order.failed
{
"event": "order.failed",
"order_id": "WEB-a8f3c123",
"reason": "Store closed or group link expired",
"refunded_amount": 6.00,
"remaining_balance": 342.00,
"failed_at": "2026-05-23T18:25:00+00:00",
"discord_user_id": 123456789012345678
}
Whataburger Events
wb_order.completed
{
"event": "wb_order.completed",
"order_id": "WB-a1b2c3d4",
"customer_email": "[email protected]",
"store": {"id": "1234", "name": "Whataburger #1234", "address": "123 Main St", "city": "Houston", "state": "TX"},
"order_numbers": ["98765432", "98765433"],
"entrees": [
{"type": "burger", "order_number": "98765432", "pickup_time": "6:30 PM"},
{"type": "chickn", "order_number": "98765433", "pickup_time": "6:32 PM"}
],
"entrees_delivered": 2,
"entrees_failed": 1,
"cost_deducted": 1.50,
"refunded_amount": 0.75,
"partial": true,
"completed_at": "2026-08-22T18:25:00+00:00",
"failures": [
{"item_index": 2, "type": "burger", "reason_code": "store_closed", "reason": "Store is closed for online orders"}
]
}
failures is only present when partial: true. See WB Order Status for all reason_code values.
wb_order.failed
{
"event": "wb_order.failed",
"order_id": "WB-a1b2c3d4",
"customer_email": "[email protected]",
"reason": "All entrees failed to place",
"refunded_amount": 2.25,
"failed_at": "2026-08-22T18:25:00+00:00",
"failures": [
{"item_index": 0, "type": "burger", "reason_code": "store_closed", "reason": "Store is closed for online orders"},
{"item_index": 1, "type": "chickn", "reason_code": "no_stock", "reason": "No replacement accounts available"},
{"item_index": 2, "type": "burger", "reason_code": "account_error", "reason": "Login failed"}
]
}
Insomnia Cookies Events
insom_order.completed
{
"event": "insom_order.completed",
"order_id": "IC-a8f3c123",
"customer_email": "[email protected]",
"store": {"name": "Insomnia Cookies - Greenwich Village", "address": "164 Bleecker St", "city": "New York", "state": "NY"},
"cookies": [
{"flavor": "Chocolate Chunk", "pickup_time": "10:30 PM"},
{"flavor": "Cookies 'N Cream", "pickup_time": "10:30 PM"}
],
"cookies_delivered": 2,
"cookies_failed": 1,
"cost_deducted": 1.00,
"refunded_amount": 0.50,
"partial": true,
"completed_at": "2026-08-24T02:30:00+00:00",
"failures": [
{"cookie_index": 2, "flavor": "Snickerdoodle", "reason_code": "out_of_stock", "reason": "Cookie currently unavailable at this location"}
]
}
failures is only present when partial: true. See Insomnia Order Status for all reason_code values.
insom_order.failed
{
"event": "insom_order.failed",
"order_id": "IC-a8f3c123",
"customer_email": "[email protected]",
"reason": "All cookies failed to place",
"refunded_amount": 1.50,
"failed_at": "2026-08-24T02:30:00+00:00",
"failures": [
{"cookie_index": 0, "flavor": "Chocolate Chunk", "reason_code": "store_closed", "reason": "Store is closed for online orders"},
{"cookie_index": 1, "flavor": "Cookies 'N Cream", "reason_code": "payment_error", "reason": "FreedomPay tokenization failed"},
{"cookie_index": 2, "flavor": "Snickerdoodle", "reason_code": "no_stock", "reason": "No replacement accounts available"}
]
}
DoorDash Events
dd_order.completed
{
"event": "dd_order.completed",
"order_id": "DD-a1b2c3d4",
"store_name": "McDonald's",
"items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
"tracking_url": "https://doordash.com/orders/...",
"pricing": {"subtotal": 9.48, "discount": 3.79, "subtotal_after_discount": 5.69, "tip": 2.00, "service_fee": 8.00, "total": 15.69},
"elapsed_seconds": 28.4,
"completed_at": "2026-08-31T16:01:30+00:00"
}
dd_order.failed
{
"event": "dd_order.failed",
"order_id": "DD-a1b2c3d4",
"store_name": "McDonald's",
"reason": "card_declined",
"reason_message": "The payment card was declined.",
"refunded": true,
"refunded_amount": 0.00,
"failed_at": "2026-08-31T16:01:30+00:00"
}
Retries: Up to 3 attempts (0s, 30s, 2min). Only retries on 5xx or connection failures — 4xx errors are not retried.
⚠ Error Codes
All errors return {"error": "code", "message": "description"}
| Status | Meaning |
|---|---|
| 400 | Bad request (invalid input) |
| 401 | Invalid or missing API key |
| 402 | Insufficient balance |
| 403 | Suspended or wrong reseller |
| 404 | Not found |
| 409 | Conflict (already queued / completed / not cancellable) |
| 410 | Order expired |
| 408 | Timeout (e.g. OTP not received in time) |
| 429 | Rate limited (includes retry_after seconds) |
| 500 | Server error |
| 502 | Upstream service failed (e.g. Taco Bell OTP request rejected) |
💻 Code Examples
Whataburger Order Flow (Python)
import requests
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
# 1. Check stock
resp = requests.get(f"{BASE}/api/wb/stock", headers=HEADERS)
stock = resp.json()
print(f"Available: {stock['available']}/{stock['total']}")
# 2. Create order
resp = requests.post(f"{BASE}/api/wb/order", json={
"items": [{"item_id": "whataburger", "qty": 1}],
"customer_email": "[email protected]"
}, headers=HEADERS)
order = resp.json()
print(f"Order {order['order_id']}: ${order['total_price']}")
# 3. Confirm order
resp = requests.post(f"{BASE}/api/wb/confirm/{order['order_id']}", json={
"first_name": "John",
"last_name": "Smith"
}, headers=HEADERS)
print(f"Confirmed! {resp.json()['status']}")
Webhook Receiver (Flask)
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route("/webhook", methods=["POST"])
def webhook():
secret = request.headers.get("X-Webhook-Secret")
if secret != "my_secret_key_123":
return jsonify({"error": "unauthorized"}), 401
data = request.json
if data["event"] == "order.completed":
print(f"Order placed! Code: {data['confirmation_code']}")
# notify your customer
elif data["event"] == "order.failed":
print(f"Order failed: {data['reason']}")
# refund your customer
return jsonify({"ok": True}), 200
Whataburger Order Flow (Python)
import requests
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
# 1. Check stock
stock = requests.get(f"{BASE}/api/wb/stock", headers=HEADERS).json()
print(f"Burgers: {stock['burger']['available']}, Chickn: {stock['chickn']['available']}")
# 2. Find stores
stores = requests.post(f"{BASE}/api/wb/stores", json={
"zipcode": "77001"
}, headers=HEADERS).json()["stores"]
store = stores[0]
# 3. Get menu to see available toppings (optional)
menu = requests.post(f"{BASE}/api/wb/menu", json={
"store_id": store["id"], "zipcode": "77001", "type": "burger"
}, headers=HEADERS).json()
# menu["toppings"] = [{"name": "Tomato", "levels": [0,1,2,3], "default": 2}, ...]
# 4. Create order with custom toppings
order = requests.post(f"{BASE}/api/wb/order", json={
"first_name": "John", "last_name": "Smith",
"email": "[email protected]", "zipcode": "77001",
"store_id": store["id"],
"items": [
{"type": "burger", "toppings": {"Tomato": 0, "Pickles": 3}},
{"type": "chickn"} # default build
]
}, headers=HEADERS).json()
print(f"Order {order['order_id']}: ${order['total_price']}")
# 5. Collect payment (your logic), then confirm
result = requests.post(
f"{BASE}/api/wb/order/{order['order_id']}/confirm",
json={}, headers=HEADERS
).json()
print(f"Status: {result['status']}, Cost: ${result['cost_deducted']}")
# 6. Poll status (or wait for webhook)
import time
while True:
status = requests.get(
f"{BASE}/api/wb/order/{order['order_id']}", headers=HEADERS
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(3)
print(f"Final: {status['status']}")
Insomnia Cookies Order Flow (Python)
import requests, time
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
# 1. Check stock
stock = requests.get(f"{BASE}/api/insom/stock", headers=HEADERS).json()
print(f"Cookies: {stock['cookies']['available']}, Price: ${stock['cookies']['price']}")
# 2. Find stores
stores = requests.post(f"{BASE}/api/insom/stores", json={
"zipcode": "10001"
}, headers=HEADERS).json()["stores"]
store = stores[0]
print(f"Store: {store['name']}")
# 3. Create order (pick flavors by flavor_id from /api/insom/menu)
order = requests.post(f"{BASE}/api/insom/order", json={
"first_name": "Sarah", "last_name": "Johnson",
"email": "[email protected]", "zipcode": "10001",
"store_id": store["external_id"],
"cookies": [
{"flavor_id": "4"}, # Chocolate Chunk
{"flavor_id": "3323"}, # Cookies 'N Cream
{"flavor_id": "13"} # Snickerdoodle
]
}, headers=HEADERS).json()
print(f"Order {order['order_id']}: {order['cookie_count']} cookies, ${order['total_price']}")
# 4. Collect payment (your logic), then confirm
result = requests.post(
f"{BASE}/api/insom/order/{order['order_id']}/confirm",
json={}, headers=HEADERS
).json()
print(f"Status: {result['status']}, Cost: ${result['cost_deducted']}")
# 5. Poll status (or wait for webhook)
while True:
status = requests.get(
f"{BASE}/api/insom/order/{order['order_id']}", headers=HEADERS
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(3)
if status["status"] == "completed":
for c in status["cookies"]:
print(f" {c['flavor_name']} - pickup: {c['pickup_time']}")
else:
print(f"Failed: {status['reason']}")
DoorDash Order Flow (Python)
import requests, time
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "pm_live_xxxxx"}
# 1. Check stock
stock = requests.get(f"{BASE}/api/dd/stock", headers=HEADERS).json()
print(f"DD accounts available: {stock['accounts']['available']}")
# 2. Create order
order = requests.post(f"{BASE}/api/dd/order", headers=HEADERS, json={
"group_link": "https://drd.sh/cart/ABC123/",
"address": "123 Main St, 90210",
"card_number": "4111111111111111",
"card_exp": "08/28",
"card_cvv": "123",
"card_zip": "90210",
"tip": 2.00
}).json()
print(f"Store: {order['store_name']}, Total: ${order['pricing']['total']}")
# 3. Confirm
requests.post(f"{BASE}/api/dd/order/{order['order_id']}/confirm", headers=HEADERS)
# 4. Poll until done
while True:
status = requests.get(f"{BASE}/api/dd/order/{order['order_id']}", headers=HEADERS).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(3)
print(f"Result: {status['status']}")
Taco Bell Account Gen (Python)
import requests, time
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
H007_KEY = "25abf49c-62ab-4112-ba1e-..."
# 1. Generate accounts
gen = requests.post(f"{BASE}/api/tb/gen", headers=HEADERS, json={
"first_name": "John",
"last_name": "Smith",
"birthday": "03/15", # optional
"hotmail007_key": H007_KEY,
"qty": 2
}).json()
for acc in gen["accounts"]:
print(f"Account: {acc['email']}")
for r in acc["rewards"]:
print(f" Reward: {r['title']}")
for fail in gen["failed"]:
print(f"Failed #{fail['index']}: {fail['error']}")
# 2. Later — get a login OTP for an account
email = gen["accounts"][0]["email"]
otp = requests.post(f"{BASE}/api/tb/otp", headers=HEADERS, json={
"email": email,
"hotmail007_key": H007_KEY
}).json()
if otp.get("ok"):
print(f"OTP for {email}: {otp['otp']}")
else:
print(f"OTP failed: {otp['message']}")
Wingstop Order Flow (Python)
import requests, time
BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
# 1. Find stores
stores = requests.post(f"{BASE}/api/ws/stores", json={
"zipcode": "90210"
}, headers=HEADERS).json()["stores"]
store = stores[0]
print(f"Store: {store['name']} (id={store['id']})")
# 2. Get menu
menu = requests.post(f"{BASE}/api/ws/menu", json={
"vendor_id": store["id"]
}, headers=HEADERS).json()
for cat in menu["categories"]:
print(f"\n{cat['name']}:")
for p in cat["products"][:3]:
print(f" {p['name']} (id={p['id']}, ${p['cost']})")
# 3. Get modifiers for a product (optional)
product_id = menu["categories"][0]["products"][0]["id"]
mods = requests.post(f"{BASE}/api/ws/modifiers", json={
"product_id": product_id
}, headers=HEADERS).json()
# Pick first option from each mandatory group
options = []
for g in mods["optiongroups"]:
if g["mandatory"] and g["options"]:
options.append(str(g["options"][0]["id"]))
options_str = ",".join(options)
# 4. Create order
order = requests.post(f"{BASE}/api/ws/order", json={
"first_name": "John", "last_name": "Doe",
"email": "[email protected]", "phone": "5551234567",
"vendor_id": store["id"],
"items": [
{"product_id": product_id, "quantity": 1, "options": options_str}
]
}, headers=HEADERS).json()
print(f"Order {order['order_id']}: ${order['subtotal']}, wholesale: ${order['wholesale_cost']}")
# 5. Confirm
result = requests.post(
f"{BASE}/api/ws/order/{order['order_id']}/confirm",
json={}, headers=HEADERS
).json()
print(f"Confirmed! Cost: ${result['cost_deducted']}")
# 6. Poll status
while True:
status = requests.get(
f"{BASE}/api/ws/order/{order['order_id']}", headers=HEADERS
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(3)
print(f"Result: {status['status']}")
Works the same for all 5 services — just change ws to fg, ss, cj, or hd.
Customer Order Lookup (JavaScript)
const BASE = "https://polarmunch.com";
const API_KEY = "rk_your_key_here";
async function lookupOrder(paymentCode, email) {
const resp = await fetch(`${BASE}/api/customer/lookup`, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
payment_code: paymentCode,
customer_email: email
})
});
const order = await resp.json();
if (order.status === "completed") {
console.log(`Pick up code: ${order.confirmation_code}`);
console.log(`Pickup time: ${order.pickup_time}`);
} else if (order.can_cancel) {
console.log("Order can still be cancelled");
}
return order;
}