# Exceptions and other endpoints

> Shop exceptions (always allow or always block a buyer), the connection test GET /me, and the anonymous country and postcode report POST /geo.

## Exceptions

A shop can always allow a regular buyer, or always block one, whatever the other shops reported. Exceptions apply to your own shop only.

```http
PUT /exceptions
```

```json
{
  "kind": "email",
  "identity_hash": "8cd79ce2224abde026ddc67563fe5edb8b5eb41846c63cd550a76ea76cc2eddd",
  "action": "deny",
  "note": "refused parcels"
}
```

| Field | |
|---|---|
| `kind` | `email`, `phone` or `address` |
| `identity_hash` | the hash of the value ([hashing](https://docs.uptools.io/trustorder/api/hashing/)) |
| `action` | `allow` or `deny` |
| `note` | optional, at most 500 characters, no control characters |

The answer is `204`. Sending the same `kind` and hash again replaces the exception.

```http
GET /exceptions?limit=100&cursor=…
```

Lists your exceptions, at most 500 per page (default 100). The hash never comes back; `id` only tells the rows apart. Pass `next_cursor` to get the next page; it is `null` on the last one.

```json
{
  "items": [
    { "id": "9f3a10c2", "kind": "email", "action": "deny", "note": "refused parcels", "created_at": "2026-11-02T09:12:44Z" }
  ],
  "next_cursor": null
}
```

```http
DELETE /exceptions/{kind}/{identity_hash}
```

Removes one. You need the hash again, so keep the value or its hash on your side.

## Connection test

```http
GET /me
```

Returns the webshop of the key, its environment, the account status (`pending` or `approved`), the daily check quota and today's checks. See [Getting started](https://docs.uptools.io/trustorder/api/#first-request).

## Country and postcode

```http
POST /geo
```

```json
{ "country": "HU", "postcode": "1051" }
```

Optional. Send it once per order for anonymous statistics. It is stored with the shop and the hour only, without order id, hash, IP address, amount or product, and deleted after 1095 days. The answer is `204`.
