HTTP Response Codes
Qubictron uses conventional HTTP response codes to indicate the success or failure of an API request.
Always read success and status_code from the response body; do not rely on the HTTP status alone.
| code | status_code | success | description |
|---|---|---|---|
200 | SUCCESS | true | Request completed successfully. Also returned when no sailings match (sailings is empty) and when the last known schedule is served because the schedule source is unavailable (metadata.cache_expires is in the past). |
400 | WRONG_PARAMETERS | false | A request parameter is missing or invalid. |
400 | OUT_OF_HORIZON | false | The requested etd is more than 8 weeks ahead. |
401 | INVALID_API_KEY | false | The API key is missing or unknown. The header name must be lowercase x-api-key; other spellings are treated as a missing key. Not counted against the limit. |
403 | API_KEY_ACCESS_DENIED | false | The API key is valid but has no access to the Vessel Schedules API (error: API_KEY_ACCESS_DENIED), or its monthly request limit is used up (error: API_KEY_QUOTA_EXCEEDED). Not counted against the limit. |
502 | UPSTREAM_UNAVAILABLE | false | The schedule source is unavailable and no schedule for this port pair has been stored yet. Please retry later. |