API-referanse
Tickets
Ticket types, add-ons and discount codes.
List ticket types
GET/events/{eventId}/ticket-types
Lists an event's ticket types in their order, with their prices, capacity and how many are taken. Access codes are never included.
- Omfang
- tickets:read
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
spørring
cursorstringWhere the page starts: nextCursor from the page before, exactly as it was returned. Leave out for the first page.
limitinteger (int32)How many on a page, up to 500.
Standard:
100updatedSincestring (date-time)Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.
Svar
- 200 The ticket types. TicketTypeList
Felt
dataTicketType[]The ticket types.
Vis feltene
ticketTypeIdstring (uuid)The ticket type's id.
namestringIts name.
descriptionstringWhat it includes.
pricenumberThe price, VAT included, with the currency's own decimals.
vatRatenumberThe VAT rate, as a percentage.
currencystringThe currency, as ISO 4217.
capacityinteger eller nullHow many may be sold, when limited.
takenintegerHow many are taken.
maxPerOrderintegerThe most one order may hold.
visibilitystringPublic, code (sold with an access code) or hidden.
Én av:
public,code,hiddensalesStartUtcstring (date-time)When sales start, in UTC.
salesEndUtcstring (date-time)When sales end, in UTC.
sortOrderintegerIts place in the list.
eventIdstring (uuid)The event's id.
remaininginteger (int32) eller nullPlaces left, or null without a limit.
requiresApprovalbooleanWhether an order for it waits for the organiser's approval.
salesStartLocalstring eller nullWhen sales start, in the venue's time.
salesEndLocalstring eller nullWhen sales end, in the venue's time.
includedAddOnIdsstring (uuid)[]The add-ons it includes, as a bundle.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
nextCursorstring eller nullThe cursor for the next page; null on the last page.
hasMorebooleanWhether there is another page.
- 400 invalidCursor, invalidUpdatedSince, invalidRequest.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope.
- 404 eventNotFound.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound invalidCursor invalidUpdatedSince invalidRequest
Forespørsel
curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types?limit=2" \
-H "Authorization: Bearer $ATTENDBEACON_KEY"const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types?limit=2", {
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`
}
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types?limit=2");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.get(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types", params={"limit": 2},
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
}
$data = Invoke-RestMethod -Method Get -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types?limit=2" -Headers $headers200 Eksempelsvar
{
"data": [
{
"ticketTypeId": "b3ac0006-0000-4000-8000-000000000000",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Community pass",
"description": "Both days, lunch included. Free for members of a local user group.",
"price": 0,
"vatRate": 21,
"currency": "EUR",
"capacity": 300,
"taken": 24,
"remaining": 276,
"maxPerOrder": 10,
"visibility": "public",
"requiresApproval": false,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"includedAddOnIds": [],
"sortOrder": 0,
"updatedUtc": "2026-10-14T21:40:48.160Z"
},
{
"ticketTypeId": "b3ac0006-0000-4000-8000-000000000001",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Conference pass",
"description": "Both days, lunch and drinks. A workshop seat is booked as an extra.",
"price": 395,
"vatRate": 21,
"currency": "EUR",
"capacity": 500,
"taken": 38,
"remaining": 462,
"maxPerOrder": 10,
"visibility": "public",
"requiresApproval": false,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"includedAddOnIds": [],
"sortOrder": 1,
"updatedUtc": "2026-10-14T21:40:48.168Z"
}
],
"nextCursor": "YzE6MDAwMDAwMTAwMDAwMDAwMDAwMXxiM2FjMDAwNjAwMDA0MDAwODAwMDAwMDAwMDAwMDAwMQ",
"hasMore": true
}400 invalidCursor, invalidUpdatedSince, invalidRequest.
{
"type": "https://attendbeacon.com/developers/errors#invalidCursor",
"title": "The cursor is not valid",
"status": 400,
"detail": "Pass nextCursor exactly as a list returned it, with the same filters.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types",
"code": "invalidCursor",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "Pass nextCursor exactly as a list returned it, with the same filters."
}Get a ticket type
GET/events/{eventId}/ticket-types/{ticketTypeId}
Gets one ticket type with its price, capacity, what is taken and its sales window.
- Omfang
- tickets:read
- Svarer med en ETag; send If-None-Match for å slippe en ny nedlasting.
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
ticketTypeIdstring (uuid)påkrevdThe ticket type's id.
header
If-None-MatchstringThe ETag you have: when it is still current the answer is 304 with no body.
Svar
- 200 The ticket type. TicketType
Felt
ticketTypeIdstring (uuid)The ticket type's id.
namestringIts name.
descriptionstringWhat it includes.
pricenumberThe price, VAT included, with the currency's own decimals.
vatRatenumberThe VAT rate, as a percentage.
currencystringThe currency, as ISO 4217.
capacityinteger eller nullHow many may be sold, when limited.
takenintegerHow many are taken.
maxPerOrderintegerThe most one order may hold.
visibilitystringPublic, code (sold with an access code) or hidden.
Én av:
public,code,hiddensalesStartUtcstring (date-time)When sales start, in UTC.
salesEndUtcstring (date-time)When sales end, in UTC.
sortOrderintegerIts place in the list.
eventIdstring (uuid)The event's id.
remaininginteger (int32) eller nullPlaces left, or null without a limit.
requiresApprovalbooleanWhether an order for it waits for the organiser's approval.
salesStartLocalstring eller nullWhen sales start, in the venue's time.
salesEndLocalstring eller nullWhen sales end, in the venue's time.
includedAddOnIdsstring (uuid)[]The add-ons it includes, as a bundle.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
- 304 Not modified: If-None-Match named the representation as it is.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope.
- 404 eventNotFound, notFound.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound notFound
Forespørsel
curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001" \
-H "Authorization: Bearer $ATTENDBEACON_KEY"const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001", {
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`
}
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.get(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001",
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
}
$data = Invoke-RestMethod -Method Get -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001" -Headers $headers200 Eksempelsvar
{
"ticketTypeId": "b3ac0006-0000-4000-8000-000000000000",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Community pass",
"description": "Both days, lunch included. Free for members of a local user group.",
"price": 0,
"vatRate": 21,
"currency": "EUR",
"capacity": 300,
"taken": 24,
"remaining": 276,
"maxPerOrder": 10,
"visibility": "public",
"requiresApproval": false,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"includedAddOnIds": [],
"sortOrder": 0,
"updatedUtc": "2026-10-14T21:40:48.160Z"
}401 invalidKey, keyExpired, keyRevoked.
{
"type": "https://attendbeacon.com/developers/errors#invalidKey",
"title": "No working API key",
"status": 401,
"detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/{ticketTypeId}",
"code": "invalidKey",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
}Change a ticket type Endrer data
PATCH/events/{eventId}/ticket-types/{ticketTypeId}
Changes a ticket type's capacity, sales window, most per order, name or description, as a JSON merge patch. Capacity is set under the tickets' lock and never below what is taken; more places reopen a sold-out ticket at once. Price and VAT are changed in the workspace.
- Omfang
- tickets:write
- Send If-Match med ETag-en du leste, slik at en endring i mellomtiden ikke overskrives.
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
ticketTypeIdstring (uuid)påkrevdThe ticket type's id.
header
If-MatchstringThe ETag you read, so a change made since is refused (412) rather than overwritten.
Innhold TicketTypePatch
The fields to change.
namestringIts name.
descriptionstring eller nullWhat it includes.
capacityinteger (int32) eller nullPlaces, or null for no limit. Refused below what is already taken.
maxPerOrderinteger (int32)The most in one order, 1 to 100.
salesStartUtcstring (date-time) eller nullWhen sales start, in UTC.
salesEndUtcstring (date-time) eller nullWhen sales end, in UTC.
Svar
- 200 The ticket type as it is now. TicketType
Felt
ticketTypeIdstring (uuid)The ticket type's id.
namestringIts name.
descriptionstringWhat it includes.
pricenumberThe price, VAT included, with the currency's own decimals.
vatRatenumberThe VAT rate, as a percentage.
currencystringThe currency, as ISO 4217.
capacityinteger eller nullHow many may be sold, when limited.
takenintegerHow many are taken.
maxPerOrderintegerThe most one order may hold.
visibilitystringPublic, code (sold with an access code) or hidden.
Én av:
public,code,hiddensalesStartUtcstring (date-time)When sales start, in UTC.
salesEndUtcstring (date-time)When sales end, in UTC.
sortOrderintegerIts place in the list.
eventIdstring (uuid)The event's id.
remaininginteger (int32) eller nullPlaces left, or null without a limit.
requiresApprovalbooleanWhether an order for it waits for the organiser's approval.
salesStartLocalstring eller nullWhen sales start, in the venue's time.
salesEndLocalstring eller nullWhen sales end, in the venue's time.
includedAddOnIdsstring (uuid)[]The add-ons it includes, as a bundle.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
- 400 invalidBody, invalidRequest.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope, demoWorkspace.
- 404 eventNotFound, notFound.
- 409 capacityBelowTaken.
- 412 preconditionFailed.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound notFound invalidBody invalidRequest demoWorkspace preconditionFailed capacityBelowTaken
Forespørsel
curl -X PATCH "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001" \
-H "Authorization: Bearer $ATTENDBEACON_KEY" \
-H "If-Match: $ETAG" \
-H "Content-Type: application/json" \
-d '{
"capacity": 450
}'const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`,
"If-Match": etag,
"Content-Type": "application/json"
},
body: JSON.stringify({
"capacity": 450
})
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Patch, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001");
request.Headers.IfMatch.Add(new EntityTagHeaderValue(etag));
request.Content = new StringContent("""
{
"capacity": 450
}
""", Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.patch(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001",
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}",
"If-Match": etag
},
json={
"capacity": 450
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
"If-Match" = $etag
}
$body = @'
{
"capacity": 450
}
'@
$data = Invoke-RestMethod -Method Patch -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001" -Headers $headers -ContentType "application/json" -Body $body200 Eksempelsvar
{
"ticketTypeId": "b3ac0006-0000-4000-8000-000000000000",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Community pass",
"description": "Both days, lunch included. Free for members of a local user group.",
"price": 0,
"vatRate": 21,
"currency": "EUR",
"capacity": 300,
"taken": 24,
"remaining": 276,
"maxPerOrder": 10,
"visibility": "public",
"requiresApproval": false,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"includedAddOnIds": [],
"sortOrder": 0,
"updatedUtc": "2026-10-14T21:40:48.160Z"
}400 invalidBody, invalidRequest.
{
"type": "https://attendbeacon.com/developers/errors#invalidBody",
"title": "The body is not readable",
"status": 400,
"detail": "The body is not JSON, or a field has the wrong type.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/{ticketTypeId}",
"code": "invalidBody",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "The body is not JSON, or a field has the wrong type."
}List add-ons
GET/events/{eventId}/add-ons
Lists an event's add-ons: extras sold with a ticket, with their prices and what is taken.
- Omfang
- tickets:read
- Modul
addonsAvvises med moduleOff så lenge arrangøren har slått modulen av for arrangementet.
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
spørring
cursorstringWhere the page starts: nextCursor from the page before, exactly as it was returned. Leave out for the first page.
limitinteger (int32)How many on a page, up to 500.
Standard:
100updatedSincestring (date-time)Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.
Svar
- 200 A page of add-ons. AddOnList
Felt
dataAddOn[]The items of this page.
Vis feltene
addOnIdstring (uuid)The add-on's id.
eventIdstring (uuid)The event's id.
namestringIts name.
descriptionstring eller nullWhat it is.
pricenumberIts price, VAT included. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.
vatRatenumberThe VAT rate, as a percentage.
currencystringISO 4217.
capacityinteger (int32) eller nullHow many there are, or null without a limit.
takeninteger (int32)How many are held.
includedinteger (int32)Of which included in a bundle.
maxPerAttendeeinteger (int32)The most one attendee may have.
ticketTypeIdsstring (uuid)[]The ticket types it is sold with; every one when empty.
sessionIdstring (uuid) eller nullA session it admits to.
atVenuebooleanWhether it needs the venue, so is not sold with a stream ticket.
activebooleanWhether it is on sale.
salesStartUtcstring (date-time) eller nullWhen sales start, in UTC.
salesEndUtcstring (date-time) eller nullWhen sales end, in UTC.
salesStartLocalstring eller nullWhen sales start, in the venue's time.
salesEndLocalstring eller nullWhen sales end, in the venue's time.
sortOrderinteger (int32)Its place in the list.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
nextCursorstring eller nullThe cursor for the next page; null on the last page. Pass it as cursor, with the same filters.
hasMorebooleanWhether there is another page.
- 400 invalidCursor, invalidUpdatedSince, invalidRequest.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope.
- 404 eventNotFound.
- 409 moduleOff.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidCursor invalidUpdatedSince invalidRequest
Forespørsel
curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons?limit=2" \
-H "Authorization: Bearer $ATTENDBEACON_KEY"const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons?limit=2", {
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`
}
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons?limit=2");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.get(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons", params={"limit": 2},
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
}
$data = Invoke-RestMethod -Method Get -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons?limit=2" -Headers $headers200 Eksempelsvar
{
"data": [
{
"addOnId": "b3ac4900-0000-4000-8000-000000000000",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Conference dinner",
"description": "Thursday evening upstairs in the Beurs: three courses, wine, and speakers at every table.",
"price": 65,
"vatRate": 9,
"currency": "EUR",
"capacity": 120,
"taken": 15,
"included": 6,
"maxPerAttendee": 1,
"ticketTypeIds": [],
"sessionId": null,
"atVenue": true,
"active": true,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"sortOrder": 0,
"updatedUtc": "2026-10-14T21:40:52.776Z"
},
{
"addOnId": "b3ac4900-0000-4000-8000-000000000001",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"name": "Workshop seat: building with AI agents",
"description": "Two hours hands on with Sofia Lindqvist and Priya Raman in the Workshop Lab. Bring your laptop.",
"price": 45,
"vatRate": 21,
"currency": "EUR",
"capacity": 30,
"taken": 9,
"included": 0,
"maxPerAttendee": 1,
"ticketTypeIds": [],
"sessionId": "b3ac0004-0000-4000-8000-000000000014",
"atVenue": true,
"active": true,
"salesStartUtc": null,
"salesEndUtc": "2026-11-13T11:00:00.000Z",
"salesStartLocal": null,
"salesEndLocal": "2026-11-13T12:00",
"sortOrder": 1,
"updatedUtc": "2026-10-14T21:40:52.810Z"
}
],
"nextCursor": "YzE6MDAwMDAwMTAwMDAwMDAwMDAwMXxiM2FjNDkwMDAwMDA0MDAwODAwMDAwMDAwMDAwMDAwMQ",
"hasMore": true
}400 invalidCursor, invalidUpdatedSince, invalidRequest.
{
"type": "https://attendbeacon.com/developers/errors#invalidCursor",
"title": "The cursor is not valid",
"status": 400,
"detail": "Pass nextCursor exactly as a list returned it, with the same filters.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons",
"code": "invalidCursor",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "Pass nextCursor exactly as a list returned it, with the same filters."
}List discount codes
GET/events/{eventId}/discount-codes
Lists an event's discount codes with how often each was used and what it took off.
- Omfang
- tickets:read
- Modul
addonsAvvises med moduleOff så lenge arrangøren har slått modulen av for arrangementet.
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
spørring
cursorstringWhere the page starts: nextCursor from the page before, exactly as it was returned. Leave out for the first page.
limitinteger (int32)How many on a page, up to 500.
Standard:
100updatedSincestring (date-time)Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.
Svar
- 200 A page of discount codes. DiscountCodeList
Felt
dataDiscountCode[]The items of this page.
Vis feltene
discountCodeIdstring (uuid)The code's id.
eventIdstring (uuid)The event's id.
codestringThe letters people type, in capitals.
kindstringPercent or amount.
Én av:
percent,amountvaluenumberPercentage off, or the amount off each ticket with the currency's own decimals.
currencystring eller nullISO 4217, for an amount off.
ticketTypeIdsstring (uuid)[]The ticket types it applies to; every one when empty.
maxUsesinteger (int32) eller nullThe most orders that may use it, or null without a limit.
usesinteger (int32)Orders that used it.
discountednumberWhat it took off in all. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.
startsUtcstring (date-time) eller nullWhen it starts working, in UTC.
endsUtcstring (date-time) eller nullWhen it stops working, in UTC.
startsLocalstring eller nullWhen it starts working, in the venue's time.
endsLocalstring eller nullWhen it stops working, in the venue's time.
activebooleanWhether it is switched on.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
nextCursorstring eller nullThe cursor for the next page; null on the last page. Pass it as cursor, with the same filters.
hasMorebooleanWhether there is another page.
- 400 invalidCursor, invalidUpdatedSince, invalidRequest.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope.
- 404 eventNotFound.
- 409 moduleOff.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidCursor invalidUpdatedSince invalidRequest
Forespørsel
curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes?limit=2" \
-H "Authorization: Bearer $ATTENDBEACON_KEY"const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes?limit=2", {
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`
}
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes?limit=2");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.get(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes", params={"limit": 2},
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
}
$data = Invoke-RestMethod -Method Get -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes?limit=2" -Headers $headers200 Eksempelsvar
{
"data": [
{
"discountCodeId": "b3ac0017-0000-4000-8000-000000000000",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"code": "EARLYBIRD",
"kind": "percent",
"value": 20,
"currency": null,
"ticketTypeIds": [
"b3ac0006-0000-4000-8000-000000000001"
],
"maxUses": 50,
"uses": 3,
"discounted": 237,
"startsUtc": null,
"endsUtc": "2026-10-01T21:59:00.000Z",
"startsLocal": null,
"endsLocal": "2026-10-01T23:59",
"active": true,
"updatedUtc": "2026-10-14T21:40:48.183Z"
},
{
"discountCodeId": "b3ac0017-0000-4000-8000-000000000001",
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"code": "CONTOSO-TEAM",
"kind": "amount",
"value": 75,
"currency": "EUR",
"ticketTypeIds": [
"b3ac0006-0000-4000-8000-000000000001"
],
"maxUses": 10,
"uses": 2,
"discounted": 150,
"startsUtc": null,
"endsUtc": null,
"startsLocal": null,
"endsLocal": null,
"active": true,
"updatedUtc": "2026-10-14T21:40:48.187Z"
}
],
"nextCursor": "YzE6MDYzOTI3NjEwODQ4MTg3MDAwMHxiM2FjMDAxNzAwMDA0MDAwODAwMDAwMDAwMDAwMDAwMQ",
"hasMore": true
}400 invalidCursor, invalidUpdatedSince, invalidRequest.
{
"type": "https://attendbeacon.com/developers/errors#invalidCursor",
"title": "The cursor is not valid",
"status": 400,
"detail": "Pass nextCursor exactly as a list returned it, with the same filters.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes",
"code": "invalidCursor",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "Pass nextCursor exactly as a list returned it, with the same filters."
}Create a discount code Endrer data
POST/events/{eventId}/discount-codes
Creates a discount code: a percentage or an amount off each ticket, for some ticket types or all, until a moment or a number of uses. It works at once.
- Omfang
- tickets:write
- Modul
addonsAvvises med moduleOff så lenge arrangøren har slått modulen av for arrangementet.
- Send en Idempotency-Key for å gjøre nye forsøk trygge. →
Parametere
sti
eventIdstring (uuid)påkrevdThe event's id.
header
Idempotency-KeystringA key of your own, such as a UUID, so a retry after a lost connection is answered with the first answer instead of doing it twice. Kept 24 hours.
Innhold NewDiscountCode
The code.
codestringpåkrevdThe letters people type: A to Z, digits, - and _, at most 40.
kindstringpåkrevdPercent or amount.
Én av:
percent,amountvaluenumberpåkrevdPercentage off (1 to 100), or the amount off each ticket in the event's currency.
maxUsesinteger (int32) eller nullThe most orders that may use it. No limit when left out.
ticketTypeIdsstring (uuid)[]Only these ticket types. Every one when left out.
startsUtcstring (date-time) eller nullWhen it starts working, in UTC. At once when left out.
endsUtcstring (date-time) eller nullWhen it stops working, in UTC. Never when left out.
activebooleanSwitched on; true when left out.
Svar
- 201 The code. DiscountCode
Felt
discountCodeIdstring (uuid)The code's id.
eventIdstring (uuid)The event's id.
codestringThe letters people type, in capitals.
kindstringPercent or amount.
Én av:
percent,amountvaluenumberPercentage off, or the amount off each ticket with the currency's own decimals.
currencystring eller nullISO 4217, for an amount off.
ticketTypeIdsstring (uuid)[]The ticket types it applies to; every one when empty.
maxUsesinteger (int32) eller nullThe most orders that may use it, or null without a limit.
usesinteger (int32)Orders that used it.
discountednumberWhat it took off in all. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.
startsUtcstring (date-time) eller nullWhen it starts working, in UTC.
endsUtcstring (date-time) eller nullWhen it stops working, in UTC.
startsLocalstring eller nullWhen it starts working, in the venue's time.
endsLocalstring eller nullWhen it stops working, in the venue's time.
activebooleanWhether it is switched on.
updatedUtcstring (date-time) eller nullWhen it last changed, in UTC.
- 400 invalidBody, invalidRequest, invalidIdempotencyKey.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope, demoWorkspace.
- 404 eventNotFound.
- 409 moduleOff, idempotencyKeyInUse, codeTaken.
- 422 idempotencyKeyReused.
- 429 rateLimited.
Avvisninger
invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidBody invalidRequest demoWorkspace idempotencyKeyInUse idempotencyKeyReused invalidIdempotencyKey codeTaken
Forespørsel
curl -X POST "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes" \
-H "Authorization: Bearer $ATTENDBEACON_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"code": "NORTHWIND25",
"kind": "percent",
"value": 25,
"maxUses": 50,
"endsUtc": "2026-11-01T23:00:00Z"
}'const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json"
},
body: JSON.stringify({
"code": "NORTHWIND25",
"kind": "percent",
"value": 25,
"maxUses": 50,
"endsUtc": "2026-11-01T23:00:00Z"
})
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Post, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes");
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
request.Content = new StringContent("""
{
"code": "NORTHWIND25",
"kind": "percent",
"value": 25,
"maxUses": 50,
"endsUtc": "2026-11-01T23:00:00Z"
}
""", Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os, uuid
import requests
response = requests.post(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes",
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}",
"Idempotency-Key": str(uuid.uuid4())
},
json={
"code": "NORTHWIND25",
"kind": "percent",
"value": 25,
"maxUses": 50,
"endsUtc": "2026-11-01T23:00:00Z"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
"Idempotency-Key" = [guid]::NewGuid().ToString()
}
$body = @'
{
"code": "NORTHWIND25",
"kind": "percent",
"value": 25,
"maxUses": 50,
"endsUtc": "2026-11-01T23:00:00Z"
}
'@
$data = Invoke-RestMethod -Method Post -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes" -Headers $headers -ContentType "application/json" -Body $body400 invalidBody, invalidRequest, invalidIdempotencyKey.
{
"type": "https://attendbeacon.com/developers/errors#invalidBody",
"title": "The body is not readable",
"status": 400,
"detail": "The body is not JSON, or a field has the wrong type.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes",
"code": "invalidBody",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "The body is not JSON, or a field has the wrong type."
}Veiledningene og dette nettstedet er på ditt språk. Beskrivelsene i selve API-referansen er på engelsk, slik API-et selv er.