Event import API description
Bla
Introduction
This API allows you to publish Events that will become visible on the ahead homepage. Events published in this way support
- Multilinguality (provided your tenant is set up that way)
- Association with one channel
- Targeting to show relevant content to your users
Given the example payload shown below under “Example”, the card on the homepage and on the “All events page” would like this:
While the following information would be presented to the user both in English and Spanish:
Request
The request’s content-type must be application/json.
The JSON must be an object with the following properties:
Property | Required | Type | Description |
---|---|---|---|
title | Yes | ML-string | The title of the event. |
location | Yes | ML-string | The location at which the event takes place. |
description | - | ML-string | A description that becomes part of the event page information. |
startDate | Yes | ISO-8601 datetime | The start date and time of the event |
endDate | - | ISO-8601 datetime | Optional end date and time of the event. |
author | Yes | object | An object identifying the author that should be used for this particular event. |
channelId | - | string | channel with which this event is associated. You get the id from the copy button in ahead’s channel administration. |
targeting | - | object | Any targeting information to be associated with this document (See further down for the contents of this object). |
Targeting
The “targeting” JSON object is constructed as described on this page:
ML String
The multilanguage string is a json object where the property is a lowercase two-letter ISO language code, and the value is a string.
Author object
The author object must contain one of
- the “employeeId” field. This field needs to correlate with a person’s “employeeId” value as stored in MS Entra.
- the “userPrincipalName” (UPN). This field needs to correlate with a person’s user principal name in MS Entra.
Validations
When choosing in which languages to publish the event, please note the following:
- The languages used must be available in the list of content languages that your tenant uses in ahead.
- The use of languages must be consistent throughout title, location and description.
For the choice of author, it will be checked that
- we can identify a person that can use ahead
- that particular person has editor permissions.
For the choice of targeting, it will be checked that
- The targeting reaches someone (i.e. somebody is targeted by that particular combination)
Example
The following would be an example payload: