Skip to main content

Health Reference

Endpoint​

GET /health

What this endpoint does​

Verifies that the Capricorn Transaction Experience API is available and can process requests using the same authentication and authorization context as the business endpoints.

Request Headers​

In the tables below, Required indicates that Capricorn cannot process the request without that value.

HeaderTypeRequiredDescriptionConstraintsExample
client_idstringYesClient application identifier for the calling system.32-character alphanumeric, pattern ^([A-Za-z0-9]){32}$0123456789ABCDEF0123456789ABCDEF
client_secretstringYesClient application secret for the calling system.32-character alphanumeric, pattern ^([A-Za-z0-9]){32}$ABCDEF0123456789ABCDEF0123456789
x-captokenstringYesMandatory Capricorn authorization token for the calling system so the health check validates the same documented request context.64-character SHA-256 hash, pattern ^[a-fA-F0-9]64$opaque-token
X-Correlation-IDstringNoOptional correlation value used for tracing and support.Pattern ^[0-9a-zA-Z(\-){}]+$, min length 1a0235ed0-d884-11ef-957a-005056afc7ce

URI / Query Parameters​

ParameterTypeRequiredDescriptionConstraintsExample
Nonen/aNoThis endpoint does not define URI or query parameters.n/an/a

Code Examples​

important

Replace the example credentials with the values provided during onboarding. If the example includes a supplierId, use your own supplier ID associated with your x-captoken.

curl -X GET 'https://api.capricorn.example.com/health' \
-H 'client_id: 0123456789ABCDEF0123456789ABCDEF' \
-H 'client_secret: ABCDEF0123456789ABCDEF0123456789' \
-H 'x-captoken: opaque-token' \
-H 'X-Correlation-ID: a0235ed0-d884-11ef-957a-005056afc7ce'

Responses​

important

X-Correlation-ID is generated automatically if omitted and may appear as correlationId in the response body.

200 OK​

Returned when the Capricorn Transaction Experience API is reachable and responding to authenticated requests.

FieldTypeDescriptionExample
messagestringConfirmation that the API process is running and reachable.The API is running
{
"message": "The API is running"
}

400 Bad Request​

Returned when the request headers are malformed, for example if a supplied correlation identifier does not match the documented pattern.

FieldTypeDescriptionExample
error.typestringError category for request-shape or validation problems.CAP:BAD_REQUEST
error.descriptionstringShort summary of the failure category.Bad request
error.messagestringMessage describing what to correct before retrying.Invalid Request, Please validate the request message.
{
"error": {
"type": "CAP:BAD_REQUEST",
"description": "Bad request",
"message": "Invalid Request, Please validate the request message."
}
}

401 Unauthorized​

Returned when client_id or client_secret is missing or invalid.

FieldTypeDescriptionExample
error.typestringError category returned when authentication fails.CAP:UNAUTHORIZED
error.descriptionstringShort summary of the authentication failure.Unauthorized
error.messagestringExplains that the supplied client credentials were rejected.Client id or secret is invalid.
{
"error": {
"type": "CAP:UNAUTHORIZED",
"description": "Unauthorized",
"message": "Client id or secret is invalid."
}
}

404 Not Found​

The published asset includes this response example for /health, but the payload text is clearly account-oriented rather than health-check-oriented. It is reproduced here exactly because it exists in the current specification; treat it as a source-spec anomaly rather than a supported /health contract until the upstream asset is corrected.

FieldTypeDescriptionExample
error.typestringError category returned when the requested record is not available.CAP:NOT_FOUND
error.descriptionstringShort summary of the missing-resource condition.Not found / CAP's resource not found
error.messagestringMessage published in the asset for the not-found case.The specified account could not be located.
{
"error": {
"type": "CAP:NOT_FOUND",
"description": "Not found / CAP's resource not found",
"message": "The specified account could not be located."
}
}

429 Too Many Requests​

Returned when the caller exceeds the API rate limit.

FieldTypeDescriptionExample
messagestringRate-limit message returned when too many requests are sent in a short period.Too Many Requests
{
"message": "Too Many Requests"
}

500 Internal Server Error​

Returned when the API encounters an unexpected server-side failure.

FieldTypeDescriptionExample
error.typestringError category for unexpected server-side failures.CAP:INTERNAL_SERVER_ERROR
error.descriptionstringShort summary of the server-side error.Internal server error
error.messagestringAdvises the client to retry later.API encountered an unexpected error. Please retry later.
{
"error": {
"type": "CAP:INTERNAL_SERVER_ERROR",
"description": "Internal server error",
"message": "API encountered an unexpected error. Please retry later."
}
}

503 Service Unavailable​

Returned when a downstream dependency is unavailable or times out. The service can include a retry hint for clients.

Response headers

HeaderTypeDescription
Retry-AfterstringOptional delay, in seconds, that the client should wait before retrying the request.

Response Body

FieldTypeDescriptionExample
error.typestringError category for temporary downstream or platform outages.CAP:SERVICE_UNAVAILABLE
error.descriptionstringShort summary of the availability issue.Service unavailable
error.messagestringIndicates the API timed out or could not reach a backend service.A timeout occurred while processing the request.
{
"error": {
"type": "CAP:SERVICE_UNAVAILABLE",
"description": "Service unavailable",
"message": "A timeout occurred while processing the request."
}
}