5.0 KiB
5.0 KiB
Unified API V2
Frontend should use this service as the single base URL:
https://krow-api-v2-933560802882.us-central1.run.app
The gateway keeps backend services separate internally, but frontend should treat it as one API.
1) Auth routes
Client auth
POST /auth/client/sign-inPOST /auth/client/sign-upPOST /auth/client/sign-out
Staff auth
POST /auth/staff/phone/startPOST /auth/staff/phone/verifyPOST /auth/staff/sign-out
Shared auth
GET /auth/sessionPOST /auth/sign-out
2) Client routes
Client reads
GET /client/sessionGET /client/dashboardGET /client/reordersGET /client/billing/accountsGET /client/billing/invoices/pendingGET /client/billing/invoices/historyGET /client/billing/current-billGET /client/billing/savingsGET /client/billing/spend-breakdownGET /client/coverageGET /client/coverage/statsGET /client/coverage/core-teamGET /client/hubsGET /client/cost-centersGET /client/vendorsGET /client/vendors/:vendorId/rolesGET /client/hubs/:hubId/managersGET /client/team-membersGET /client/orders/viewGET /client/orders/:orderId/reorder-previewGET /client/reports/summaryGET /client/reports/daily-opsGET /client/reports/spendGET /client/reports/coverageGET /client/reports/forecastGET /client/reports/performanceGET /client/reports/no-show
Client writes
POST /client/orders/one-timePOST /client/orders/recurringPOST /client/orders/permanentPOST /client/orders/:orderId/editPOST /client/orders/:orderId/cancelPOST /client/hubsPUT /client/hubs/:hubIdDELETE /client/hubs/:hubIdPOST /client/hubs/:hubId/assign-nfcPOST /client/hubs/:hubId/managersPOST /client/billing/invoices/:invoiceId/approvePOST /client/billing/invoices/:invoiceId/disputePOST /client/coverage/reviewsPOST /client/coverage/late-workers/:assignmentId/cancel
3) Staff routes
Staff reads
GET /staff/sessionGET /staff/dashboardGET /staff/profile-completionGET /staff/availabilityGET /staff/clock-in/shifts/todayGET /staff/clock-in/statusGET /staff/payments/summaryGET /staff/payments/historyGET /staff/payments/chartGET /staff/shifts/assignedGET /staff/shifts/openGET /staff/shifts/pendingGET /staff/shifts/cancelledGET /staff/shifts/completedGET /staff/shifts/:shiftIdGET /staff/profile/sectionsGET /staff/profile/personal-infoGET /staff/profile/industriesGET /staff/profile/skillsGET /staff/profile/documentsGET /staff/profile/attireGET /staff/profile/tax-formsGET /staff/profile/emergency-contactsGET /staff/profile/certificatesGET /staff/profile/bank-accountsGET /staff/profile/benefitsGET /staff/profile/time-cardGET /staff/profile/privacyGET /staff/faqsGET /staff/faqs/search
Staff writes
POST /staff/profile/setupPOST /staff/clock-inPOST /staff/clock-outPUT /staff/availabilityPOST /staff/availability/quick-setPOST /staff/shifts/:shiftId/applyPOST /staff/shifts/:shiftId/acceptPOST /staff/shifts/:shiftId/declinePOST /staff/shifts/:shiftId/request-swapPUT /staff/profile/personal-infoPUT /staff/profile/experiencePUT /staff/profile/locationsPOST /staff/profile/emergency-contactsPUT /staff/profile/emergency-contacts/:contactIdPUT /staff/profile/tax-forms/:formTypePOST /staff/profile/tax-forms/:formType/submitPOST /staff/profile/bank-accountsPUT /staff/profile/privacy
4) Upload and verification routes
These are exposed as direct unified aliases even though they are backed by core-api-v2.
Generic core aliases
POST /upload-filePOST /create-signed-urlPOST /invoke-llmPOST /rapid-orders/transcribePOST /rapid-orders/parsePOST /verificationsGET /verifications/:verificationIdPOST /verifications/:verificationId/reviewPOST /verifications/:verificationId/retry
Staff upload aliases
POST /staff/profile/photoPOST /staff/profile/documents/:documentId/uploadPOST /staff/profile/attire/:documentId/uploadPOST /staff/profile/certificatesDELETE /staff/profile/certificates/:certificateId
5) Notes that matter for frontend
roleIdonPOST /staff/shifts/:shiftId/applyis the concreteshift_roles.idfor that shift, not the catalog role definition id.accountTypeonPOST /staff/profile/bank-accountsaccepts either lowercase or uppercase and is normalized by the backend.- File upload routes return a storage path plus a signed URL. Frontend uploads the file directly to storage using that URL.
- Verification routes are durable in the v2 backend and were validated live through document, attire, and certificate upload flows.
6) Why this shape
- frontend gets one host
- backend keeps reads, writes, and service helpers separated
- routing can change internally later without forcing frontend rewrites