{"openapi":"3.1.0","info":{"title":"RA Delivery API","version":"0.1.0","description":"Shared API for RA Delivery web, mobile, merchant, courier, fleet, support, and admin clients."},"servers":[{"url":"https://api.radelivery.com"},{"url":"https://api.roperomania.com"},{"url":"http://localhost:4000"}],"paths":{"/api/v1/health":{"get":{"summary":"Health check"}},"/api/v1/status":{"get":{"summary":"Public platform status"}},"/api/v1/demo/accounts":{"get":{"summary":"List public sandbox demo accounts"}},"/api/v1/auth/demo-login":{"post":{"summary":"Create a sandbox demo session"}},"/api/v1/countries":{"get":{"summary":"List supported marketplace countries"}},"/api/v1/cities":{"get":{"summary":"List supported marketplace cities by country"}},"/api/v1/service-zones":{"get":{"summary":"List active service zones and deterministic delivery-area fixtures"}},"/api/v1/addresses/validate":{"post":{"summary":"Validate whether an address is inside the Bucharest MVP service area"}},"/api/v1/mobile/app-config":{"get":{"summary":"Return remote config for customer, courier, merchant, and fleet apps"}},"/api/v1/mobile/capabilities":{"post":{"summary":"Accept app capability report from a native app"}},"/api/v1/mobile/push-tokens":{"post":{"summary":"Register or rotate a hashed mobile push token for the authenticated app session"}},"/api/v1/mobile/push-tokens/current":{"get":{"summary":"List active mobile push token registrations for the authenticated user"}},"/api/v1/mobile/push-tokens/{id}":{"delete":{"summary":"Revoke a mobile push token for the authenticated user"}},"/api/v1/customer/profile":{"get":{"summary":"Read the authenticated account profile (display name, phone, password capability); never returns the token"},"patch":{"summary":"Update the authenticated account display name and/or E.164-ish phone; self-scoped"}},"/api/v1/account/me":{"get":{"summary":"Alias of /customer/profile: read the authenticated account profile"},"patch":{"summary":"Alias of /customer/profile: update display name and/or phone"}},"/api/v1/auth/change-password":{"post":{"summary":"Change the authenticated account password: verifies current (401 if wrong), rejects weak new (400), rotates and revokes other sessions; published sandbox creds return 409 password_managed"}},"/api/v1/auth/password-capability":{"get":{"summary":"Return whether the authenticated account can rotate its password in-app (rotatable) or is managed by support/sandbox (sandbox_published)"}},"/api/v1/customer/invoice-profile":{"get":{"summary":"Read the authenticated account billing/invoice profile (individual or company, CUI/VAT, address)"},"put":{"summary":"Create or replace the authenticated account billing/invoice profile; company type requires companyName + vatId/CUI; self-scoped"}},"/api/v1/privacy/me":{"get":{"summary":"Return authenticated user's privacy request and data summary"}},"/api/v1/privacy/export-request":{"post":{"summary":"Create an authenticated personal data export request"}},"/api/v1/privacy/export-request/{id}":{"get":{"summary":"Read an authenticated user's personal data export request status"}},"/api/v1/privacy/deletion-request":{"post":{"summary":"Create an authenticated account deletion request"}},"/api/v1/privacy/deletion-request/{id}":{"get":{"summary":"Read an authenticated user's account deletion request status"}},"/api/v1/privacy/deletion-request/{id}/cancel":{"post":{"summary":"Cancel a pending authenticated account deletion request"}},"/api/v1/admin/privacy/requests":{"get":{"summary":"List privacy export and deletion requests for support/admin review"}},"/api/v1/admin/privacy/requests/{id}/mark-processing":{"post":{"summary":"Mark a privacy request processing"}},"/api/v1/admin/privacy/requests/{id}/complete":{"post":{"summary":"Complete a privacy request"}},"/api/v1/admin/privacy/requests/{id}/reject":{"post":{"summary":"Reject a privacy request with a reason"}},"/api/v1/apps/config":{"get":{"summary":"Return versioned app config by app id"}},"/api/v1/apps/min-version":{"get":{"summary":"Return minimum and latest app version rules"}},"/api/v1/apps/feature-flags":{"get":{"summary":"Return app feature flag state"}},"/api/v1/apps/legal-documents":{"get":{"summary":"Return app legal document versions"}},"/api/v1/apps/release-notes":{"get":{"summary":"Return app release notes"}},"/api/v1/leads":{"post":{"summary":"Create a progressive onboarding lead"}},"/api/v1/leads/customer-intent":{"post":{"summary":"Create an address-first customer ordering or waitlist lead"}},"/api/v1/leads/{id}/status":{"patch":{"summary":"Update supplier onboarding status; real sessions require step-up"}},"/api/v1/leads/{id}/documents":{"get":{"summary":"Read private supplier document metadata"},"post":{"summary":"Upload private supplier document metadata or bytes"}},"/api/v1/couriers/{id}/documents":{"get":{"summary":"Read private courier KYC document metadata"},"post":{"summary":"Upload private courier KYC document metadata or bytes"}},"/api/v1/documents/{id}/content":{"get":{"summary":"Download private document bytes for authorized reviewers or owning courier"}},"/api/v1/documents/{id}/review":{"post":{"summary":"Review private KYB/KYC document; real sessions require step-up"}},"/api/v1/leads/{id}/go-live":{"post":{"summary":"Approve controlled go-live after required documents pass; real sessions require step-up"}},"/api/v1/affiliates/clicks":{"post":{"summary":"Record affiliate or referral click attribution"}},"/api/v1/referrals/conversions":{"post":{"summary":"Record pending affiliate or referral conversion"}},"/api/v1/discovery/filters":{"get":{"summary":"Return customer discovery filters and facets from live catalog data"}},"/api/v1/discovery/stores":{"get":{"summary":"Return filtered stores with catalog truth and segmentation metadata"}},"/api/v1/search/autocomplete":{"get":{"summary":"Return store, product, and category autocomplete suggestions"}},"/api/v1/search":{"get":{"summary":"Search demo stores and products for a public customer query"}},"/api/v1/stores/{storeId}/menu":{"get":{"summary":"Return store menu with ingredients, allergens, modifiers, and availability"}},"/api/v1/checkout":{"post":{"summary":"Create order and payment intent. Optional checkout fields: tipPercent (server computes tipAmount), scheduledDeliveryAt (30-min slot, open-now), cutleryRequested, allergyNotes, deliveryNotes, addressText, deliveryCoordinates (service-area validated), upsellItems. Out-of-area pin -> 409; invalid slot -> 400/409."}},"/api/v1/orders":{"get":{"summary":"List orders scoped to the authenticated mobile/web role"}},"/api/v1/orders/{id}/tracking":{"get":{"summary":"Read customer/courier/merchant/fleet order tracking state"}},"/api/v1/orders/{id}/verification-codes":{"get":{"summary":"Read scoped pickup and dropoff verification codes for operations/courier proof"}},"/api/v1/orders/{id}/review":{"post":{"summary":"Create post-delivery rating, feedback, and sandbox tip"}},"/api/v1/orders/{id}/merchant-accept":{"post":{"summary":"Merchant accepts an order"}},"/api/v1/orders/{id}/merchant-ready":{"post":{"summary":"Merchant marks order ready for pickup"}},"/api/v1/orders/{id}/courier-claim":{"post":{"summary":"Courier claims a ready order"}},"/api/v1/orders/{id}/courier-delivered":{"post":{"summary":"Courier marks order delivered"}},"/api/v1/couriers/location":{"post":{"summary":"Update authenticated courier location for shift and map verification"}},"/api/v1/dispatch/{orderId}/offers":{"get":{"summary":"List deterministic courier offers"}},"/api/v1/admin/kpis/overview":{"get":{"summary":"Return super-admin operational KPI overview with filters"}},"/api/v1/admin/kpis/finance":{"get":{"summary":"Return finance KPI, ledger reconciliation, and payout obligations"}},"/api/v1/finance/ledger/reconciliation":{"get":{"summary":"Return sandbox ledger reconciliation status and variance"}},"/api/v1/finance/payout-obligations":{"get":{"summary":"Return sandbox payout obligations for merchants, couriers, and fleets"}},"/api/v1/maps/config":{"get":{"summary":"Return MapLibre style, tile, routing, and geocoding configuration"}},"/api/v1/maps/style.json":{"get":{"summary":"Return RA Delivery MapLibre-compatible vector tile style"}},"/api/v1/maps/health":{"get":{"summary":"Return self-hosted map provider health and fallback status"}},"/api/v1/maps/geocode":{"get":{"summary":"Legacy geocode endpoint returning the best point for a query"}},"/api/v1/geocode/search":{"get":{"summary":"Search addresses through the self-hosted geocoder proxy"}},"/api/v1/geocode/reverse":{"get":{"summary":"Reverse geocode a coordinate through the self-hosted geocoder proxy"}},"/api/v1/routing/route":{"get":{"summary":"Return route distance, duration, and geometry through the self-hosted routing proxy"}},"/api/v1/routing/eta":{"get":{"summary":"Return ETA and distance for a route"}},"/api/v1/routing/matrix":{"post":{"summary":"Return a small route matrix for dispatch ranking and delivery estimates"}},"/api/v1/support/tickets":{"post":{"summary":"Create support ticket"}},"/api/v1/support/tickets/mine":{"get":{"summary":"List support tickets visible to the authenticated requester"}},"/api/v1/support/tickets/{id}/messages":{"post":{"summary":"Append a customer/merchant/courier/fleet support message"}},"/api/v1/notifications/preferences":{"get":{"summary":"Read notification preferences"},"put":{"summary":"Update notification preferences"}},"/api/v1/notifications/rules":{"get":{"summary":"List notification delivery rules"}},"/api/v1/notifications/rules/evaluate":{"post":{"summary":"Evaluate notification preference and rule outcome"}},"/api/v1/upsell/offers":{"get":{"summary":"List eligible upsell offers"}},"/api/v1/upsell/events":{"post":{"summary":"Record upsell impression or action"}},"/api/v1/legal/acceptances":{"post":{"summary":"Record legal acceptance"}}}}