{
  "openapi": "3.0.3",
  "info": {
    "version": "1.0.0",
    "title": "extpartneromnisvcsms",
    "description": "This is OpenAPI Spec APIs for external partners to perform NumberManagement Operations.",
    "contact": {
      "name": "Omni API Support",
      "email": "DL-OmniAdapter@att.com"
    }
  },
  "servers": [
    {
      "url": "https://partner.att.com/omni-svcs"
    }
  ],
  "tags": [
    {
      "name": "omni-svcs-subscriber-number",
      "description": "omni service subscriber number"
    }
  ],
  "paths": {
    "/v1/subscriber-number": {
      "post": {
        "tags": [
          "omni-svcs"
        ],
        "description": "Perform NumberManagement Operations",
        "summary": "Retrieve \n- Available Number\n- Release previously reserved Number\n- Port Eligibility\n- Port Status\n- Port Cancel\n",
        "operationId": "RetreiveSubscriberNumber",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AvailableNumberRequest"
                  },
                  {
                    "$ref": "#/components/schemas/ReleaseNumberRequest"
                  },
                  {
                    "$ref": "#/components/schemas/EligibilityPortRequest"
                  },
                  {
                    "$ref": "#/components/schemas/InquirePortRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CancelPortRequest"
                  }
                ]
              },
              "examples": {
                "AvailableNumberRequest_With_ZipCode": {
                  "value": {
                    "available": {
                      "zipCode": 70001,
                      "numberofctns": 2
                    }
                  }
                },
                "AvailableNumberRequest_With_AreaCode": {
                  "value": {
                    "available": {
                      "areaCode": 972,
                      "numberofctns": 2
                    }
                  }
                },
                "AvailableNumberRequest_Next_Available_Number": {
                  "value": {
                    "available": {
                      "numberofctns": 2
                    }
                  }
                },
                "ReleaseNumberRequest": {
                  "value": {
                    "release": {
                      "ctn": 9721215258
                    }
                  }
                },
                "EligibilityPortRequest": {
                  "value": {
                    "eligibilityPort": {
                      "ctn": 9721215258
                    }
                  }
                },
                "InquirePortRequest": {
                  "value": {
                    "inquirePort": {
                      "ctn": 9721215258
                    }
                  }
                },
                "InquirePortRequest_with_ctn": {
                  "value": {
                    "inquirePort": {
                      "ctn": 9721215258
                    }
                  }
                },
                "InquirePortRequest_with_extRequestNo": {
                  "value": {
                    "inquirePort": {
                      "externalRequestNo": 26568518
                    }
                  }
                },
                "CancelPortRequest": {
                  "value": {
                    "cancelPort": {
                      "ctn": 9721215258
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authentication methods returned",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AvailableNumberResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ReleaseNumberResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EligibilityPortResponse"
                    },
                    {
                      "$ref": "#/components/schemas/InquirePortResponse_Single"
                    },
                    {
                      "$ref": "#/components/schemas/InquirePortResponse_Array"
                    },
                    {
                      "$ref": "#/components/schemas/CancelPortResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "validation": {
                      "$ref": "#/components/schemas/Validation"
                    },
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/order/{orderid}/subscriber-number": {
      "post": {
        "tags": [
          "omni-svcs"
        ],
        "description": "Perform NumberManagement Operations",
        "summary": "Reserve Number\n- Add Port\n- Update Port Cancel\n- Cancel Port\n",
        "operationId": "patchNumberSelection",
        "parameters": [
          {
            "name": "orderid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Order ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PortRequest"
                  }
                ]
              },
              "examples": {
                "AddPort_perlineLineitem": {
                  "value": {
                    "addPort": [
                      {
                        "rootBundleProductOrderItemId": "RBPOI123456",
                        "ctn": "9721215258",
                        "desiredDueDate": "2025-08-10",
                        "formerCarrierAccount": "FC123456",
                        "formerSP": "Verizon",
                        "marketCode": "TX",
                        "customerDetails": {
                          "firstName": "John",
                          "lastName": "Doe",
                          "streetNumber": "123",
                          "streetName": "Main St",
                          "city": "Plano",
                          "state": "TX",
                          "zipcode": "75024",
                          "contactNumber": "2145551234"
                        }
                      }
                    ]
                  }
                },
                "UpdatePort_perlineLineitem": {
                  "value": {
                    "updatePort": [
                      {
                        "requestNo": "1234",
                        "rootBundleProductOrderItemId": "RBPOI123456",
                        "ctn": "9721215258",
                        "desiredDueDate": "2025-08-10",
                        "formerCarrierAccount": "FC123456",
                        "formerSP": "Verizon",
                        "marketCode": "TX",
                        "customerDetails": {
                          "firstName": "John",
                          "lastName": "Doe",
                          "streetNumber": "123",
                          "streetName": "Main St",
                          "city": "Plano",
                          "state": "TX",
                          "zipcode": "75024",
                          "contactNumber": "2145551234"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Number selection response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NumberSelectionResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "validation": {
                      "$ref": "#/components/schemas/Validation"
                    },
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "example": "<400-INVALID-REQUEST>"
          },
          "errorDescription": {
            "type": "string",
            "example": "Validation Failure"
          },
          "errorList": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "example": "customer"
                },
                "errorCode": {
                  "type": "string",
                  "example": "AUTH-142"
                },
                "errorDescription": {
                  "type": "string",
                  "example": ""
                },
                "errorDetails": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "system": {
                        "type": "string",
                        "example": "IDGRAPH"
                      },
                      "errorCode": {
                        "type": "string",
                        "example": "IDG-1235"
                      },
                      "errorDescription": {
                        "type": "string",
                        "example": ""
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Number": {
        "type": "object",
        "properties": {
          "zipCode": {
            "type": "integer",
            "example": 70001
          },
          "areaCode": {
            "type": "integer",
            "example": 972
          },
          "numberofctns": {
            "type": "integer",
            "default": 1,
            "maximum": 5,
            "example": 2
          }
        }
      },
      "PortRequest": {
        "type": "object",
        "properties": {
          "rootBundleProductOrderItemId": {
            "type": "string"
          },
          "ctn": {
            "type": "string"
          },
          "desiredDueDate": {
            "type": "string"
          },
          "formerCarrierAccount": {
            "type": "string"
          },
          "formerSP": {
            "type": "string"
          },
          "marketCode": {
            "type": "string"
          },
          "customerDetails": {
            "$ref": "#/components/schemas/CustomerDetails"
          },
          "requestNo": {
            "type": "string"
          }
        }
      },
      "PortResponse": {
        "type": "object",
        "properties": {
          "ctn": {
            "type": "string",
            "description": "Customer telephone number",
            "example": "123"
          },
          "rootBundleProductOrderItemId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Status code",
            "example": "STATUS_ERROR_CORRECTION"
          },
          "statusDesc": {
            "type": "string",
            "description": "Description of the status",
            "example": "Needs Customer Input"
          },
          "requestNo": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "firstName",
              "lastName",
              "zipCode",
              "city",
              "state",
              "streetName",
              "streetNumber"
            ]
          }
        }
      },
      "NumberSelectionResponse": {
        "type": "object",
        "properties": {
          "portResponse": {
            "$ref": "#/components/schemas/PortResponse"
          },
          "numberselection": {
            "$ref": "#/components/schemas/ReservedNumberResponse"
          }
        }
      },
      "ReservedNumberResponse": {
        "type": "object",
        "properties": {
          "numberReservationResult": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rootBundleProductOrderItemId": {
                  "type": "string"
                },
                "ctn": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CustomerDetails": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "streetNumber": {
            "type": "string"
          },
          "streetName": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          }
        }
      },
      "AvailableNumberRequest": {
        "type": "object",
        "properties": {
          "available": {
            "$ref": "#/components/schemas/Number"
          }
        },
        "required": [
          "available"
        ]
      },
      "AvailableNumberResponse": {
        "type": "object",
        "properties": {
          "available": {
            "properties": {
              "subscriberNumbers": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "example": 9721215258
                }
              }
            }
          }
        }
      },
      "ReleaseNumberRequest": {
        "type": "object",
        "properties": {
          "release": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              }
            },
            "required": [
              "ctn"
            ]
          }
        },
        "required": [
          "release"
        ]
      },
      "ReleaseNumberResponse": {
        "type": "object",
        "properties": {
          "release": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              }
            }
          }
        }
      },
      "EligibilityPortRequest": {
        "type": "object",
        "properties": {
          "eligibilityPort": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              }
            },
            "required": [
              "ctn"
            ]
          }
        },
        "required": [
          "eligibilityPort"
        ]
      },
      "EligibilityPortResponse": {
        "type": "object",
        "properties": {
          "eligibilityPort": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              },
              "portEligibilityInd": {
                "type": "boolean",
                "example": true,
                "description": "Port eligibility indicator"
              },
              "PorteligibilityDesc": {
                "type": "string",
                "example": "MV- Internal Port-In is not allowed, Please perform move flow.",
                "description": "Port ineligibility description if portEligibilityInd is false"
              }
            }
          }
        }
      },
      "InquirePortRequest": {
        "type": "object",
        "properties": {
          "inquirePort": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              },
              "externalRequestNo": {
                "type": "integer",
                "example": 26568518
              }
            }
          }
        },
        "required": [
          "inquirePort"
        ]
      },
      "InquirePortResponse_Single": {
        "type": "object",
        "properties": {
          "ctn": {
            "type": "integer",
            "example": 9721215258
          },
          "status": {
            "type": "string",
            "enum": [
              "STATUS_SUBMITTED",
              "STATUS_IN_PROGRESS",
              "STATUS_ERROR_CORRECTION",
              "STATUS_ACCEPTED",
              "STATUS_CONFIRMED",
              "STATUS_COMPLETED",
              "STATUS_CANCELLED",
              "STATUS_PENDING_CANCELLED",
              "STATUS_DDT_SUCCESS"
            ],
            "example": "STATUS_ERROR_CORRECTION"
          },
          "statusDesc": {
            "type": "string",
            "example": "Needs Customer Input"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "zipCode"
            }
          }
        }
      },
      "InquirePortResponse_Array": {
        "type": "object",
        "properties": {
          "inquirePort": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ctn": {
                  "type": "integer",
                  "example": 9721215258
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "STATUS_SUBMITTED",
                    "STATUS_IN_PROGRESS",
                    "STATUS_ERROR_CORRECTION",
                    "STATUS_ACCEPTED",
                    "STATUS_CONFIRMED",
                    "STATUS_COMPLETED",
                    "STATUS_CANCELLED",
                    "STATUS_PENDING_CANCELLED",
                    "STATUS_DDT_SUCCESS"
                  ],
                  "example": "STATUS_ERROR_CORRECTION"
                },
                "statusDesc": {
                  "type": "string",
                  "example": "Needs Customer Input"
                },
                "fields": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "example": "zipCode"
                  }
                }
              }
            }
          }
        }
      },
      "CancelPortRequest": {
        "type": "object",
        "properties": {
          "cancelPort": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              }
            },
            "required": [
              "ctn"
            ]
          }
        },
        "required": [
          "cancelPort"
        ]
      },
      "CancelPortResponse": {
        "type": "object",
        "properties": {
          "cancelPort": {
            "properties": {
              "ctn": {
                "type": "integer",
                "example": 9721215258
              }
            }
          }
        }
      },
      "Validation": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the order"
          },
          "readyToSubmit": {
            "type": "boolean",
            "description": "Indicates if the order is ready to submit"
          },
          "validationMessage": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "Validation message text"
                },
                "type": {
                  "type": "string",
                  "description": "Component type"
                },
                "parameter": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Holds the value for any line level error ids"
                      },
                      "value": {
                        "type": "string",
                        "description": "Value of the parameter name"
                      }
                    }
                  }
                }
              }
            }
          },
          "configuration": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Configuration type"
                },
                "status": {
                  "type": "string",
                  "description": "Configuration status"
                },
                "required": {
                  "type": "boolean",
                  "description": "Indicates if the configuration is required"
                },
                "postOrderConfigurable": {
                  "type": "boolean",
                  "description": "Indicates if the configuration is post-order configurable"
                }
              }
            }
          }
        }
      }
    }
  }
}