Basic usage of Integration API
Please find the technical documentation here.
How to get access
You will be using one of your organizer administrators to access the API.
Use the following URL to get a token that you must include with all your requests:
POST:
https://legacyapi.deltager.no/token
content-type: application/x-www-form-urlencoded
BODY:
grant_type=password&username={username}&password={password}&affid=1
Please note that you need to include the id(affid) for the site your organizer is hosted on.
If you are not sure about this, please contact us and we will provide this for you.
You will receive a JSON response when you have successfully logged in. Please store the token located in the property “access_token” for future use.
You need to include the following header for any API requests:
"Authorization": "bearer {your token}"
Note that your token will eventually expire. In that case you will need to reauthenticate to get a new token.
Please note that most POST/UPDATE/DELETE methods will require elevated permissions. We will add these for you upon request.
Recommended workflows
Get your organizer(s)
Get a list of your organizers by calling “the GET /organizers” endpoint. This will provide you with the id of your organizer(s). This is needed when fetching the event list
Getting a list of events
For getting a list of events for one specific organizer, you will use the GET “/organizers/{organizerId}/events” endpoint. This endpoint supports paging and filtering by text and start/end dates. The id of each event must be used when fetching the events registered participants.
Getting a list of registered participants
When getting a list of registrations for an event you should use the GET “/events/{eventId}/orders/orderdetails” endpoint.
This will return all orders/participants for an event without any filtering options. Any paging and/or filtering will have to be done on your client.
Callbacks and notifications
If you would like to receive notification in real-time when an event occurs you can use our web hooks.
Webhooks
To get a list of available hooks use the GET “/webhooks” endpoint. Current hooks include event added/updated and registration added/deleted. You will need to use the name (“hookName”) of the hook you want to subscribe to.
Subscribing to a specific hook
Use the POST “/webhooks” endpoint for subscribing to a specific hook.
It takes a JSON object with the following properties.
{
"webHookType": "string"
"hookUrl": "string",
"organizerId": 0,
"eventId": 0,
}
“WebhookType” is the “hookName” you got from the list of available hooks.
“HookUrl” is the url that will be called whenever an event occurs. This will usually be a page on your server.
Use either “organizerId” or “eventId” depending on use case. When subscribing to new events, you would have to set organizerId.
When subscribing to new registrations you can choose to subscribe to just one event or all events on the specified organizer.
To be notified when a specific event has a new registration, set “eventId” with the id of the event. Set “OrganizerId” to 0;
To be notified when any event on a specified organizer has a new registration, set “organizerId” with the id of the organizer. Set “eventId” to 0;
Bli bedre kjent med våre løsninger for påmelding, booking og betaling på LetsReg. |
Kommentarer
0 kommentarer
Artikkelen er stengt for kommentarer.