563848e0ecc0
Search facilities by filter criteria with pagination
Returns a paginated list of facilities matching the supplied filter criteria. Use this to search or list facilities for a tenant; use GET /facilities/{id} instead when you already know the facility identifier. Supports offset-based pagination via page/size. Search by Roster (CP-35452): the rosterIds query param filters to facilities belonging to one or more selected rosters; combines with other filters using AND logic. Filtering by credentialingCycle, nextCredentialingDate, credentialingStatus, and User Defined Fields (UDFs) is supported through the filter parameter. UDF fields can be filtered using the path format: data.userDefinedFields.{fieldName} for simple fields or data.userDefinedFields.{parent}.{child} for nested fields.
Query parameters
Filter by delegation status (Direct or Delegated)
Filter by external ID
Filter criteria as JSON (must be URL encoded). Multiple filters are combined with AND logic.
Filterable Fields:
Credentialing Fields:
- credentialingCycle (String): Credentialing cycle type - INITIAL or RECREDENTIALING (eq, neq, in, nin, contains)
- nextCredentialingDate (Date): Next credentialing date in ISO format YYYY-MM-DD (eq, neq, gt, gte, lt, lte, in, nin)
- credentialingStatus (String): Current credentialing status (eq, neq, in, nin, contains)
User Defined Fields (UDFs):
- userDefinedFields.* (Dynamic): Any user-defined field stored in data.userDefinedFields object
- Field Path Format: Use userDefinedFields.{fieldName} or userDefinedFields.{fieldName}.{subfield} for nested fields
- Important: Clients should use only the userDefinedFields.* format (without data. prefix). The backend automatically transforms userDefinedFields.* to data.userDefinedFields.* internally.
- Supported Operations (varies by field type):
- String fields: eq, neq, in, nin, contains
- Numeric fields: eq, neq, gt, gte, lt, lte, in, nin
- Array fields: eq, in (checks if array contains the value)
- Boolean fields: eq, neq
- Examples: userDefinedFields.market, userDefinedFields.location.region
Other Data Fields:
- data.ncpdpId (String): Pharmacy NCPDP identifier (eq, in, contains) — prefer query params ncpdpId / ncpdpIdContains for simple cases
- data.* (Any): Any data field (eq, neq, in, nin, contains, gt, gte, lt, lte)
Operations:
- String: eq, neq, in, nin, contains
- Date: eq, neq, gt, gte, lt, lte, in, nin
- Numeric: eq, neq, gt, gte, lt, lte, in, nin
- Array: eq, in (checks if array contains the value)
- Boolean: eq, neq
Examples:
Credentialing Filters:
{"credentialingCycle":{"eq":"INITIAL"}}
{"nextCredentialingDate":{"gte":"2025-01-01"}}
{"credentialingStatus":{"eq":"CRED_APPROVED"}}
{"credentialingCycle":{"eq":"INITIAL"},"nextCredentialingDate":{"gte":"2025-01-01","lte":"2025-12-31"}}
{"credentialingStatus":{"in":["CRED_APPROVED","PSV_READY"]},"credentialingCycle":{"eq":"RECREDENTIALING"}}
NCPDP Filters:
{"data.ncpdpId":{"eq":"2334234"}}
{"data.ncpdpId":{"in":["1111111","3333333"]}}
{"data.ncpdpId":{"contains":"342"}}
User Defined Fields (UDFs):
{"userDefinedFields.market":{"eq":"MARKET1"}}
{"userDefinedFields.market":{"in":["MARKET1","MARKET2"]}}
{"userDefinedFields.location.region":{"eq":"NORTH"}}
Note: Clients must use the userDefinedFields.* format (without data. prefix). The backend automatically transforms these to data.userDefinedFields.* internally.
Combined Filters:
{"credentialingStatus":{"eq":"CRED_APPROVED"},"userDefinedFields.market":{"eq":"MARKET1"}}
{"credentialingCycle":{"eq":"INITIAL"},"nextCredentialingDate":{"gte":"2025-01-01"},"userDefinedFields.market":{"in":["MARKET1","MARKET2"]}}
Notes:
- Filter must be URL encoded when sent as query parameter
- tenantId from header always takes precedence (cannot be overridden)
- Credentialing fields are derived from the most recent CRED_APPROVED timeline event
- Date format must be ISO 8601: YYYY-MM-DD
- String operations are case-sensitive
- UDF field names are case-sensitive - use exact field names as stored in your data
- UDF fields are dynamically supported - any field under userDefinedFields.* can be filtered (use userDefinedFields.* format, not data.userDefinedFields.*)
- UDF nested fields are supported using dot notation: userDefinedFields.parent.child
Filter by line of business (comma-separated list, e.g., MEDICARE,MEDICAID)
Filter by facility name
Filter by NCPDP ID (exact match). Accepts one 7-digit value, or multiple values separated by comma/newline/tab/semicolon/space for {@code in} matching (CP-33006). Each value must be exactly 7 digits.
Filter by NCPDP ID substring ({@code contains}). Does not require a full 7-digit value (CP-33006). Prefer {@code ncpdpId} for exact UI search.
Filter by facility NPI. May contain one or more values for bulk search (copy-paste): separate with comma, newline, tab, semicolon, or space. When one or more NPI values are provided via this parameter, the response includes optional identifiersSearched, matchedCount, notFoundCount, unmatchedIdentifiers. When the query parameter is omitted (standard list request), those fields are null.
Page number for offset-based pagination (0-based index). Defaults to 0 if not specified.
Search by Roster (CP-35452): comma-separated roster UUIDs. May contain one or more values, max facility.roster-search.max-ids (default 20). Combines with other query params and filter using AND logic. Omit or leave blank for a standard (non-roster) list request.
Number of items per page in offset-based pagination. Defaults to 10 if not specified.
Filter by facility TIN
Headers
Response
List of Facilities
Example response
{
"totalCount": 1,
"identifiersSearched": 2,
"matchedCount": 1,
"notFoundCount": 1,
"unmatchedIdentifiers": [
"9999999999"
]
}