Warning

🚧 Work in Progress: This page is currently under construction. Content may be incomplete or subject to change. To contribute, see the contribution guide.

REST Standards


Versioning

All internal APIs must be versioned in the URL:

https://api.patria.internal/v1/funds
https://api.patria.internal/v2/funds
  • v1, v2… — major versions with breaking changes
  • Keep the previous version active for at least 6 months after launching the new one

Endpoint naming

  • Plural nouns, kebab-case: /v1/capital-calls, /v1/portfolio-companies
  • No verbs in the URL — the HTTP method is the verb
  • Hierarchy reflects relationship: /v1/funds/{id}/investors

HTTP methods

MethodUseIdempotent?
GETReadYes
POSTCreateNo
PUTFull updateYes
PATCHPartial updateNo
DELETERemoveYes

Required status codes

CodeUse
200 OKGeneric success (GET, PUT, PATCH)
201 CreatedResource created (POST)
204 No ContentSuccess with no body (DELETE)
400 Bad RequestClient validation error
401 UnauthorizedNot authenticated
403 ForbiddenAuthenticated but no permission
404 Not FoundResource not found
422 Unprocessable EntityValid data but semantically incorrect
500 Internal Server ErrorServer error

Standard error format

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The reference_date field is required",
    "details": [
      { "field": "reference_date", "message": "required field" }
    ]
  }
}

Authentication

All internal APIs must use Entra ID Bearer token:

Authorization: Bearer <token>