Skip to Content
APIsBase URL

Base URL and responses

Foundation for every HTTP call: hosts, path versioning, required headers, and the common error and pagination envelopes.

Hosts

EnvironmentBase URLPurpose
Sandboxhttps://sandbox-api.udai.live/v1Integrator testing
Staginghttps://staging-api.udai.live/v1Pre-production rehearsal
Productionhttps://api.udai.live/v1Live national operations

All REST paths in this documentation are relative to /v1 on the host you choose. Example:

GET https://sandbox-api.udai.live/v1/assets

See Environments and the Sandbox for access policy.

Path versioning

Public routes are served under the /v1 path prefix. Breaking changes to request or response contracts increment the path version. Clients continue to call /v1 until they deliberately move to a later prefix.

Required headers

Most operational routes require:

HeaderPurpose
partner-api-keyIdentifies the integrating platform
AuthorizationBearer user JWT for the acting user
X-Organisation-IDOrganisation tenancy for the call
Content-Typeapplication/json for JSON bodies

Authentication routes and exceptions are defined in Access control. Session issuance is documented in Authentication.

Error response format

Errors use a single JSON shape:

{ "error": "Bad Request", "message": "Missing required field 'email'", "status_code": 400, "timestamp": "2025-07-17T11:45:00Z", "path": "/v1/auth/register" }
FieldTypeDescription
errorstringShort error class
messagestringHuman-readable explanation
status_codeintHTTP status code
timestamptimestampISO 8601 time of the error
pathstringRequest path that failed

Common status codes

CodeMeaningTypical cause
200OKSuccessful read or update
201CreatedSuccessful create
400Bad RequestInvalid body, parameters, or business rule
401UnauthorizedMissing or invalid partner key or JWT
403ForbiddenAuthenticated but not authorised for the action or organisation
404Not FoundUnknown UUID or resource
409ConflictDuplicate or incompatible state
422Unprocessable EntityValid JSON but invalid references
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected failure
503Service UnavailableDependency unavailable

Endpoint pages document which of these codes that route returns.

Pagination

List endpoints that page results accept:

ParameterTypeDefaultDescription
pageinteger1Page number, starting at 1
limitinteger25Page size

Successful list responses use:

{ "message": "Resources retrieved successfully", "data": [], "pagination": { "total_records": 142, "total_pages": 3, "current_page": 1, "per_page": 50, "has_next": true, "has_previous": false } }
Last updated on