Rank menu profitability API
Rank menu items by contribution using calculated portion profit and supplied sales units. Ties fall back to gross margin.
The Rank menu profitability operation is part of the Restaurant Operations Intelligence API on BRAINIAC.software. Rank menu items by contribution using calculated portion profit and supplied sales units. Ties fall back to gross margin. It is exposed as POST /api/v1/restaurant-operations/menu-profitability-rank and priced at $0.05 USDC on Base. Payment uses the x402 exact scheme: an unpaid call returns HTTP 402 with payment requirements; after paying the exact USDC amount, retry the same request with a payment-signature header and Idempotency-Key. No account and no API key are required. Data sources for this product: Caller-supplied recipes Supplier prices Sales and waste records Ingredient allergen flags Limitations: Prices, allergens, and nutritional values are never invented. Unit conversion covers common mass and volume units. Allergen validation uses only explicitly supplied flags and claims. No legal food-safety compliance is claimed. Missing ingredient prices leave recipe cost incomplete. Outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Related operations in this group include Calculate recipe cost, Analyze menu item margins, Detect ingredient price variance, Estimate food waste cost. Open the group documentation for the full request schema, field notes, and response examples before integrating.
/api/v1/restaurant-operations/menu-profitability-rankExample request
curl -i -X POST "https://www.brainiac.software/api/v1/restaurant-operations/menu-profitability-rank" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"ingredients": [
{
"id": "flour",
"unit": "g",
"unitPrice": 0.002
},
{
"id": "butter",
"unit": "g",
"unitPrice": 0.012
}
],
"recipes": [
{
"id": "R-1",
"name": "Cookie",
"portions": 10,
"sellPrice": 3
},
{
"id": "R-2",
"name": "Toast",
"portions": 1,
"sellPrice": 4
}
],
"recipeLines": [
{
"recipeId": "R-1",
"ingredientId": "flour",
"quantity": 500,
"unit": "g"
},
{
"recipeId": "R-1",
"ingredientId": "butter",
"quantity": 100,
"unit": "g"
},
{
"recipeId": "R-2",
"ingredientId": "flour",
"quantity": 50,
"unit": "g"
},
{
"recipeId": "R-2",
"ingredientId": "butter",
"quantity": 20,
"unit": "g"
}
],
"sales": [
{
"recipeId": "R-1",
"units": 40
},
{
"recipeId": "R-2",
"units": 10
}
]
}
JSONAn unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.
FAQ
- Do I need an API key? No. Pay the listed USDC amount with x402.
- What network? Base (eip155:8453), USDC.
- Is this an official determination? No. Results are for human review against the cited sources.
Related operations
- Calculate recipe cost — $0.04 USDC
- Analyze menu item margins — $0.05 USDC
- Detect ingredient price variance — $0.04 USDC
- Estimate food waste cost — $0.04 USDC