# Query Language

The Verifier’s query language defines precise requirements for acceptable credentials. By specifying fields and applying JSON Schema filters, you ensure that only credentials meeting exact criteria are accepted.

## Key Concepts

* **Paths**:\
  Identify data fields in a credential’s JSON structure using JSONPath syntax.
* **Filters**:\
  Apply JSON Schema rules (e.g., type, enum, pattern) to validate content at the specified path.

## Example

**Proof of Purchase Credential Requirement:**

* `type` includes "ProofOfPurchase".
* `credentialSubject.id` matches the pattern `^did:empe:.*$`.

```json
[
  {
    "fields": [
      {
        "path": ["$.type"],
        "filter": {
          "type": "array",
          "contains": {"const": "ProofOfPurchase"}
        }
      },
      {
        "path": ["$.credentialSubject.id"],
        "filter": {
          "type": "string",
          "pattern": "^did:empe:.*$"
        }
      }
    ]
  }
]
```

By combining paths and filters, the Verifier ensures that only credentials meeting your defined requirements pass the verification process.


---

# Agent Instructions: 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:

```
GET https://docs.empe.io/develop/verifier/query-language.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
