{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-asynchronous-job-schema.json",
  "title": "AsynchronousJob",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-jobs-api-openapi.yml#/components/schemas/AsynchronousJob",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "prequeued",
        "pending",
        "success",
        "failure"
      ]
    },
    "response": {
      "type": "object",
      "properties": {
        "body": {
          "description": "Response body that would have been returned if the job were a synchronous request"
        },
        "http_status": {
          "type": "number",
          "description": "HTTP status code that would have been returned if the job were a synchronous request"
        }
      },
      "required": [
        "http_status"
      ],
      "additionalProperties": false,
      "description": "The response to a request executed as a job"
    },
    "request": {
      "type": "object",
      "properties": {
        "body": {
          "description": "The request body"
        },
        "method": {
          "type": "string",
          "description": "The request method e.g. POST"
        },
        "url": {
          "type": "string",
          "description": "The full URL of the request"
        },
        "idempotency_key": {
          "type": "string",
          "description": "The provided Idempotency-Key header in the original request"
        }
      },
      "required": [
        "method",
        "url"
      ],
      "additionalProperties": false,
      "description": "The request that kicked off the job"
    }
  },
  "required": [
    "id",
    "status",
    "request"
  ]
}