The complete UPCOZ NGR API โ endpoints, request/response schema, business rules and worked examples. Built to be copied straight into Claude Code (or any AI assistant) as context.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/calculate-sports-ngr | Primary. Calculate GGR/NGR for a bet (single or multi-leg). Returns values (numbers) + data (display strings). |
| POST | /api/calculate-ngr | Single-bet variant. Flat top-level fields + ngrDetailed running total. |
| GET | /api/tax-rates | POC & GST rates by state. |
| GET | /api/racing-fees | All racing bodies + rates. Also /:stateCode. |
| GET | /api/sport-fees | All sport bodies + rates. Also /:bodyCode. |
| GET | /api/operational-fees | Bank fee and other operational rates. |
| GET | /api/transaction-types | Transaction type reference list. |
| GET | /api/health | Service + DB health. |
| POST | /api/update-racing-fees | Admin: update racing rates. |
| POST | /api/update-sport-fees | Admin: update sport rates. |
| POST | /api/update-tax-rates | Admin: update POC/GST. |
| POST | /api/update-operational-fees | Admin: update bank fee etc. |
| GET / POST | /api/racing-contract/:bodyCode /api/sport-contract/:bodyCode | Download / upload a body's contract PDF. |