Accept challenge

POST /1/challenges/invites/{id}/accept

Accept challenge

Path parameters

  • id string Required

    The challenge invite id.

Responses

  • 200 application/json

    The accepted challenge.

    Hide response attribute Show response attribute object
    • challenge object
      Hide challenge attributes Show challenge attributes object
      • id string Required
      • type string Required
      • name string Required
      • startDate string Required
      • endDate string
      • metaData array[object] Required
        Hide metaData attributes Show metaData attributes object
        • id string Required
        • name string
        • type string Required
        • value integer Required
        • priority integer Required
      • timeZoneId string Required
      • totalRounds integer
      • currentRound integer
      • status string Required
      • language string
      • participantship object
        Hide participantship attributes Show participantship attributes object
        • id string

          Id of the participantship.

        • role string

          Role either user or admin.

      • invite object
        Hide invite attributes Show invite attributes object
        • id string

          Id of the invite.

        • date

          Role either user or admin.

      • jokers array[object] Required
        Hide jokers attributes Show jokers attributes object
        • id string

          Id of the joker.

        • participantId string

          Id of the participant.

        • date string

          When the joker has been applied.

      • participantMetaData array[object]
        Hide participantMetaData attributes Show participantMetaData attributes object
        • id string

          Id of the joker.

        • participantId string

          Id of the participant.

        • value integer

          The value of the meta data.

        • date string

          When the joker has been applied.

      • participants array[object] Required
        Hide participants attributes Show participants attributes object
        • id string Required
        • challengeId string Required
        • role string Required
        • user object Required
          Hide user attributes Show user attributes object
          • id string Required
          • nickname string Required
          • fullName string
          • email string Required
          • language string Required
          • startDate string Required
          • imageUrl string
          • waitingListValue number Required
          • notificationsEnabled boolean Required
          • notifyDaysBefore array[integer] Required
          • private boolean Required
          • yourFriendship object
            Hide yourFriendship attributes Show yourFriendship attributes object
            • id string Required
            • status string Required
            • date string Required
            • muted boolean
          • theirFriendship object
            Hide theirFriendship attributes Show theirFriendship attributes object
            • id string Required
            • status string Required
            • date string Required
            • muted boolean
      • nextParticipant object
        Hide nextParticipant attributes Show nextParticipant attributes object
        • id string Required
        • challengeId string Required
        • role string Required
        • user object Required
          Hide user attributes Show user attributes object
          • id string Required
          • nickname string Required
          • fullName string
          • email string Required
          • language string Required
          • startDate string Required
          • imageUrl string
          • waitingListValue number Required
          • notificationsEnabled boolean Required
          • notifyDaysBefore array[integer] Required
          • private boolean Required
          • yourFriendship object
            Hide yourFriendship attributes Show yourFriendship attributes object
            • id string Required
            • status string Required
            • date string Required
            • muted boolean
          • theirFriendship object
            Hide theirFriendship attributes Show theirFriendship attributes object
            • id string Required
            • status string Required
            • date string Required
            • muted boolean
      • nextParticipantDueDate string
      • nextParticipantWindowInSeconds integer
POST /1/challenges/invites/{id}/accept
curl \
 --request POST 'https://api.localsporthero.com/1/challenges/invites/{id}/accept'
Response examples (200)
{
  "challenge": {
    "id": "df2cd71c-d006-4a46-8e2a-d09503273f07",
    "type": "tag, goal, battle",
    "name": "De Marathon",
    "startDate": "2022-05-02T11:00:00.000Z",
    "endDate": "2022-05-02T11:00:00.000Z",
    "metaData": [
      {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "name": "Push-ups",
        "type": "seconds, meters, number or exercise",
        "value": 1000,
        "priority": 1
      }
    ],
    "timeZoneId": "Europe/Amsterdam",
    "totalRounds": 1,
    "currentRound": 1,
    "status": "pending, started, ended",
    "language": "nl, en",
    "participantship": {
      "id": "string",
      "role": "string"
    },
    "invite": {
      "id": "string",
      "date": "2022-05-02T11:00:00.000Z"
    },
    "jokers": [
      {
        "id": "string",
        "participantId": "string",
        "date": "2022-05-02T11:00:00.000Z"
      }
    ],
    "participantMetaData": [
      {
        "id": "string",
        "participantId": "string",
        "value": 42,
        "date": "2022-05-02T11:00:00.000Z"
      }
    ],
    "participants": [
      {
        "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "challengeId": "85362399-38e1-4255-87a0-f3f984ed16d9",
        "role": "user or admin",
        "user": {
          "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
          }
        }
      }
    ],
    "nextParticipant": {
      "id": "85362399-38e1-4255-87a0-f3f984ed16d9",
      "challengeId": "85362399-38e1-4255-87a0-f3f984ed16d9",
      "role": "user or admin",
      "user": {
        "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
        }
      }
    },
    "nextParticipantDueDate": "2022-05-02T11:00:00.000Z",
    "nextParticipantWindowInSeconds": 86400
  }
}