{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-job-status-response-schema.json",
  "title": "JobStatusResponse",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-invoice-openapi.yml#/components/schemas/JobStatusResponse",
  "type": "object",
  "properties": {
    "jobStatus": {
      "description": "Status of the processed job. Possible values: `DONE`,` IN_PROGRESS`",
      "enum": [
        "DONE",
        "IN_PROGRESS"
      ],
      "type": "string"
    },
    "jobType": {
      "description": "Job type determines if the orders are provided manually or searched by a parametrized query.",
      "enum": [
        "AUTOMATIC",
        "MANUAL"
      ],
      "type": "string"
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "orderId": {
            "description": "The ID of the processed order.",
            "type": "string"
          },
          "orderStatus": {
            "description": "Status determining if the order was processed successfully.",
            "enum": [
              "SUCCESS",
              "FAILURE",
              "PENDING"
            ],
            "type": "string"
          },
          "message": {
            "description": "Information about the result of order processing.",
            "type": "string"
          },
          "downloadLink": {
            "description": "URL to the generated invoice PDF.",
            "type": "string"
          },
          "invoiceNumber": {
            "description": "Number of the generated invoice.",
            "type": "string"
          }
        }
      }
    }
  }
}