Files
kantinen-wrapper/analysis_results/order_api_capture.json
Michael Kaufmann bc98a19fc6 feat: server-based version with menu flagging, distributed polling, and SSE
Complete implementation including:
- Express server with Bessa API proxy
- Puppeteer scraper for menu data
- Flag storage (file-based persistence)
- SSE manager for real-time updates
- Polling orchestrator for distributed polling
- Frontend with weekly view, ordering, and flagging UI
- Yellow/green glow indicators for flagged items
2026-02-12 08:36:05 +01:00

131 lines
4.4 KiB
JSON

{
"capturedAt": "2026-02-11T10:15:00Z",
"description": "Captured API traffic from Bessa web app during order placement and cancellation",
"apiCalls": [
{
"step": "1. Fetch available dates (with existing orders)",
"method": "GET",
"url": "https://api.bessa.app/v1/venues/591/menu/dates/",
"requestHeaders": {
"Accept": "application/json",
"Authorization": "Token dba7d86e83c7f462fd8af96521dea41c4facd8a5",
"X-Client-Version": "1.7.0_prod/2026-01-26"
},
"responseStatus": 200,
"responseBody": {
"results": [
{
"date": "2026-02-11",
"id": 691,
"orders": [
{
"id": 1522671,
"order_state": 8,
"total": "5.50",
"items": [
{
"name": "M1 Herzhaftes"
}
]
}
]
},
{
"date": "2026-02-12",
"id": 692,
"orders": [
{
"id": 1522672,
"order_state": 5,
"total": "5.50",
"items": [
{
"name": "M5F Salat mit Gebäck DO 2"
}
]
}
]
},
{
"date": "2026-02-13",
"id": 698,
"orders": []
}
]
},
"duration": 202
},
{
"step": "2. Place order (POST)",
"method": "POST",
"url": "https://api.bessa.app/v1/user/orders/",
"requestHeaders": {
"Accept": "application/json",
"Authorization": "Token dba7d86e83c7f462fd8af96521dea41c4facd8a5",
"Content-Type": "application/json"
},
"requestBody": {
"customer": {
"email": "knapp-2041@bessa.app",
"first_name": "Michael",
"last_name": "Kaufmann"
},
"date": "2026-02-13T10:00:00.000Z",
"items": [
{
"amount": 1,
"article": 182378,
"name": "M1 W2",
"price": 4,
"vat": "10.00"
}
],
"order_type": 7,
"payment_method": "payroll",
"total": 4,
"venue": 591
},
"responseStatus": 201,
"responseBody": {
"id": 1535066,
"hash_id": "o_xlOaq",
"order_state": 5,
"total": "4.00"
},
"duration": 269
},
{
"step": "3. Cancel order (PATCH)",
"method": "PATCH",
"url": "https://api.bessa.app/v1/user/orders/1535066/cancel/",
"requestHeaders": {
"Accept": "application/json",
"Authorization": "Token dba7d86e83c7f462fd8af96521dea41c4facd8a5",
"Content-Type": "application/json"
},
"requestBody": {},
"responseStatus": 200,
"responseBody": {
"order_id": "o_xlOaq",
"state": "order cancelled."
},
"duration": 133
}
],
"orderStates": {
"5": "Transmitted/Active (new order)",
"8": "Accepted/Processed (confirmed by kitchen)"
},
"configurationDetails": {
"orderType": 7,
"configName": "canteen",
"paymentTypes": [
"payroll"
],
"cancellationCutoff": 3600,
"allowCancel": true,
"preorderDelta": 3600,
"venueId": 591,
"venueTimezone": "CET"
}
}