openapi: 3.0.1
info:
  title: Porting
  description: >
    The /bulkPortins endpoint manages requests to port multiple telephone
    numbers into the Bandwidth network. 
      It automatically decomposes the collection of numbers into individual port-in orders based on port type, 
      losing carrier, and losing RespOrg, while maintaining uniform processing across all requests. 
      Common elements from the bulk payload (such as CustomerOrderId or RequestedFocDate) are cascaded to child orders when applicable, streamlining bulk porting operations.
      Note: All other porting functionality will eventually be consolidated here, but for now can be found [here](https://dev.bandwidth.com/apis/numbers-apis/numbers/#tag/Porting).
  version: 2.0.0
  termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/
  contact:
    name: Bandwidth
    url: https://support.bandwidth.com
    email: support@bandwidth.com
security:
  - Basic: []
paths:
  /accounts/{accountId}/bulkPortins/{orderId}/history:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieves the history of the specified bulk port-in order. Obtaining
        history for a draft bulk port-in is not supported.</p><p>Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a></p>
      operationId: getBulkHistory
      summary: Retrieve bulk port-in order history
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinHistoryResponse200'
        '404':
          $ref: '#/components/responses/bulkPortinHistoryResponse404'
  /accounts/{accountId}/bulkPortins/{orderId}/loas:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieves the list of the loa (and other) files associated with the
        order.
      operationId: listBulkLoas
      summary: List bulk port-in order loa files
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
        - $ref: '#/components/parameters/MetadataQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinLoasResponse200'
    post:
      tags:
        - Bulk Port-In
      description: >-
        <p>POSTing to the /loas resource will enable the upload of the file. 
        The key attribute to the POST is ensuring that the headers are correctly
        set to support the file upload.<br>

        Query parameter or header documentType can be used to specify type of
        document on upload. Possible values are: LOA, INVOICE, CSR, OTHER.
            <br>
        Header settings typical of a valid upload are...<br>
            <br>
        <code>

        Host: api.bandwidth.com <br>

        Authorization: Basic xxxxxxxxxxxxxxxxxxxx== <br>

        Content-Type: application/pdf <br>

        documentType: [LOA | INVOICE | CSR | OTHER] <br>

        Accept: <em>/</em> <br>

        Accept-Encoding: gzip, deflate <br>

        Accept-Language: en-US,en;q=0.8 <br>

        Cache-Control: no-cache <br>
            <br>
        ----WebKitFormBoundaryE19zNvXGzXaLvS5C <br>

        Content-Disposition: form-data; name="george"; filename="Bandwidth
        App.pdf" <br>

        Content-Type: application/pdf <br>
            <br>
            <br>
        ----WebKitFormBoundaryE19zNvXGzXaLvS5C <br>

        </code></p>

        <p>When uploading documents using the /loas resource, you must specify
        the MIME type of the document being upload using the Content-Type HTTP
        header.</p>

        <p><b>Information for non-toll free port-in customers:</b></p>

        <p>The LOA document must be uploaded using one of the following MIME
        types:</p>

        <ul>

        <li>application/pdf</li>

        <li>text/plain</li>

        <li>image/jpeg</li>

        <li>image/png</li>

        <li>image/tiff</li>

        <li>text/csv</li>

        <li>application/vnd.ms-excel</li>

        <li>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</li>

        <li>application/msword</li>

        <li>application/vnd.openxmlformats-officedocument.wordprocessingml.document</li>

        </ul>

        <p><b>Information for toll free port-in customers:</b></p>

        <p>If you are porting toll free numbers and either of the following are
        true, the port-in order requires a LOA document.</p>

        <ul>

        <li>The controlling and target RespOrg IDs have different entity values
        (i.e. the first two characters are different).</li>

        <li>The toll free port-in will cause toll free telephone numbers to move
        from one Bandwidth account to another Bandwidth account.</li>

        </ul>

        <p>If a LOA is required, the LOA document must adhere to these
        rules:</p>

        <ul>

        <li>The LOA document must be uploaded using MIME type "application/pdf",
        or "image/tiff", as these are the only formats supported by our toll
        free porting vendor.</li>

        <li>The LOA document must be annotated as a LOA document using the
        documentType query parameter or header value.</li>

        </ul>

        <p>If a LOA is required but a compliant LOA document has not been
        uploaded, the toll free port-in order will remain in the Pending
        Documents state until a valid LOA is provided.</p>
      operationId: uploadBulkLoa
      summary: Upload bulk port-in order loa file
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
        - $ref: '#/components/parameters/DocumentTypeQueryParam'
      responses:
        '201':
          $ref: '#/components/responses/bulkPortinLoasResponse201'
        '400':
          $ref: '#/components/responses/bulkPortinLoasResponse400'
        '409':
          $ref: '#/components/responses/bulkPortinLoasResponse409'
        '415':
          $ref: '#/components/responses/bulkPortinLoasResponse415'
  /accounts/{accountId}/bulkPortins:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieves bulk port-in orders for the specified accountId.

        A maximum of 1,000 orders can be retrieved per request. If no date range
        or specific query parameter is provided, the order results will be
        limited to the last two years. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: listBulkPortins
      summary: List bulk port-in orders
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - name: page
          description: >-
            The full bulk port-in orderId of the first order of the page. 
            Special value `1` is used

            to indicate the first port-in for the accountId matching any other
            query parameters.

            If the number of results exceeds the `size` parameter value, the
            result includes a header

            called `next` that allows you to fetch the next page of the results.
          in: query
          required: true
          schema:
            type: string
            default: '1'
          example: '`ca43d178-8f67-4a08-9a4b-af0ce06b5914`, `1`'
        - name: size
          description: >-
            The maximum number of results to include in the response payload. 
            The

            value should be between 1 and 1000.  Larger values may be specified,
            but results are

            limited to a maximum of 1000 entries, regardless.
          in: query
          required: true
          schema:
            type: integer
            default: 300
          example: 30
        - name: status
          description: >-
            Include in the response payload only entries in which the bulk
            port-in order had the specified ProcessingStatus value.  Note:
            specifying `draft` will include any of the draft values, including
            `DRAFT`, `VALIDATE_DRAFT_TNS`, `VALID_DRAFT_TNS`, and
            `INVALID_DRAFT_TNS`.
          in: query
          required: false
          schema:
            type: string
            enum:
              - draft
              - in_progress
              - needs_attention
              - partial
              - completed
              - cancelled
          example: draft
        - name: orderDate
          description: >-
            A specific date on which you wish to see modifications to a bulk
            port-in order.

            For each bulk port-in order, belonging to the account, that was
            modified on the specified date/time, only the latest update for that
            order is included in the results. Date format can be one of:
            `yyyy-mm-ddThh:mm:ss.sZ`, `yyyy-mm-ddZ`, `yyyy-mm-ddThh:mm:ssTZD`.
          in: query
          required: false
          schema:
            format: date
            type: string
          example: '2021-06-21'
        - name: modifiedDateFrom
          description: >-
            The earliest date from which you want to see modifications to a bulk
            port-in order.

            This query parameter must be used together with `modifiedDateTo`.

            This parameter and modifiedDateTo define a time interval.  For each
            bulk port-in order,

            belonging to the account, that was modified in that time interval,
            only the latest

            update for that order is included in the results. Date format can be
            one of: `yyyy-mm-ddThh:mm:ss.sZ`, `yyyy-mm-ddZ`,
            `yyyy-mm-ddThh:mm:ssTZD`.
          in: query
          required: false
          schema:
            format: date
            type: string
          example: '2021-06-21'
        - name: modifiedDateTo
          description: >-
            The latest date from which you want to see modifications to a bulk
            port-in order.

            This query parameter must be used together with `modifiedDateFrom`.

            This parameter and modifiedDateFrom define a time interval.  For
            each bulk

            port-in order, belonging to the account, that was modified in that
            time interval,

            only the latest update for that order is included in the results.

            The modifiedDateTo value may be in the future. Date format can be
            one of: `yyyy-mm-ddThh:mm:ss.sZ`, `yyyy-mm-ddZ`,
            `yyyy-mm-ddThh:mm:ssTZD`.
          in: query
          required: false
          schema:
            format: date
            type: string
          example: '2021-06-21'
        - name: orderDetails
          description: >-
            If set to true, bulk port-in order details will be displayed instead
            of summary information.
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinListResponse200'
        '204':
          $ref: '#/components/responses/bulkPortinListResponse204'
    post:
      tags:
        - Bulk Port-In
      description: >-
        <p>Creates a bulk port-in order to be used as a template for a
        collection of child port-in orders.  The template values will be
        cascaded to child port-ins that result from decomposing a collection of
        Telephone Numbers that span carriers, RespOrgs, or have attributes that
        drive the decomposition into a number of individual port-in
        orders.<p></p> Upon a successfully-submitted payload, the order will
        have a status of "DRAFT", denoting that further modification to the
        template is expected.  For example, the next step is to use the /tnList
        endpoint to add a collection of telephone numbers to the bulk port-in
        order. The only valid value for the ProcessingStatus element in a POST
        is 'DRAFT', which is the default value. All parameters except for the
        URL parameter "accountId" are optional in the bulk port-in, although the
        rules for individual child port-ins described in the <a
        href='/apis/numbers-apis/numbers/#tag/Porting/operation/CreatePortin'>POST
        /portins</a> API still apply to the child port-ins that make up the bulk
        port-in. Enforcement of required fields in the child port-ins occurs
        when the bulk port-in is submitted (i.e. changed from a DRAFT status to
        IN_PROGRESS). Enforcement of required fields in the child port-ins
        occurs when the bulk port-in is submitted (i.e. changed from a DRAFT
        status to IN_PROGRESS). </p><p>Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a></p>
      operationId: createBulkPortin
      summary: Create bulk port-in order
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinRequest'
      responses:
        '201':
          $ref: '#/components/responses/bulkPortinResponse201'
        '400':
          $ref: '#/components/responses/bulkPortinResponse400'
        '409':
          $ref: '#/components/responses/bulkPortinResponse409'
  /accounts/{accountId}/bulkPortins/{orderId}:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieves information associated with the bulk port-in order specified
        by the orderId URI parameter. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: retrieveBulkOrder
      summary: Retrieve bulk port-in order
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinResponse200'
        '404':
          $ref: '#/components/responses/bulkPortinResponse404'
    put:
      tags:
        - Bulk Port-In
      description: >-
        The PUT operation is available only for bulk port-in orders that are not
        yet associated with subtending orders. Since this only occurs for bulk
        port-in orders that are in one of the draft states, there are few
        restrictions on what may be included. As with the POST, any data
        associated with the bulk port-in will cascade to subtending orders when
        they are created. (Subtending orders are created after telephone numbers
        are added to the bulk port-in using the /tnList endpoint.) The PUT
        completely replaces the existing Bulk Portin order with the payload of
        the PUT. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>.
      operationId: putBulkOrder
      summary: Update bulk port-in order
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinUpdateResponse200'
        '400':
          $ref: '#/components/responses/bulkPortinUpdateResponse400'
        '404':
          $ref: '#/components/responses/bulkPortinUpdateResponse404'
    delete:
      tags:
        - Bulk Port-In
      description: >-
        Delete a bulk port-in order with child port-ins.  Deleting a bulk
        port-in is allowed for 'DRAFT' state only.  Deleting a bulk port-in will
        delete all DRAFT child port-ins associated with the bulk port-in.  When
        the bulk port-in is deleted, any child port-in orders that are not in a
        draft status are dissociated from the bulk port-in, but not deleted.
        Please visit <a href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides
        and Tutorials</a>
      operationId: deleteBulkOrder
      summary: Delete bulk port-in order
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinDeleteResponse200'
        '400':
          $ref: '#/components/responses/bulkPortinDeleteResponse400'
        '404':
          $ref: '#/components/responses/bulkPortinDeleteResponse404'
    patch:
      tags:
        - Bulk Port-In
      description: >-
        <p>It is possible to change ("SUPP" in LNP terms) an existing Bulk
        Port-in order.  This is done via a PUT or PATCH on the existing
        order-id.  Since the Bulk Port-in
          order acts as a template for port-in orders in DRAFT status, any record can be changed at any time.  The PATCH replaces elements of the referenced Bulk Portin order, but it replaces only the records included in the request payload.  Other elements will remain untouched.</p><p>Changing the fields in a Bulk Port-in order causes the system to reapply all changed values to the child port-ins contained in the list of subtending port-in orders. Note that if the port-in orders contained within the Bulk Port are in DRAFT state, any field can be modified. If any child port-in order in the Bulk Port-in is in any other state, normal SUPP rules apply, and the list of appropriate fields is smaller.</p><p>Changing the ProcessingStatus to 'IN_PROGRESS' causes all child port-ins to begin processing. This is only valid if child port-ins exist for the bulk port-in.</p> <p>Please visit <a href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and Tutorials</a></p>
      operationId: patchBulkOrder
      summary: Patch bulk port-in order
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinPatchRequest'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinPatchResponse200'
        '400':
          $ref: '#/components/responses/bulkPortinPatchResponse400'
        '404':
          $ref: '#/components/responses/bulkPortinPatchResponse404'
  /accounts/{accountId}/bulkPortins/{orderId}/portinList:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieves a list of Port-in Orders that are all associated with the
        identified Bulk Port-in.   This response is not paginated due to its
        inherently limited size. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: listBulkChildOrders
      summary: List bulk port-in child orders
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinChildListResponse200'
    put:
      tags:
        - Bulk Port-In
      description: >-
        <p>A PUT on a PortinList resource will cause replacement of the list of
        port-in orders associated with the specified bulk port-in.</p><p>This
        PUT will completely replace the existing list of port-in orders
        associated with the bulk port-in.  If all port-in orders in the list are
        not valid, the PUT request will fail, due to the potential for losing
        the port-in to bulk port-in relationships.</p><p>Only port-in orders in
        a draft status may be associated with a bulk port-in order.  And port-in
        orders may only be added to a bulk port-in order while that bulk port-in
        order is still in a draft state.</p><p>Child port-in orders may be
        dissociated from the bulk port-in at any time. </p> <p>Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a></p>
      operationId: updateBulkChildList
      summary: Update list of bulk port-in child orders
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinChildListRequest'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinUpdateChildListResponse200'
        '400':
          $ref: '#/components/responses/bulkPortinUpdateChildListResponse400'
  /accounts/{accountId}/bulkPortins/{orderId}/notes:
    get:
      tags:
        - Bulk Port-In
      description: >-
        Retrieve all notes associated with the order. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: listBulkNotes
      summary: List bulk port-in order notes
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinNotesResponse200'
        '204':
          $ref: '#/components/responses/bulkPortinNotesResponse204'
    post:
      tags:
        - Bulk Port-In
      description: >-
        Updates the Notes resource by adding a note. Adding a note to a port-in
        order causes a notification to be sent to Bandwidth Operations, so that
        they may assist as necessary. A note may be up to 500 characters in
        length. Please visit <a
        href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: createBulkNote
      summary: Create bulk port-in order note
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinNotesRequest'
      responses:
        '201':
          $ref: '#/components/responses/bulkPortinNotesResponse201'
        '400':
          $ref: '#/components/responses/bulkPortinNotesResponse400'
  /accounts/{accountId}/bulkPortins/{orderId}/notes/{noteId}:
    put:
      tags:
        - Bulk Port-In
      description: >-
        Update a specified note.  Notes may only be updated, not deleted. Please
        visit <a href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and
        Tutorials</a>
      operationId: updateBulkNote
      summary: Update bulk port-in order note
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
        - $ref: '#/components/parameters/NoteIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/bulkPortinNotesUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinNotesUpdateResponse200'
        '400':
          $ref: '#/components/responses/bulkPortinNotesUpdateResponse400'
  /accounts/{accountId}/bulkPortins/{orderId}/tnList:
    get:
      tags:
        - Bulk Port-In
      description: >-
        <p>The information returned in the GET /tnList response payload depends
        on the ProcessingStatus of the bulk port-in order. See the Responses tab
        for examples of each response payload.</p><table border="1"
        cellspacing="0" cellpadding="0" width="624">
                <tbody>
                    <tr>
                        <td valign="top">
                            <p>
                                <strong>ProcessingStatus</strong>
                            </p>
                        </td>
                        <td valign="top">
                            <p>
                                <strong>Information Returned</strong>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <p>
                                DRAFT
                            </p>
                        </td>
                        <td valign="top">
                            <p align="center">
                                In this state, no tnList has been provided, so the response
                                includes empty portable and non-portable telephone number lists.
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <p>
                                VALIDATE_DRAFT_TNS
                            </p>
                        </td>
                        <td valign="top">
                            <p align="center">
                                In this state, validation of the tnList is still in progress,
                                so the response includes all of the tnList telephone numbers
                                in a 'not validated' list.  This is a temporary state until
                                the validation completes.  Validation takes longer when toll
                                free numbers are included in the tnList.
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <p>
                                VALID_DRAFT_TNS
                            </p>
                        </td>
                        <td valign="top">
                            <p align="center">
                                In this state, all of the telephone numbers in the tnList have
                                been determined to be portable.  The response payload includes
                                a list of the child port-in orders and shows which telephone
                                numbers are assigned to each child port-in order.
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <p>
                                INVALID_DRAFT_TNS
                            </p>
                        </td>
                        <td valign="top">
                            <p align="center">
                                In this state, at least one of the telephone numbers in the tnList
                                has been determined to be non-portable.  The response payload includes
                                a list of portable numbers (if any) and a list of errors showing which
                                telephone numbers are non-portable as well as the reasons why they
                                cannot be ported.  Or, if communication errors prevented us from
                                determining telephone number portability, those errors will be included.
                            </p>
                        </td>
                    </tr>
                </tbody>
            </table>
         <p>Please visit <a href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and Tutorials</a></p>
      operationId: listBulkTns
      summary: List bulk port-in order tns
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/bulkPortinTnListResponse200'
    put:
      tags:
        - Bulk Port-In
      description: >-
        <p>This operation is used to add telephone numbers to a draft bulk
        port-in order.
          The telephone numbers may be a mix of toll free and non-toll free.  Once the
          telephone numbers are added, they will be checked for portability, and if
          portable, decomposed into individual child port-in orders.  Both the bulk
          port-in order and the child port-in orders remain in draft status until you
          explicitly submit them.</p>

        <p>After submitting a tnList with the PUT operation, you will need to
        poll for
          completion of the validation and decomposition using the GET /tnList operation
          or the GET /bulkPortins/orderId operation (both include the order ProcessingStatus).
          The basic ProcessingStatus flow is as follows:</p>

        <ul><li>On submission of the tnList, the bulk port-in order transitions
        from DRAFT
          status to VALIDATE_DRAFT_TNS.  The order will remain in this state until validation
          is complete.  For a tnList that does not contain any toll free telephone numbers, the
          validation step is very fast.  When the tnList does contain toll free telephone
          numbers, the time it takes to validate the toll free numbers is roughly proportional
          to the number of toll free telephone numbers.  If you PUT a new tnList while validation
          is in progress for a previous tnList, the validation of the previous tnList will be
          abandoned and replaced by validation of the new tnList.</li>
          <li>If all of the telephone numbers in the tnList are portable, the bulk port-in
            transitions to the VALID_DRAFT_TNS state.  At this point, child port-in orders have
            been created in DRAFT status to meet requirements about which telephone numbers can
            be ported together in the same port-in order.  The bulk port-in will remain in this
            state until you use the PATCH operation on the bulk port-in order to change the
            ProcessingStatus to IN_PROGRESS.  If you PUT an updated tnList, all draft child
            port-in orders are removed, and the validation process begins again with the new
            tnList.</li>
          <li>If at least one of the telephone numbers in the tnList is not portable, the bulk
            port-in transitions to the INVALID_DRAFT_TNS state.  When this happens, no child
            port-in orders are created.  You can use the GET operation on /tnList to see reasons
            why telephone numbers are non-portable.  You’ll need to update the tnList to remove
            non-portable telephone numbers and PUT the tnList again to restart the validation
            step.  The goal is to get to the VALID_DRAFT_TNS state, from which you can submit
            the bulk port-in order.</li></ul>
         <p>Please visit <a href='/docs/numbers/porting/port-ins/bulkPortIns'>Guides and Tutorials</a></p>
      operationId: updateBulkTnList
      summary: Update bulk port-in order tn list
      parameters:
        - $ref: '#/components/parameters/AccountIdPathParam'
        - $ref: '#/components/parameters/OrderIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/tnListUpdateRequest'
      responses:
        '202':
          $ref: '#/components/responses/tnListUpdateResponse202'
        '400':
          $ref: '#/components/responses/tnListUpdateResponse400'
components:
  securitySchemes:
    Basic:
      type: http
      scheme: basic
      description: |-
        Basic authentication is a simple authentication scheme built into the
        HTTP protocol. To use it, send your HTTP requests with an Authorization
        header that contains the word Basic followed by a space and a
        base64-encoded string `username:password`Example: `Authorization: Basic
        ZGVtbZpwQDU1dzByZA==`
  schemas:
    address:
      type: object
      properties:
        HousePrefix:
          description: >-
            The HousePrefix is the non-numeric address number prefix of the
            ServiceAddress. This element is optional when not needed to fully
            specify the ServiceAddress.
          type: string
        HouseNumber:
          description: >-
            The HouseNumber is the street address number of the ServiceAddress.
            HouseNumber is mandatory for port-in orders in which the
            ServiceAddress is mandatory.
          type: string
        HouseSuffix:
          description: >-
            The HouseSuffix is the non-numeric address number suffix of the
            ServiceAddress. This element is optional when not needed to fully
            specify the ServiceAddress.
          type: string
        PreDirectional:
          description: >-
            The PreDirectional is the non-numeric street name prefix of the
            ServiceAddress. This element is optional when not needed to fully
            specify the ServiceAddress.
          type: string
        StreetName:
          description: >-
            The StreetName is mandatory in cases where the ServiceAddress is
            mandatory.
          type: string
        StreetSuffix:
          description: >-
            The StreetSuffix is the street suffix of the ServiceAddress. This
            element is optional when not needed to fully specify the
            ServiceAddress.
          type: string
        PostDirectional:
          description: >-
            The PostDirectional is the street name post directional of the
            ServiceAddress. This element is optional when not needed to fully
            specify the ServiceAddress.
          type: string
        AddressLine2:
          description: >-
            AddressLine2 is used to specify Unit, Suite, Floor, etc. in the
            Service Address. AddressLine2 is optional when not needed to fully
            specify the ServiceAddress.
          type: string
        City:
          description: City is mandatory in cases where the ServiceAddress is mandatory.
          type: string
        StateCode:
          description: >-
            StateCode is the 2-letter abbreviation of the state of the
            ServiceAddress. StateCode is mandatory in cases where the
            ServiceAddress is mandatory.
          type: string
        Zip:
          description: >-
            Zip is the Zip Code of the ServiceAddress. Zip is mandatory in cases
            where the ServiceAddress is mandatory.
          type: string
        PlusFour:
          description: >-
            PlusFour is the 4 digits that are sometimes suffixed to the Zip
            Code.
          type: string
        County:
          description: The county where the subscriber or business is located.
          type: string
        Country:
          description: >-
            Country is the country of the ServiceAddress. This value will be
            derived from the StateCode, so it should generally be omitted.
          type: string
        ResetAddressFields:
          type: boolean
        Latitude:
          type: string
        Longitude:
          type: string
        AddressType:
          $ref: '#/components/schemas/addressType'
    addressType:
      type: string
      enum:
        - SERVICE
        - BILLING
        - DLDA
        - E911
    bulkPortin:
      type: object
      properties:
        CustomerOrderId:
          description: >-
            Optional customer-defined reference ID for this order. Only
            alphanumeric values, dashes and spaces are allowed. Not unique —
            Bandwidth applies no uniqueness constraint, so multiple orders may
            share the same value. Each order receives its own unique
            Bandwidth-assigned `orderId`.
          type: string
        RequestedFocDate:
          description: >-
            This is the FOC (Firm Order Commitment) Date requested by the person
            (or machine) creating the Port-in Order.
          type: string
          format: date-time
        SubAccountId:
          description: >-
            The numeric designation for the Sub-Account ID that applied to the
            Port-in Order. The SubAccountId is used to provide a home within the
            account for the Tn(s) that were ported in by the Port-in Order.
          type: integer
        LocationId:
          description: >-
            The numeric designation for the Location ID that applied to the
            Port-in Order. The Location ID is used to provide a home within the
            location for the Tn(s) that were ported in by the Port-in Order.
          type: integer
        ProcessingStatus:
          enum:
            - DRAFT
            - PARTIAL
            - COMPLETED
            - CANCELED
            - VALIDATE_DRAFT_TNS
            - VALID_DRAFT_TNS
            - INVALID_DRAFT_TNS
          type: string
        AccountId:
          description: User's account ID.
          type: integer
        CreatedByUser:
          description: >-
            The username that created the order.  This may show as "System" if
            the order was last modified by Bandwidth automated software.
          type: string
        LastModifiedBy:
          description: >-
            The username that last modified the order.  This may show as
            "System" if the order was last modified by Bandwidth automated
            software.
          type: string
        TargetRespOrgId:
          type: string
          description: >-
            For toll free port-ins, this value specifies the RespOrg ID that
            toll free numbers will be ported to.  When porting to Bandwidth, the
            value is generally JYT01.  When specified in a bulk port-in, the
            value is applied to all subtending toll free port-in orders, unless
            overridden in the subtending order.
        VoiceConfigurationPackageId:
          type: string
          description: >-
            VoiceConfigurationPackageId is the identifier of the voice
            configuration package containing the voice origination settings.
            When specified in a bulk port-in, the value will be applied to all
            subtending port-in orders, unless overriden in the subtending order.
        LastModifiedDate:
          description: >-
            The date and time on which the order was last modified, including
            status updates.
          type: string
        OrderCreateDate:
          description: The date and time when the order was created.
          type: string
        OrderId:
          description: >-
            The unique identifier string created by Bandwidth to refer to the
            order.  This value is returned in the synchronous response to the
            POST.
          type: string
    tnAttribute:
      type: object
      description: >-
        The TnAttributes field specifies line attributes that will apply to the
        ported in telephone numbers. If present, TnAttributes may have a value
        of PROTECTED. This element is not applicable for off-net and toll free
        port-types.
      properties:
        TnAttribute:
          type: string
    subscriber:
      type: object
      properties:
        SubscriberType:
          type: string
          enum:
            - BUSINESS
            - RESIDENTIAL
            - GENERIC
          description: If residential, order will be rejected if a BusinessName is entered.
        BusinessName:
          type: string
          description: Subscriber business name.
        FirstName:
          type: string
          description: Subscriber first name.
        MiddleInitial:
          type: string
          description: Subscriber middle initial.
        LastName:
          type: string
          description: Subscriber last name.
        ServiceAddress:
          $ref: '#/components/schemas/address'
    subscriberJson:
      type: object
      properties:
        subscriberType:
          type: string
          enum:
            - BUSINESS
            - RESIDENTIAL
            - GENERIC
          description: If residential, order will be rejected if a BusinessName is entered.
        businessName:
          type: string
          description: Subscriber business name.
        firstName:
          type: string
          description: Subscriber first name.
        middleInitial:
          type: string
          description: Subscriber middle initial.
        lastName:
          type: string
          description: Subscriber last name.
        serviceAddress:
          $ref: '#/components/schemas/address'
    bulkPortinPatchRequest:
      type: object
      properties:
        BulkPortin:
          $ref: '#/components/schemas/bulkPortinPatch'
    bulkPortinPatch:
      type: object
      properties:
        CustomerOrderId:
          description: >-
            Optional customer-defined reference ID for this order. Not unique —
            Bandwidth applies no uniqueness constraint, so multiple orders may
            share the same value. Each order receives its own unique
            Bandwidth-assigned `orderId`.
          example: CUST12345
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        RequestedFocDate:
          description: >-
            If present this will specify the date and time that the port-in is
            requested to happen. The actual time and date is subject to
            negotiation with the losing carriers.
          allOf:
            - $ref: '#/components/schemas/datePatch'
        AlternateSpid:
          description: >-
            Unique customer AltSPID to be applied to the port-in requests. Can
            be changed only for DRAFT bulk port-in.
          example: X455
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        BillingTelephoneNumber:
          description: >-
            Account or Billing telephone number for order. This will be unusual
            for bulk port-in requests that are expected to decompose into
            port-in requests from multiple carriers, because the value will be
            different for each losing carrier.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        Subscriber:
          $ref: '#/components/schemas/subscriberPatch'
        LoaAuthorizingPerson:
          description: First and last name of person who authorized LOA.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        AccountNumber:
          description: >-
            Account number associated with the account on the losing carrier,
            often required for wireless ports, or enterprise ports. This will be
            unusual for bulk port-in requests that are expected to decompose
            into port-in requests from multiple carriers.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        PinNumber:
          description: PIN Number, often required for wireless ports.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        SiteId:
          description: >-
            This is the Site / Sub-Account ID made visible in the
            /accounts/{accountId}/sites API call.
          allOf:
            - $ref: '#/components/schemas/intPatch'
        PeerId:
          description: >-
            This is the SIP Peer / Location ID made visible in the
            /accounts/{accountId}/sites/{siteId}/sipPeers API call.
          example: '521434'
          allOf:
            - $ref: '#/components/schemas/intPatch'
        ProcessingStatus:
          description: >-
            This is the processing status the bulk portin should transition
            into.
          allOf:
            - $ref: '#/components/schemas/processingStatusPatch'
        TnAttributes:
          description: >-
            Attributes to be assigned to the telephone number. Optional
            parameter. Possible values - `Protected`.
          allOf:
            - $ref: '#/components/schemas/tnAttributesPatch'
        TargetRespOrgId:
          type: string
          minLength: 5
          maxLength: 5
          description: >-
            For toll free port-ins, this value specifies the RespOrg ID that the
            toll free numbers should be ported to.  When porting to Bandwidth,
            the value is generally JYT01.  When specified in a bulk port-in, the
            value will be applied to all subtending toll free port-in orders,
            unless overridden in the subtending order.  The value should be 5
            characters in length, consisting of digits a-z, A-Z, and 0-9.
          example: JYT01
        RetryValidation:
          description: |-
            Only allowed for PUT and PATCH requests.

             When telephone numbers are included in a bulk port-in order, Bandwidth accesses a vendor to determine if the numbers are portable, and who currently serves the numbers. In the event that we do not receive a response from our vendor after a number of retries, we give up and place the order in the INVALID_DRAFT_TNS state. This scenario can occur if our vendor is performing maintenance. Including RetryValidation with a value of true will cause the order to return to VALIDATE_DRAFT_TNS and we will repeat our attempts to retrieve the portability data from the vendor. This element is included in the synchronous response to the PUT or PATCH, when included in the request, but is not included in subsequent GET requests for the order.
          type: boolean
        VoiceConfigurationPackageId:
          type: string
          description: >-
            VoiceConfigurationPackageId is the identifier of the voice
            configuration package containing the voice origination settings.
            When specified in a bulk port-in, the value will be applied to all
            subtending port-in orders, unless overriden in the subtending order.
        losingResellerName:
          type: string
          maxLength: 60
          pattern: '[A-z0-9 -]+'
          description: >-
            Name of the company serving the telephone numbers prior to the port.
            Some Canada ports may be rejected unless this information is
            supplied.
          example: ResellerName
          xml:
            name: LosingResellerName
    bulkPortinPatchJson:
      type: object
      properties:
        customerOrderId:
          description: >-
            Optional customer-defined reference ID for this order. Not unique —
            Bandwidth applies no uniqueness constraint, so multiple orders may
            share the same value. Each order receives its own unique
            Bandwidth-assigned `orderId`.
          example: CUST12345
          type: string
        requestedFocDate:
          description: >-
            If present this will specify the date and time that the port-in is
            requested to happen. The actual time and date is subject to
            negotiation with the losing carriers.
          type: string
          format: date-time
        alternateSpid:
          description: >-
            Unique customer AltSPID to be applied to the port-in requests. Can
            be changed only for DRAFT bulk port-in.
          example: X455
          type: string
        billingTelephoneNumber:
          description: >-
            Account or Billing telephone number for order. This will be unusual
            for bulk port-in requests that are expected to decompose into
            port-in requests from multiple carriers, because the value will be
            different for each losing carrier.
          type: string
        subscriber:
          $ref: '#/components/schemas/subscriberPatchJson'
        loaAuthorizingPerson:
          description: First and last name of person who authorized LOA.
          type: string
        accountNumber:
          description: >-
            Account number associated with the account on the losing carrier,
            often required for wireless ports, or enterprise ports. This will be
            unusual for bulk port-in requests that are expected to decompose
            into port-in requests from multiple carriers.
          type: string
        pinNumber:
          description: PIN Number, often required for wireless ports.
          type: string
        subAccountId:
          description: >-
            This is the Site / Sub-Account ID made visible in the
            /accounts/{accountId}/sites API call.
          type: integer
        locationId:
          description: >-
            This is the SIP Peer / Location ID made visible in the
            /accounts/{accountId}/sites/{siteId}/sipPeers
    bulkPortinHistoryErrorResponse:
      type: object
      properties:
        BulkPortInHistoryResponse:
          $ref: '#/components/schemas/responseStatus'
    bulkPortinHistoryErrorResponseJson:
      type: object
      properties:
        errorCode:
          description: Numeric designation of corresponding error.
          type: integer
        description:
          description: Detailed explanation about error.
          type: string
    bulkPortinRequest:
      type: object
      properties:
        BulkPortin:
          type: object
          properties:
            CustomerOrderId:
              type: string
              description: >-
                Optional customer-defined reference ID for this order. Not
                unique — Bandwidth applies no uniqueness constraint, so multiple
                orders may share the same value. Each order receives its own
                unique Bandwidth-assigned `orderId`.
            RequestedFocDate:
              type: string
              format: date-time
              description: >-
                If present this will specify the date and time that the port-in
                is requested to happen. The actual time and date is subject to
                negotiation with the losing carriers.
              example: '2013-05-10T15:14:22Z'
            AlternateSpid:
              type: string
              description: >-
                Unique customer AltSPID to be applied to the port-in requests.
                Can be changed only for DRAFT bulk port-in.
            BillingTelephoneNumber:
              type: string
              description: >-
                Account or Billing telephone number for order. This will be
                unusual for bulk port-in requests that are expected to decompose
                into port-in requests from multiple carriers, because the value
                will be different for each losing carrier.
            Subscriber:
              $ref: '#/components/schemas/subscriber'
            LoaAuthorizingPerson:
              type: string
              description: First and last name of person who authorized LOA.
            AccountNumber:
              type: string
              description: >-
                Account number associated with the account on the losing
                carrier, often required for wireless ports, or enterprise ports.
                This will be unusual for bulk port-in requests that are expected
                to decompose into port-in requests from multiple carriers.
            PinNumber:
              type: string
              description: PIN Number, often required for wireless ports.
            SiteId:
              type: integer
              format: int32
              description: >-
                This is the Site / Sub-Account ID made visible in the
                /accounts/{accountId}/sites API call.
            PeerId:
              type: integer
              format: int32
              description: >-
                This is the SIP Peer / Location ID made visible in the
                /accounts/{accountId}/sites/{siteId}/sipPeers API call.
            TnAttributes:
              type: array
              description: >-
                Attributes to be assigned to the telephone number. Optional
                parameter. Possible values - `Protected`.
              items:
                $ref: '#/components/schemas/tnAttribute'
            TargetRespOrgId:
              type: string
              minLength: 5
              maxLength: 5
              description: >-
                For toll free port-ins, this value specifies the RespOrg ID that
                the toll free numbers should be ported to.  When porting to
                Bandwidth, the value is generally JYT01.  When specified in a
                bulk port-in, the value will be applied to all subtending toll
                free port-in orders, unless overridden in the subtending order. 
                The value should be 5 characters in length, consisting of digits
                a-z, A-Z, and 0-9.
            RetryValidation:
              type: boolean
              description: |-
                Only allowed for PUT and PATCH requests.

                 When telephone numbers are included in a bulk port-in order, Bandwidth accesses a vendor to determine if the numbers are portable, and who currently serves the numbers. In the event that we do not receive a response from our vendor after a number of retries, we give up and place the order in the INVALID_DRAFT_TNS state. This scenario can occur if our vendor is performing maintenance. Including RetryValidation with a value of true will cause the order to return to VALIDATE_DRAFT_TNS and we will repeat our attempts to retrieve the portability data from the vendor. This element is included in the synchronous response to the PUT or PATCH, when included in the request, but is not included in subsequent GET requests for the order.
            VoiceConfigurationPackageId:
              type: string
              format: uuid
              description: >-
                VoiceConfigurationPackageId is the identifier of the voice
                configuration package containing the voice origination settings.
                When specified in a bulk port-in, the value will be applied to
                all subtending port-in orders, unless overriden in the
                subtending order.
            LosingResellerName:
              type: string
              maxLength: 60
              pattern: '[A-z0-9 -]+'
              description: >-
                Name of the company serving the telephone numbers prior to the
                port. Some Canada ports may be rejected unless this information
                is supplied.
              example: ResellerName
              xml:
                name: LosingResellerName
    bulkPortinRequestJson:
      type: object
      properties:
        bulkPortin:
          type: object
          properties:
            customerOrderId:
              type: string
              description: >-
                Optional customer-defined reference ID for this order. Not
                unique — Bandwidth applies no uniqueness constraint, so multiple
                orders may share the same value. Each order receives its own
                unique Bandwidth-assigned `orderId`.
            requestedFocDate:
              type: string
              format: date
              description: >-
                If present this will specify the date and time that the port-in
                is requested to happen. The actual time and date is subject to
                negotiation with the losing carriers.
              example: 2013-05-10Z
            alternateSpid:
              type: string
              description: >-
                Unique customer AltSPID to be applied to the port-in requests.
                Can be changed only for DRAFT bulk port-in.
            billingTelephoneNumber:
              type: string
              description: >-
                Account or Billing telephone number for order. This will be
                unusual for bulk port-in requests that are expected to decompose
                into port-in requests from multiple carriers, because the value
                will be different for each losing carrier.
            subscriber:
              $ref: '#/components/schemas/subscriberJson'
            loaAuthorizingPerson:
              type: string
              description: First and last name of person who authorized LOA.
            accountNumber:
              type: string
              description: >-
                Account number associated with the account on the losing
                carrier, often required for wireless ports, or enterprise ports.
                This will be unusual for bulk port-in requests that are expected
                to decompose into port-in requests from multiple carriers.
            pinNumber:
              type: string
              description: PIN Number, often required for wireless ports.
            subAccountId:
              type: integer
              format: int32
              description: >-
                This is the Site / Sub-Account ID made visible in the
                /accounts/{accountId}/sites API call.
            locationId:
              type: integer
              format: int32
              description: >-
                This is the SIP Peer / Location ID made visible in the
                /accounts/{accountId}/sites/{siteId}/sipPeers API call.
            tnAttributes:
              type: array
              description: >-
                Attributes to be assigned to the telephone number. Optional
                parameter. Possible values - `Protected`.
              items:
                $ref: '#/components/schemas/tnAttribute'
            targetRespOrgId:
              type: string
              minLength: 5
              maxLength: 5
              description: >-
                For toll free port-ins, this value specifies the RespOrg ID that
                the toll free numbers should be ported to.  When porting to
                Bandwidth, the value is generally JYT01.  When specified in a
                bulk port-in, the value will be applied to all subtending toll
                free port-in orders, unless overridden in the subtending order. 
                The value should be 5 characters in length, consisting of digits
                a-z, A-Z, and 0-9.
            retryValidation:
              type: boolean
              description: |-
                Only allowed for PUT and PATCH requests.

                 When telephone numbers are included in a bulk port-in order, Bandwidth accesses a vendor to determine if the numbers are portable, and who currently serves the numbers. In the event that we do not receive a response from our vendor after a number of retries, we give up and place the order in the INVALID_DRAFT_TNS state. This scenario can occur if our vendor is performing maintenance. Including RetryValidation with a value of true will cause the order to return to VALIDATE_DRAFT_TNS and we will repeat our attempts to retrieve the portability data from the vendor. This element is included in the synchronous response to the PUT or PATCH, when included in the request, but is not included in subsequent GET requests for the order.
            voiceConfigurationPackageId:
              type: string
              format: uuid
              description: >-
                VoiceConfigurationPackageId is the identifier of the voice
                configuration package containing the voice origination settings.
                When specified in a bulk port-in, the value will be applied to
                all subtending port-in orders, unless overriden in the
                subtending order.
            losingResellerName:
              type: string
              maxLength: 60
              pattern: '[A-z0-9 -]+'
              description: >-
                Name of the company serving the telephone numbers prior to the
                port. Some Canada ports may be rejected unless this information
                is supplied.
              example: ResellerName
              xml:
                name: LosingResellerName
    stringPatch:
      type: object
      properties:
        delete:
          type: boolean
          xml:
            attribute: true
    datePatch:
      type: object
      properties:
        delete:
          type: boolean
    addressPatch:
      type: object
      properties:
        delete:
          type: boolean
        HousePrefix:
          description: Street address number prefix.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        HouseNumber:
          description: Street address number.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        HouseSuffix:
          description: Street address number suffix.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        PreDirectional:
          description: Street address pre-directional.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        StreetName:
          description: Street name.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        StreetSuffix:
          description: Street suffix.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        PostDirectional:
          description: Street address post directional.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        AddressLine2:
          description: Put unit, suite, floor, etc. here.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        City:
          description: City.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        StateCode:
          description: Two letter state code.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        Zip:
          description: Zip code.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        PlusFour:
          description: Zip + 4 value.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        County:
          description: The county where the subscriber or business is located.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
    addressPatchJson:
      type: object
      properties:
        housePrefix:
          description: Street address number prefix.
          type: string
        houseNumber:
          description: Street address number.
          type: string
        houseSuffix:
          description: Street address number suffix.
          type: string
        preDirectional:
          description: Street address pre-directional.
          type: string
        streetName:
          description: Street name.
          type: string
        streetSuffix:
          description: Street suffix.
          type: string
        postDirectional:
          description: Street address post directional.
          type: string
        addressLine2:
          description: Put unit, suite, floor, etc. here.
          type: string
        city:
          description: City.
          type: string
        stateCode:
          description: Two letter state code.
          type: string
        zip:
          description: Zip code.
          type: string
        plusFour:
          description: Zip + 4 value.
          type: string
        county:
          description: The county where the subscriber or business is located.
          type: string
    intPatch:
      type: object
      properties:
        delete:
          type: boolean
    bulkPortinResponses:
      type: object
      properties:
        BulkPortinResponses:
          type: object
          properties:
            TotalCount:
              type: integer
            Links:
              $ref: '#/components/schemas/links'
            BulkPortinResponse:
              type: array
              items:
                properties:
                  OrderId:
                    description: >-
                      The unique identifier string created by Bandwidth to refer
                      to the order.  This value is returned in the synchronous
                      response to the POST.
                    type: string
                  CompanyName:
                    description: >-
                      The name associated with the Bandwidth account that
                      created this order.
                    type: string
                  LastModifiedBy:
                    description: >-
                      The username that last modified the order.  This may show
                      as "System" if the order was last modified by Bandwidth
                      automated software.
                    type: string
                  LastModifiedDate:
                    description: >-
                      The date and time on which the order was last modified,
                      including status updates.
                    type: string
                  OrderCreateDate:
                    description: The date and time when the order was created.
                    type: string
                  PortinList:
                    $ref: '#/components/schemas/portinList'
                  ProcessingStatus:
                    type: string
                    enum:
                      - DRAFT
                      - IN_PROGRESS
                      - NEEDS_ATTENTION
                      - PARTIAL
                      - COMPLETED
                      - CANCELLED
                      - VALIDATE_DRAFT_TNS
                      - VALID_DRAFT_TNS
                      - INVALID_DRAFT_TNS
                  RequestedFocDate:
                    description: >-
                      This is the FOC (Firm Order Commitment) date requested by
                      the person (or machine) creating the order.
                    type: string
                  TargetRespOrgId:
                    description: >-
                      For toll free port-ins, this value specifies the RespOrg
                      ID that toll free numbers will be ported to.  When porting
                      to Bandwidth, the value is generally JYT01.  When
                      specified in a bulk port-in, the value is applied to all
                      subtending toll free port-in orders, unless overridden in
                      the subtending order.
                    type: string
                  VoiceConfigurationPackageId:
                    description: >-
                      VoiceConfigurationPackageId is the identifier of the voice
                      configuration package containing the voice origination
                      settings. When specified in a bulk port-in, the value will
                      be applied to all subtending port-in orders, unless
                      overriden in the subtending order.
                    type: string
    bulkPortinResponsesJson:
      type: object
      properties:
        totalCount:
          type: integer
        links:
          $ref: '#/components/schemas/links'
        bulkPortins:
          type: array
          items:
            properties:
              orderId:
                description: >-
                  The unique identifier string created by Bandwidth to refer to
                  the order.  This value is returned in the synchronous response
                  to the POST.
                type: string
              companyName:
                description: >-
                  The name associated with the Bandwidth account that created
                  this order.
                type: string
              lastModifiedBy:
                description: >-
                  The username that last modified the order.  This may show as
                  "System" if the order was last modified by Bandwidth automated
                  software.
                type: string
              lastModifiedDate:
                description: >-
                  The date and time on which the order was last modified,
                  including status updates.
                type: string
              orderCreateDate:
                description: The date and time when the order was created.
                type: string
              portinOrderIds:
                $ref: '#/components/schemas/portinOrderIds'
              processingStatus:
                type: string
                enum:
                  - DRAFT
                  - IN_PROGRESS
                  - NEEDS_ATTENTION
                  - PARTIAL
                  - COMPLETED
                  - CANCELLED
                  - VALIDATE_DRAFT_TNS
                  - VALID_DRAFT_TNS
                  - INVALID_DRAFT_TNS
              requestedFocDate:
                description: >-
                  This is the FOC (Firm Order Commitment) date requested by the
                  person (or machine) creating the order.
                type: string
              targetRespOrgId:
                description: >-
                  For toll free port-ins, this value specifies the RespOrg ID
                  that toll free numbers will be ported to.  When porting to
                  Bandwidth, the value is generally JYT01.  When specified in a
                  bulk port-in, the value is applied to all subtending toll free
                  port-in orders, unless overridden in the subtending order.
                type: string
              voiceConfigurationPackageId:
                description: >-
                  VoiceConfigurationPackageId is the identifier of the voice
                  configuration package containing the voice origination
                  settings. When specified in a bulk port-in, the value will be
                  applied to all subtending port-in orders, unless overriden in
                  the subtending order.
                type: string
    bulkPortinResponse:
      type: object
      properties:
        BulkPortinResponse:
          type: object
          properties:
            BulkPortin:
              $ref: '#/components/schemas/bulkPortin'
    bulkPortinResponseJson:
      type: object
      properties:
        customerOrderId:
          description: >-
            Optional customer-defined reference ID for this order. Only
            alphanumeric values, dashes and spaces are allowed. Not unique —
            Bandwidth applies no uniqueness constraint, so multiple orders may
            share the same value. Each order receives its own unique
            Bandwidth-assigned `orderId`.
          type: string
        requestedFocDate:
          description: >-
            This is the FOC (Firm Order Commitment) Date requested by the person
            (or machine) creating the Port-in Order.
          type: string
          format: date-time
        subAccountId:
          description: >-
            The numeric designation for the Sub-Account ID that applied to the
            Port-in Order. The SubAccountId is used to provide a home within the
            account for the Tn(s) that were ported in by the Port-in Order.
          type: integer
        locationId:
          description: >-
            The numeric designation for the Location ID that applied to the
            Port-in Order. The Location ID is used to provide a home within the
            location for the Tn(s) that were ported in by the Port-in Order.
          type: integer
        processingStatus:
          enum:
            - DRAFT
            - PARTIAL
            - COMPLETED
            - CANCELED
            - VALIDATE_DRAFT_TNS
            - VALID_DRAFT_TNS
            - INVALID_DRAFT_TNS
          type: string
        accountId:
          description: User's account ID.
          type: integer
        createdByUser:
          description: >-
            The username that created the order.  This may show as "System" if
            the order was last modified by Bandwidth automated software.
          type: string
        lastModifiedBy:
          description: >-
            The username that last modified the order.  This may show as
            "System" if the order was last modified by Bandwidth automated
            software.
          type: string
        targetRespOrgId:
          type: string
          description: >-
            For toll free port-ins, this value specifies the RespOrg ID that
            toll free numbers will be ported to.  When porting to Bandwidth, the
            value is generally JYT01.  When specified in a bulk port-in, the
            value is applied to all subtending toll free port-in orders, unless
            overridden in the subtending order.
        voiceConfigurationPackageId:
          type: string
          description: >-
            VoiceConfigurationPackageId is the identifier of the voice
            configuration package containing the voice origination settings.
            When specified in a bulk port-in, the value will be applied to all
            subtending port-in orders, unless overriden in the subtending order.
        lastModifiedDate:
          description: >-
            The date and time on which the order was last modified, including
            status updates.
          type: string
        orderCreateDate:
          description: The date and time when the order was created.
          type: string
        orderId:
          description: >-
            The unique identifier string created by Bandwidth to refer to the
            order.  This value is returned in the synchronous response to the
            POST.
          type: string
    bulkPortinErrorResponse:
      type: object
      properties:
        BulkPortinResponse:
          $ref: '#/components/schemas/responseStatus'
    bulkPortinErrorResponseJson:
      type: object
      properties:
        errorCode:
          description: Numeric designation of corresponding error.
          type: integer
        description:
          description: Detailed explanation about error.
          type: string
    bulkPortinPatchErrorResponse:
      type: object
      properties:
        BulkPortinResponse:
          type: object
          properties:
            ResponseStatus:
              type: object
              properties:
                Description:
                  description: Detailed explanation about error
                  type: string
            PortinListErrors:
              type: array
              items:
                properties:
                  PortinErrors:
                    type: object
                    properties:
                      PortinOrderId:
                        type: string
                      Errors:
                        type: array
                        items:
                          properties:
                            Error:
                              type: object
                              properties:
                                Description:
                                  type: string
                                ErrorCode:
                                  type: integer
    bulkPortinPatchErrorResponseJson:
      type: object
      properties:
        portinErrors:
          type: array
          items:
            properties:
              portinOrderId:
                type: string
              description:
                type: string
              errorCode:
                type: integer
    bulkPortinLoasResponse:
      type: object
      properties:
        FileListResponse:
          type: object
          properties:
            FileCount:
              description: Total count of files in response.
              type: integer
            FileData:
              $ref: '#/components/schemas/fileData'
            ResultCode:
              description: Result code of fetching the list of files from AWS.
              type: integer
            ResultMessage:
              description: Results of the attempt to fetch the list of files.
              type: string
    bulkPortinLoasResponseJson:
      type: object
      properties:
        fileCount:
          description: Total count of files in response.
          type: integer
        fileData:
          description: Optional metadata associated with the file that was uploaded.
          type: array
          items:
            $ref: '#/components/schemas/fileDataJson'
        resultCode:
          description: Result code of fetching the list of files from AWS.
          type: integer
        resultMessage:
          description: Results of the attempt to fetch the list of files.
          type: string
    customerOrderId:
      type: object
      properties:
        CustomerOrderId:
          type: string
    customerOrderIdJson:
      type: string
    fileMetaData:
      type: object
      properties:
        FileMetaData:
          type: object
          properties:
            DocumentName:
              description: Name of particular document.
              type: string
            DocumentType:
              description: Enum of possible file type.
              type: string
              enum:
                - LOA
                - INVOICE
                - CSR
                - OTHER
    fileMetaDataJson:
      type: object
      properties:
        documentName:
          description: Name of particular document.
          type: string
        documentType:
          description: Enum of possible file type.
          type: string
          enum:
            - LOA
            - INVOICE
            - CSR
            - OTHER
    fileData:
      type: object
      properties:
        FileName:
          type: string
        FileMetaData:
          $ref: '#/components/schemas/fileMetaData'
    fileDataJson:
      type: object
      properties:
        fileName:
          type: string
        fileMetaData:
          $ref: '#/components/schemas/fileMetaDataJson'
    links:
      title: Links
      type: array
      items:
        $ref: '#/components/schemas/selfLink'
    notes:
      type: object
      properties:
        Notes:
          type: array
          items:
            $ref: '#/components/schemas/note'
    notesJson:
      type: object
      properties:
        notes:
          type: array
          items:
            $ref: '#/components/schemas/noteJson'
    note:
      type: object
      properties:
        Note:
          type: object
          properties:
            Id:
              description: >-
                This is the Order Note identifier that is automatically
                generated by system.
              type: string
            UserId:
              description: >-
                The UserId is authenticated for access to the network via a
                username string.
              type: string
            Description:
              description: This is the Order Note description.
              type: string
            LastDateModified:
              description: This is the date when Order Note was last modified.
              type: string
            Internal:
              description: >-
                This is the flag that indicates whether the note is internal or
                not.
              type: boolean
    noteJson:
      type: object
      properties:
        id:
          description: >-
            This is the Order Note identifier that is automatically generated by
            system.
          type: string
        userId:
          description: >-
            The UserId is authenticated for access to the network via a username
            string.
          type: string
        description:
          description: This is the Order Note description.
          type: string
        lastModifiedDate:
          description: This is the date when Order Note was last modified.
          type: string
        internal:
          description: This is the flag that indicates whether the note is internal or not.
          type: boolean
    noteErrorResponse:
      type: object
      properties:
        NoteResponse:
          $ref: '#/components/schemas/responseStatus'
    noteErrorResponseJson:
      type: object
      properties:
        errorCode:
          description: Numeric designation of corresponding error.
          type: integer
        description:
          description: Detailed explanation about error.
          type: string
    orderHistory:
      type: object
      properties:
        OrderDate:
          description: This is the date/time when the order history entry was created.
          type: string
        Note:
          description: This is the order note that accompanied the order history entry.
          type: string
        Author:
          description: >-
            This is the user that initiated the event that caused the order
            history to be updated.
          type: string
        Difference:
          description: SUPP changes difference.
          type: string
        Status:
          description: >-
            This is the state that the order was in when the order history event
            occurred.
          type: string
    bulkPortinHistoryResponseJson:
      type: object
      properties:
        orderHistory:
          type: array
          items:
            properties:
              orderDate:
                description: >-
                  This is the date/time when the order history entry was
                  created.
                type: string
              note:
                description: >-
                  This is the order note that accompanied the order history
                  entry.
                type: string
              author:
                description: >-
                  This is the user that initiated the event that caused the
                  order history to be updated.
                type: string
              difference:
                description: SUPP changes difference.
                type: string
              status:
                description: >-
                  This is the state that the order was in when the order history
                  event occurred.
                type: string
    bulkPortinHistoryResponse:
      type: object
      properties:
        OrderHistoryWrapper:
          type: object
          properties:
            OrderHistory:
              $ref: '#/components/schemas/orderHistory'
    portinList:
      type: object
      description: >-
        The list of child, or subtending, orders associated with a bulk
        port-in.  The bulk port-in will have an empty PortinList until telephone
        numbers are added using the /tnList endpoint.
      properties:
        PortinList:
          type: array
          items:
            $ref: '#/components/schemas/portinOrderId'
    portinOrderIds:
      type: array
      description: >-
        The list of child, or subtending, orders associated with a bulk
        port-in.  The bulk port-in will have an empty PortinList until telephone
        numbers are added using the /tnList endpoint.
      items:
        $ref: '#/components/schemas/portinOrderIdJson'
    portinListResponse:
      type: object
      properties:
        PortinListResponse:
          type: object
          properties:
            PortinList:
              type: array
              items:
                $ref: '#/components/schemas/portinOrderId'
            Errors:
              type: array
              items:
                properties:
                  Error:
                    type: object
                    properties:
                      ErrorCode:
                        description: Numeric designation of corresponding error.
                        type: integer
                      PortinOrderId:
                        type: string
                      Description:
                        description: Detailed explanation about error.
                        type: string
    portinOrderIdsResponse:
      type: object
      properties:
        portinOrderIds:
          $ref: '#/components/schemas/portinOrderIds'
        portinErrors:
          type: array
          items:
            properties:
              errorCode:
                description: Numeric designation of corresponding error.
                type: integer
              portinOrderId:
                type: string
              description:
                description: Detailed explanation about error.
                type: string
    portinOrderId:
      type: object
      properties:
        PortinOrderId:
          description: >-
            The OrderId associated with a child, or subtending, order associated
            with the bulk port-in.
          type: string
    portinOrderIdJson:
      type: object
      properties:
        portinOrderId:
          description: >-
            The OrderId associated with a child, or subtending, order associated
            with the bulk port-in.
          type: string
    processingStatusPatch:
      type: object
      properties:
        delete:
          type: boolean
    tnAttributesPatch:
      type: object
      properties:
        delete:
          type: boolean
    responseStatus:
      type: object
      properties:
        ErrorCode:
          description: Numeric designation of corresponding error
          type: integer
        Description:
          description: 'Detailed explanation about error '
          type: string
    portinErrors:
      type: array
      items:
        properties:
          errorCode:
            description: Numeric designation of corresponding error
            type: integer
          description:
            description: 'Detailed explanation about error '
            type: string
    selfLink:
      title: Link
      type: object
      properties:
        href:
          type: string
          description: URI of the link
          example: /self/uri
        rel:
          type: string
          description: Specifies the relationship between this link and the resource.
          example: SelfResource
        method:
          type: string
          description: HTTP method to be used
          example: GET
    subscriberPatch:
      type: object
      properties:
        delete:
          type: boolean
        SubscriberType:
          description: If residential, order will be rejected if a BusinessName is entered.
          enum:
            - BUSINESS
            - RESIDENTIAL
            - GENERIC
          allOf:
            - $ref: '#/components/schemas/subscriberTypePatch'
        BusinessName:
          description: Subscriber business name.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        FirstName:
          description: Subscriber first name.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        MiddleInitial:
          description: Subscriber middle initial.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        LastName:
          description: Subscriber last name.
          allOf:
            - $ref: '#/components/schemas/stringPatch'
        ServiceAddress:
          $ref: '#/components/schemas/addressPatch'
    subscriberPatchJson:
      type: object
      properties:
        subscriberType:
          description: If residential, order will be rejected if a BusinessName is entered.
          enum:
            - BUSINESS
            - RESIDENTIAL
            - GENERIC
        businessName:
          description: Subscriber business name.
          type: string
        firstName:
          description: Subscriber first name.
          type: string
        middleInitial:
          description: Subscriber middle initial.
          type: string
        lastName:
          description: Subscriber last name.
          type: string
        serviceAddress:
          $ref: '#/components/schemas/addressPatchJson'
    subscriberTypePatch:
      type: object
      properties:
        delete:
          type: boolean
    tnList:
      type: object
      properties:
        TnList:
          type: object
          properties:
            Tn:
              type: array
              items:
                type: string
                xml:
                  name: Tn
    phoneNumbers:
      type: array
      items:
        type: string
    tnListResponse:
      type: object
      properties:
        TnListResponse:
          type: object
          properties:
            ProcessingStatus:
              type: string
              enum:
                - DRAFT
                - PARTIAL
                - COMPLETED
                - CANCELED
                - VALIDATE_DRAFT_TNS
                - VALID_DRAFT_TNS
                - INVALID_DRAFT_TNS
            OrderId:
              description: >-
                The unique identifier string created by Bandwidth to refer to
                the order.  This value is returned in the synchronous response
                to the POST.
              type: string
            PortableTnList:
              description: >-
                This is a list of all of the telephone numbers from the tnList
                that were validated and are known to be portable.
              type: array
              items:
                properties:
                  Tn:
                    type: string
            NotValidatedTnList:
              description: >-
                This is a list of any telephone numbers from the tnList that
                have not yet been validated.
              type: array
              items:
                properties:
                  Tn:
                    type: string
            ChildPortinOrderList:
              description: >-
                This is a list of any telephone numbers from the tnList that
                have not yet been validated.
              type: object
              properties:
                ChildPortinOrder:
                  description: >-
                    The list of child, or subtending, orders associated with a
                    bulk port-in.  The bulk port-in will have an empty
                    ChildPortinOrderList if none of the telephone numbers
                    included in the /tnList are portable.
                  type: object
                  properties:
                    OrderId:
                      description: >-
                        The unique identifier string created by Bandwidth to
                        refer to the order.  This value is returned in the
                        synchronous response to the POST.
                      type: string
                    TnList:
                      $ref: '#/components/schemas/tnList'
            ErrorList:
              type: array
              description: >-
                The list of errors (if any) associated with the telephone
                numbers in the tnList.
              items:
                properties:
                  Error:
                    type: object
                    properties:
                      Code:
                        description: Numeric designation of corresponding error.
                        type: integer
                      Description:
                        description: Detailed explanation about error.
                        type: string
                      TnList:
                        $ref: '#/components/schemas/tnList'
    tnListResponseJson:
      type: object
      properties:
        processingStatus:
          type: string
          enum:
            - DRAFT
            - PARTIAL
            - COMPLETED
            - CANCELED
            - VALIDATE_DRAFT_TNS
            - VALID_DRAFT_TNS
            - INVALID_DRAFT_TNS
        orderId:
          description: >-
            The unique identifier string created by Bandwidth to refer to the
            order.  This value is returned in the synchronous response to the
            POST.
          type: string
        portablePhoneNumbers:
          description: >-
            This is a list of all of the telephone numbers from the tnList that
            were validated and are known to be portable.
          type: array
          items:
            properties:
              phoneNumber:
                type: string
        notValidatedPhoneNumbers:
          description: >-
            This is a list of any telephone numbers from the phone numbers that
            have not yet been validated.
          type: array
          items:
            properties:
              phoneNumbers:
                type: string
        childPortinOrders:
          description: >-
            The list of child, or subtending, orders associated with a bulk
            port-in.  The bulk port-in will have an empty childPortinOrders list
            if none of the telephone numbers included in the /tnList are
            portable.
          type: array
          items:
            properties:
              orderId:
                description: >-
                  The unique identifier string created by Bandwidth to refer to
                  the order.  This value is returned in the synchronous response
                  to the POST.
                type: string
              phoneNumbers:
                $ref: '#/components/schemas/phoneNumbers'
        portinErrors:
          $ref: '#/components/schemas/portinErrors'
    tnListUpdateResponse:
      type: object
      properties:
        TnListResponse:
          type: object
          properties:
            OrderId:
              description: This is Bandwidth order ID.
              type: string
            ProcessingStatus:
              description: >-
                The processing status of this order. Values may be: PROCESSING,
                COMPLETED, FAILED. PROCESSING means that the system is still
                processing the order. COMPLETED means that the order has been
                successfully completed. FAILED means that errors occurred while
                processing the order, and that the order did not make any
                changes to the system.
              type: string
              enum:
                - DRAFT
                - PARTIAL
                - COMPLETED
                - CANCELED
                - VALIDATE_DRAFT_TNS
                - VALID_DRAFT_TNS
                - INVALID_DRAFT_TNS
    tnListUpdateResponseJson:
      type: object
      properties:
        orderId:
          description: This is Bandwidth order ID.
          type: string
        processingStatus:
          description: >-
            The processing status of this order. Values may be: PROCESSING,
            COMPLETED, FAILED. PROCESSING means that the system is still
            processing the order. COMPLETED means that the order has been
            successfully completed. FAILED means that errors occurred while
            processing the order, and that the order did not make any changes to
            the system.
          type: string
          enum:
            - DRAFT
            - PARTIAL
            - COMPLETED
            - CANCELED
            - VALIDATE_DRAFT_TNS
            - VALID_DRAFT_TNS
            - INVALID_DRAFT_TNS
    tnListUpdateErrorResponse:
      type: object
      properties:
        TnListResponse:
          type: object
          properties:
            ResponseStatus:
              $ref: '#/components/schemas/responseStatus'
            OrderId:
              type: string
            ProcessingStatus:
              type: string
              enum:
                - INVALID_DRAFT_TNS
    tnListUpdateErrorResponseJson:
      type: object
      properties:
        portinErrors:
          $ref: '#/components/schemas/portinErrors'
        orderId:
          type: string
        processingStatus:
          type: string
          enum:
            - INVALID_DRAFT_TNS
  responses:
    bulkPortinHistoryResponse200:
      description: >-
        The history has been successfully retrieved and displayed in the
        payload. History is not supported for bulk port-ins in draft status.
      content:
        application/json:
          examples:
            Simple response:
              $ref: '#/components/examples/bulkPortinHistorySimpleExampleJson'
            Bulk port-in in DRAFT state:
              $ref: '#/components/examples/bulkPortinHistoryDraftExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinHistoryResponseJson'
        application/xml:
          examples:
            Simple response:
              $ref: '#/components/examples/bulkPortinHistorySimpleExample'
            Bulk port-in in DRAFT state:
              $ref: '#/components/examples/bulkPortinHistoryDraftExample'
          schema:
            $ref: '#/components/schemas/bulkPortinHistoryResponse'
    bulkPortinHistoryResponse404:
      description: NOT FOUND - the order id does not exist in the system
      content:
        application/json:
          examples:
            example:
              value:
                errorCode: 1001
                description: The resource does not exist
          schema:
            $ref: '#/components/schemas/bulkPortinHistoryErrorResponseJson'
        application/xml:
          examples:
            example:
              description: example
              value: |-
                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <BulkPortInHistoryResponse>
                    <ResponseStatus>
                        <Description>The resource does not exist</Description>
                    </ResponseStatus>
                </BulkPortInHistoryResponse>
          schema:
            $ref: '#/components/schemas/bulkPortinHistoryErrorResponse'
    bulkPortinLoasResponse200:
      description: >-
        The list of all files is being returned.  This response includes the
        case where the list is empty.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinLoasResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinLoasResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinLoasResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinLoasResponse'
    bulkPortinLoasResponse400:
      description: 'Supported values for documentType are: LOA, INVOICE, CSR, or OTHER.'
    bulkPortinLoasResponse409:
      description: >-
        Conflicting values specified for documentType query parameter and
        documentType header.
    bulkPortinLoasResponse415:
      description: Unsupported content type provided in http header or uploaded file.
    bulkPortinLoasResponse201:
      description: >-
        The 201 response indicates the successful creation of a file resource
        containing the uploaded content.

        The response header will include a link to the created file as a GET on
        the identified resource.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinLoasUploadExampleJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinLoasUploadExample'
    bulkPortinListResponse200:
      description: The list of bulk port-ins have been successfully retrieved.
      content:
        application/json:
          examples:
            Exclude query params:
              $ref: '#/components/examples/bulkPortinListResponseExampleJson'
            Include query params:
              $ref: '#/components/examples/bulkPortinListResponseExample2Json'
          schema:
            $ref: '#/components/schemas/bulkPortinResponsesJson'
        application/xml:
          examples:
            Exclude query params:
              $ref: '#/components/examples/bulkPortinListResponseExample'
            Include query params:
              $ref: '#/components/examples/bulkPortinListResponseExample2'
          schema:
            $ref: '#/components/schemas/bulkPortinResponses'
    bulkPortinListResponse204:
      description: No results matching the specified query parameters were found.
      content:
        application/xml: {}
        application/json: {}
    bulkPortinResponse201:
      description: >-
        The order has been created with the order ID specified in the response
        payload

        and in the Location header.  Note that it is possible to create an order
        that

        has errors in it.  Very little screening is done, because all fields are

        optional and very little validation is done other than simple syntax
        checking.

        The expectation is that the child orders will be updated using the
        /portins

        API prior to submission to fill in port-specific information (e.g. the
        LOA

        authorizing person, or subscriber data).
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinResponse'
    bulkPortinResponse400:
      description: >
        <p>Order could not be processed and no order ID was created.<br>

        Some bad request error examples:<br> 

        <ul>

        <li>7527 - Target RespOrg IDs must be 5 characters in length.</li>

        <li>7528 - Target RespOrg IDs must consist of letters (a-z, A-Z) and
        digits (0-9).</li>

        <li>7533 - A toll free port-in cannot be submitted without a
        TargetRespOrgId.</li>

        </p>
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin400ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponse'
    bulkPortinResponse409:
      description: >
        <p>Conflict <br> 

        Some conflict error examples:<br> 

        <ul>

        <li>7529 - The specified Target RespOrg ID is not a Bandwidth RespOrg
        ID, and your account is not configured for RespOrg Exception.</li>

        <li>7530 - The specified Target RespOrg ID is neither a Bandwidth
        RespOrg ID, nor one of the RespOrg Exception RespOrg IDs configured for
        your account.</li>

        <li>7531 - The specified Target RespOrg ID is not a valid Bandwidth
        RespOrg ID.</li>

        <li>7535 - The TargetRespOrgId may only be included for a bulk port-in
        that is still in a draft state.</li>

        </ul></p>
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin409ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin409ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponse'
    bulkPortinResponse200:
      description: >-
        The information has been successfully retrieved and displayed in the
        payload.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin200ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortin200ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinResponse'
    bulkPortinResponse404:
      description: The indicated Bulk Port-in order could not be found.
    bulkPortinUpdateResponse200:
      description: >-
        The information has been successfully retrieved and displayed in the
        payload.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinResponse'
    bulkPortinUpdateResponse400:
      description: Bad request. Invalid input.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdate400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinPatchErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdate400ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinPatchErrorResponse'
    bulkPortinUpdateResponse404:
      description: The indicated Bulk Port-in order could not be found.
    bulkPortinDeleteResponse200:
      description: Bulk Port-in order has been successfully deleted.
    bulkPortinDeleteResponse400:
      description: Bad request. Bulk Port-in order not in DRAFT state.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinDelete400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinDelete400ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinErrorResponse'
    bulkPortinDeleteResponse404:
      description: The indicated Bulk Port-in order could not be found.
    bulkPortinPatchResponse200:
      description: >-
        The information has been successfully retrieved and displayed in the
        payload.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinPatch200ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinPatch200ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinResponse'
    bulkPortinPatchResponse400:
      description: Bad request. Invalid input.
      content:
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinPatch400ResponseExample'
          schema:
            $ref: '#/components/schemas/bulkPortinPatchErrorResponse'
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinPatch400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinPatchErrorResponseJson'
    bulkPortinPatchResponse404:
      description: The indicated Bulk Port-in order could not be found.
    bulkPortinChildListResponse200:
      description: >-
        The information has been successfully retrieved and displayed in the
        payload. It is possible to receive an empty PortinList if there are no
        child port-in orders associated with the bulk port-in.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinChildList200ExampleJson'
          schema:
            $ref: '#/components/schemas/portinOrderIdsResponse'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinChildList200Example'
          schema:
            $ref: '#/components/schemas/portinListResponse'
    bulkPortinUpdateChildListResponse200:
      description: The list was replaced successfully and no errors were detected.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateChildList200ExampleJson'
          schema:
            $ref: '#/components/schemas/portinOrderIdsResponse'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateChildList200Example'
          schema:
            $ref: '#/components/schemas/portinListResponse'
    bulkPortinUpdateChildListResponse400:
      description: >-
        There was an error - one or more of the port-in orders was invalid.  The
        response payload will indicate the errors that were detected, and no
        changes will be made to the list of portin orders associated with the
        bulk order.
    bulkPortinNotesResponse200:
      description: >-
        OK - There are Notes associated with the order, and they have been
        returned in the response.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesResponseExampleJson'
          schema:
            $ref: '#/components/schemas/notesJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesResponseExample'
          schema:
            $ref: '#/components/schemas/notes'
    bulkPortinNotesResponse204:
      description: >-
        No Content - There are no Notes associated with the order.  Since the
        notes resource is an aggregate rather than addressed resource the
        generic no content response is used, rather than a 404 as would be used
        if the resource was addressed with an identifier
    bulkPortinNotesResponse201:
      description: >-
        Created - The note has been created and added to the collection of notes
        associated with the order.  A link to the note is included in the
        Location header of the response.  No body is returned
    bulkPortinNotesResponse400:
      description: >-
        Bad Request - The note has not been created because the payload is
        incomplete or in error.  An error payload is provided in the response.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotes400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/noteErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotes400ResponseExample'
          schema:
            $ref: '#/components/schemas/noteErrorResponse'
    bulkPortinNotesUpdateResponse200:
      description: OK - note has been updated.  No body is returned
    bulkPortinNotesUpdateResponse400:
      description: >-
        Bad Request - the note has not been updated because the payload is
        incomplete or in error.  An error payload is provided in the response.
      content:
        application/json:
          examples:
            example:
              $ref: >-
                #/components/examples/bulkPortinNotesUpdate400ResponseExampleJson
          schema:
            $ref: '#/components/schemas/noteErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesUpdate400ResponseExample'
          schema:
            $ref: '#/components/schemas/noteErrorResponse'
    bulkPortinTnListResponse200:
      description: >-
        The information has been successfully retrieved and displayed in the
        payload.
      content:
        application/json:
          examples:
            DRAFT state:
              $ref: '#/components/examples/tnListResponseDraftExampleJson'
            VALIDATE_DRAFT_TNS state:
              $ref: '#/components/examples/tnListResponseValidateDraftTnsExampleJson'
            VALID_DRAFT_TNS state:
              $ref: '#/components/examples/tnListResponseValidDraftTnsExampleJson'
            Non-portable INVALID_DRAFT_TNS state:
              $ref: >-
                #/components/examples/tnListResponseNonPortableInvalidDraftTnsExampleJson
            Vendor error INVALID_DRAFT_TNS state:
              $ref: >-
                #/components/examples/tnListResponseVendorErrorInvalidDraftTnsExampleJson
          schema:
            $ref: '#/components/schemas/tnListResponseJson'
        application/xml:
          examples:
            DRAFT state:
              $ref: '#/components/examples/tnListResponseDraftExample'
            VALIDATE_DRAFT_TNS state:
              $ref: '#/components/examples/tnListResponseValidateDraftTnsExample'
            VALID_DRAFT_TNS state:
              $ref: '#/components/examples/tnListResponseValidDraftTnsExample'
            Non-portable INVALID_DRAFT_TNS state:
              $ref: >-
                #/components/examples/tnListResponseNonPortableInvalidDraftTnsExample
            Vendor error INVALID_DRAFT_TNS state:
              $ref: >-
                #/components/examples/tnListResponseVendorErrorInvalidDraftTnsExample
          schema:
            $ref: '#/components/schemas/tnListResponse'
    tnListUpdateResponse202:
      description: >-
        The request to validate telephone numbers and create child port-in
        orders has been accepted.  Use the GET /tnList to check for status
        updates on the validation.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdateResponseExampleJson'
          schema:
            $ref: '#/components/schemas/tnListUpdateResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdateResponseExample'
          schema:
            $ref: '#/components/schemas/tnListUpdateResponse'
    tnListUpdateResponse400:
      description: >-
        The Tn List payload was malformed, and the list could not be processed. 
        The response payload includes information about why the request failed. 
        If the request is entirely malformed (e.g. unrecognized elements), the
        400 response may have no payload.</p><p>In the example below, the Tn
        values include the country code prefix.The Tn values should be 10-digit
        North American telephone numbers.
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdate400ResponseExampleJson'
          schema:
            $ref: '#/components/schemas/tnListUpdateErrorResponseJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdate400ResponseExample'
          schema:
            $ref: '#/components/schemas/tnListUpdateErrorResponse'
  requestBodies:
    bulkPortinRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinRequestExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinRequestJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinRequestExample'
          schema:
            $ref: '#/components/schemas/bulkPortinRequest'
    bulkPortinUpdateRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateRequestExampleJson'
          schema:
            $ref: '#/components/schemas/bulkPortinRequestJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinUpdateRequestExample'
          schema:
            $ref: '#/components/schemas/bulkPortinRequest'
    bulkPortinPatchRequest:
      content:
        application/json:
          examples:
            Simple Request:
              value:
                customerOrderId: Order Id for all child orders
                requestedFocDate: 2020-06-18T16:30:00.000Z
                targetRespOrgId: JYT99
                voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
                subAccountId: 14020
            In progress:
              value:
                processingStatus: IN_PROGRESS
            Updated requested FOC date:
              value:
                requestedFocDate: 2021-06-22T15:30:00.000Z
          schema:
            $ref: '#/components/schemas/bulkPortinPatchJson'
        application/xml:
          examples:
            Simple Request:
              value: |-
                <BulkPortin>
                  <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
                  <RequestedFocDate>2021-06-30Z</RequestedFocDate>
                  <TargetRespOrgId>JYT99</TargetRespOrgId>
                  <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
                  <SiteId>14020</SiteId>
                  <PeerId delete='true'/>
                </BulkPortin>
            In progress:
              value: |-
                <BulkPortin>
                  <ProcessingStatus>IN_PROGRESS</ProcessingStatus>
                </BulkPortin>
            Updated requested FOC date:
              value: |-
                <BulkPortin>
                  <RequestedFocDate>2021-06-22T11:30:00-04:00</RequestedFocDate>
                </BulkPortin>
          schema:
            $ref: '#/components/schemas/bulkPortinPatchRequest'
    bulkPortinChildListRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinChildListRequestExampleJson'
          schema:
            $ref: '#/components/schemas/portinOrderIds'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinChildListRequestExample'
          schema:
            $ref: '#/components/schemas/portinList'
    bulkPortinNotesRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesRequestExampleJson'
          schema:
            $ref: '#/components/schemas/noteJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesRequestExample'
          schema:
            $ref: '#/components/schemas/note'
    bulkPortinNotesUpdateRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesUpdateRequestExampleJson'
          schema:
            $ref: '#/components/schemas/noteJson'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/bulkPortinNotesUpdateRequestExample'
          schema:
            $ref: '#/components/schemas/note'
    tnListUpdateRequest:
      content:
        application/json:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdateRequestExampleJson'
          schema:
            $ref: '#/components/schemas/phoneNumbers'
        application/xml:
          examples:
            example:
              $ref: '#/components/examples/tnListUpdateRequestExample'
          schema:
            $ref: '#/components/schemas/tnList'
  parameters:
    AccountIdPathParam:
      name: accountId
      description: User's account ID.
      in: path
      required: true
      schema:
        type: string
      example: '1234567'
    OrderIdPathParam:
      name: orderId
      description: ''
      in: path
      required: true
      schema:
        type: string
    NoteIdPathParam:
      name: noteId
      description: Note ID
      in: path
      required: true
      schema:
        type: string
      example: '123'
    DocumentTypeQueryParam:
      name: documentType
      description: >-
        This query parameter allows you to include the document type metadata at
        the same

        time you upload the file.  The value may be one of&#58; LOA, INVOICE,
        CSR, or OTHER.
      in: query
      required: false
      schema:
        type: string
      example: LOA
    MetadataQueryParam:
      name: metadata
      description: >-
        if true it will return meta-data associated with the file used to
        describe the file.
      in: query
      required: false
      schema:
        type: boolean
        default: false
      example: true
  examples:
    bulkPortinHistorySimpleExampleJson:
      value:
        orderHistory:
          - orderDate: 2018-06-12T13:44:47.604Z
            note: Draft order has been created/updated
            author: systemUser
            status: DRAFT
          - orderDate: 2018-06-12T13:49:02.328Z
            note: Draft order has been created/updated
            author: systemUser
            status: DRAFT
            difference: 'subAccountId : 0 --> 743'
          - orderDate: 2018-06-12T13:49:46.350Z
            note: Order has been submitted/updated
            author: systemUser
            status: IN_PROGRESS
          - orderDate: 2018-06-12T13:51:13.855Z
            note: Order has been submitted/updated
            author: systemUser
            status: IN_PROGRESS
            difference: 'SubscriberType : "" --> residential'
    bulkPortinHistoryDraftExampleJson:
      value:
        errorCode: 7710
        description: >-
          History is not supported for bulk port-ins or individual port-ins in
          draft status.
    bulkPortinHistorySimpleExample:
      value: |-
        <OrderHistoryWrapper>
            <OrderHistory>
                <OrderDate>2018-06-12T13:44:47.604Z</OrderDate>
                <Note>Draft order has been created/updated</Note>
                <Author>systemUser</Author>
                <Status>DRAFT</Status>
            </OrderHistory>
            <OrderHistory>
                <OrderDate>2018-06-12T13:49:02.328Z</OrderDate>
                <Note>Draft order has been created/updated</Note>
                <Author>systemUser</Author>
                <Status>DRAFT</Status>
                <Difference>SiteId : 0 --&gt; 743</Difference>
            </OrderHistory>
            <OrderHistory>
                <OrderDate>2018-06-12T13:49:46.350Z</OrderDate>
                <Note>Order has been submitted/updated</Note>
                <Author>systemUser</Author>
                <Status>IN_PROGRESS</Status>
            </OrderHistory>
            <OrderHistory>
                <OrderDate>2018-06-12T13:51:13.855Z</OrderDate>
                <Note>Order has been submitted/updated</Note>
                <Author>systemUser</Author>
                <Status>IN_PROGRESS</Status>
                <Difference>SubscriberType : "" --&gt; residential</Difference>
            </OrderHistory>
        </OrderHistoryWrapper>
    bulkPortinHistoryDraftExample:
      description: >-
        The following response will be returned when the bulk port-in is in
        DRAFT state
      value: |-
        <OrderHistoryWrapper>
            <IrisStatus>
                <Code>7710</Code>
                <Description>History is not supported for bulk port-ins or individual port-ins in draft status.</Description>
            </IrisStatus>
        </OrderHistoryWrapper>
    bulkPortinLoasResponseExampleJson:
      description: Successful retrieval of files associated with a bulk port-in order JSON
      value:
        fileCount: 1
        fileData:
          - fileName: eeceff88-c11e-4bd8-86f3-8e3482888500-1624044440058.pdf
            fileMetaData:
              documentName: Document Name
              documentType: LOA
        resultCode: 0
        resultMessage: LOA file list successfully returned
    bulkPortinLoasResponseExample:
      description: Successful retrieval of files associated with a bulk port-in order
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <FileListResponse>
            <FileCount>1</FileCount>
            <FileData>
                <FileName>eeceff88-c11e-4bd8-86f3-8e3482888500-1624044440058.pdf</FileName>
                <FileMetaData>
                    <DocumentName>Document Name</DocumentName>
                    <DocumentType>LOA</DocumentType>
                </FileMetaData>
            </FileData>
            <ResultCode>0</ResultCode>
            <ResultMessage>LOA file list successfully returned</ResultMessage>
        </FileListResponse>
    bulkPortinLoasUploadExampleJson:
      description: Bulk Port-in LOA file upload successful response example JSON
      value:
        fileName: 63097af1-37ae-432f-8a0d-9b0e6517a35b-1429550165581.pdf
        resultCode: 0
        resultMessage: >-
          LOA file uploaded successfully for order
          63097af1-37ae-432f-8a0d-9b0e6517a35b
    bulkPortinLoasUploadExample:
      description: Bulk Port-in LOA file upload successful response example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <FileUploadResponse>
            <FileName>63097af1-37ae-432f-8a0d-9b0e6517a35b-1429550165581.pdf</FileName>
            <ResultCode>0</ResultCode>
            <ResultMessage>LOA file uploaded successfully for order 63097af1-37ae-432f-8a0d-9b0e6517a35b</ResultMessage>
        </FileUploadResponse>
    bulkPortinListResponseExampleJson:
      description: >-
        If the orderDetails query parameter was not included, or was set to
        false, the response will look like the following
      value:
        totalCount: 3
        links:
          - first: >-
              https://api.bandwidth.com:443/v1.0/accounts/9900012/bulkPortins?page=1&size=100&orderDate=2020-06-16>
        bulkPortins:
          - orderId: 7811bc44-9f34-4c5c-97d5-51e666eb982e
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T20:02:19.156Z
            orderCreateDate: 2020-06-16T19:25:04.482Z
            portinOrderIds:
              - 24686d19-6c8d-4b8e-9e07-59bdb5dd2782
              - 5795dff2-b9cf-4989-974a-a74e7fa6a756
              - b8fc06b5-36d3-4d86-b015-13d9f994960d
              - 03442cad-61f5-4777-9299-6527bef523ca
            processingStatus: IN_PROGRESS
            requestedFocDate: 2020-06-18T16:30:00.000Z
            targetRespOrgId: JYT01
            voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
            losingResellerName: My Current Provider Name
          - orderId: d8a449c5-d3ea-426e-aa6d-a9cf5393df7e
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T18:58:54.638Z
            orderCreateDate: 2020-06-16T17:26:52.542Z
            portinOrderIds:
              - dfda81d4-6a06-4cfc-9b6e-aecf373a16cd
              - 28ce2db3-8ff6-4151-8dc4-487faf19795b
              - 3cba78e5-93aa-407a-bcf5-6ebd46b60f77
              - aa1bd5ae-d3f9-429a-91e4-34ddfe6dba1c
            processingStatus: CANCELLED
            requestedFocDate: 2020-06-19T19:00:00.000Z
          - orderId: 555e320c-a093-4e9d-97e2-03d822b78aa4
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T16:10:11.406Z
            orderCreateDate: 2020-06-16T15:52:16.607Z
            portinOrderIds:
              - 9c01d8d6-24bc-41b3-9afb-4f0b571e0a36
              - cb691fcc-fcaf-42bf-ac5d-ed073dc95219
              - 87abdd51-9aaf-4b0a-8cb6-8f5aaa0a1bb0
              - 4eeb7bbd-412e-4a53-988e-7190ad5c210f
            processingStatus: CANCELLED
            requestedFocDate: 2020-06-18T02:00:00.000Z
    bulkPortinListResponseExample2Json:
      description: >-
        If the orderDetails query parameter was included with a value of true,
        the results will look like the following
      value:
        totalCount: 3
        links:
          - first: >-
              https://api.bandwidth.com:443/v1.0/accounts/9900012/bulkPortins?page=1&size=100&orderDate=2020-06-16>
        bulkPortins:
          - accountId: 9900012
            orderId: 7811bc44-9f34-4c5c-97d5-51e666eb982e
            orderType: bulk_port_in
            suppCount: 0
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T20:02:19.156Z
            orderCreateDate: 2020-06-16T19:25:04.482Z
            locationId: 583048
            portinOrderIds:
              - 24686d19-6c8d-4b8e-9e07-59bdb5dd2782
              - 5795dff2-b9cf-4989-974a-a74e7fa6a756
              - b8fc06b5-36d3-4d86-b015-13d9f994960d
              - 03442cad-61f5-4777-9299-6527bef523ca
            processingStatus: IN_PROGRESS
            requestedFocDate: 2020-06-18T16:30:00.000Z
            targetRespOrgId: JYT01
            voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
          - accountId: 9900012
            orderId: d8a449c5-d3ea-426e-aa6d-a9cf5393df7e
            orderType: bulk_port_in
            suppCount: 0
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T18:58:54.638Z
            orderCreateDate: 2020-06-16T17:26:52.542Z
            portinOrderIds:
              - dfda81d4-6a06-4cfc-9b6e-aecf373a16cd
              - 28ce2db3-8ff6-4151-8dc4-487faf19795b
              - 3cba78e5-93aa-407a-bcf5-6ebd46b60f77
              - aa1bd5ae-d3f9-429a-91e4-34ddfe6dba1c
            processingStatus: CANCELLED
            requestedFocDate: 2020-06-19T19:00:00.000Z
            subAccountId: 202
          - accountId: 9900012
            orderId: 555e320c-a093-4e9d-97e2-03d822b78aa4
            orderType: bulk_port_in
            suppCount: 0
            companyName: WandEDemo
            lastModifiedBy: marketing
            lastModifiedDate: 2020-06-16T16:10:11.406Z
            orderCreateDate: 2020-06-16T15:52:16.607Z
            locationId: 583048
            portinOrderIds:
              - 9c01d8d6-24bc-41b3-9afb-4f0b571e0a36
              - cb691fcc-fcaf-42bf-ac5d-ed073dc95219
              - 87abdd51-9aaf-4b0a-8cb6-8f5aaa0a1bb0
              - 4eeb7bbd-412e-4a53-988e-7190ad5c210f
            processingStatus: CANCELLED
            requestedFocDate: 2020-06-18T02:00:00.000Z
            subAccountId: 202
    bulkPortinListResponseExample:
      description: >-
        If the orderDetails query parameter was not included, or was set to
        false, the response will look like the following
      value: |-
        <BulkPortinResponses>
          <TotalCount>3</TotalCount>
          <Links>
            <first>Link=&lt;https://api.bandwidth.com:443/v1.0/accounts/9900012/bulkPortins?page=1&amp;size=100&amp;orderDate=2020-06-16&gt;;rel=\"first\";</first>
          </Links>
          <BulkPortinResponse>
            <OrderId>7811bc44-9f34-4c5c-97d5-51e666eb982e</OrderId>
            <CompanyName>WandEDemo</CompanyName>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T20:02:19.156Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T19:25:04.482Z</OrderCreateDate>
            <PortinList>
              <PortinOrderId>24686d19-6c8d-4b8e-9e07-59bdb5dd2782</PortinOrderId>
              <PortinOrderId>5795dff2-b9cf-4989-974a-a74e7fa6a756</PortinOrderId>
              <PortinOrderId>b8fc06b5-36d3-4d86-b015-13d9f994960d</PortinOrderId>
              <PortinOrderId>03442cad-61f5-4777-9299-6527bef523ca</PortinOrderId>
            </PortinList>
            <ProcessingStatus>IN_PROGRESS</ProcessingStatus>
            <RequestedFocDate>2020-06-18T16:30:00.000Z</RequestedFocDate>
            <TargetRespOrgId>JYT01</TargetRespOrgId>
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
            <LosingResellerName>My Current Provider Name</LosingResellerName>
          </BulkPortinResponse>
          <BulkPortinResponse>
            <OrderId>d8a449c5-d3ea-426e-aa6d-a9cf5393df7e</OrderId>
            <CompanyName>WandEDemo</CompanyName>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T18:58:54.638Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T17:26:52.542Z</OrderCreateDate>
            <PortinList>
              <PortinOrderId>dfda81d4-6a06-4cfc-9b6e-aecf373a16cd</PortinOrderId>
              <PortinOrderId>28ce2db3-8ff6-4151-8dc4-487faf19795b</PortinOrderId>
              <PortinOrderId>3cba78e5-93aa-407a-bcf5-6ebd46b60f77</PortinOrderId>
              <PortinOrderId>aa1bd5ae-d3f9-429a-91e4-34ddfe6dba1c</PortinOrderId>
            </PortinList>
            <ProcessingStatus>CANCELLED</ProcessingStatus>
            <RequestedFocDate>2020-06-19T19:00:00.000Z</RequestedFocDate>
          </BulkPortinResponse>
          <BulkPortinResponse>
            <OrderId>555e320c-a093-4e9d-97e2-03d822b78aa4</OrderId>
            <CompanyName>WandEDemo</CompanyName>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T16:10:11.406Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T15:52:16.607Z</OrderCreateDate>
            <PortinList>
              <PortinOrderId>9c01d8d6-24bc-41b3-9afb-4f0b571e0a36</PortinOrderId>
              <PortinOrderId>cb691fcc-fcaf-42bf-ac5d-ed073dc95219</PortinOrderId>
              <PortinOrderId>87abdd51-9aaf-4b0a-8cb6-8f5aaa0a1bb0</PortinOrderId>
              <PortinOrderId>4eeb7bbd-412e-4a53-988e-7190ad5c210f</PortinOrderId>
            </PortinList>
            <ProcessingStatus>CANCELLED</ProcessingStatus>
            <RequestedFocDate>2020-06-18T02:00:00.000Z</RequestedFocDate>
          </BulkPortinResponse>
        </BulkPortinResponses>
    bulkPortinListResponseExample2:
      description: >-
        If the orderDetails query parameter was included with a value of true,
        the results will look like the following
      value: |-
        <BulkPortinResponses>
          <TotalCount>3</TotalCount>
          <Links>
            <first>Link=&lt;https://api.bandwidth.com:443/v1.0/accounts/9900012/bulkPortins?page=1&amp;size=100&amp;orderDate=2020-06-16&amp;orderDetails=true&gt;;rel=\"first\";</first>
          </Links>
          <BulkPortinResponse>
            <accountId>9900012</accountId>
            <OrderId>7811bc44-9f34-4c5c-97d5-51e666eb982e</OrderId>
            <OrderType>bulk_port_in</OrderType>
            <SuppCount>0</SuppCount>
            <CompanyName>WandEDemo</CompanyName>
            <CreatedByUser>marketing</CreatedByUser>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T20:02:19.156Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T19:25:04.482Z</OrderCreateDate>
            <PeerId>583048</PeerId>
            <PortinList>
              <PortinOrderId>24686d19-6c8d-4b8e-9e07-59bdb5dd2782</PortinOrderId>
              <PortinOrderId>5795dff2-b9cf-4989-974a-a74e7fa6a756</PortinOrderId>
              <PortinOrderId>b8fc06b5-36d3-4d86-b015-13d9f994960d</PortinOrderId>
              <PortinOrderId>03442cad-61f5-4777-9299-6527bef523ca</PortinOrderId>
            </PortinList>
            <ProcessingStatus>IN_PROGRESS</ProcessingStatus>
            <RequestedFocDate>2020-06-18T16:30:00.000Z</RequestedFocDate>
            <SiteId>202</SiteId>
            <TargetRespOrgId>JYT01</TargetRespOrgId>
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
          </BulkPortinResponse>
          <BulkPortinResponse>
            <accountId>9900012</accountId>
            <OrderId>d8a449c5-d3ea-426e-aa6d-a9cf5393df7e</OrderId>
            <OrderType>bulk_port_in</OrderType>
            <SuppCount>0</SuppCount>
            <CompanyName>WandEDemo</CompanyName>
            <CreatedByUser>marketing</CreatedByUser>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T18:58:54.638Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T17:26:52.542Z</OrderCreateDate>
            <PeerId>566974</PeerId>
            <PortinList>
              <PortinOrderId>dfda81d4-6a06-4cfc-9b6e-aecf373a16cd</PortinOrderId>
              <PortinOrderId>28ce2db3-8ff6-4151-8dc4-487faf19795b</PortinOrderId>
              <PortinOrderId>3cba78e5-93aa-407a-bcf5-6ebd46b60f77</PortinOrderId>
              <PortinOrderId>aa1bd5ae-d3f9-429a-91e4-34ddfe6dba1c</PortinOrderId>
            </PortinList>
            <ProcessingStatus>CANCELLED</ProcessingStatus>
            <RequestedFocDate>2020-06-19T19:00:00.000Z</RequestedFocDate>
            <SiteId>202</SiteId>
          </BulkPortinResponse>
          <BulkPortinResponse>
            <accountId>9900012</accountId>
            <OrderId>555e320c-a093-4e9d-97e2-03d822b78aa4</OrderId>
            <OrderType>bulk_port_in</OrderType>
            <SuppCount>0</SuppCount>
            <CompanyName>WandEDemo</CompanyName>
            <CreatedByUser>marketing</CreatedByUser>
            <LastModifiedBy>marketing</LastModifiedBy>
            <LastModifiedDate>2020-06-16T16:10:11.406Z</LastModifiedDate>
            <OrderCreateDate>2020-06-16T15:52:16.607Z</OrderCreateDate>
            <PeerId>583048</PeerId>
            <PortinList>
              <PortinOrderId>9c01d8d6-24bc-41b3-9afb-4f0b571e0a36</PortinOrderId>
              <PortinOrderId>cb691fcc-fcaf-42bf-ac5d-ed073dc95219</PortinOrderId>
              <PortinOrderId>87abdd51-9aaf-4b0a-8cb6-8f5aaa0a1bb0</PortinOrderId>
              <PortinOrderId>4eeb7bbd-412e-4a53-988e-7190ad5c210f</PortinOrderId>
            </PortinList>
            <ProcessingStatus>CANCELLED</ProcessingStatus>
            <RequestedFocDate>2020-06-18T02:00:00.000Z</RequestedFocDate>
            <SiteId>202</SiteId>
          </BulkPortinResponse>
        </BulkPortinResponses>
    bulkPortinRequestExample:
      description: Bulk Port-in Request Example
      value: |-
        <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
        <BulkPortin> 
          <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
          <RequestedFocDate>2021-06-30Z</RequestedFocDate>
          <SiteId>14020</SiteId>
          <PeerId>521434</PeerId>
          <TargetRespOrgId>JYT01</TargetRespOrgId>
          <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
        </BulkPortin>
    bulkPortinRequestExampleJson:
      description: Bulk Port-in Request Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30Z
        subAccountId: 14020
        locationId: 521434
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
    bulkPortinResponseExample:
      description: Create Bulk Port-in Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
            <BulkPortin>
                <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
                <RequestedFocDate>2021-06-30T00:00:00.000Z</RequestedFocDate>
                <SiteId>14020</SiteId>
                <PeerId>521434</PeerId>
                <ProcessingStatus>DRAFT</ProcessingStatus>
                <AccountId>9900572</AccountId>
                <CreatedByUser>testuser</CreatedByUser>
                <LastModifiedBy>testuser</LastModifiedBy>
                <TargetRespOrgId>JYT01</TargetRespOrgId>
                <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
                <LastModifiedDate>2021-06-21T19:42:34.760Z</LastModifiedDate>
                <OrderCreateDate>2021-06-21T19:42:34.760Z</OrderCreateDate>
                <OrderId>3233e096-1ce5-4a58-ba77-02a5ee1c0ef4</OrderId>
            </BulkPortin>
        </BulkPortinResponse>
    bulkPortinResponseExampleJson:
      description: Create Bulk Port-in Response Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30Z
        subAccountId: 14020
        locationId: 521434
        processingStatus: DRAFT
        accountId: 9900572
        createdByUser: testuser
        lastModifiedBy: testuser
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
        lastModifiedDate: 2021-06-21T19:42:34.760Z
        orderCreateDate: 2021-06-21T19:42:34.760Z
        orderId: 3233e096-1ce5-4a58-ba77-02a5ee1c0ef4
    bulkPortin400ResponseExample:
      description: Bulk Port-in Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
            <ResponseStatus>
                <ErrorCode>7333</ErrorCode>
                <Description>Porting is not enabled on the account.</Description>
            </ResponseStatus>
        </BulkPortinResponse>
    bulkPortin400ResponseExampleJson:
      description: Bulk Port-in Bad Request Example JSON
      value:
        errorCode: 7333
        description: Porting is not enabled on the account.
    bulkPortin409ResponseExample:
      description: Bulk Port-in 409 Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
            <ResponseStatus>
                <ErrorCode>7531</ErrorCode>
                <Description>The specified Target RespOrg ID is not a valid Bandwidth RespOrg ID.</Description>
            </ResponseStatus>
        </BulkPortinResponse>
    bulkPortin409ResponseExampleJson:
      description: Bulk Port-in 409 Response Example JSON
      value:
        errorCode: 7531
        description: The specified Target RespOrg ID is not a valid Bandwidth RespOrg ID.
    bulkPortin200ResponseExample:
      description: Bulk Port-in Successful Response Example
      value: |-
        <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
        <BulkPortinResponse>
          <BulkPortin>
            <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
            <RequestedFocDate>2021-06-30T00:00:00.000Z</RequestedFocDate>
            <SiteId>14020</SiteId>
            <PeerId>521434</PeerId>
            <ProcessingStatus>DRAFT</ProcessingStatus>
            <AccountId>9900572</AccountId>
            <Subscriber>
                <SubscriberType>BUSINESS</SubscriberType>
                <BusinessName>Porting Inc.</BusinessName>
                <ServiceAddress>
                    <HouseNumber>123</HouseNumber>
                    <StreetName>Maple Ave</StreetName>
                    <City>Hometown</City>
                    <StateCode>MO</StateCode>
                    <Zip>54923</Zip>
                </ServiceAddress>
            </Subscriber>
            <LosingResellerName>My Current Provider Name</LosingResellerName> 
            <TargetRespOrgId>JYT01</TargetRespOrgId> 
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId> 
            <CreatedByUser>testuser</CreatedByUser>
            <LastModifiedBy>testuser</LastModifiedBy>
            <LastModifiedDate>2021-06-21T19:42:34.760Z</LastModifiedDate>
            <OrderCreateDate>2021-06-21T19:42:34.760Z</OrderCreateDate>
          </BulkPortin>
        </BulkPortinResponse>
    bulkPortin200ResponseExampleJson:
      description: Bulk Port-in Successful Response Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30T00:00:00.000Z
        subAccountId: 14020
        locationId: 521434
        processingStatus: DRAFT
        accountId: 9900572
        subscriber:
          subscriberType: BUSINESS
          businessName: Porting Inc.
          serviceAddress:
            houseNumber: '123'
            streetName: Maple Ave
            city: Hometown
            stateCode: MO
            zip: '54923'
        losingResellerName: My Current Provider Name
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
        createdByUser: testuser
        lastModifiedBy: testuser
        lastModifiedDate: 2021-06-21T19:42:34.760Z
        orderCreateDate: 2021-06-21T19:42:34.760Z
    bulkPortinUpdateRequestExample:
      description: Bulk Port-in Update Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortin>
            <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
            <RequestedFocDate>2021-06-30Z</RequestedFocDate>
            <Subscriber>
                <SubscriberType>BUSINESS</SubscriberType>
                <BusinessName>Porting Inc.</BusinessName>
                <ServiceAddress>
                    <HouseNumber>123</HouseNumber>
                    <StreetName>Maple Ave</StreetName>
                    <City>Hometown</City>
                    <StateCode>MO</StateCode>
                    <Zip>54923</Zip>
                </ServiceAddress>
            </Subscriber>
            <TargetRespOrgId>JYT01</TargetRespOrgId>
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
            <SiteId>14020</SiteId>
            <PeerId>521434</PeerId>
        </BulkPortin>
    bulkPortinUpdateRequestExampleJson:
      description: Bulk Port-in Update Request Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30Z
        subscriber:
          subscriberType: BUSINESS
          businessName: Porting Inc.
          serviceAddress:
            houseNumber: '123'
            streetName: Maple Ave
            city: Hometown
            stateCode: MO
            zip: '54923'
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
        subAccountId: 14020
        locationId: 521434
    bulkPortinUpdateResponseExample:
      description: Bulk Port-in Update Response Example
      value: |-
        <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
        <BulkPortinResponse>
          <BulkPortin>
            <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
            <RequestedFocDate>2021-06-30T00:00:00.000Z</RequestedFocDate>
            <Subscriber>
              <SubscriberType>BUSINESS</SubscriberType>
              <BusinessName>Porting Inc.</BusinessName>
              <ServiceAddress>
                <HouseNumber>123</HouseNumber>
                <StreetName>Maple Ave</StreetName>
                <City>Hometown</City>
                <StateCode>MO</StateCode>
                <Zip>54923</Zip>
                <Country>United States</Country>
                <AddressType>Service</AddressType>
              </ServiceAddress>
            </Subscriber>
            <SiteId>14020</SiteId>
            <PeerId>521434</PeerId>
            <ProcessingStatus>DRAFT</ProcessingStatus>
            <AccountId>9900572</AccountId>
            <TargetRespOrgId>JYT01</TargetRespOrgId>
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
            <CreatedByUser>testuser</CreatedByUser>
            <LastModifiedBy>testuser</LastModifiedBy>
            <LastModifiedDate>2021-06-21T20:24:36.616Z</LastModifiedDate>
            <OrderCreateDate>2021-06-21T19:42:34.760Z</OrderCreateDate>
          </BulkPortin>
        </BulkPortinResponse>
    bulkPortinUpdateResponseExampleJson:
      description: Bulk Port-in Update Response Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30T00:00:00.000Z
        subscriber:
          subscriberType: BUSINESS
          businessName: Porting Inc.
          serviceAddress:
            houseNumber: '123'
            streetName: Maple Ave
            city: Hometown
            stateCode: MO
            zip: '54923'
            country: United States
            addressType: Service
        subAccountId: 14020
        locationId: 521434
        processingStatus: DRAFT
        accountId: 9900572
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
        createdByUser: testuser
        lastModifiedBy: testuser
        lastModifiedDate: 2021-06-21T20:24:36.616Z
        orderCreateDate: 2021-06-21T19:42:34.760Z
    bulkPortinUpdate400ResponseExample:
      description: Bulk Port-in Update Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
            <ResponseStatus>
                <Description>Please check your input parameters.</Description>
            </ResponseStatus>
            <PortinListErrors>
                <PortinErrors>
                    <PortinOrderId>c358cb90-f1e6-4d72-92be-435411d50609</PortinOrderId>
                    <Errors>
                        <Error>
                            <Description>The order cannot be modified because the order is awaiting a response from the losing carrier</Description>
                            <ErrorCode>7300</ErrorCode>
                        </Error>
                    </Errors>
                </PortinErrors>
                <PortinErrors>
                    <PortinOrderId>cb57e5a0-c70d-4f24-a450-bab62e908cc6</PortinOrderId>
                    <Errors>
                        <Error>
                            <Description>Unable to modify processing status for AUTOMATED port type</Description>
                            <ErrorCode>7367</ErrorCode>
                        </Error>
                    </Errors>
                </PortinErrors>
            </PortinListErrors>
        </BulkPortinResponse>
    bulkPortinUpdate400ResponseExampleJson:
      description: Bulk Port-in Update Bad Request Example JSON
      value:
        portinErrors:
          - portinOrderId: c358cb90-f1e6-4d72-92be-435411d50609
            description: >-
              The order cannot be modified because the order is awaiting a
              response from the losing carrier
            code: 7300
          - portinOrderId: cb57e5a0-c70d-4f24-a450-bab62e908cc6
            description: Unable to modify processing status for AUTOMATED port type
            code: 7367
    bulkPortinDelete400ResponseExample:
      description: Bulk Port-in Delete Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
          <BulkPortin>
            <Status>
              <Code>7709</Code>
              <Description>Bulk port-in with id d88763f4-8914-4301-bdca-6f409e4cd811 cannot be deleted since it is not in
                  draft status.
              </Description>
            </Status>
          </BulkPortin>
        </BulkPortinResponse>
    bulkPortinDelete400ResponseExampleJson:
      description: Bulk Port-in Delete Bad Request Example JSON
      value:
        errorCode: 7709
        description: >-
          Bulk port-in with id d88763f4-8914-4301-bdca-6f409e4cd811 cannot be
          deleted since it is not in draft status.
    bulkPortinPatch200ResponseExample:
      description: Bulk Port-in Patch Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
          <BulkPortin>
            <CustomerOrderId>Order Id for all child orders</CustomerOrderId>
            <RequestedFocDate>2021-06-30T00:00:00.000Z</RequestedFocDate>
            <Subscriber>
              <SubscriberType>BUSINESS</SubscriberType>
              <BusinessName>Porting Inc.</BusinessName>
              <ServiceAddress>
                <HouseNumber>123</HouseNumber>
                <StreetName>Maple Ave</StreetName>
                <City>Hometown</City>
                <StateCode>MO</StateCode>
                <Zip>54923</Zip>
                <Country>United States</Country>
                <AddressType>Service</AddressType>
              </ServiceAddress>
            </Subscriber>
            <SiteId>14020</SiteId>
            <TargetRespOrgId>JYT01</TargetRespOrgId>
            <VoiceConfigurationPackageId>6611bc44-9f34-4c5c-97d5-51e666eb982e</VoiceConfigurationPackageId>
            <PeerId>521434</PeerId>
            <ProcessingStatus>DRAFT</ProcessingStatus>
            <AccountId>9900572</AccountId>
            <CreatedByUser>testuser</CreatedByUser>
            <LastModifiedBy>testuser</LastModifiedBy>
            <LastModifiedDate>2021-06-22T14:25:24.487Z</LastModifiedDate>
            <OrderCreateDate>2021-06-21T19:42:34.760Z</OrderCreateDate>
          </BulkPortin>
        </BulkPortinResponse>
    bulkPortinPatch200ResponseExampleJson:
      description: Bulk Port-in Patch Response Example JSON
      value:
        customerOrderId: Order Id for all child orders
        requestedFocDate: 2021-06-30T00:00:00.000Z
        subscriber:
          subscriberType: BUSINESS
          businessName: Porting Inc.
          serviceAddress:
            houseNumber: '123'
            streetName: Maple Ave
            city: Hometown
            stateCode: MO
            zip: '54923'
            country: United States
            addressType: Service
        subAccountId: 14020
        targetRespOrgId: JYT01
        voiceConfigurationPackageId: 6611bc44-9f34-4c5c-97d5-51e666eb982e
        locationId: 521434
        processingStatus: DRAFT
        accountId: 9900572
        createdByUser: testuser
        lastModifiedBy: testuser
        lastModifiedDate: 2021-06-22T14:25:24.487Z
        orderCreateDate: 2021-06-21T19:42:34.760Z
    bulkPortinPatch400ResponseExample:
      description: Bulk Port-in Patch 400 Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <BulkPortinResponse>
            <ResponseStatus>
                <Description>Please check your input parameters.</Description>
            </ResponseStatus>
            <PortinListErrors>
                <PortinErrors>
                    <PortinOrderId>c358cb90-f1e6-4d72-92be-435411d50609</PortinOrderId>
                    <Errors>
                        <Error>
                            <Description>The order cannot be modified because the order is awaiting a response from the losing carrier</Description>
                            <ErrorCode>7300</ErrorCode>
                        </Error>
                    </Errors>
                </PortinErrors>
                <PortinErrors>
                    <PortinOrderId>cb57e5a0-c70d-4f24-a450-bab62e908cc6</PortinOrderId>
                    <Errors>
                        <Error>
                            <Description>Unable to modify processing status for AUTOMATED port type</Description>
                            <ErrorCode>7367</ErrorCode>
                        </Error>
                    </Errors>
                </PortinErrors>
            </PortinListErrors>
        </BulkPortinResponse>
    bulkPortinPatch400ResponseExampleJson:
      description: Bulk Port-in Patch 400 Response Example
      value:
        portinErrors:
          - portinOrderId: c358cb90-f1e6-4d72-92be-435411d50609
            description: >-
              The order cannot be modified because the order is awaiting a
              response from the losing carrier
            code: 7300
          - portinOrderId: cb57e5a0-c70d-4f24-a450-bab62e908cc6
            description: Unable to modify processing status for AUTOMATED port type
            code: 7367
    bulkPortinChildList200Example:
      description: Bulk Port-in Port-in List Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <PortinListResponse>
            <PortinList>
                <PortinOrderId>33d387f8-d60b-4e20-9c31-5b68a4ef4b0a</PortinOrderId>
                <PortinOrderId>0021cde5-99d7-4be3-afcd-a8803374921a</PortinOrderId>
                <!-- SNIP -->
                <PortinOrderId>7b0e5e38-ce93-4d29-8882-d3b5c4a37e56</PortinOrderId>
                <PortinOrderId>c6512b78-d44f-419f-9836-eaae408e3149</PortinOrderId>
            </PortinList>
            <Errors>
                <Error>
                    <ErrorCode>1234</ErrorCode>
                    <portinOrderId>0021cde5-99d7-4be3-afcd-a8803374921a</portinOrderId>
                    <Description>string</Description>
                </Error>
                <Error>
                    <ErrorCode>5678</ErrorCode>
                    <portinOrderId>c6512b78-d44f-419f-9836-eaae408e3149</portinOrderId>
                    <Description>string</Description>
                </Error>
            </Errors>
        </PortinListResponse>
    bulkPortinChildList200ExampleJson:
      description: Bulk Port-in Port-in List Example JSON
      value:
        portinOrderIds:
          - 33d387f8-d60b-4e20-9c31-5b68a4ef4b0a
          - 0021cde5-99d7-4be3-afcd-a8803374921a
          - 7b0e5e38-ce93-4d29-8882-d3b5c4a37e56
          - c6512b78-d44f-419f-9836-eaae408e3149
        portinErrors:
          - code: 1234
            portinOrderId: c6512b78-d44f-419f-9836-eaae408e3149
            description: string
    bulkPortinChildListRequestExample:
      description: Bulk Port-in Update Port-in List Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <PortinList>
            <PortinOrderId>33d387f8-d60b-4e20-9c31-5b68a4ef4b0a</PortinOrderId>
            <PortinOrderId>0021cde5-99d7-4be3-afcd-a8803374921a</PortinOrderId>
            <!-- SNIP -->
            <PortinOrderId>7b0e5e38-ce93-4d29-8882-d3b5c4a37e56</PortinOrderId>
            <PortinOrderId>c6512b78-d44f-419f-9836-eaae408e3149</PortinOrderId>
        </PortinList>
    bulkPortinChildListRequestExampleJson:
      description: Bulk Port-in Update Port-in List Request Example JSON
      value:
        portinOrderIds:
          - 33d387f8-d60b-4e20-9c31-5b68a4ef4b0a
          - 0021cde5-99d7-4be3-afcd-a8803374921a
          - 7b0e5e38-ce93-4d29-8882-d3b5c4a37e56
          - c6512b78-d44f-419f-9836-eaae408e3149
    bulkPortinUpdateChildList200Example:
      description: Bulk Port-in Update Port-in List Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <PortinListResponse>
          <PortinList>
            <PortinOrderId>33d387f8-d60b-4e20-9c31-5b68a4ef4b0a</PortinOrderId>
            <PortinOrderId>0021cde5-99d7-4be3-afcd-a8803374921a</PortinOrderId>
            <PortinOrderId>7b0e5e38-ce93-4d29-8882-d3b5c4a37e56</PortinOrderId>
            <PortinOrderId>c6512b78-d44f-419f-9836-eaae408e3149</PortinOrderId>
          </PortinList>
        </PortinListResponse>
    bulkPortinUpdateChildList200ExampleJson:
      description: Bulk Port-in Update Port-in List Example JSON
      value:
        portinOrderIds:
          - 33d387f8-d60b-4e20-9c31-5b68a4ef4b0a
          - 0021cde5-99d7-4be3-afcd-a8803374921a
          - 7b0e5e38-ce93-4d29-8882-d3b5c4a37e56
          - c6512b78-d44f-419f-9836-eaae408e3149
    bulkPortinNotesResponseExample:
      description: Bulk Port-in Notes Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Notes>
            <Note>
                <Id>87037</Id>
                <UserId>jbm</UserId>
                <Description>This is a test note</Description>
                <LastDateModified>2014-11-16T04:01:10.000Z</LastDateModified>
                <Internal>false</Internal>
            </Note>
            <Note>
                <Id>87039</Id>
                <UserId>smckinnon</UserId>
                <Description>This is a second test note</Description>
                <LastDateModified>2014-11-16T04:08:46.000Z</LastDateModified>
                <Internal>true</Internal>
            </Note>
        </Notes>
    bulkPortinNotesResponseExampleJson:
      description: Bulk Port-in Notes Response Example JSON
      value:
        notes:
          - id: '87037'
            userId: jbm
            description: This is a test note
            lastModifiedDate: 2014-11-16T04:01:10.000Z
            internal: true
          - id: '87039'
            userId: smckinnon
            description: This is a second test note
            lastModifiedDate: 2014-11-16T04:08:46.000Z
            internal: true
    bulkPortinNotesRequestExample:
      description: Bulk Port-in Notes Request Example
      value: |-
        <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
        <Note>
          <UserId>userId</UserId>
          <!-- note the userId must match the logged-in user -->
          <Description>note text</Description>
        </Note>
    bulkPortinNotesRequestExampleJson:
      description: Bulk Port-in Notes Request Example JSON
      value:
        userId: userId
        description: note text
    bulkPortinNotes400ResponseExample:
      description: Bulk Port-in Notes Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <NoteResponse>
            <ResponseStatus>
                <ErrorCode>12501</ErrorCode>
                <Description>Username is required</Description>
            </ResponseStatus>
        </NoteResponse>
    bulkPortinNotes400ResponseExampleJson:
      description: Bulk Port-in Notes Bad Request Example JSON
      value:
        errorCode: 12501
        description: Username is required
    bulkPortinNotesUpdateRequestExample:
      description: Bulk Port-in Notes Update Request
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Note>
          <UserId>userId</UserId>
          <Description>note text</Description>
        </Note>
    bulkPortinNotesUpdateRequestExampleJson:
      description: Bulk Port-in Notes Update Request Example JSON
      value:
        userId: userId
        description: note text
    bulkPortinNotesUpdate400ResponseExample:
      description: Bulk Port-in Notes Update Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <NoteResponse>
            <ResponseStatus>
                <ErrorCode>12501</ErrorCode>
                <Description>Username is required</Description>
            </ResponseStatus>
        </NoteResponse>
    bulkPortinNotesUpdate400ResponseExampleJson:
      description: Bulk Port-in Notes Update Bad Request Example JSON
      value:
        errorCode: 12501
        description: Username is required
    tnListResponseDraftExample:
      description: Example response for DRAFT state
      value: |-
        <TnListResponse>
          <ProcessingStatus>DRAFT</ProcessingStatus>
          <OrderId>33b58246-f27c-4b1d-896d-0acc03b3ad8a</OrderId>
          <PortableTnList/>
        </TnListResponse>
    tnListResponseDraftExampleJson:
      description: Example response for DRAFT state
      value:
        processingStatus: DRAFT
        orderId: 33b58246-f27c-4b1d-896d-0acc03b3ad8a
        portablePhoneNumbers:
          - '+14047221089'
          - '+17013498774'
    tnListResponseValidateDraftTnsExample:
      description: Example response for VALIDATE_DRAFT_TNS state
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnListResponse>
          <ProcessingStatus>VALIDATE_DRAFT_TNS</ProcessingStatus>
          <OrderId>33b58246-f27c-4b1d-896d-0acc03b3ad8a</OrderId>
          <NotValidatedTnList>
            <Tn>+18772397726</Tn>
            <Tn>+18006148733</Tn>
            <Tn>+14047221089</Tn>
            <Tn>+17013498774</Tn>
          </NotValidatedTnList>
        </TnListResponse>
    tnListResponseValidateDraftTnsExampleJson:
      description: Example response for VALIDATE_DRAFT_TNS state
      value:
        processingStatus: VALIDATE_DRAFT_TNS
        orderId: 33b58246-f27c-4b1d-896d-0acc03b3ad8a
        notValidatedPhoneNumbersList:
          - '+18772397726'
          - '+18006148733'
          - '+14047221089'
          - '+17013498774'
    tnListResponseValidDraftTnsExample:
      description: Example response for VALID_DRAFT_TNS state
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnListResponse>
          <ProcessingStatus>VALID_DRAFT_TNS</ProcessingStatus>
          <OrderId>33b58246-f27c-4b1d-896d-0acc03b3ad8a</OrderId>
          <ChildPortinOrderList>
            <ChildPortinOrder>
              <OrderId>10f48fec-9db0-4f68-8bcb-c8a6a230a2d9</OrderId>
              <TnList>
                <Tn>+18772397726</Tn>
              </TnList>
            </ChildPortinOrder>
            <ChildPortinOrder>
              <OrderId>059cf2d9-a004-4a88-866c-082c97fb7d5f</OrderId>
              <TnList>
                <Tn>+18006148733</Tn>
              </TnList>
            </ChildPortinOrder>
            <ChildPortinOrder>
              <OrderId>092815dc-9ced-4d67-a070-a80eb243b914</OrderId>
              <TnList>
                <Tn>+14047221089</Tn>
                <Tn>+17013498774</Tn>
              </TnList>
            </ChildPortinOrder>
          </ChildPortinOrderList>
        </TnListResponse>
    tnListResponseValidDraftTnsExampleJson:
      description: Example response for VALID_DRAFT_TNS state
      value:
        processingStatus: VALID_DRAFT_TNS
        orderId: 33b58246-f27c-4b1d-896d-0acc03b3ad8a
        childPortinOrders:
          - orderId: 10f48fec-9db0-4f68-8bcb-c8a6a230a2d9
            phoneNumbers:
              - '+18772397726'
          - orderId: 059cf2d9-a004-4a88-866c-082c97fb7d5f
            phoneNumbers:
              - '+18006148733'
          - orderId: 092815dc-9ced-4d67-a070-a80eb243b914
            phoneNumbers:
              - '+14047221089'
              - '+17013498774'
    tnListResponseNonPortableInvalidDraftTnsExample:
      description: Example response for INVALID_DRAFT_TNS state with non-portable numbers
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnListResponse>
          <ProcessingStatus>INVALID_DRAFT_TNS</ProcessingStatus>
          <OrderId>33b58246-f27c-4b1d-896d-0acc03b3ad8a</OrderId>
          <!-- If at least one Tn is portable -->
          <PortableTnList>
            <Tn>+18772397726</Tn>
          </PortableTnList>
          <ChildPortinOrder>
            <OrderId>10f48fec-9db0-4f68-8bcb-c8a6a230a2d9</OrderId>
            <TnList>
              <Tn>+18772397726</Tn>
            </TnList>
          </ChildPortinOrder>
          <ErrorList>
            <Error>
              <Code>7642</Code>
              <Description>Tn list contains at least one toll free number that cannot be ported due to spare status.</Description>
              <TnList>
                <Tn>+18005587721</Tn>
              </TnList>
            </Error>
            <Error>
              <Code>7643</Code>
              <Description>Tn list contains at least one toll free number that cannot be ported due to unavailable status.</Description>
              <TnList>
                <Tn>+17225098835</Tn>
              </TnList>
            </Error>
          </ErrorList>
        </TnListResponse>
    tnListResponseNonPortableInvalidDraftTnsExampleJson:
      description: Example response for INVALID_DRAFT_TNS state with non-portable numbers
      value:
        processingStatus: INVALID_DRAFT_TNS
        orderId: 33b58246-f27c-4b1d-896d-0acc03b3ad8a
        portablePhoneNumbers:
          - '+18772397726'
        childPortinOrders:
          - orderId: 10f48fec-9db0-4f68-8bcb-c8a6a230a2d9
            phoneNumbers:
              - '+18772397726'
        portinErrors:
          - errorCode: 7642
            description: >-
              Tn list contains at least one toll free number that cannot be
              ported due to spare status.
            phoneNumbers:
              - '+18005587721'
          - errorCode: 7643
            description: >-
              Tn list contains at least one toll free number that cannot be
              ported due to unavailable status.
            phoneNumbers:
              - '+17225098835'
    tnListResponseVendorErrorInvalidDraftTnsExample:
      description: Example response for INVALID_DRAFT_TNS state with vendor error
      value: |-
        <TnListResponse>
          <ProcessingStatus>INVALID_DRAFT_TNS</ProcessingStatus>
          <OrderId>33b58246-f27c-4b1d-896d-0acc03b3ad8a</OrderId>
          <PortableTnList/>
          <ErrorList>
            <Error>
              <Code>7628</Code>
              <Description>An unexpected Batch Number Query response was received from our porting vendor. Please contact Bandwidth for assistance with this error.</Description>
              <TnList>
                <Tn>+18772397726</Tn>
                <Tn>+18006148733</Tn>
                <Tn>+14047221089</Tn>
                <Tn>+17013498774</Tn>
              </TnList>
            </Error>
          </ErrorList>
        </TnListResponse>
    tnListResponseVendorErrorInvalidDraftTnsExampleJson:
      description: Example response for INVALID_DRAFT_TNS state with vendor error JSON
      value:
        processingStatus: INVALID_DRAFT_TNS
        orderId: 33b58246-f27c-4b1d-896d-0acc03b3ad8a
        portablePhoneNumbers: []
        portinErrors:
          - errorCode: 7628
            description: >-
              An unexpected Batch Number Query response was received from our
              porting vendor. Please contact Bandwidth for assistance with this
              error.
            phoneNumbers:
              - '+18772397726'
              - '+18006148733'
              - '+14047221089'
              - '+17013498774'
    tnListUpdateRequestExample:
      description: Bulk Port-in TnList Update Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnList>
            <Tn>+18772397726</Tn>
            <Tn>+18006148733</Tn>
            <!-- SNIP -->
            <Tn>+14047221089</Tn>
            <Tn>+17013498774</Tn>
        </TnList>
    tnListUpdateRequestExampleJson:
      description: Bulk Port-in TnList Update Request Example JSON
      value:
        phoneNumbers:
          - '+18772397726'
          - '+18006148733'
          - '+14047221089'
          - '+17013498774'
    tnListUpdateResponseExample:
      description: Bulk Port-in TnList Successful Response Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnListResponse>
          <OrderId>ac2c8ab2-7a63-44da-a307-edcabe0b6c81</OrderId>
          <ProcessingStatus>VALIDATE_DRAFT_TNS</ProcessingStatus>
        </TnListResponse>
    tnListUpdateResponseExampleJson:
      description: TnList Successful Response Example JSON
      value:
        orderId: ac2c8ab2-7a63-44da-a307-edcabe0b6c81
        processingStatus: VALIDATE_DRAFT_TNS
    tnListUpdate400ResponseExample:
      description: Bulk Port-in TnList Bad Request Example
      value: |-
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <TnListResponse>
          <ResponseStatus>
            <ErrorCode>7339</ErrorCode>
            <Description>Telephone numbers '[+15032241124, +18632167633, +19133648872, +18882889734]' are not valid</Description>
          </ResponseStatus>
          <OrderId>ac2c8ab2-7a63-44da-a307-edcabe0b6c81</OrderId>
          <ProcessingStatus>INVALID_DRAFT_TNS</ProcessingStatus>
        </TnListResponse>
    tnListUpdate400ResponseExampleJson:
      description: Bulk Port-in TnList Bad Request Example JSON
      value:
        orderId: ac2c8ab2-7a63-44da-a307-edcabe0b6c81
        processingStatus: INVALID_DRAFT_TNS
        errorCode: 7339
        description: >-
          Invalid telephone numbers '[+15032241124, +18632167633, +19133648872,
          +18882889734]'
tags:
  - name: Bulk Port-In
servers:
  - url: https://api.bandwidth.com/api/v2
    description: Production
  - url: https://test.api.bandwidth.com/api/v2
    description: Test
