> ## Documentation Index
> Fetch the complete documentation index at: https://hs-df36fa00.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Execution Receipts — GET /v1/receipts Endpoint

> Query execution receipts by agent_id, provider_id, or verification verdict. Returns StoredReceipt objects with digests and invocation status.

Returns a list of `StoredReceipt` objects, optionally filtered by agent, provider, or verification verdict.

## Query Parameters

<ParamField query="agent_id" type="string">
  Filter receipts to those produced by this agent.
</ParamField>

<ParamField query="provider_id" type="string">
  Filter receipts to those produced under this provider.
</ParamField>

<ParamField query="verification" type="string">
  Filter by verification verdict. One of `not_required`, `pending`, `verified`, or `failed`.
</ParamField>

<ParamField query="limit" type="integer">
  Maximum number of receipts to return.
</ParamField>

## Response

Returns `{ "items": [StoredReceipt] }`.

<ResponseField name="items" type="array">
  Array of `StoredReceipt` objects.

  <Expandable title="StoredReceipt">
    <ResponseField name="receipt" type="object" required>
      The core `ExecutionReceipt` record.

      <Expandable title="ExecutionReceipt">
        <ResponseField name="receipt_id" type="string (UUID)" required>
          Unique identifier for this execution receipt.
        </ResponseField>

        <ResponseField name="agent_id" type="string" required>
          The agent that handled this invocation.
        </ResponseField>

        <ResponseField name="provider_id" type="string" required>
          The provider that owns the agent.
        </ResponseField>

        <ResponseField name="status" type="string" required>
          Invocation outcome. One of `running`, `succeeded`, `failed`, or `rejected`.
        </ResponseField>

        <ResponseField name="verification" type="string" required>
          Current verification verdict. One of `not_required`, `pending`, `verified`, or `failed`.
        </ResponseField>

        <ResponseField name="request_digest" type="string" required>
          SHA-256 digest of the serialised invocation request payload.
        </ResponseField>

        <ResponseField name="result_digest" type="string">
          SHA-256 digest of the invocation result. Present once the invocation completes.
        </ResponseField>

        <ResponseField name="started_at" type="string (ISO 8601)" required>
          UTC timestamp when the invocation started.
        </ResponseField>

        <ResponseField name="completed_at" type="string (ISO 8601)">
          UTC timestamp when the invocation finished. Absent while `status` is `running`.
        </ResponseField>

        <ResponseField name="cost_units" type="integer">
          Execution cost in protocol cost units, if reported by the agent.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="output" type="object">
      Structured output returned by the agent. Omitted when the invocation produced no structured output.
    </ResponseField>

    <ResponseField name="stderr" type="string">
      Diagnostic text captured from the agent's stderr stream, if any.
    </ResponseField>
  </Expandable>
</ResponseField>

## Examples

### List receipts for a provider

```bash theme={null}
curl 'http://your-node:8042/v1/receipts?provider_id=acme-labs'
```

### List receipts for a specific agent

```bash theme={null}
curl 'http://your-node:8042/v1/receipts?agent_id=stripe-agent'
```

### Filter by verification verdict

```bash theme={null}
curl 'http://your-node:8042/v1/receipts?verification=pending&limit=20'
```

### Example response

```json theme={null}
{
  "items": [
    {
      "receipt": {
        "receipt_id": "018f4e2a-1c3b-7d90-a1b2-3c4d5e6f7890",
        "agent_id": "stripe-agent",
        "provider_id": "acme-labs",
        "status": "succeeded",
        "verification": "verified",
        "request_digest": "sha256:a3f1e2b4c5d6...",
        "result_digest": "sha256:9b8c7d6e5f4a...",
        "started_at": "2025-01-15T10:30:00Z",
        "completed_at": "2025-01-15T10:30:02Z",
        "cost_units": 10
      },
      "output": {
        "payment_link": "https://buy.stripe.com/example"
      },
      "stderr": "agent: retried once on connection reset"
    }
  ]
}
```
