nCino Doc Package Orders API

Endpoints pertaining to doc package orders

OpenAPI Specification

ncino-doc-package-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: nCino Mortgage Doc Package Orders API
  description: API framework built from the ground up to be more a robust, forward thinking solution with tools to support our developer community
  version: '1.0'
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.ncinomortgage.com
  description: Production server
security:
- OAuth2: []
tags:
- name: Doc Package Orders
  description: Endpoints pertaining to doc package orders
paths:
  /loans/{loan_id}/doc_package_orders:
    get:
      tags:
      - Doc Package Orders
      operationId: doc_package_orders-index
      parameters:
      - name: doc_vendor
        description: Filter by document vendor.
        required: false
        in: query
        schema:
          type: string
      - name: doc_vendor_order_id
        description: Filter by vendor order ID.
        required: false
        in: query
        schema:
          type: string
      - name: loan_id
        description: Loan GUID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: order_group_id
        description: Filter by order group ID. Use to poll all orders created by a single create request.
        required: false
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/CreatedAfter'
      - $ref: '#/components/parameters/CreatedBefore'
      - $ref: '#/components/parameters/UpdatedAfter'
      - $ref: '#/components/parameters/UpdatedBefore'
      - $ref: '#/components/parameters/ApiVersionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocPackageOrderPagination'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      description: '> 🚧 Under construction

        > **This endpoint is in beta.** Functionality may change without notice, support is limited, and use in production is not recommended. Your feedback is appreciated.


        This endpoint will retrieve all doc package orders for a <<glossary:loan>>.'
      summary: 🚧 List doc package orders for a loan (BETA)
    post:
      tags:
      - Doc Package Orders
      operationId: doc_package_orders-create
      parameters:
      - name: loan_id
        description: Loan GUID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/ApiVersionHeader'
      responses:
        '202':
          description: Doc package orders accepted for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocPackageOrderAccepted'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '409':
          description: Orders already in progress for this loan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSet'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '400':
          description: No eligible borrower pairs found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSet'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      description: '> 🚧 Under construction

        > **This endpoint is in beta.** Functionality may change without notice, support is limited, and use in production is not recommended. Your feedback is appreciated.


        This endpoint will create a <<glossary:doc package order>> for each borrower pair on a <<glossary:loan>>

        and process them asynchronously. Poll the index endpoint with the returned

        `order_group_id` to track status.'
      summary: 🚧 Create doc package orders for a loan (BETA)
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocPackageOrderPostBody'
    patch:
      tags:
      - Doc Package Orders
      operationId: doc_package_orders-update
      parameters:
      - name: loan_id
        description: Loan GUID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/ApiVersionHeader'
      responses:
        '202':
          description: Failed doc package orders accepted for retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocPackageOrderAccepted'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '404':
          description: No doc package orders found for the given order_group_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSet'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '409':
          description: No failed orders to reset, orders already processing, or lock contention
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSet'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      description: '> 🚧 Under construction

        > **This endpoint is in beta.** Functionality may change without notice, support is limited, and use in production is not recommended. Your feedback is appreciated.


        This endpoint will retry all failed <<glossary:doc package order>> for a given order group on a

        <<glossary:loan>>. Optionally, a subset of doc package order IDs can be passed to retry only

        those specific orders. Poll the index endpoint with the returned `order_group_id`

        to track status.'
      summary: 🚧 Retry failed doc package orders for a loan (BETA)
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocPackageOrderPatchBody'
  /loans/{loan_id}/doc_package_orders/{doc_package_order_id}:
    get:
      tags:
      - Doc Package Orders
      operationId: doc_package_orders-show
      parameters:
      - name: doc_package_order_id
        description: Doc package order GUID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: loan_id
        description: Loan GUID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/ApiVersionHeader'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocPackageOrder'
          headers:
            X-Api-Version:
              $ref: '#/components/headers/ApiVersionResponseHeader'
            X-Api-Supported-Versions:
              $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      description: '> 🚧 Under construction

        > **This endpoint is in beta.** Functionality may change without notice, support is limited, and use in production is not recommended. Your feedback is appreciated.


        This endpoint will retrieve a single doc package order for a <<glossary:loan>>.'
      summary: 🚧 Retrieve a doc package order (BETA)
