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

# Distribution API

> Resell Gomry tickets on your marketplace. Only for distributors Gomry has approved, not an open API.

# Distribution API

> [!WARNING]
>
> **The Distribution API is not an open API.** It is only for distributors Gomry has approved and signed terms with. There is no self-serve sign-up: Gomry reviews each distributor, agrees its terms and credit limit, and issues every key itself. If Gomry has not approved you, these pages do not give you access. To apply, contact [support@gomry.com](mailto:support@gomry.com).

A distributor buys Gomry tickets at wholesale and resells them on outside marketplaces (StubHub, Vivid Seats, SeatGeek and the like), and seats on Gomry experiences (tours, classes, workshops) on tours-and-activities marketplaces. Both are [products](https://docs.gomry.com/distribution-api/list-products.md), sold the same way. Gomry is the seller. Organizers opt in on their side; you never deal with them, and their names are not passed to you.

```
Organizers on Gomry
      ⇅
Gomry                    the Distribution API: products, orders, statement
      ⇅
Your integration         calls Gomry, lists on your marketplaces, delivers tickets
      ⇅
Marketplaces and buyers
```

> [!NOTE]
>
> **You are the client for every endpoint here.** Gomry never calls your systems. You poll for changes: products, and orders Gomry cancelled.

## How a sale flows

**1. List**

Read [products](https://docs.gomry.com/distribution-api/list-products.md) (events and experiences, one shape) every few minutes, or a product's sessions live. List exactly what it returns, at the quantities it returns, and take down anything it no longer returns.

**2. Sell**

When a buyer buys on a marketplace, [place an order](https://docs.gomry.com/distribution-api/create-order.md) with your own order reference. Gomry issues the tickets at once.

**3. Deliver**

[Deliver](https://docs.gomry.com/distribution-api/delivery.md) each ticket's code to the buyer, with its Gomry link. Gomry scans the code at the door.

**4. Pay**

Pay Gomry what the [statement](https://docs.gomry.com/distribution-api/get-statement.md) says you owe. Gomry records the payment against those orders.

## Base URL

```
https://www.gomry.com/api/v1/distribution
```

## Authentication

Send your key on every request:

```bash theme={null}
curl https://www.gomry.com/api/v1/distribution/products \
  -H "Authorization: Bearer gdk_..."
```

Gomry shows a key once, when it issues it, and keeps only a fingerprint. Store it as a secret on your server. If it leaks, ask Gomry for a new one: the old key stops working the moment the new one is issued.

## Money

| Term | Meaning |
| - | - |
| `price` | The ticket's face value, in the event's currency. |
| `wholesale_price` | What Gomry bills you per ticket: face value minus your agreed discount. |
| Your price | Whatever you sell it for on the marketplace. The difference is yours. |
| Credit limit | The most you may owe Gomry at once, per currency. Past it, new orders are refused until you pay. |

Refunds and customer service for your buyers are yours. Gomry never refunds a buyer you sold to.

## Limits

20 requests per second per distributor. Past that, Gomry answers `429` with `Retry-After: 1`.

## Errors

Every error has the same shape. Branch on `code`, never on `message`.

```json theme={null}
{ "error": { "code": "credit_limit_reached", "message": "This order would exceed the credit limit. Settle open statements first." } }
```

| Status | `code` | Meaning |
| - | - | - |
| 400 | `invalid_body` | The body or query is malformed. `message` says which field. |
| 400 | `not_supported` | The product does not do this: holds are for experience products. |
| 401 | `unauthorized` | Missing or unknown key. |
| 403 | `distributor_paused` | Gomry paused your account. Products are empty and orders are refused. |
| 404 | `not_found` | No such route, order, product or hold. |
| 409 | `not_listed` | The offer is not for sale to you right now. `reason` says why. |
| 409 | `sold_out` | Fewer tickets or seats left than you asked for. |
| 409 | `quantity_limit_exceeded` | The order is above the offer's per-order limit. |
| 409 | `credit_limit_reached` | This order would take you past your credit limit. |
| 409 | `order_in_progress` | The same order is still being issued. Retry in a few seconds. |
| 409 | `order_mismatch` | This `external_ref` was already used for a different order, or the order does not match its hold. |
| 409 | `already_used` | A ticket (or seat) on the order was already scanned, so it cannot be cancelled. |
| 429 | `rate_limited` | Too many requests. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.