What Is NLDocSearch?

NLDocSearch (NLDS) is a platform that ingests mortgage documents, validates and indexes them asynchronously, and provides controlled document access for client-facing workflows.

Before You Read the API Reference

Read the Getting Started guide first. It explains all constructs (company, product, case, external IDs, and upload flow) with annotated examples before you start calling APIs.

Authentication

All endpoints require an OAuth2 Bearer token obtained via the AuthX machine client credentials flow.

Token endpoint:

POST /authx/oauth2/token
grant_type=client_credentials
client_id=<your-client-id>
client_secret=<your-client-secret>
scope=nldocsearch.api

Tokens expire after 30 minutes. Re-request before expiry. Cache locally — do not store in source code or version control.

API Journey

  1. Products — discover available product codes for your company
  2. Cases — create a case (loan application) under a product
  3. Document Upload — register documents, upload to blob storage, signal completion

Products

Discover the product catalog for your company. Products are admin-managed and define the document context for cases. Integration clients read products; they do not create or modify them.

List active products for company

Returns active products for the company using a paginated response envelope. Default sort: productCode,asc.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

query Parameters
page
integer >= 0
Default: 0

Zero-based page number. Must be zero or greater.

size
integer [ 1 .. 100 ]
Default: 50

Requested page size. Must be greater than zero and at most 100.

sort
string
Default: "productCode,asc"
Examples:
  • sort=productCode,asc -
  • sort=displayName,asc -

Spring Pageable sort parameter. Format: field,direction. Only one sort field is currently supported. Direction must be asc or desc. Allowed fields: productCode, displayName, createdAt, lastModifiedAt. Default: productCode,asc. Use camelCase API field names only.

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Get product by code

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

productCode
required
string

Product identifier code

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Cases

Create and inspect loan application cases. Each case is scoped to a product and aggregates all uploaded documents. Use externalCaseId to make case creation idempotent with your upstream system.

List cases

Returns cases matching the optional filters using a paginated response envelope. Default sort: lastModifiedAt,desc.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

query Parameters
productCode
string

Optional product filter

q
string

Optional search term for case display name, externalCaseId, or casePublicId

page
integer >= 0
Default: 0

Zero-based page number. Must be zero or greater.

size
integer [ 1 .. 100 ]
Default: 50

Requested page size. Must be greater than zero and at most 100.

sort
string
Default: "lastModifiedAt,desc"
Examples:
  • sort=lastModifiedAt,desc -
  • sort=createdAt,asc -

Spring Pageable sort parameter. Format: field,direction. Only one sort field is currently supported. Direction must be asc or desc. Allowed fields: lastModifiedAt, createdAt, displayName, externalCaseId, productCode, status. Default: lastModifiedAt,desc. Use camelCase API field names only.

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Create a case

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Request Body schema: application/json
required

Case creation request

productCode
required
string
externalCaseId
string or null
displayName
string or null
object or null

Responses

Request samples

Content type
application/json
{
  • "productCode": "MORTGAGE",
  • "externalCaseId": "LOS-998877",
  • "displayName": "Johnson Residential Mortgage - 2024",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Get case with document status summary

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Document Upload

Register documents, receive SAS upload URLs, and signal completion. Documents are uploaded directly to Azure Blob Storage — the API never proxies file bytes. Validation runs automatically after upload completion.

List documents in a case

Returns documents belonging to the specified case using a paginated response envelope. Default sort: createdAt,asc.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

query Parameters
page
integer >= 0
Default: 0

Zero-based page number. Must be zero or greater.

size
integer [ 1 .. 100 ]
Default: 50

Requested page size. Must be greater than zero and at most 100.

sort
string
Default: "createdAt,asc"
Examples:
  • sort=createdAt,asc -
  • sort=originalFilename,desc -

Spring Pageable sort parameter. Format: field,direction. Only one sort field is currently supported. Direction must be asc or desc. Allowed fields: createdAt, lastModifiedAt, originalFilename, uploadStatus, validationStatus, ingestionStatus. Default: createdAt,asc. Use camelCase API field names only.

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Batch register documents and receive SAS upload URLs

Register 1-50 PDF documents for a case and receive short-lived SAS URLs for direct-to-blob upload. Full success returns an array of successful document responses. Partial and all-failed batches return a batch response object.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Request Body schema: application/json
required

Document registration request

required
Array of objects (DocumentRegistrationItem) [ 1 .. 50 ] items

Responses

Request samples

Content type
application/json
{
  • "documents": [
    ]
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Signal upload completion and trigger validation

Call this endpoint after the Azure Blob PUT to sasUploadUrl succeeds. This endpoint does not accept a request body.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

documentPublicId
required
string <uuid>

Document public identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

Get document upload and validation status

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

documentPublicId
required
string <uuid>

Document public identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": {
    }
}

External Reference Lookup

Check whether documents are already registered before uploading. Use documentPublicId or externalDocumentId to look up existing registration status and avoid duplicate uploads.

Lookup documents by case-scoped identifiers

Look up documents within a case by externalDocumentIds, documentPublicIds, or both. At least one non-empty identifier list is required. Use GET /api/v1/{companyId}/cases/{casePublicId}/documents to list all documents in a case.

Authorizations:
bearerAuth
path Parameters
companyId
required
integer <int64>

Company tenant identifier

casePublicId
required
string <uuid>

Case public identifier

header Parameters
X-Request-ID
string <uuid>

Optional client-provided request correlation ID

Request Body schema: application/json
required

Case document lookup request

Any of
externalDocumentIds
required
Array of strings [ 1 .. 200 ] items [ items [ 1 .. 256 ] characters ^[a-zA-Z0-9._\-:/]*$ ]
documentPublicIds
Array of strings <uuid> [ 1 .. 200 ] items unique [ items <uuid > ]

Responses

Request samples

Content type
application/json
Example
{
  • "externalDocumentIds": [
    ]
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}