Backend SDK
Install
Section titled “Install”pnpm add @wodira/sdkQuickstart
Section titled “Quickstart”import { createWodiraClient } from '@wodira/sdk';
const wodira = createWodiraClient({ apiKey: process.env.WODIRA_API_KEY!,});
const events = await wodira.searchEvents({ status: 'PUBLISHED', limit: 20 });const pricing = await wodira.getPricingCards(events.data[0].id);Methods
Section titled “Methods”searchEventsSearch organizer eventsgetEventRead full event detailsgetPricingCardsRead categories, quotas, and pricescreateRegistrationCreate server-to-server registrationsearchRegistrationsSearch registrations/ticketsupdateRegistrationUpdate a registrationdeleteRegistrationCancel/delete a registrationsearchEvents
Section titled “searchEvents”Searches events for the authenticated organizer. Use it to sync catalogs, show internal listings, or find an eventId before reading pricing or registrations.
const events = await wodira.searchEvents({ search: 'Madrid', status: 'PUBLISHED', limit: 20, offset: 0,});- Endpoint:
POST /external/v1/organizer/events/search - Required scope:
events:read
getEvent
Section titled “getEvent”Reads full event details, including categories, form fields, waivers, sponsors, and active supplements.
const event = await wodira.getEvent('event_123');- Endpoint:
GET /external/v1/organizer/events/:eventId - Required scope:
events:read
getPricingCards
Section titled “getPricingCards”Returns sellable event categories with quota, registered count, base price, active price, and tiers. Use it before creating a registration.
const pricing = await wodira.getPricingCards('event_123');const firstCategory = pricing.cards[0];- Endpoint:
GET /external/v1/organizer/events/:eventId/pricing-cards - Required scope:
pricing:read
createRegistration
Section titled “createRegistration”Creates a registration from a trusted backend using a secret key. Do not use this method in the browser; for public checkout use createRegistrationCheckoutSession from @wodira/browser.
const order = await wodira.createRegistration({ eventId: 'event_123', categoryId: 'cat_123', purchaserEmail: 'buyer@example.com', purchaserName: 'Buyer Name', termsAccepted: true, athletes: [{ fullname: 'Ada Lovelace', email: 'ada@example.com' }],});- Endpoint:
POST /external/v1/organizer/registrations - Required scope:
registrations:write
searchRegistrations
Section titled “searchRegistrations”Searches registrations/tickets for reconciliation, support, or syncing with external systems.
const registrations = await wodira.searchRegistrations({ eventId: 'event_123', search: 'ada@example.com', limit: 50,});- Endpoint:
POST /external/v1/organizer/registrations/search - Required scope:
registrations:read
updateRegistration
Section titled “updateRegistration”Updates an existing registration from a backend when the integrator owns support or edit flows.
const ticket = await wodira.updateRegistration('ticket_123', { purchaserName: 'Ada L.',});- Endpoint:
PATCH /external/v1/organizer/registrations/:ticketId - Required scope:
registrations:write
deleteRegistration
Section titled “deleteRegistration”Cancels or deletes a registration from a backend according to WODira operational rules.
await wodira.deleteRegistration('ticket_123');- Endpoint:
DELETE /external/v1/organizer/registrations/:ticketId - Required scope:
registrations:write