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);If you are not using Node/TypeScript, you can call the same endpoints over HTTP. Each method below includes equivalent examples with @wodira/sdk, curl, and PHP without an SDK.
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,});curl -X POST "https://api.wodira.app/external/v1/organizer/events/search" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "search": "Madrid", "status": "PUBLISHED", "limit": 20, "offset": 0 }'$payload = [ 'search' => 'Madrid', 'status' => 'PUBLISHED', 'limit' => 20, 'offset' => 0,];
$ch = curl_init('https://api.wodira.app/external/v1/organizer/events/search');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode($payload, JSON_THROW_ON_ERROR),]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$events = json_decode($response, true, 512, JSON_THROW_ON_ERROR);- 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');curl "https://api.wodira.app/external/v1/organizer/events/event_123" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json"$eventId = rawurlencode('event_123');
$ch = curl_init("https://api.wodira.app/external/v1/organizer/events/{$eventId}");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', ],]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$event = json_decode($response, true, 512, JSON_THROW_ON_ERROR);- 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];curl "https://api.wodira.app/external/v1/organizer/events/event_123/pricing-cards" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json"$eventId = rawurlencode('event_123');
$ch = curl_init("https://api.wodira.app/external/v1/organizer/events/{$eventId}/pricing-cards");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', ],]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$pricing = json_decode($response, true, 512, JSON_THROW_ON_ERROR);$firstCategory = $pricing['cards'][0] ?? null;- 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', teamName: 'Team Ada', athletes: [ { fullname: 'Ada Lovelace', email: 'ada@example.com', phone: '+34600000000', gender: 'FEMALE', idNumber: '12345678A', birthDate: '1990-01-01', }, ],});curl -X POST "https://api.wodira.app/external/v1/organizer/registrations" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "eventId": "event_123", "categoryId": "cat_123", "teamName": "Team Ada", "athletes": [ { "fullname": "Ada Lovelace", "email": "ada@example.com", "phone": "+34600000000", "gender": "FEMALE", "idNumber": "12345678A", "birthDate": "1990-01-01" } ] }'$payload = [ 'eventId' => 'event_123', 'categoryId' => 'cat_123', 'teamName' => 'Team Ada', 'athletes' => [ [ 'fullname' => 'Ada Lovelace', 'email' => 'ada@example.com', 'phone' => '+34600000000', 'gender' => 'FEMALE', 'idNumber' => '12345678A', 'birthDate' => '1990-01-01', ], ],];
$ch = curl_init('https://api.wodira.app/external/v1/organizer/registrations');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode($payload, JSON_THROW_ON_ERROR),]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$order = json_decode($response, true, 512, JSON_THROW_ON_ERROR);- 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,});curl -X POST "https://api.wodira.app/external/v1/organizer/registrations/search" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "eventId": "event_123", "search": "ada@example.com", "limit": 50 }'$payload = [ 'eventId' => 'event_123', 'search' => 'ada@example.com', 'limit' => 50,];
$ch = curl_init('https://api.wodira.app/external/v1/organizer/registrations/search');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode($payload, JSON_THROW_ON_ERROR),]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$registrations = json_decode($response, true, 512, JSON_THROW_ON_ERROR);- 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', { teamName: 'Team Ada Updated', note: 'Updated from external CRM',});curl -X PATCH "https://api.wodira.app/external/v1/organizer/registrations/ticket_123" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "teamName": "Team Ada Updated", "note": "Updated from external CRM" }'$ticketId = rawurlencode('ticket_123');$payload = [ 'teamName' => 'Team Ada Updated', 'note' => 'Updated from external CRM',];
$ch = curl_init("https://api.wodira.app/external/v1/organizer/registrations/{$ticketId}");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode($payload, JSON_THROW_ON_ERROR),]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);
$ticket = json_decode($response, true, 512, JSON_THROW_ON_ERROR);- 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');curl -X DELETE "https://api.wodira.app/external/v1/organizer/registrations/ticket_123" \ -H "Authorization: Bearer $WODIRA_API_KEY" \ -H "Accept: application/json"$ticketId = rawurlencode('ticket_123');
$ch = curl_init("https://api.wodira.app/external/v1/organizer/registrations/{$ticketId}");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('WODIRA_API_KEY'), 'Accept: application/json', ],]);
$response = curl_exec($ch);if ($response === false) { throw new RuntimeException(curl_error($ch));}curl_close($ch);