Updates to program season webhooks

The following program season webhooks are updated to include session details:

  • Program Season (Create & Updated)
  • Shared Program Season (Date Updated)

Program Season

Updated events:

  • Created (PROGRAM_SEASON.CREATED)
  • Updated (PROGRAM_SEASON.UPDATED)

The webhooks are updated to include season level session details. The session details are all optional fields, and may include information such as number of sessions, days, times, gender and venue information. These fields will only be populated for local programs (for shared programs see updates to the Shared Program Season webhook below).

The table below details all the fields available in the webhooks. The fields highlighted as green text will be added to the webhooks as part of the upcoming update.

Field Name

Field Label

Field Description

Type

IsNullable

Comments / Questions

Id

Season Id

PlayHQ’s unique Id for Season

UUID

No

 

name

Season name

Name of the Season

String (no limited but defined fixed list)

No

 

programId

Program Id

Program Id that the Season belongs to

UUID

No

 

startDate

Season start date

Season start date

Date

No

this date is presented as a string and will be provided in the tenant’s timezone

endDate

Season end date

Season end date

Date

No

this date is presented as a string and will be provided in the tenant’s timezone

launchStatus

Launch Status

The launch status of the season

Boolean

No

this will always be set to “True” for local programs - there is no “launch” event

it will initially be “False” for shared programs (i.e. seasons belonging to programs where shared status = True) until the “Launch” button is pressed for the season by the org the owns the shared program - Note that this push event is handled separately

sessionCount

Sessions

Number of sessions that will be run in season

Integer

Yes

Field currently exists in the Program Season Groups webhook

gender

Gender

Gender of season

String (no limited but defined picklist)

Yes

Field currently exists in the Program Season Groups webhook

venueId

Venue ID

Venue that the season takes place at

UUID

Yes

Field currently exists in the Program Season Groups webhook

venueName

Venue Name

Venue name associated with the Venue ID

String (limited to 100 characters)

Yes

Field currently exists in the Program Season Groups webhook

venueLatitude

Venue Latitude

Venue latitude associated with the Venue ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

venue Longitude

Venue Longitude

Venue longitude associated with the Venue ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceId

Playing Surface ID

Playing Surface at Venue that the season takes place at

UUID

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceName

Playing Surface Name

Playing Surface name associated with the Venue ID

String (limited to 50 characters)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceLatitude

Playing Surface Latitude

Playing Surface latitude associated with the Playing Surface ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceLongitude

Playing Surface Longitude

Playing Surface longitude associated with the Playing Surface ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

daySessions

Days and Times

Array of the 7 days of the week that can be selected when setting up a program/season, with a start and end session times for each selected day.
Informs the days of the week that the program/season runs, and the session times

Object Array

Yes

There is currently a days array in the Program Season Groups webhook, but it does not include session times

daySessions.day

Day of Week

Day of the week that can be selected when creating / editing a season. Informs the days of the week that the season runs

String

Yes

 

daySessions.startTime

Start time

Start time of session

String

Yes

Stored in 24 hour time, eg. “13:15:00” for 1:15pm

daySessions.endTime

End time

End time of session

String

Yes

 

 

Below are sample responses, which include the new session details fields. Further information is also available on the PlayHQ docs site;

--------------------------------

PROGRAM SEASON CREATED

{
  "messageId": "96f3c7d0-1e26-4362-ac6c-2004fc239cc6",
  "eventType": "PROGRAM_SEASON.CREATED",
  "entityId": "068a62e8-cf9d-470f-b2f2-b08eac8c352e",
  "eventRaisedDateTime": "2021-03-22T23:43:08.407Z",
  "data": {
    "id": "068a62e8-cf9d-470f-b2f2-b08eac8c352e",
    "name": "2021",
    "programId": "7686fbbd-cfdb-40ca-8f5b-0c72a2acd8c9",
    "startDate": "2021-04-01",
    "endDate": "2021-04-30",
    "launchStatus": true,
    "sessionCount": 10,
    "gender": "MIXED",
    "venueId": "520c2351-8903-458b-ba13-798663a30f8a",
    "venueName": "my first venue",
    "venueLatitude": "32",
    "venueLongitude": "-32",
    "playingSurfaceId": "d202c1e0-916d-4914-b0ee-c3c96f3f5b3a",
    "playingSurfaceName": "another court",
    "playingSurfaceLatitude": "32",
    "playingSurfaceLongitude": "-32",
    "daySessions": [
      {
        "day": "MONDAY",
        "startTime": "09:30:00",
        "endTime": "17:30:00",
      },
      {
        "day": "WEDNESDAY",
        "startTime": "10:00:00",
        "endTime": "14:30:00",
      },
      {
        "day": "SATURDAY",
        "startTime": "10:30:00",
        "endTime": "15:30:00",
      }
    ],
    "eventRaisedDateTime": "2021-03-22T23:43:08.407Z"
  }
}

--------------------------------

PROGRAM SEASON UPDATED

{
  "messageId": "90f26bcb-75a8-47b3-8c1b-84487ae27aa1",
  "eventType": "PROGRAM_SEASON.UPDATED",
  "entityId": "068a62e8-cf9d-470f-b2f2-b08eac8c352e",
  "eventRaisedDateTime": "2021-03-22T23:50:43.215Z",
  "data": {
    "id": "068a62e8-cf9d-470f-b2f2-b08eac8c352e",
    "name": "2021",
    "programId": "7686fbbd-cfdb-40ca-8f5b-0c72a2acd8c9",
    "startDate": "2021-04-01",
    "endDate": "2021-05-22",
    "launchStatus": true,
    "sessionCount": 10,
    "gender": "MIXED",
    "venueId": "520c2351-8903-458b-ba13-798663a30f8a",
    "venueName": "my first venue",
    "venueLatitude": "32",
    "venueLongitude": "-32",
    "playingSurfaceId": "d202c1e0-916d-4914-b0ee-c3c96f3f5b3a",
    "playingSurfaceName": "another court",
    "playingSurfaceLatitude": "32",
    "playingSurfaceLongitude": "-32",
    "daySessions": [
      {
        "day": "MONDAY",
        "startTime": "09:30:00",
        "endTime": "17:30:00",
      },
      {
        "day": "WEDNESDAY",
        "startTime": "10:00:00",
        "endTime": "14:30:00",
      },
      {
        "day": "SATURDAY",
        "startTime": "10:30:00",
        "endTime": "15:30:00",
      }
    ],
    "eventRaisedDateTime": "2021-03-22T23:50:43.215Z"
  }
}

 

