Contract 4d1e0ad · updated 2026-11-11
Lissen Ticketing
Getting started

From key to first quote

Eight requests that take you from an API key to a priced cart, with every response you should expect on the way

By the end of this page you will have created an event, a pool of capacity, a priced offer and a discount code, read the fee that rides on them — and you will have asked the engine what a two-ticket cart costs and read back exactly which effects moved the number.

Nothing here sells anything. A quote is a preview: it holds no capacity, reserves no discount use, moves no money and leaves no trace. That makes it the safest possible thing to run against a live organizer while you are still finding your feet.

Every id below is an example: substitute the ones your own responses return. Each step says which earlier response its id comes from — not always the step immediately before, because later steps reuse ids created earlier.

Two headers ride every request: your key and the organizer it acts on. If either is missing you will get a 401 or a 400 that names what to send — Getting started has the detail.

Every create below also carries an Idempotency-Key. It is required on every create in the configuration API, not just the ones that move money: omitting it is a 400 missing_idempotency_key. Send a fresh UUID per logical operation and reuse it for each retry of that operation.

Check your key

The cheapest possible smoke test. If this answers, your key, your header and your mode all agree.

curl https://tickets.lissen.com/api/v1/organizer \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"
{
  "id": "org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7",
  "name": "Acme Events",
  "slug": "acme-events",
  "test": true,
  "status": "active",
  "psp_account_ref": "acct_1QxAcmeTestAccount"
}

test: true means this organizer is a sandbox twin: same API, same endpoints, no real money. psp_account_ref is the Stripe account the money would land on; null until you connect one, which nothing on this page needs.

Create the event

An event is the engine's door-and-clock record — a time, a place and a door. Not the concert: the lineup, the artwork and the description stay in your own catalog and join by id.

curl -X POST https://tickets.lissen.com/api/v1/events \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Idempotency-Key: 7c1f0a3e-4d29-4f81-9b6b-1e2a5c8d0f44" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Winter Social",
    "starts_at": "2026-11-14T19:30:00Z",
    "ends_at": "2026-11-15T02:00:00Z",
    "timezone": "Europe/London",
    "venue_name": "The Old Dock",
    "venue_address": "12 Wharf Road, London N1 7GS"
  }'
{
  "id": "evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22",
  "name": "Acme Winter Social",
  "starts_at": "2026-11-14T19:30:00.000Z",
  "ends_at": "2026-11-15T02:00:00.000Z",
  "timezone": "Europe/London",
  "venue_name": "The Old Dock",
  "venue_address": "12 Wharf Road, London N1 7GS",
  "metadata": {}
}

Send RFC3339 timestamps with an offset; responses normalize to UTC with milliseconds. The IANA timezone rides alongside them because "doors at 7:30pm" is a fact about the venue, not about UTC — see Events.

Create a quota

A quota is a named pool of sellable capacity. Items draw on quotas; a quota can back several items at once, which is how "300 people in the room" survives being sold as four different tiers.

curl -X POST https://tickets.lissen.com/api/v1/quotas \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Idempotency-Key: 4b2e9d10-8a67-4c03-b7d1-52f0e6c9a381" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Room capacity", "size": 250 }'
{
  "id": "quo_0199c4e6-3c21-7a55-9b02-4d8e1f6a9b33",
  "name": "Room capacity",
  "size": 250,
  "metadata": {}
}

size: null instead of a number declares unlimited capacity, which is the right answer for genuinely uncapped event admission. Choose deliberately: unlimited is terminal — a quota that has been declared unlimited can never be given a finite size afterwards.

Create the item

An item is the offer, not the thing: a named, priced, quota-backed thing you sell. It must name at least one quota, and an item that names an event is an admission item, which is what this example sells. Items without an event (merchandise, for example) are also supported.

