API error codes
Errors come as application/problem+json (RFC 9457). Act on code; title and detail are for people and may change.
{
"type": "https://stj.fyi/developers/errors#not-found",
"title": "Not found",
"status": 404,
"detail": "No API resource at this path. Endpoints: https://stj.fyi/developers",
"instance": "/api/v1/places/nowhere.json",
"code": "not-found"
}invalid-parameter400 Invalid parameter- A query parameter is out of range or malformed (
days,n,limit,cursor,target, …).detailnames the allowed values. Unknown parameters are ignored, not rejected. invalid-body400 Invalid body- The rating body is not valid JSON or form data, or
starsis not 1 to 5. Only from POST /ratings. forbidden-origin403 Foreign origin- Ratings are accepted from stj.fyi pages only (plus origins the operator lists). Reading needs no origin. Only from POST /ratings.
not-found404 Not found- No endpoint at this path, or no record with this id (for example an unpublished place or an unknown route). Check the id against the list endpoint.
body-too-large413 Body too large- A rating body is limited to 2 KB. Only from POST /ratings.
query-too-long414 Query too long- The query string is over 6 KB. Ask for at most 100 targets per request. Only from GET /ratings.
unsupported-media-type415 Unsupported media type- Send
application/jsonorapplication/x-www-form-urlencoded. Only from POST /ratings. invalid-target422 Invalid target- The rating target is not in
/api/v1/targets.json. Only from POST /ratings. rejected422 Rating not saved- The rating looked automated (a hidden form field was filled) and was not saved. Only from POST /ratings.
too-fast422 Rating not saved- The rating came too soon after the page loaded. Wait a moment and retry. Only from POST /ratings.
rate-limited429 Too many requests- Over 120 requests a minute on live endpoints, or over the rating limits. Wait the seconds in
Retry-After;RateLimitshows what is left. rating-cap429 Rating limit reached- This network or device has rated this target as often as allowed in 30 days. Only from POST /ratings.
target-busy429 Target busy- This target got unusually many new ratings in the last hour or day. Try later. Only from POST /ratings.
paused503 Ratings paused- New ratings are paused for maintenance; see
Retry-After. Reading still works. Only from POST /ratings. busy503 Busy- Too many ratings right now, or the store is slow. Retry after
Retry-Afterseconds. Only from POST /ratings.