# API Documentation

## Pagination Parameters

### ending_before
**uuid**  
A cursor representing an item's token before which a page of results should end. Used to retrieve the previous page of results before this item.

### page_size
**integer**  
1 to 100  
Defaults to 50  
Page size (for pagination).

### starting_after
**uuid**  
A cursor representing an item's token after which a page of results should begin. Used to retrieve the next page of results after this item.

### event_token
**uuid**  
Filter by event token

### auth_rule_token
**uuid**  
Filter by Auth Rule token

### begin
**date-time**  
Date string in RFC 3339 format. Only events evaluated after the specified time will be included. UTC time zone.

### end
**date-time**  
Date string in RFC 3339 format. Only events evaluated before the specified time will be included. UTC time zone.

### has_actions
**boolean**  
Filter by whether the rule evaluation produced any actions. When not provided, all results are returned.

## Auth Rule Results

### Response Structure

#### 200
**object**

- **data**  
  **array of objects** (required)  
  Authorization Result, Authentication (3DS) Result, Tokenization Result, ACH Result, Card Transaction Update Result, ACH Payment Update Result

- **event_stream**  
  **const**  
  The event stream during which the rule was evaluated: `AUTHORIZATION`

- **actions**  
  **array of objects** (required)  
  Actions returned by the rule evaluation

#### Action Structure

- **type**  
  **string** (enum, required)  
  `DECLINE`

- **code**  
  **string** (enum, required)  
  The detailed result code explaining the specific reason for the decline. Possible values include:
  - `ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED`
  - `ACCOUNT_DELINQUENT`
  - `CARD_SPEND_LIMIT_EXCEEDED`
  - `TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL`

- **explanation**  
  **string** (optional)  
  Explanation for why this action was taken.

- **token**  
  **uuid** (required)  
  Globally unique identifier for the evaluation.

- **auth_rule_token**  
  **uuid** (required)

- **event_token**  
  **uuid** (required)

- **evaluation_time**  
  **date-time** (required)  
  Timestamp of the rule evaluation.

- **rule_version**  
  **integer** (required)

- **transaction_token**  
  **uuid | null** (required)

- **mode**  
  **string** (enum, required)  
  `ACTIVE` or `INACTIVE`

- **has_more**  
  **boolean** (required)  
  Indicates whether there are more results to be retrieved by paging through results.

### Error Responses

#### 400 Bad Request
#### 404 Not Found

## Example CURL Request
```bash
curl --request GET \ 
     --url 'https://sandbox.lithic.com/v2/auth_rules/results?page_size=50' \ 
     --header 'accept: application/json'
```

## Example JSON Response
```json
{
  "data": [
    {
      "token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "auth_rule_token": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "event_token": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "transaction_token": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "evaluation_time": "2026-01-15T09:30:00Z",
      "rule_version": 1,
      "mode": "ACTIVE",
      "event_stream": "AUTHORIZATION",
      "actions": [
        {
          "type": "DECLINE",
          "code": "CARD_SPEND_LIMIT_EXCEEDED",
          "explanation": "Transaction declined due to velocity limit"
        }
      ]
    }
  ],
  "has_more": false
}
```
