This guide walks you step by step through creating a public-facing registration form for Administrate events, including the technical setup and expected outcomes for each step.
Contents
- Overview
- Prerequisites
- Step 1: Create a webhook in Administrate
- Step 2: Add custom fields in Administrate
- Step 3: Handle webhook requests
- Step 4: Display the public event page
- Step 5: Build the registration form
- Step 6: Register the learner via API
- Benefits
Overview
This integration enables you to:
- generate a public registration link for Administrate events
- display a QR code that links to the registration form
- let event managers share the link or display the QR code for walk-in registrations
- automatically store and manage these URLs in Administrate
Example scenario: An event manager prints the QR code and posts it outside the training room. Walk-in learners can scan the code and register on their phones.
Prerequisites
Before starting, ensure you have:
- access to the Administrate Developer Portal
- an API key and secret
- access to your Administrate instance
- completed the OAuth flow so you have access tokens ready
- a web server or application that can receive webhook requests
Expected outcome: By the end of this step, you can authenticate and make API calls to Administrate.
Step 1: Create a Webhook in Administrate
Add a manual webhook to the Events page so it can be triggered from the event’s Add-ons section.
Purpose: When triggered, this webhook sends event details to your endpoint so you can generate a public URL.
1.1 Find the webhook type
query webhookTypes {
webhookTypes(
filters: [
{ field: trigger, operation: eq, value: "manual" },
{ field: name, operation: like, value: "%event%" }
]
) {
edges { node { id name description } }
}
}Expected outcome: You receive a list of webhook types and the ID needed for the next step.
1.2 Create the webhook
mutation create {
webhooks {
create(input:{
webhookTypeId: "WEBHOOK_TYPE_ID",
name: "Generate Public URL",
url: "https://yourendpointurl",
notificationEmails: ["youremail@example.com"]
}) {
webhook { id lifecycleState }
errors { label message value }
}
}
}Expected outcome: A webhook entry appears in the event Add-ons menu.
1.3 Activate the webhook
mutation updateWebhook {
webhooks {
update(input:{
webhookId: "YOUR_WEBHOOK_ID",
lifecycleState: active
}) {
webhook { id lifecycleState }
errors { label message value }
}
}
}Expected outcome: The webhook status changes to active.
Step 2: Add Custom Fields in Administrate
Create the following custom fields:
-
nr-public-url(text) - stores the registration link -
nr-available-public(checkbox) - lets you publish or unpublish the link
Expected outcome: These fields appear in the event’s custom field section.
Step 3: Handle Webhook Requests
When the webhook fires, your endpoint should:
- receive event details
- generate a public registration URL
- store it in the
nr-public-urlfield
PHP example:
public function handleWebhook(Request $request, TMSOAuthController $weblinkController) {
$eventID = $request->input('payload.event.id');
$eventUrl = $this->generateEventUrl($eventID);
$encodedId = base64_encode("Course:$eventID");
$this->storeEventUrl($encodedId, $eventUrl, $weblinkController);
return response()->json([
'event_url' => $eventUrl,
'status' => "success"
]);
}Expected outcome: A public URL is generated and saved in Administrate.
Step 4: Display the Public Event Page
When learners visit the link, they should see:
- event details such as title, code, and date
- a QR code for registration
- a direct link to the registration form
Example HTML snippet:
<h1>{{ $event->title }}</h1>
<p>Event Code: {{ $event->code }}</p>
<div>{!! $qrCode !!}</div>
<a href="{{ url('/events/'.$event->id.'/register') }}">Register Here</a>Expected outcome: Learners can either scan the QR code or click the link to register.
Step 5: Build the Registration Form
The form should collect:
- first name
- last name
- company (optional)
Example HTML:
<form method="POST"> @csrf <input name="firstname" required> <input name="lastname" required> <input name="email" type="email" required> <input name="company"> <button type="submit">Register</button> </form>
Expected outcome: Submitting the form creates or finds the learner account and registers them for the event.
Step 6: Register the Learner via API
mutation addLearner {
event {
registerContacts(
eventId: "event_id",
input: { contacts: ["contact_id"], notes: "company" }
) {
event { id }
}
}
}Expected outcome: The learner is added to the event in Administrate.
Benefits
- no login needed - a public link or QR code simplifies access
- fast check-in - useful for walk-in registrations
- control access - use the publish checkbox to make the form available or hidden
- full integration - all registrations flow directly into Administrate
If you need setup help, please contact our Zendesk support team.