{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/invoicepdfs-com/json-schema/invoicepdfs-com-import-response-schema.json",
  "title": "ImportResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/invoicepdfs-com-imports-api-openapi.yml#/components/schemas/ImportResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/ImportOut"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "ImportOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "source_format": {
          "type": "string",
          "title": "Source Format"
        },
        "status": {
          "$ref": "#/$defs/ImportStatus"
        },
        "total_rows": {
          "type": "integer",
          "title": "Total Rows"
        },
        "imported_rows": {
          "type": "integer",
          "title": "Imported Rows"
        },
        "failed_rows": {
          "type": "integer",
          "title": "Failed Rows"
        },
        "errors": {
          "anyOf": [
            {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Errors"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "title": "Updated At"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completed At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "source_format",
        "status",
        "total_rows",
        "imported_rows",
        "failed_rows",
        "created_at",
        "updated_at"
      ],
      "title": "ImportOut"
    },
    "ImportStatus": {
      "type": "string",
      "enum": [
        "pending",
        "completed",
        "cancelled"
      ],
      "title": "ImportStatus",
      "description": "How far an import has got.\n\n`confirm_import` completes the work before it responds, so an import is\n`pending` until it is confirmed and `completed` immediately afterwards."
    }
  }
}