Shared Program Season

Updated events:

  • Date Updated (SHARED_PROGRAM_SEASON.DATE_UPDATED)

The Shared Program Season - Date Updated webhook is updated to include season level session details. The session details are all optional fields, and may include information such as number of sessions, days, times, gender and venue information. These fields will only be populated (if entered) for both shared and local programs.

The table below details all the fields available in the Shared Program Season - Date Updated webhook. The fields highlighted as green text will be added to the webhook as part of the upcoming update.

Field Name

Field Label

Field Description

Type

IsNullable

Comments/ Questions

seasonId

Season Id

PlayHQ’s unique Id for Season

UUID

No

 

organisationId

Organisation Id

PlayHQ’s unique identifier for the organisation participating in the program

UUID

No

 

startDate

Season start date

Season start date

Date

No

this date is presented as a string and will be provided in the tenant’s timezone

endDate

Season end date

Season end date

Date

No

this date is presented as a string and will be provided in the tenant’s timezone

sessionCount

Sessions

Number of sessions that will be run in season

Integer

Yes

Field currently exists in the Program Season Groups webhook

gender

Gender

Gender of season

String (no limited but defined picklist)

Yes

Field currently exists in the Program Season Groups webhook

venueId

Venue ID

Venue that the season takes place at

UUID

Yes

Field currently exists in the Program Season Groups webhook

venueName

Venue Name

Venue name associated with the Venue ID

String (limited to 100 characters)

Yes

Field currently exists in the Program Season Groups webhook

venueLatitude

Venue Latitude

Venue latitude associated with the Venue ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

venue Longitude

Venue Longitude

Venue longitude associated with the Venue ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceId

Playing Surface ID

Playing Surface at Venue that the season takes place at

UUID

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceName

Playing Surface Name

Playing Surface name associated with the Venue ID

String (limited to 50 characters)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceLatitude

Playing Surface Latitude

Playing Surface latitude associated with the Playing Surface ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

playingSurfaceLongitude

Playing Surface Longitude

Playing Surface longitude associated with the Playing Surface ID

String (no limit)

Yes

Field currently exists in the Program Season Groups webhook

daySessions

Days and Times

Array of the 7 days of the week that can be selected when setting up a program/season, with a start and end session times for each selected day.
Informs the days of the week that the program/season runs, and the session times

Object Array

Yes

There is currently a days array in the Program Season Groups webhook, but it does not include session times

daySessions.day

Day of Week

Day of the week that can be selected when creating / editing a season. Informs the days of the week that the season runs

String

Yes

 

daySessions.startTime

Start time

Start time of session

String

Yes

Stored in 24 hour time, eg. “13:15:00” for 1:15pm

daySessions.endTime

End time

End time of session

String

Yes

 

 

Below is a sample response, which include the new session details fields. Further information is also available on the PlayHQ docs site;

--------------------------------

SHARED PROGRAM SEASON DATE UPDATED

{
  "messageId": "74670b3d-e581-4e9a-b91b-5eb7adc1ab30",
  "eventType": "SHARED_PROGRAM_SEASON.DATE_UPDATED",
  "entityId": "db652b97-4c97-4949-a919-515a37926f97",
  "eventRaisedDateTime": "2022-09-11T19:39:30.638Z",
  "data": {
    "organisationId": "bc86c47b-26d6-432f-a315-af9f4a413f28",
    "seasonId": "1588add6-8928-44af-8772-fe962a521eda",
    "seasonStartDate": "2022-09-01T00:00:00.000Z",
    "seasonEndDate": "2022-11-30T00:00:00.000Z"
    "sessionCount": 10,
    "gender": "MIXED",
    "venueId": "520c2351-8903-458b-ba13-798663a30f8a",
    "venueName": "my first venue",
    "venueLatitude": "32",
    "venueLongitude": "-32",
    "playingSurfaceId": "d202c1e0-916d-4914-b0ee-c3c96f3f5b3a",
    "playingSurfaceName": "another court",
    "playingSurfaceLatitude": "32",
    "playingSurfaceLongitude": "-32",
    "daySessions": [
      {
        "day": "MONDAY",
        "startTime": "09:30:00",
        "endTime": "17:30:00",
      },
      {
        "day": "WEDNESDAY",
        "startTime": "10:00:00",
        "endTime": "14:30:00",
      },
      {
        "day": "SATURDAY",
        "startTime": "10:30:00",
        "endTime": "15:30:00",
      }
    ],
  }
}

 

Additional affected webhooks

The following webhooks will also include session program details, but they can be ignored

  • LOCAL_PROGRAM_SEASON.ORGANISATION_PARTICIPATED
  • LOCAL_PROGRAM_SEASON.DATE_UPDATED
  • SHARED_PROGRAM_SEASON.SHARE_STATUS_ON
  • SHARED_PROGRAM_SEASON.SHARE_STATUS_OFF
  • PROGRAM_SEASON.LAUNCHED

 

 

 

Was this article helpful?
0 out of 0 found this helpful