components:
  responses:
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSet'
      headers:
        X-Api-Version:
          $ref: '#/components/headers/ApiVersionResponseHeader'
        X-Api-Supported-Versions:
          $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSet'
      headers:
        X-Api-Version:
          $ref: '#/components/headers/ApiVersionResponseHeader'
        X-Api-Supported-Versions:
          $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
    NotFoundError:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSet'
      headers:
        X-Api-Version:
          $ref: '#/components/headers/ApiVersionResponseHeader'
        X-Api-Supported-Versions:
          $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSet'
      headers:
        X-Api-Version:
          $ref: '#/components/headers/ApiVersionResponseHeader'
        X-Api-Supported-Versions:
          $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
    BadRequestError:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSet'
      headers:
        X-Api-Version:
          $ref: '#/components/headers/ApiVersionResponseHeader'
        X-Api-Supported-Versions:
          $ref: '#/components/headers/ApiSupportedVersionsResponseHeader'
  schemas:
    OrderType:
      type: string
      enum:
      - opening
      - closing
      - forms
      description: Order type enum key.
    AbstractResourceModel:
      allOf:
      - $ref: '#/components/schemas/AbstractModel'
      - type: object
        properties:
          id:
            type: string
            format: uuid
            description: Unique identifier for the record.
        required:
        - id
        additionalProperties: false
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique ID (useful as a reference when debugging an error with support)
        status:
          type: integer
          description: The HTTP status code
        title:
          type: string
          description: A generic title
        detail:
          type: string
          description: A detailed message
        _links:
          type: object
          description: A list of relevant links
      required:
      - id
      - status
      - title
      example:
        id: 123abc
        status: 400
        title: Generic title for the error
        detail: Detailed message for the error
        _links:
          resource: contextual resource if applicable
    RecipientRoleType:
      type: string
      enum:
      - additional_contact
      - Appointment of Designee
      - Borrower
      - Builder
      - Buyer's Agent
      - Buyer's Attorney
      - Closer
      - CoBorrower
      - Doc Prep By
      - Escrow Agent
      - Escrow Company
      - Loan Officer
      - Loan Processor
      - One off Doc Recipient
      - Seller's Agent
      - Seller's Attorney
      - Settlement Agent
      - Title Company
      description: Recipient role type enum key.
    AbstractModel:
      type: object
      properties:
        _self:
          type: string
          description: The model's resource link to itself.
        _type:
          type: string
          description: The model's type.
        _links:
          type: object
          description: A list of links for the model's associations.
      required:
      - _self
      - _type
      additionalProperties: false
    DocPackageOrderRecipient:
      type: object
      properties:
        role:
          allOf:
          - $ref: '#/components/schemas/RecipientRoleType'
          description: The recipient's role.
        email:
          type:
          - string
          - 'null'
          description: The recipient's email address.
        phone:
          type:
          - string
          - 'null'
          description: The recipient's phone number. (###-###-####)
        full_name:
          type:
          - string
          - 'null'
          description: The recipient's full name.
      description: An additional recipient to be added to the package.
      additionalProperties: false
    PackageType:
      type: string
      enum:
      - initial
      - closing
      - pre_closing
      - requested_docs
      - sent_docs
      - post_consummation
      - hybrid
      - hybrid_ron
      description: Disclosure package type enum key.
    ErrorSet:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      required:
      - errors
      example:
        errors:
        - id: 123abc
          status: 400
          title: Generic title for the error
          detail: Detailed message for the error
          _links:
            resource: contextual resource if applicable
    ClosingDocToRemove:
      type: object
      properties:
        name:
          type: string
          description: The document name. Use 'ENOTE' to target the eNote.
        guid:
          type: string
          description: The document GUID to remove from the package.
      required:
      - name
      - guid
      description: 'A document to remove from a closing package. The document is matched by `guid`;

        `name` is used to detect the eNote. Only applicable when order type is ''closing''.'
      additionalProperties: false
    DocPackageOrderAuditFailure:
      type: object
      properties:
        description:
          type: string
          description: Human-readable description of the failed audit rule.
        field_ids:
          type: array
          items:
            type: string
          description: Encompass field IDs associated with the failure. May be empty.
        severity:
          type: string
          description: Severity of the rule, e.g. "Required" or "Recommended".
      description: A single field-level audit rule failure from the Encompass data audit.
      additionalProperties: false
    DocVendor:
      type: string
      enum:
      - encompass
      description: Doc vendor type enum key.
    AbstractPagination:
      allOf:
      - $ref: '#/components/schemas/AbstractCollection'
      - type: object
        properties:
          total_pages:
            type: integer
            description: The total number of pages in the collection.
          total:
            type: integer
            description: The total number of items in the collection.
        additionalProperties: false
    DocPackageOrderPagination:
      allOf:
      - $ref: '#/components/schemas/AbstractPagination'
      - type: object
        properties:
          contents:
            type: array
            items:
              $ref: '#/components/schemas/DocPackageOrder'
        required:
        - contents
    DocPackageOrderAccepted:
      type: object
      properties:
        order_group_id:
          type: string
          format: uuid
          description: Shared identifier for all orders created by this request.
        message:
          type: string
          description: Description of how to poll for status.
      required:
      - order_group_id
      - message
      description: 'Response returned when doc package orders have been accepted for async processing.

        Poll GET /loans/{loan_id}/doc_package_orders?order_group_id={order_group_id} to track status.'
      additionalProperties: false
    RonJurisdictionInfo:
      type: object
      properties:
        ron_jurisdiction_id:
          type: string
          description: Recording jurisdiction identifier from the RON vendor.
        ron_title_agency_id:
          type: string
          description: Title agency identifier from the RON vendor.
        ron_title_underwriter_id:
          type: string
          description: Underwriter identifier from the RON vendor.
      required:
      - ron_jurisdiction_id
      - ron_title_agency_id
      - ron_title_underwriter_id
      description: 'The RON jurisdiction, title agency, and underwriter used to determine where to create

        the RON transaction. Only applicable when closing package type is ''HybridRON''.'
      additionalProperties: false
    DocPackageOrder:
      allOf:
      - $ref: '#/components/schemas/AbstractResourceModel'
      - type: object
        properties:
          status:
            type: string
            description: The status of the doc package order.
          error:
            type:
            - string
            - 'null'
            description: Error message if the order failed.
          audit_failures:
            type:
            - array
            - 'null'
            items:
              $ref: '#/components/schemas/DocPackageOrderAuditFailure'
            description: Field-level audit failures when the order failed a data audit. Null for non-audit failures and orders that have not failed.
          doc_vendor_order_id:
            type:
            - string
            - 'null'
            description: The vendor's order ID.
          doc_vendor:
            type: string
            description: The document vendor.
          created_at:
            type: string
            format: date-time
            description: Timestamp of when the order was created.
          updated_at:
            type: string
            format: date-time
            description: Timestamp of when the order was last modified.
        additionalProperties: false
      description: Doc package order model
    AbstractCollection:
      allOf:
      - $ref: '#/components/schemas/AbstractModel'
      - type: object
        properties:
          contents:
            type: array
            items:
              type: object
            description: The contents for the collection.
        required:
        - contents
        additionalProperties: false
    DocPackageOrderPostBody:
      type: object
      properties:
        doc_vendor:
          allOf:
          - $ref: '#/components/schemas/DocVendor'
          description: The document vendor. Defaults to 'encompass'.
        order_type:
          allOf:
          - $ref: '#/components/schemas/OrderType'
          description: The order type. Defaults to 'opening'.
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/DocPackageOrderRecipient'
          description: The list of additional recipients to be added to the package. Defaults to an empty array.
        package_type:
          allOf:
          - $ref: '#/components/schemas/PackageType'
          description: The disclosure package type. For 'closing' orders, one of 'closing'/'hybrid'/'hybrid_ron' (subject to servicer eClosing settings); for 'forms' orders, the package type to file the generated forms under (e.g. 'sent_docs'). Required for 'closing' and 'forms' order types; ignored for 'opening'.
        final_package:
          type: boolean
          description: Indicates if this is a final or draft package. Only applicable when order type is 'closing'. Defaults to 'false'.
        include_enote:
          type: boolean
          description: Indicates if an eNote should be added to the package. Only applicable when order type is 'closing'. Defaults to 'false'.
        use_existing_enote:
          type: boolean
          description: Indicates if a previously existing eNote should be used instead of creating a new eNote. Only applicable when order type is 'closing'. Defaults to 'false'.
        borrower_pair_ids:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Optional list of borrower pair IDs to create orders for. Only valid pair IDs associated with the loan will be processed. Ignored when order_type is "closing".
        closing_docs_to_remove:
          type: array
          items:
            $ref: '#/components/schemas/ClosingDocToRemove'
          description: The list of documents to remove from a closing package. Only applicable when order type is 'closing'. Defaults to an empty array.
        ron_jurisdiction_info:
          allOf:
          - $ref: '#/components/schemas/RonJurisdictionInfo'
          description: The RON jurisdiction used to determine where to create the RON transaction. Only applicable when package type is 'hybrid_ron'. Defaults to nil.
        templates:
          type: array
          items:
            type: string
          description: The list of Encompass form/template names to generate (e.g. "Loan Estimate"). Required when order type is 'forms'; ignored otherwise.
      description: Available properties for creating doc package orders
      additionalProperties: false
    DocPackageOrderPatchBody:
      type: object
      properties:
        order_group_id:
          type: string
          format: uuid
          description: The order group ID returned by the create endpoint.
        doc_package_order_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
          description: Optional subset of doc package order IDs to retry. When omitted, all failed orders in the group are retried.
      required:
      - order_group_id
      description: Available properties for retrying failed doc package orders
      additionalProperties: false
  parameters:
    ApiVersionHeader:
      name: X-Api-Version
      description: Specify API version, for example '1.0'. By default, the version configured in the company settings is used.
      required: false
      in: header
      schema:
        type: string
    CreatedBefore:
      name: created_before
      description: The date which a resource must be created before to be returned.
      required: false
      in: query
      schema:
        type: string
        format: date-time
    UpdatedBefore:
      name: updated_before
      description: The date which a resource must be updated before to be returned.
      required: false
      in: query
      schema:
        type: string
        format: date-time
    Page:
      name: page
      description: The page to retrieve.
      required: false
      in: query
      schema:
        type: integer
    UpdatedAfter:
      name: updated_after
      description: The date which a resource must be updated after to be returned.
      required: false
      in: query
      schema:
        type: string
        format: date-time
    PageSize:
      name: page_size
      description: The number of records returned in each page.
      required: false
      in: query
      schema:
        type: integer
    CreatedAfter:
      name: created_after
      description: The date which a resource must be created after to be returned.
      required: false
      in: query
      schema:
        type: string
        format: date-time
  headers:
    ApiSupportedVersionsResponseHeader:
      description: API supported versions for endpoint.
      schema:
        type: string
    ApiVersionResponseHeader:
      description: API version.
      schema:
        type: string
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 Access Token (Default)
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes: {}