> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/health/design/architecture/low-level-design/services/health-services/console-services/excel-ingestion/process-search-api.md).

# Process Search API

### Endpoint

* **Endpoint:** `/excel-ingestion/v1/data/process/_search`
* **Method:** POST

### Request Structure

#### Body Parameters:

RequestInfo: Object containing request information.

ProcessingSearchCriteria: Object containing the search criteria for filtering processing records.

* tenantId: Tenant identifier (required).
* ids: List of processing IDs to search for (optional).
* referenceIds: List of reference IDs to filter by (optional).
* referenceTypes: List of reference types to filter by (optional).
* types: List of resource types to filter by (unified-console-parse , unified-console-validation) (optional).
* statuses: List of statuses to filter by (pending, completed, failed) (optional).
* limit: Maximum number of records to return (optional, default: 50, minimum: 1).
* offset: Number of records to skip for pagination (optional, default: 0, minimum: 0).

#### Request Example 1: Search by Processing ID

```
{
  "RequestInfo": {
    "apiId": "excel-ingestion-api",
    "ver": "1.0",
    "ts": 1672531200000,
    "action": "search",
    "msgId": "unique-message-id"
  },
  "ProcessingSearchCriteria": {
    "tenantId": "mz",
    "ids": ["650e8400-e29b-41d4-a716-446655440000"]
  }
}
```

#### Request Example 2: Search by Reference ID and Status

```
{
  "RequestInfo": {
    "apiId": "excel-ingestion-api",
    "ver": "1.0",
    "ts": 1672531200000
  },
  "ProcessingSearchCriteria": {
    "tenantId": "mz",
    "referenceIds": [{{referenceID}}],
    "statuses": ["completed"],
    "limit": 10,
    "offset": 0
  }
}
```

### Response Structure

ResponseInfo: Object containing response information.

ProcessingDetails: Array of ProcessResource objects matching the search criteria.

Each ProcessResource contains:

* id: Unique identifier for the processing request.
* tenantId: Tenant identifier.
* type: Type of resource (unified-console-parse , unified-console-validation).
* hierarchyType: Type of hierarchy (e.g., ADMIN, MICROPLAN).
* referenceId: Reference identifier (e.g., campaign ID, project ID).
* referenceType: Type of reference (e.g., campaign, project).
* fileStoreId: Original uploaded file store identifier.
* processedFileStoreId: Processed file store identifier (populated when status is 'completed').
* status: Current status (pending, completed, failed).
* processedStatus: Processing result status (valid, invalid, error: CODE).
* locale: Locale used for validation messages.
* additionalDetails: Additional details including:
  * errorCount: Total number of validation errors found
  * validationStatus: Overall validation status (valid/invalid)
  * rowCount: Total number of rows processed
  * errorCode: Error code if status is 'failed'
  * errorMessage: Error message if status is 'failed'
  * createdByEmail: Email of the user who initiated the request
* auditDetails: Audit information containing:
  * createdBy: User UUID who created the record
  * lastModifiedBy: User UUID who last modified the record
  * createdTime: Timestamp when created
  * lastModifiedTime: Timestamp when last modified

TotalCount: Total number of records matching the search criteria (without pagination).

#### Response Example

```
{
  "ResponseInfo": {
    "apiId": "excel-ingestion-api",
    "ver": "1.0",
    "ts": 1672531200000,
    "status": "successful"
  },
  "ProcessingDetails": [
    {
      "id": "650e8400-e29b-41d4-a716-446655440000",
      "tenantId": "mz",
      "type": "boundary",
      "hierarchyType": "ADMIN",
      "referenceId": "campaign-123",
      "referenceType": "campaign",
      "fileStoreId": "filestore-id-abc-456",
      "processedFileStoreId": "filestore-id-xyz-789",
      "status": "completed",
      "processedStatus": "valid",
      "locale": "en_IN",
      "additionalDetails": {
        "errorCount": 0,
        "validationStatus": "valid",
        "rowCount": 150,
        "createdByEmail": "user@example.com"
      },
      "auditDetails": {
        "createdBy": "user-uuid-123",
        "lastModifiedBy": "user-uuid-123",
        "createdTime": 1672531200000,
        "lastModifiedTime": 1672531500000
      }
    }
  ],
  "TotalCount": 1
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/health/design/architecture/low-level-design/services/health-services/console-services/excel-ingestion/process-search-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
