{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/passportcraft-com/json-schema/passportcraft-com-import-job-with-rows-schema.json",
  "title": "ImportJobWithRows",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/passportcraft-com-openapi.json#/components/schemas/ImportJobWithRows",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "import_job"
    },
    "id": {
      "type": "string",
      "maxLength": 255
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "organization_id": {
      "type": "string",
      "maxLength": 255
    },
    "livemode": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "completed",
        "failed"
      ]
    },
    "total_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "succeeded_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "failed_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "pending_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "attempts": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "created_at": {
      "type": "string"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "const": "list"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportRow"
          }
        },
        "has_more": {
          "type": "boolean"
        },
        "next_after_row_index": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "object",
        "data",
        "has_more",
        "next_after_row_index"
      ],
      "additionalProperties": {}
    }
  },
  "required": [
    "object",
    "id",
    "name",
    "organization_id",
    "livemode",
    "status",
    "total_rows",
    "succeeded_rows",
    "failed_rows",
    "pending_rows",
    "attempts",
    "created_at",
    "started_at",
    "completed_at",
    "rows"
  ],
  "additionalProperties": {},
  "$defs": {
    "ImportRow": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "const": "import_row"
        },
        "row_index": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "succeeded",
            "failed"
          ]
        },
        "passport_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "passport_name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "detail": {}
              },
              "required": [
                "code",
                "detail"
              ],
              "additionalProperties": {}
            },
            {
              "type": "null"
            }
          ]
        },
        "processed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "object",
        "row_index",
        "external_id",
        "status",
        "passport_id",
        "passport_name",
        "error",
        "processed_at"
      ],
      "additionalProperties": {}
    }
  }
}