Create trigger Deprecated

POST /1/triggers

Create trigger

application/json

Body

  • userId string Required

    The receiver of the trigger.

  • text string

    Extra comment.

  • type string Required

    push or praise

  • replyId string

    The id of the trigger that's being replied.

  • The id of the checkin that's being replied.

Responses

POST /1/triggers
curl \
 --request POST 'https://api.localsporthero.com/1/triggers' \
 --header "Content-Type: application/json" \
 --data '{"userId":"string","text":"string","type":"string","replyId":"string","checkinId":"string"}'
Request examples
{
  "userId": "string",
  "text": "string",
  "type": "string",
  "replyId": "string",
  "checkinId": "string"
}
Response examples (200)
{
  "trigger": {
    "id": "df2cd71c-d006-4a46-8e2a-d09503273f07",
    "fromUser": {
      "id": "1ab474d5-e1fa-4340-ba6a-5642e720ea6a",
      "nickname": "Stevertje",
      "fullName": "Stefan de Jong",
      "email": "stefandejong@gmail.com",
      "language": "nl",
      "startDate": "2022-05-02T11:00:00.000Z",
      "imageUrl": "https://example.org/image.jpg",
      "waitingListValue": 0,
      "notificationsEnabled": true,
      "notifyDaysBefore": [
        -1,
        1
      ],
      "private": false,
      "yourFriendship": {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "status": "requested, accepted or blocked",
        "date": "2022-05-02T11:00:00.000Z",
        "muted": false
      },
      "theirFriendship": {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "status": "requested, accepted or blocked",
        "date": "2022-05-02T11:00:00.000Z",
        "muted": false
      }
    },
    "toUser": {
      "id": "1ab474d5-e1fa-4340-ba6a-5642e720ea6a",
      "nickname": "Stevertje",
      "fullName": "Stefan de Jong",
      "email": "stefandejong@gmail.com",
      "language": "nl",
      "startDate": "2022-05-02T11:00:00.000Z",
      "imageUrl": "https://example.org/image.jpg",
      "waitingListValue": 0,
      "notificationsEnabled": true,
      "notifyDaysBefore": [
        -1,
        1
      ],
      "private": false,
      "yourFriendship": {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "status": "requested, accepted or blocked",
        "date": "2022-05-02T11:00:00.000Z",
        "muted": false
      },
      "theirFriendship": {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "status": "requested, accepted or blocked",
        "date": "2022-05-02T11:00:00.000Z",
        "muted": false
      }
    },
    "text": "FF AAN DE SLAG BRUUR",
    "viewed": false,
    "date": "2022-05-02T11:00:00.000Z",
    "type": "praise or push",
    "replyId": "df2cd71c-d006-4a46-8e2a-d09503273f07",
    "checkinId": "df2cd71c-d006-4a46-8e2a-d09503273f07"
  }
}