> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peere.co/llms.txt
> Use this file to discover all available pages before exploring further.

# schemas

# Customer Decisions Schemas

API endpoints for monitoring customer authorization decisions and billing permissions.

## Endpoints

| Method | Endpoint                          | Description                          |
| ------ | --------------------------------- | ------------------------------------ |
| GET    | `/v1/merchant/customer-decisions` | Get customer decisions with filters  |
| GET    | `/v1/customer-decisions/:id`      | Get specific customer decision by ID |

## GET /v1/merchant/customer-decisions

Retrieve customer decisions with optional filtering parameters.

### Query Parameters

| Parameter    | Type   | Required | Description                 |
| ------------ | ------ | -------- | --------------------------- |
| `paymentID`  | string | No       | Filter by payment id        |
| `customerId` | string | No       | Filter by customer ID       |
| `lookupID`   | string | No       | Filter by lookup ID         |
| `limit`      | number | No       | Number of results to return |
| `skip`       | number | No       | Number of results to skip   |

### Response Schema

```json theme={null}
{
  "statusCode": 200,
  "success": true,
  "data": [
    {
      "id": "string",
      "customerId": "string",
      "entityId": "string",
      "paymentID": "string",
      "decision": "approve_once | approve_recurring | deny | suspended",
      "spendingLimits": {
        "single": 5000,
        "daily": 8000,
        "weekly": 20000,
        "monthly": 60000
      },
      "blockMerchant": false,
      "createdAt": "string",
      "lastUsed": "string"
    }
  ],
  "total": 1
}
```

### Customer Decision Schema

| Field                    | Type    | Description                 |
| ------------------------ | ------- | --------------------------- |
| `id`                     | string  | Decision identifier         |
| `customerId`             | string  | Customer identifier         |
| `entityId`               | string  | Merchant identifier         |
| `paymentID`              | string  | Encrypted payment id        |
| `decision`               | string  | Customer decision type      |
| `spendingLimits`         | object  | Customer spending limits    |
| `spendingLimits.single`  | number  | Single transaction limit    |
| `spendingLimits.daily`   | number  | Daily spending limit        |
| `spendingLimits.weekly`  | number  | Weekly spending limit       |
| `spendingLimits.monthly` | number  | Monthly spending limit      |
| `blockMerchant`          | boolean | Whether merchant is blocked |
| `createdAt`              | string  | Decision creation timestamp |
| `lastUsed`               | string  | Last usage timestamp        |

## GET /v1/customer-decisions/:id

Get detailed information about a specific customer decision.

### Path Parameters

| Parameter | Type   | Required | Description          |
| --------- | ------ | -------- | -------------------- |
| `id`      | string | Yes      | Customer decision ID |

### Response Schema

```json theme={null}
{
  "statusCode": 200,
  "success": true,
  "data": {
    "id": "string",
    "customerId": "string",
    "entityId": "string",
    "paymentID": "string",
    "lookupID": "string",
    "decision": "approve_once | approve_recurring | deny | suspended",
    "spendingLimits": {
      "single": 5000,
      "daily": 8000,
      "weekly": 20000,
      "monthly": 60000
    },
    "blockMerchant": false,
    "createdAt": "string",
    "lastUpdated": "string",
    "lastUsed": "string"
  }
}
```

## Decision Types

| Decision            | Description                                     |
| ------------------- | ----------------------------------------------- |
| `approve_once`      | Customer approves each transaction individually |
| `approve_recurring` | Automatic approval for future transactions      |
| `deny`              | Customer declined billing agreement             |
| `suspended`         | Decision is temporarily suspended               |

## Error Responses

### 404 Not Found

```json theme={null}
{
  "statusCode": 404,
  "success": false,
  "message": "Customer decision not found"
}
```

### 400 Bad Request

```json theme={null}
{
  "statusCode": 400,
  "success": false,
  "message": "Invalid query parameters"
}
```
