Back to Invoice Generator

Real Hibachi Invoice API

v1.0

A REST API for AI agents and integrations to generate catering quotes, retrieve price breakdowns, and download printable invoice PDFs.

Quick Start

1

Get available menu items and schema

GET /api/invoice/schema -- returns all protein/appetizer/addon IDs, prices, and a full example payload.

2

POST your order to generate an invoice

POST /api/invoice -- returns JSON price breakdown, BOM (ingredients prep list), and a pdfUrl.

3

Open the PDF URL to get the printable invoice

GET /api/invoice/pdf?token=<token> -- renders a standalone HTML invoice page. Use browser print / "Save as PDF". Token expires in 30 minutes.

Endpoints

GET/api/invoice/schema

Returns all available item IDs (proteins, appetizers, add-ons, extras) with prices, the full input schema with field descriptions, and a ready-to-use example payload. No request body needed.

Try it live
POST/api/invoice

Submit a full InvoiceData JSON body. Returns price breakdown, BOM, and a temporary PDF link.

Content-Type:application/json
Auth:None (open)
GET/api/invoice/pdf?token=<token>

Renders a self-contained HTML invoice page for the given token (from the POST response pdfUrl). Optimized for print. Includes a "Save as PDF" button. Token expires in 30 minutes.

Request Body Reference

FieldTypeNotes
contactInfoobjectclientName, email, phone, eventDate, eventTime, eventAddress, specialNotes
adultCountnumberRequired. Number of adult guests.
childCountnumberNumber of children (age < 13). Default 0.
mode"detailed" | "quick"Detailed: per-guest proteins. Quick: aggregate counts.
guests[]GuestRow[]Required for detailed mode. Each guest has proteins[], name, isChild, etc.
quickCountItems[]QuickCountItem[]Required for quick mode. itemId, category, qty, childQty.
partyWideAddonsstring[]e.g. ["noodles"]. Applied to every guest.
partyExtras[]{ id, qty }[]Party-wide extras like gyoza, edamame. See schema for IDs.
paymentMethod"cash" | "credit_card"Credit card adds a fee.
depositAmountnumberDefault $100. Deducted from balance due.
promotions[]{ id, label, amount }[]Discounts. Amount is $ deducted from subtotal.
travelFeeobjecthomeZipcode, ratePerMile (def $2), freeRadiusMiles (def 20), distanceMiles, manualOverride.
selectedGratuityRatenumber | nulle.g. 0.18 for 18%. null = no gratuity selected.

Examples

Use quick mode when you just need aggregate protein counts rather than per-guest assignments.

{
  "contactInfo": {
    "clientName": "Jane Doe",
    "phone": "555-867-5309",
    "eventDate": "2026-05-20",
    "eventTime": "6:00 PM",
    "eventAddress": "456 Oak Ave, Pasadena, CA 91101"
  },
  "adultCount": 8,
  "childCount": 2,
  "mode": "quick",
  "guests": [],
  "quickCountItems": [
    { "itemId": "chicken", "category": "protein", "qty": 8, "childQty": 2 },
    { "itemId": "shrimp", "category": "protein", "qty": 6, "childQty": 0 },
    { "itemId": "filet_mignon", "category": "protein", "qty": 4, "childQty": 0 }
  ],
  "partyWideAddons": [],
  "partyExtras": [],
  "paymentMethod": "cash",
  "depositAmount": 100,
  "promotions": [],
  "travelFee": {
    "homeZipcode": "91748",
    "ratePerMile": 2,
    "freeRadiusMiles": 20,
    "distanceMiles": null,
    "manualOverride": null
  },
  "selectedGratuityRate": null
}

AI Agent Integration Guide

Recommended Flow

  1. On first run, call GET /api/invoice/schema to cache available item IDs and prices.
  2. Gather order details from your user (guest count, protein preferences, address, etc.).
  3. Build the InvoiceData JSON body using the IDs from step 1.
  4. Call POST /api/invoice with the JSON body.
  5. Present the invoice breakdown to your user. Share the pdfUrl for them to download/print.

Tips

  • Use quick mode when you only know aggregate counts (e.g. "8 people, all want chicken and shrimp").
  • Use detailed mode when you have per-guest info (names, individual protein choices, allergies).
  • Set distanceMiles in travelFee if you can calculate the distance. Otherwise leave it null and set manualOverride to a flat dollar amount.
  • The pdfUrl token expires in 30 minutes. Generate a new one by POSTing again if needed.
  • Validation errors return { ok: false, errors: [...] } with HTTP 400. Use the error messages to fix and retry.
  • The bom array in the response is the chef's prep list (bill of materials) -- useful for operational planning.

Error Handling

// 400 Bad Request
{
  "ok": false,
  "errors": [
    "adultCount must be a non-negative number.",
    "mode must be 'detailed' or 'quick'."
  ]
}

// 404 Not Found (expired PDF token)
{
  "ok": false,
  "error": "Token not found or expired (tokens expire after 30 minutes)."
}

Real Hibachi Invoice API v1.0 · No authentication required · CORS enabled