AttendBeacon
Arbeitsbereich öffnen

API-Referenz

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.

Scopes
tickets:read

    Parameter

    Pfad

    • eventIdstring (uuid)erforderlich

      The event's id.

    Query

    • cursorstring

      Where 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: 100

    • updatedSincestring (date-time)

      Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.

    Antworten

    • 200 The ticket types. TicketTypeList
      Felder
      • dataTicketType[]

        The ticket types.

        Felder anzeigen
        • ticketTypeIdstring (uuid)

          The ticket type's id.

        • namestring

          Its name.

        • descriptionstring

          What it includes.

        • pricenumber

          The price, VAT included, with the currency's own decimals.

        • vatRatenumber

          The VAT rate, as a percentage.

        • currencystring

          The currency, as ISO 4217.

        • capacityinteger oder null

          How many may be sold, when limited.

        • takeninteger

          How many are taken.

        • maxPerOrderinteger

          The most one order may hold.

        • visibilitystring

          Public, code (sold with an access code) or hidden.

          Einer von: public, code, hidden

        • salesStartUtcstring (date-time)

          When sales start, in UTC.

        • salesEndUtcstring (date-time)

          When sales end, in UTC.

        • sortOrderinteger

          Its place in the list.

        • eventIdstring (uuid)

          The event's id.

        • remaininginteger (int32) oder null

          Places left, or null without a limit.

        • requiresApprovalboolean

          Whether an order for it waits for the organiser's approval.

        • salesStartLocalstring oder null

          When sales start, in the venue's time.

        • salesEndLocalstring oder null

          When sales end, in the venue's time.

        • includedAddOnIdsstring (uuid)[]

          The add-ons it includes, as a bundle.

        • updatedUtcstring (date-time) oder null

          When it last changed, in UTC.

      • nextCursorstring oder null

        The cursor for the next page; null on the last page.

      • hasMoreboolean

        Whether there is another page.

    • 400 invalidCursor, invalidUpdatedSince, invalidRequest.
    • 401 invalidKey, keyExpired, keyRevoked.
    • 403 missingScope.
    • 404 eventNotFound.
    • 429 rateLimited.

    Ablehnungen

    invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound invalidCursor invalidUpdatedSince invalidRequest

    Anfrage

    curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types?limit=2" \
      -H "Authorization: Bearer $ATTENDBEACON_KEY"

    200 Beispielantwort

    JSON
    {
      "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.
    JSON
    {
      "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.

    Scopes
    tickets:read
    • Antwortet mit einem ETag; senden Sie If-None-Match, um sich einen Download zu sparen.

    Parameter

    Pfad

    • eventIdstring (uuid)erforderlich

      The event's id.

    • ticketTypeIdstring (uuid)erforderlich

      The ticket type's id.

    Header

    • If-None-Matchstring

      The ETag you have: when it is still current the answer is 304 with no body.

    Antworten

    • 200 The ticket type. TicketType
      Felder
      • ticketTypeIdstring (uuid)

        The ticket type's id.

      • namestring

        Its name.

      • descriptionstring

        What it includes.

      • pricenumber

        The price, VAT included, with the currency's own decimals.

      • vatRatenumber

        The VAT rate, as a percentage.

      • currencystring

        The currency, as ISO 4217.

      • capacityinteger oder null

        How many may be sold, when limited.

      • takeninteger

        How many are taken.

      • maxPerOrderinteger

        The most one order may hold.

      • visibilitystring

        Public, code (sold with an access code) or hidden.

        Einer von: public, code, hidden

      • salesStartUtcstring (date-time)

        When sales start, in UTC.

      • salesEndUtcstring (date-time)

        When sales end, in UTC.

      • sortOrderinteger

        Its place in the list.

      • eventIdstring (uuid)

        The event's id.

      • remaininginteger (int32) oder null

        Places left, or null without a limit.

      • requiresApprovalboolean

        Whether an order for it waits for the organiser's approval.

      • salesStartLocalstring oder null

        When sales start, in the venue's time.

      • salesEndLocalstring oder null

        When sales end, in the venue's time.

      • includedAddOnIdsstring (uuid)[]

        The add-ons it includes, as a bundle.

      • updatedUtcstring (date-time) oder null

        When 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.

    Ablehnungen

    invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound notFound

    Anfrage

    curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/ticket-types/b3ac0006-0000-4000-8000-000000000001" \
      -H "Authorization: Bearer $ATTENDBEACON_KEY"

    200 Beispielantwort

    JSON
    {
      "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.
    JSON
    {
      "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 Ändert Daten

    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.

    Scopes
    tickets:write
    • Senden Sie If-Match mit dem gelesenen ETag, damit eine zwischenzeitliche Änderung nicht überschrieben wird.

    Parameter

    Pfad

    • eventIdstring (uuid)erforderlich

      The event's id.

    • ticketTypeIdstring (uuid)erforderlich

      The ticket type's id.

    Header

    • If-Matchstring

      The ETag you read, so a change made since is refused (412) rather than overwritten.

    Body TicketTypePatch

    The fields to change.

    • namestring

      Its name.

    • descriptionstring oder null

      What it includes.

    • capacityinteger (int32) oder null

      Places, or null for no limit. Refused below what is already taken.

    • maxPerOrderinteger (int32)

      The most in one order, 1 to 100.

    • salesStartUtcstring (date-time) oder null

      When sales start, in UTC.

    • salesEndUtcstring (date-time) oder null

      When sales end, in UTC.

    Antworten

    • 200 The ticket type as it is now. TicketType
      Felder
      • ticketTypeIdstring (uuid)

        The ticket type's id.

      • namestring

        Its name.

      • descriptionstring

        What it includes.

      • pricenumber

        The price, VAT included, with the currency's own decimals.

      • vatRatenumber

        The VAT rate, as a percentage.

      • currencystring

        The currency, as ISO 4217.

      • capacityinteger oder null

        How many may be sold, when limited.

      • takeninteger

        How many are taken.

      • maxPerOrderinteger

        The most one order may hold.

      • visibilitystring

        Public, code (sold with an access code) or hidden.

        Einer von: public, code, hidden

      • salesStartUtcstring (date-time)

        When sales start, in UTC.

      • salesEndUtcstring (date-time)

        When sales end, in UTC.

      • sortOrderinteger

        Its place in the list.

      • eventIdstring (uuid)

        The event's id.

      • remaininginteger (int32) oder null

        Places left, or null without a limit.

      • requiresApprovalboolean

        Whether an order for it waits for the organiser's approval.

      • salesStartLocalstring oder null

        When sales start, in the venue's time.

      • salesEndLocalstring oder null

        When sales end, in the venue's time.

      • includedAddOnIdsstring (uuid)[]

        The add-ons it includes, as a bundle.

      • updatedUtcstring (date-time) oder null

        When it last changed, in UTC.

    • 400 invalidBody, invalidRequest.
    • 401 invalidKey, keyExpired, keyRevoked.
    • 403 missingScope, demoWorkspace.
    • 404 eventNotFound, notFound.
    • 409 capacityBelowTaken.
    • 412 preconditionFailed.
    • 429 rateLimited.

    Ablehnungen

    invalidKey keyExpired keyRevoked rateLimited missingScope eventNotFound notFound invalidBody invalidRequest demoWorkspace preconditionFailed capacityBelowTaken

    Anfrage

    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
    }'

    200 Beispielantwort

    JSON
    {
      "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.
    JSON
    {
      "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.

    Scopes
    tickets:read
    Modul
    addons Wird mit moduleOff abgelehnt, solange der Veranstalter das Modul für die Veranstaltung ausgeschaltet hat.

      Parameter

      Pfad

      • eventIdstring (uuid)erforderlich

        The event's id.

      Query

      • cursorstring

        Where 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: 100

      • updatedSincestring (date-time)

        Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.

      Antworten

      • 200 A page of add-ons. AddOnList
        Felder
        • dataAddOn[]

          The items of this page.

          Felder anzeigen
          • addOnIdstring (uuid)

            The add-on's id.

          • eventIdstring (uuid)

            The event's id.

          • namestring

            Its name.

          • descriptionstring oder null

            What it is.

          • pricenumber

            Its price, VAT included. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.

          • vatRatenumber

            The VAT rate, as a percentage.

          • currencystring

            ISO 4217.

          • capacityinteger (int32) oder null

            How 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) oder null

            A session it admits to.

          • atVenueboolean

            Whether it needs the venue, so is not sold with a stream ticket.

          • activeboolean

            Whether it is on sale.

          • salesStartUtcstring (date-time) oder null

            When sales start, in UTC.

          • salesEndUtcstring (date-time) oder null

            When sales end, in UTC.

          • salesStartLocalstring oder null

            When sales start, in the venue's time.

          • salesEndLocalstring oder null

            When sales end, in the venue's time.

          • sortOrderinteger (int32)

            Its place in the list.

          • updatedUtcstring (date-time) oder null

            When it last changed, in UTC.

        • nextCursorstring oder null

          The cursor for the next page; null on the last page. Pass it as cursor, with the same filters.

        • hasMoreboolean

          Whether there is another page.

      • 400 invalidCursor, invalidUpdatedSince, invalidRequest.
      • 401 invalidKey, keyExpired, keyRevoked.
      • 403 missingScope.
      • 404 eventNotFound.
      • 409 moduleOff.
      • 429 rateLimited.

      Ablehnungen

      invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidCursor invalidUpdatedSince invalidRequest

      Anfrage

      curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/add-ons?limit=2" \
        -H "Authorization: Bearer $ATTENDBEACON_KEY"

      200 Beispielantwort

      JSON
      {
        "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.
      JSON
      {
        "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.

      Scopes
      tickets:read
      Modul
      addons Wird mit moduleOff abgelehnt, solange der Veranstalter das Modul für die Veranstaltung ausgeschaltet hat.

        Parameter

        Pfad

        • eventIdstring (uuid)erforderlich

          The event's id.

        Query

        • cursorstring

          Where 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: 100

        • updatedSincestring (date-time)

          Only what changed at or after this moment, in UTC unless it says otherwise. Pass the newest updatedUtc your last sync saw.

        Antworten

        • 200 A page of discount codes. DiscountCodeList
          Felder
          • dataDiscountCode[]

            The items of this page.

            Felder anzeigen
            • discountCodeIdstring (uuid)

              The code's id.

            • eventIdstring (uuid)

              The event's id.

            • codestring

              The letters people type, in capitals.

            • kindstring

              Percent or amount.

              Einer von: percent, amount

            • valuenumber

              Percentage off, or the amount off each ticket with the currency's own decimals.

            • currencystring oder null

              ISO 4217, for an amount off.

            • ticketTypeIdsstring (uuid)[]

              The ticket types it applies to; every one when empty.

            • maxUsesinteger (int32) oder null

              The most orders that may use it, or null without a limit.

            • usesinteger (int32)

              Orders that used it.

            • discountednumber

              What 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) oder null

              When it starts working, in UTC.

            • endsUtcstring (date-time) oder null

              When it stops working, in UTC.

            • startsLocalstring oder null

              When it starts working, in the venue's time.

            • endsLocalstring oder null

              When it stops working, in the venue's time.

            • activeboolean

              Whether it is switched on.

            • updatedUtcstring (date-time) oder null

              When it last changed, in UTC.

          • nextCursorstring oder null

            The cursor for the next page; null on the last page. Pass it as cursor, with the same filters.

          • hasMoreboolean

            Whether there is another page.

        • 400 invalidCursor, invalidUpdatedSince, invalidRequest.
        • 401 invalidKey, keyExpired, keyRevoked.
        • 403 missingScope.
        • 404 eventNotFound.
        • 409 moduleOff.
        • 429 rateLimited.

        Ablehnungen

        invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidCursor invalidUpdatedSince invalidRequest

        Anfrage

        curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/discount-codes?limit=2" \
          -H "Authorization: Bearer $ATTENDBEACON_KEY"

        200 Beispielantwort

        JSON
        {
          "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.
        JSON
        {
          "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 Ändert Daten

        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.

        Scopes
        tickets:write
        Modul
        addons Wird mit moduleOff abgelehnt, solange der Veranstalter das Modul für die Veranstaltung ausgeschaltet hat.
        • Senden Sie einen Idempotency-Key, damit Wiederholungen sicher sind. →

        Parameter

        Pfad

        • eventIdstring (uuid)erforderlich

          The event's id.

        Header

        • Idempotency-Keystring

          A 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.

        Body NewDiscountCode

        The code.

        • codestringerforderlich

          The letters people type: A to Z, digits, - and _, at most 40.

        • kindstringerforderlich

          Percent or amount.

          Einer von: percent, amount

        • valuenumbererforderlich

          Percentage off (1 to 100), or the amount off each ticket in the event's currency.

        • maxUsesinteger (int32) oder null

          The 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) oder null

          When it starts working, in UTC. At once when left out.

        • endsUtcstring (date-time) oder null

          When it stops working, in UTC. Never when left out.

        • activeboolean

          Switched on; true when left out.

        Antworten

        • 201 The code. DiscountCode
          Felder
          • discountCodeIdstring (uuid)

            The code's id.

          • eventIdstring (uuid)

            The event's id.

          • codestring

            The letters people type, in capitals.

          • kindstring

            Percent or amount.

            Einer von: percent, amount

          • valuenumber

            Percentage off, or the amount off each ticket with the currency's own decimals.

          • currencystring oder null

            ISO 4217, for an amount off.

          • ticketTypeIdsstring (uuid)[]

            The ticket types it applies to; every one when empty.

          • maxUsesinteger (int32) oder null

            The most orders that may use it, or null without a limit.

          • usesinteger (int32)

            Orders that used it.

          • discountednumber

            What 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) oder null

            When it starts working, in UTC.

          • endsUtcstring (date-time) oder null

            When it stops working, in UTC.

          • startsLocalstring oder null

            When it starts working, in the venue's time.

          • endsLocalstring oder null

            When it stops working, in the venue's time.

          • activeboolean

            Whether it is switched on.

          • updatedUtcstring (date-time) oder null

            When 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.

        Ablehnungen

        invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound invalidBody invalidRequest demoWorkspace idempotencyKeyInUse idempotencyKeyReused invalidIdempotencyKey codeTaken

        Anfrage

        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"
        }'
        400 invalidBody, invalidRequest, invalidIdempotencyKey.
        JSON
        {
          "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."
        }

        Die Anleitungen und diese Website sind in Ihrer Sprache. Die Beschreibungen in der API-Referenz selbst sind auf Englisch, so wie die API selbst spricht.