INVALID_LASTN

Invalid $lastn request: what the INVALID_LASTN error means and how to fix it.

HTTP 400. Problem type: https://docs.ovok.com/errors/invalid-lastn.

What this means

Observation/$lastn refused the request before it read any data, because a parameter is missing, out of range or in conflict with another. detail names the parameter and the rule.

Troubleshooting

  1. Say what to find. Send at least one code or category, as repeated or comma-separated values. A request names at most 50 codes.
  2. Name exactly one patient with patient or subject, as Patient/123 or the bare ID 123. A patient session may leave it out and reads its own record. Every other caller must name one.
  3. Set max to a whole number from 1 to 1000. It is the number of newest Observations per code, and it defaults to 1.
  4. Set withAlerts to true or false, and nothing else.

Retry safely

Fix the parameter and send the request again. The same request is refused again. It was refused before any read, and $lastn only reads, so nothing changed.

If the problem persists

Share the HTTP status, problem type, request path, response timestamp and traceId with your administrator or support contact. Remove access tokens, provider secrets and patient data first. The Error responses guide explains the response fields, and the machine-code registry lists every endpoint-specific type.

Last updated on

On this page