curl -X POST https://tickets.lissen.com/api/v1/items \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Idempotency-Key: 1f6c0b58-3d94-4e12-8a77-9c15b4e0d2a6" \
  -H "Content-Type: application/json" \
  -d '{
    "event_id": "evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22",
    "name": "General admission",
    "price_minor": 2500,
    "currency": "GBP",
    "quota_ids": ["quo_0199c4e6-3c21-7a55-9b02-4d8e1f6a9b33"]
  }'
{
  "id": "itm_0199c4e3-77a2-7e19-b0c5-9d3f2a4e6b10",
  "event_id": "evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22",
  "name": "General admission",
  "price_minor": 2500,
  "currency": "GBP",
  "gated": false,
  "active": true,
  "sort_order": 0,
  "sale_starts_at": null,
  "sale_ends_at": null,
  "opens_after_item_id": null,
  "opens_when": null,
  "sale_state": "on_sale",
  "sale_opens_at": null,
  "sale_opened_by": null,
  "quota_ids": ["quo_0199c4e6-3c21-7a55-9b02-4d8e1f6a9b33"],
  "metadata": {}
}

2500 + GBP is £25.00. Money is always an integer in minor units next to an ISO-4217 currency; no float ever appears in a total.

The quota binding you just made is mutable only until live capacity depends on this item. Once a buyer holds one of these in a checkout, or one has been issued, quota_ids freezes — see Items and quotas.

Read the fee schedule

The fee schedule is how the platform fee on each position is computed. It is part of your agreement with Lissen, so Lissen sets it when your organizer is created and you read it — nothing to create here, but worth a look before you price anything. In v1 it lives at organizer scope: one active schedule per currency, applying to everything you sell in that currency.

curl https://tickets.lissen.com/api/v1/fee_schedules \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"
{
  "object": "list",
  "data": [
    {
      "id": "fsc_0199c4e7-4d32-7b66-ac13-5e9f2a7b0c44",
      "event_id": null,
      "item_id": null,
      "currency": "GBP",
      "percent_bps": 500,
      "flat_minor": 150,
      "mode": "passed_on",
      "active": true,
      "metadata": {}
    }
  ],
  "has_more": false
}

percent_bps is basis points: 500 is 5%. mode decides who pays it — passed_on adds it to what the buyer is charged, absorbed takes it out of your proceeds and shows the buyer nothing.

Pricing fails loud when no schedule matches. If the list is empty for a currency you sell in, a quote in that currency answers 422 fee_schedule_not_found rather than quietly charging no fee: a missing schedule never means free. Talk to Lissen before you go further.

Read availability

Availability is always derived — quota size, minus positions already issued, minus what live checkouts are holding — and never stored.

The id in the path is the quota from step 3 — the create, not the step before.

curl https://tickets.lissen.com/api/v1/quotas/quo_0199c4e6-3c21-7a55-9b02-4d8e1f6a9b33/availability \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"
{
  "quota_id": "quo_0199c4e6-3c21-7a55-9b02-4d8e1f6a9b33",
  "size": 250,
  "issued": 0,
  "in_baskets": 0,
  "available": 250,
  "state": "available"
}

state is the value to branch on. in_baskets — none left, but some are in live checkouts — is deliberately a different answer from gone, so you can render "someone may release these" rather than "sold out". On an unlimited quota, size and available are both null and state is always available.

Create a discount code

A code is bearer evidence: presenting it is the authentication. This one takes 20% off, and its restriction set confines it to the event you just created.

curl -X POST https://tickets.lissen.com/api/v1/discount_codes \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Idempotency-Key: 6d0f2a91-7c35-4b60-8e19-3a4c7f2b9d05" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "WINTER20",
    "effect_type": "percent",
    "percent_bps": 2000,
    "event_ids": ["evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22"],
    "max_uses": 100
  }'
{
  "id": "dsc_0199c4e8-5e43-7c77-bd24-6f0a3b8c1d55",
  "code": "WINTER20",
  "effect_type": "percent",
  "percent_bps": 2000,
  "amount_minor": null,
  "amount_currency": null,
  "stackable": false,
  "valid_from": null,
  "valid_until": null,
  "max_uses": 100,
  "max_uses_per_customer": null,
  "active": true,
  "item_ids": [],
  "event_ids": ["evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22"],
  "metadata": {}
}

An empty restriction set (both arrays empty) means every position in the cart. Naming an event covers every item that points at it, including items you create later.

Quote the cart

POST/v1/quotes runs the same pricing engine a real checkout runs, in preview mode. It takes no Idempotency-Key, because it changes nothing there is anything to replay.

