Skip to main content

Search Artifacts

Search for artifacts in the lake based on lock values and filters.

Endpoint

POST /dock/search

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key
X-API-SecretYesYour API secret
Content-TypeYesMust be application/json

Body Parameters

ParameterTypeRequiredDescription
filtersobjectNoSearch filters
paginationobjectNoPagination options

Filters Object

ParameterTypeRequiredDescription
document_typestringNoFilter by document type
<lock_name>stringNoFilter by lock value (exact match)
<lock_name>_afterdateNoFilter by date (greater than)
<lock_name>_beforedateNoFilter by date (less than)
created_afterdateNoCreated after timestamp
created_beforedateNoCreated before timestamp

Pagination Object

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoItems per page (default: 50, max: 100)

Example Request

curl -X POST https://api.docyard.io/v1/dock/search \
  -H "X-API-Key: dk_live_coll_aaaaaaaa" \
  -H "X-API-Secret: dk_secret_coll_bbbbbbbb" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {
      "document_type": "declaration_page",
      "mortgagee_name": "FirstCity Bank",
      "effective_date_after": "2026-01-01"
    },
    "pagination": {
      "page": 1,
      "limit": 50
    }
  }'

Response

Success (200 OK)

{
  "results": [
    {
      "id": "art-abc123",
      "document_type": "declaration_page",
      "artifact_type": "Insurance Declaration Page",
      "locks": {
        "policy_number": "POL-12345678",
        "effective_date": "2026-03-15",
        "mortgagee_name": "FirstCity Bank"
      },
      "accessible": true,
      "score_if_keys_provided": 20,
      "threshold": 20,
      "created_at": "2026-03-15T10:30:00Z"
    },
    {
      "id": "art-def456",
      "document_type": "declaration_page",
      "artifact_type": "Insurance Declaration Page",
      "locks": {
        "policy_number": "POL-87654321",
        "effective_date": "2026-03-14",
        "mortgagee_name": "FirstCity Bank"
      },
      "accessible": false,
      "score_if_keys_provided": 0,
      "threshold": 20,
      "created_at": "2026-03-14T09:15:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 2,
    "total_pages": 1
  }
}

Response Fields

FieldTypeDescription
resultsarrayArray of matching artifacts
results[].idstringArtifact identifier
results[].document_typestringDocument category
results[].artifact_typestringArtifact type name
results[].locksobjectLock values (without weights)
results[].accessiblebooleanWhether you can access with your keys
results[].score_if_keys_providedintegerScore if you use your keys
results[].thresholdintegerRequired threshold
results[].created_atstringUpload timestamp
paginationobjectPagination information

Error Responses

Unauthorized Lock Type (403)

{
  "error": "unauthorized_lock_type",
  "message": "You are not authorized to filter by 'tax_id'",
  "request_id": "req-abc123xyz"
}

Invalid Filter (422)

{
  "error": "validation_error",
  "message": "Invalid filter parameter",
  "details": {
    "field": "filters.effective_date",
    "issue": "invalid_date_format",
    "expected": "YYYY-MM-DD"
  },
  "request_id": "req-abc123xyz"
}

Code Examples

Node.js

const results = await client.dock.search({
  filters: {
    document_type: 'declaration_page',
    mortgagee_name: 'FirstCity Bank',
    effective_date_after: '2026-01-01'
  },
  pagination: {
    page: 1,
    limit: 50
  }
});

for (const artifact of results.results) {
  console.log(`${artifact.id}: ${artifact.accessible ? 'Accessible' : 'Not Accessible'}`);
}

Python

results = client.dock.search(
    filters={
        'document_type': 'declaration_page',
        'mortgagee_name': 'FirstCity Bank',
        'effective_date_after': '2026-01-01'
    },
    pagination={
        'page': 1,
        'limit': 50
    }
)

for artifact in results['results']:
    status = 'Accessible' if artifact['accessible'] else 'Not Accessible'
    print(f"{artifact['id']}: {status}")