{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/osis-co/json-schema/osis-co-line-port-response-schema.json",
  "title": "LinePortResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/osis-co-lines-api-openapi.yml#/components/schemas/LinePortResponse",
  "type": "object",
  "required": [
    "port"
  ],
  "properties": {
    "port": {
      "$ref": "#/$defs/LinePort"
    }
  },
  "$defs": {
    "LinePort": {
      "type": "object",
      "description": "The port's status, times, and errors. The account details you sent are never returned.",
      "required": [
        "id",
        "org_id",
        "locked_e164",
        "status",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "org_id": {
          "type": "string"
        },
        "locked_e164": {
          "type": "string",
          "description": "The dedicated line locked for this port."
        },
        "target_e164": {
          "type": [
            "string",
            "null"
          ],
          "description": "The number you're bringing to Comms. Set once you submit the port."
        },
        "status": {
          "$ref": "#/$defs/LinePortStatus"
        },
        "error_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "error_message": {
          "type": [
            "string",
            "null"
          ]
        },
        "submitted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "foc_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "LinePortStatus": {
      "type": "string",
      "description": "Where the port is right now.",
      "enum": [
        "number_locked",
        "port_submitted",
        "port_in_progress",
        "port_completed",
        "port_failed"
      ]
    }
  }
}