Skip to content

Jobs

All v1 endpoints currently return synchronously, so no public path enqueues jobs right now — these endpoints exist as scaffolding for a future async path and return empty for fresh accounts. See Async jobs for the current sync model.

If you’re integrating today, you can skip this page and use /v1/stays/batch and /v1/search inline.

GET /v1/jobs

List your recent jobs.

Terminal window
curl "https://api.stayingapi.com/v1/jobs?limit=20" \
-H "Authorization: Bearer sk_live_..."

Query params:

  • limit (optional, default 50) — max rows.
  • offset (optional, default 0) — for paging.
  • status (optional) — queued, running, succeeded, failed, timed_out, aborted.
  • type (optional) — e.g. batch_detail, /v1/listings/superhost.
{
"data": [
{
"id": "b1d6...",
"type": "batch_detail",
"status": "succeeded",
"result_count": 12,
"created_at": "2026-05-26T14:00:00Z",
"started_at": "2026-05-26T14:00:01Z",
"completed_at": "2026-05-26T14:00:18Z",
"error": null
}
],
"meta": { "count": 1, "limit": 50, "offset": 0, "has_more": false },
"request_id": "req_..."
}

GET /v1/jobs/{id}

Poll one job by id.

Terminal window
curl https://api.stayingapi.com/v1/jobs/b1d6... \
-H "Authorization: Bearer sk_live_..."
{
"data": {
"id": "b1d6...",
"type": "batch_detail",
"status": "succeeded",
"input": { "entries": [/* echo of original request */] },
"result_count": 12,
"created_at": "2026-05-26T14:00:00Z",
"started_at": "2026-05-26T14:00:01Z",
"completed_at": "2026-05-26T14:00:18Z",
"error": null
},
"request_id": "req_..."
}

Statuses: queuedrunningsucceeded | failed | timed_out | aborted.

GET /v1/jobs/{id}/results

Fetch the result rows for a finished job. Returns an empty array until the job reaches succeeded.

Terminal window
curl "https://api.stayingapi.com/v1/jobs/b1d6.../results?limit=100" \
-H "Authorization: Bearer sk_live_..."

Query params:

  • limit (optional, default 100) — page size.
  • offset (optional, default 0).
  • fields (optional) — projection, same syntax as /v1/stays/{id}?fields=.
  • format (optional) — json (default) or csv.

Response is an array of canonical Stay rows (same shape as /v1/stays/{id}).

Notes

  • Polling cadence: 2–5 seconds is fine; don’t hammer.
  • Results stay available for 7 days after the job completes.
  • Failed jobs include a non-null error string explaining what went wrong.
  • For push-notification instead of polling, register a webhook with the job.succeeded or job.failed event — see Webhooks.

Next