curl -X POST https://tickets.lissen.com/api/v1/quotes \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{
    "line_items": [
      { "item_id": "itm_0199c4e3-77a2-7e19-b0c5-9d3f2a4e6b10", "quantity": 2 }
    ],
    "codes": ["WINTER20"]
  }'
{
  "mode": "preview",
  "created": "2026-10-02T11:04:18.226Z",
  "currency": "GBP",
  "subject": { "kind": "anonymous", "customer_id": null, "external_ref": null },
  "line_items": [
    {
      "item_id": "itm_0199c4e3-77a2-7e19-b0c5-9d3f2a4e6b10",
      "event_id": "evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22",
      "description": "General admission",
      "quantity": 2,
      "unit_list_price_minor": 2500,
      "unit_price_minor": 2000,
      "list_subtotal_minor": 5000,
      "discount_minor": 1000,
      "subtotal_minor": 4000,
      "booking_fee_minor": 500,
      "platform_fee_minor": 500,
      "effect_ids": ["dsc_0199c4e8-5e43-7c77-bd24-6f0a3b8c1d55"],
      "sellable": true,
      "blocked_reason": null
    }
  ],
  "applied_effects": [
    {
      "id": "dsc_0199c4e8-5e43-7c77-bd24-6f0a3b8c1d55",
      "provider_kind": "discount_codes",
      "provider_id": null,
      "type": "percent_off",
      "state": "applied",
      "source": {
        "kind": "discount_code",
        "label": "WINTER20",
        "ref": "dsc_0199c4e8-5e43-7c77-bd24-6f0a3b8c1d55"
      },
      "requires": null,
      "description": "20% off with code WINTER20",
      "stackable": false,
      "consumable": true,
      "redemption_ref": null,
      "percent_bps": 2000,
      "amount_minor": null,
      "currency": null,
      "price_override_minor": null,
      "applies_to_item_ids": [],
      "applies_to_event_ids": ["evt_0199c4e5-2b10-7f44-8a91-3c7d0e5f8a22"],
      "unlocks_item_ids": []
    }
  ],
  "unapplied_effects": [],
  "superseded_effect_ids": [],
  "rejected_codes": [],
  "totals": {
    "list_subtotal_minor": 5000,
    "discount_minor": 1000,
    "subtotal_minor": 4000,
    "booking_fee_minor": 500,
    "platform_fee_minor": 500,
    "total_minor": 4500
  },
  "degraded": false,
  "degraded_providers": []
}

Read it back in the order the engine computed it:

  • The list price is unit_list_price_minor — £25.00, straight off the item.
  • The code applied. 20% of 2500 is 500, so unit_price_minor is 2000 and the line's discount_minor is 1000 across two tickets. The code's id appears in the line's effect_ids: that array is the provenance of the charge, so you can always say why a buyer paid what they paid.
  • The fee rode on the discounted price, not the list price: 5% of 2000 is 100, plus the 150 flat, is 250 per ticket — platform_fee_minor 500 for the pair. Because the schedule is passed_on, the same 500 also appears as booking_fee_minor, the buyer-visible half.
  • The total is subtotal_minor + booking_fee_minor = 4500. £45.00.

Three fields are worth wiring into your UI from day one:

  • applied_effects — what fired, each carrying source provenance and human display copy you can render without knowing the domain.
  • unapplied_effects — the teasers: effects this cart would get, carrying requires. This is how "join to unlock the presale" renders, and it works for anonymous buyers.
  • rejected_codes — a code that was presented and refused, with a reason (not_found, expired, not_applicable, max_uses_reached and the rest), so you can tell the buyer which of their codes did nothing.

Optional: check the activity stream

Every create above appended a fact, in order: event.created, quota.created, item.created, discount_code.created — and before any of them, the fee_schedule.created Lissen wrote when it set your fee. Each carries the full resource snapshot — the same object the API returned — so a consumer of the feed never has to call back to find out what changed.

The quote appended nothing. A preview is one of the engine's deliberate silences.

A ninth request, which nothing above depends on — it is here so you can see the trail for yourself:

curl "https://tickets.lissen.com/api/v1/activities?limit=5" \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"

Where to go next

On this page