Skip to main content
POST
/
integration
/
spiideo
/
v1
/
event_type_mappings
cURL
curl --request POST \
  --url https://api.mottostreaming.com/integration/spiideo/v1/event_type_mappings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "motto_event_type": "<string>",
  "home_team_field": "<string>",
  "away_team_field": "<string>",
  "scene_field": "<string>",
  "sport_field": "<string>",
  "home_color_field": "<string>",
  "away_color_field": "<string>",
  "description_field": "<string>",
  "spiideo_graphic_package_id": "<string>",
  "spiideo_storyboard_id": "<string>",
  "spiideo_production_recipe_id": "<string>"
}'
{
  "event_type_mapping": {
    "motto_event_type": "<string>",
    "home_team_field": "<string>",
    "away_team_field": "<string>",
    "scene_field": "<string>",
    "sport_field": "<string>",
    "home_color_field": "<string>",
    "away_color_field": "<string>",
    "description_field": "<string>",
    "spiideo_graphic_package_id": "<string>",
    "spiideo_storyboard_id": "<string>",
    "spiideo_production_recipe_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

project_id
string

Body

application/json

SpiideoEventTypeMapping maps a Motto event type to Spiideo event properties.

motto_event_type
string
required

The Motto event type this mapping applies to.

home_team_field
string
required

Field name on the Motto event type that maps to the home team. This has to be an entity reference. E.g. fields.home_team

away_team_field
string
required

Field name on the Motto event type that maps to the away team. This has to be an entity reference. E.g. fields.away_team

scene_field
string
required

Field name on the Motto event type that maps to the scene/venue. This has to be an entity reference. E.g. fields.stadium or fields.venue

home_color_field
string
required

Field name on the Motto event type that maps to the home team color. This has to be a string field that contains a color value, e.g. "#FF0000" for red. E.g. fields.home_color

away_color_field
string
required

Field name on the Motto event type that maps to the away team color. This has to be a string field that contains a color value, e.g. "#0000FF" for blue. E.g. fields.away_color

description_field
string
required

Field name on the Motto event that maps to the Spiideo game description, which shows above the scoreboard in the Spiideo streams. This must be an entity reference OR a string field. E.g. fields.competition (in which case the name of the referenced competition will be the description) E.g. description or fields.some_custom_description (in which case the value of the field will be the description)

sport_field
string

Field name on the Motto event type that maps to the sport. This has to be an entity reference OR if it matches exactly the Spiideo sport enum values, a string field, E.g. fields.sport (which may be an entity reference) E.g. fields.sport_type (which may be resolve to a string field with values like "football", "basketball", etc.) E.g. football (a hard-coded string field, instead of a resolvable field keypath).

If not set, there are two alternative ways to indicate which sport should be used when an event of this type is created:

  1. The Spiideo sport configured on the TeamTypeMapping. This means the sport will be taken from the home team on the event.
  2. The Spiideo sport configured on the SpiideoIntegration. This is a last resort, if no other sport can be determined.
spiideo_graphic_package_id
string

The Spiideo graphic package ID to use for any Spiideo game object created for this event type. Required, unless using the production recipe ID.

spiideo_storyboard_id
string

The Spiideo storyboard ID to use for any Spiideo game object created for this event type. Required, unless using the production recipe ID.

spiideo_production_recipe_id
string

The Spiideo production recipe ID to use for any Spiideo game object created for this event type. Required, unless using the graphic package ID and storyboard ID.

Response

OK

event_type_mapping
object

SpiideoEventTypeMapping maps a Motto event type to Spiideo event properties.

I