OfferEvent & Date

English only

Use Cases

An OfferEvent is a concrete entry point within a registration offer (Offer). Users register for an OfferEvent, which can be linked to one or more content items (such as a training, course, or external content). Each event can contain multiple OfferEventDates: these are the scheduled sessions or contact moments.

Get single event

Retrieves one specific event, including dates, linked content, and availability.

query {
  offerEvent(id: "uuid-here") {
    id
    title
    dates {
      start
      end
    }
    contentTitle
    spotsAvailable
  }
}

List all events for an offer

Shows all entry points linked to a specific offer.

query {
  offer(id: "uuid-here") {
    offerEvents {
      id
      title
    }
  }
}

Create event

Creates a new OfferEvent within a specific offer. Here you also link content (such as a training or course).

mutation {
  createOfferEvent(
    offerEvent: {
      offerId: "uuid-of-offer"
      title: "Starting Moment September"
      contentId: "uuid-of-training"
      contentType: TRAINING
      maxParticipants: 25
    }
  ) {
    offerEvent {
      id
      title
      contentTitle
    }
  }
}

Add session date(s)

Adds one or more dates to an existing event, such as a workshop day or online session.

mutation {
  createOfferEventDate(
    offerEventDate: {
      offerEventId: "uuid-event"
      start: "2025-09-12T09:00:00Z"
      end: "2025-09-12T12:00:00Z"
    }
  ) {
    offerEventDate {
      id
      start
      end
    }
  }
}

Update event

Changes the properties of an existing event, such as title or limits.

mutation {
  updateOfferEvent(
    id: "uuid-here"
    offerEvent: {
      title: "New title"
      maxParticipants: 30
    }
  ) {
    offerEvent {
      id
      title
    }
  }
}

Archive event

Makes one or more events inactive.

mutation {
  archiveOfferEvents(
    archive: true
    ids: ["uuid-1", "uuid-2"]
  ) {
    response {
      succeededIds
      failedIds
    }
  }
}

GraphQL Definitions

Type: OfferEvent

Describes one registrable entry point for an Offer.

type OfferEvent {
  id: ID!
  ref: String
  title: String
  offerId: ID!
  contentId: ID
  contentType: ContentType
  dates: [OfferEventDate!]
  isActive: Boolean
  maxParticipants: Int
  enrolledCount: Int
  spotsAvailable: Int
  contentTitle: String
}

Type: OfferEventDate

Provides date/time information for sessions within an event.

type OfferEventDate {
  id: ID!
  offerEventId: ID!
  start: DateTime!
  end: DateTime!
}

Mutations

createOfferEvent(offerEvent: CreateOfferEventInput!): CreateOfferEventPayload
updateOfferEvent(id: UUID!, offerEvent: UpdateOfferEventInput!): UpdateOfferEventPayload
archiveOfferEvents(archive: Boolean!, ids: [UUID!]!): ArchiveOfferEventsPayload

createOfferEventDate(offerEventDate: CreateOfferEventDateInput!): CreateOfferEventDatePayload
updateOfferEventDate(id: UUID!, offerEventDate: UpdateOfferEventDateInput!): UpdateOfferEventDatePayload
deleteOfferEventDates(ids: [UUID!]!): DeleteOfferEventDatesPayload

Notes

  • Each OfferEvent can contain multiple OfferEventDates.
  • Registration occurs via enrollments at the OfferEvent level.
  • ContentType can be: TRAINING, COURSE, EXTERNAL_CONTENT, etc.
  • Archiving does not delete anything permanently, but makes the event unavailable.
Schließ die Richtung