{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/osis-co/json-schema/osis-co-start-port-request-schema.json",
  "title": "StartPortRequest",
  "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/StartPortRequest",
  "type": "object",
  "required": [
    "target_e164",
    "lnp"
  ],
  "properties": {
    "target_e164": {
      "type": "string",
      "description": "The number you're bringing to Comms, in E.164 format. It replaces the locked line's number.",
      "minLength": 8,
      "maxLength": 20
    },
    "lnp": {
      "$ref": "#/$defs/LnpFields"
    },
    "authorized": {
      "type": "boolean",
      "description": "Confirm the account holder authorized the transfer. Must be true.",
      "enum": [
        true
      ]
    },
    "port_id": {
      "type": "string",
      "description": "Recommended: current preparation ID from POST /lock or GET /port. A stale ID is rejected with 409."
    }
  },
  "$defs": {
    "LnpFields": {
      "type": "object",
      "description": "Details from your current carrier. They must match the carrier's records exactly. You can't read them back later.",
      "required": [
        "account_number",
        "porting_pin",
        "account_holder_first_name",
        "account_holder_last_name",
        "address_line1",
        "city",
        "state",
        "zip",
        "country"
      ],
      "properties": {
        "account_number": {
          "type": "string",
          "description": "Your account number with your current carrier.",
          "minLength": 1,
          "maxLength": 64
        },
        "porting_pin": {
          "type": "string",
          "description": "Your port-out PIN from your current carrier. If they don't use one, send 0000.",
          "minLength": 1,
          "maxLength": 32
        },
        "account_holder_first_name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "account_holder_last_name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "address_line1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "address_line2": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "state": {
          "type": "string",
          "minLength": 2,
          "maxLength": 40
        },
        "zip": {
          "type": "string",
          "minLength": 3,
          "maxLength": 16
        },
        "country": {
          "type": "string",
          "description": "Country name.",
          "minLength": 2,
          "maxLength": 80
        }
      }
    }
  }
}