Overview
Standard API documentation for CargoExtra Gateway Service. Base path: /api/v1. Import this JSON into Postman, set baseUrl, then authenticate as a user or admin and reuse the returned token in userToken or adminToken.
Authentication: protected user endpoints accept Authorization: Bearer {{userToken}} or the customerToken/userToken cookie set by login. Protected admin endpoints accept Authorization: Bearer {{adminToken}} or the staffToken/adminToken cookie set by login.
Common list query parameters: page number, limit number max 100, sortBy string, sortOrder asc|desc, all 1 to bypass pagination, q text search, dateFrom/from, dateTo/to for date ranges where supported.
Common error responses: 401 { "message": "Unauthorized" }, 400 for missing/invalid fields, 404 for missing resources, and 500 { "message": "Unxepected Error: ..." } in unexpected failures.