Skip to content
Developer

Courses and sign-up on your own website

Show the course program from vynst on your website and accept sign-ups right there, with WordPress, on any other site, or through the API.

You maintain your course program in vynst (inwendo ERP). It should be up to date on your website, and interested people should be able to sign up right there. There are three ways to do this, depending on how your website is built.

Website Course list Sign-up
WordPress vynst Sync imports the courses as posts widget on the course page
any other widget per course, list added by hand or via the API Event sign-up widget
own app or own design public API public API

With WordPress

  1. Set up vynst Sync and enable the import on the tab Events. Every public course becomes a post, with categories and tags from vynst.
  2. Your theme builds the course overview like any other post list, for example as the archive /vynst-events/ or with a list block from your page builder.
  3. In the template of the single page, output the sign-up widget with the ID from vynst:
<?php $erpId = get_post_meta(get_the_ID(), 'erp_id', true); ?>
<div data-iw-event-signup
     data-iw-host="club.iw-erp.de"
     data-iw-event-id="<?php echo esc_attr($erpId); ?>"></div>
<script src="https://club.iw-erp.de/frontend_assets/backend/iw_erp_web_ui/event-signup.js" async></script>
  1. Create webhooks for events, so that new courses and changes appear on the website immediately. How to do this is described under vynst Sync.

Free places, sign-up period and prices are checked by the widget directly in vynst on every call. They are therefore always current, even if the post is older.

On any other website

For individual courses, place the sign-up widget on the course’s page. The ID is in vynst on the event. Instead of the ID, you can also use its short name:

<div data-iw-event-signup data-iw-host="club.iw-erp.de" data-iw-event-id="morning-yoga"></div>
<script src="https://club.iw-erp.de/frontend_assets/backend/iw_erp_web_ui/event-signup.js" async></script>

If your site builder does not allow HTML, use the shortcode [iw-event-signup host="club.iw-erp.de" event-id="morning-yoga"]. Setup and styling: Embed JavaScript widgets.

With the API

The API returns the list of public events without sign-in:

curl 'https://club.iw-erp.de/api/event/base_event?pageSize=20&page=1&withMaxPageNumber=1&orderFieldName=name&orderFieldSort=ASC' \
  --header 'x-iw-convert-to-camel-case: 1'
  • searchString is a free-text search. eventType, baseLocation and ageGroup filter by type, location and age group.
  • With withMaxPageNumber=1, the number of pages and results is in the headers X-IW-MAX-PAGES and X-IW-MAX-RESULTS.
  • GET /api/event/base_event/{id} returns a single course with all public details.

To sign up, first send the details to POST /api/event/public/test_base_event_signup. vynst checks the sign-up without saving it. If everything is fine, POST /api/event/public/base_event_signup creates the sign-up. If the course costs money, the response contains directBillingToken, and https://club.iw-erp.de/api/payment/redirect/{directBillingToken} leads to the payment. All fields are listed in the events API reference.

If you call the API from the browser, enter your website under CORS - Permitted origins.