Skip to main content

JSON response reference

Guide: JSON clients and single-page apps.

Queued client​

Sent when the request has Accept: application/json (exact value) and the visitor is in the queue.

FieldTypeContent
errorstringAlways capacity overload
handlerstringAlways Loch.sh Queue Manager
detail.positionintPosition in the queue, from 1
detail.queueSizeintNumber of visitors in the queue
detail.estimatedWaitTimeintApproximate wait, in minutes
detail.refreshIntervalintSeconds to wait before retrying (refreshIntervalSeconds)
detail.progressPercentageintProgress, from 0 to 100
detail.debugInfostringInternal state; empty unless debug=true

Rate-limited client​

Sent to a request without the cookie above rateLimitTimes per minute, whatever its Accept header. Same error and handler, no detail.

{"error": "capacity overload", "handler": "Loch.sh Queue Manager"}

Status and headers​

ItemValue
StatushttpResponseCode (429 by default)
Content-Typeapplication/json
X-Loch-shLoch Queue
Set-CookieThe queue cookie, on the first request of a visitor (with useCookies=true)