Every NikoHealth API response includes a three-digit HTTP status code that tells you whether the request succeeded and, if not, why.
Success Codes
Code | Meaning | When you’ll see it |
200 | OK | The request succeeded. Returned for most GET, PUT and DELETE requests, usually with a response body. |
201 | Created | A new record was created, usually by a POST. The body contains the new record’s |
204 | No Content | The request succeeded, and there’s no response body. |
Client Error Codes
These mean there’s a problem with the request itself. Fix the request before retrying.
Code | Meaning | What to do |
400 | Bad Request | The request failed validation, for example a missing required field, a bad enum value, an invalid ID format or invalid filters. Check the response body for details. |
401 | Unauthorized | The access token is missing, expired or invalid. Request a new token and retry. Tokens expire after 20 minutes. |
403 | Forbidden | Your token is valid, but your client doesn’t have permission for this resource. Contact support@nikohealth.com. |
404 | Not Found | The record you referenced (a patient, order, insurance, document and so on) doesn’t exist, or the endpoint path is wrong. |
413 | Content Too Large | The uploaded file is too large. Applies to file uploads. |
429 | Too Many Requests | You’ve exceeded the rate limit: 300 requests per second for most endpoints, 25 per second for insurance eligibility. Slow down and retry with an increasing delay. See Rate Limits and Retries. |
Server Error Codes
Code | Meaning | What to do |
5xx | Server error | A problem on our side. Retry after a short delay. If it keeps happening, contact support and include the request details and the time it happened. |
Error Response Format
Most 400, 404 and 429 responses include a body that explains what went wrong. It’s an array of errors:
[
{
"Code": "string",
"Message": "string",
"Parameter": "string"
}
]
Field | Description |
| An error code |
| A readable description of the problem |
| The field or parameter that caused the error, if applicable |
401 and 403 responses usually have no body.
Tips for Handling Responses
Check the status code first, then read the body.
401: Get a new token and retry once. Don’t retry over and over with the same token.
429 and 5xx: Retry with an increasing delay, for example 1 second, then 2, then 4.
400 and 404: Don’t retry without changing the request; you’ll get the same result.
Each endpoint in Swagger lists the specific codes it can return, under Responses.
If you have any questions, contact us at support@nikohealth.com.
