Skip to content

Sessions

A session is defined by date and time, content, and, optionally, available capacity.

According to this definition, the same session can be shared by several tickets. The tickets "Adult Ticket", "Child Ticket", "Junior Ticket", "Senior Ticket" and "Disabled Ticket" can be associated with the same sessions during the current year (for example, 10 sessions per day during the 365 days of the year).

Because this situation can be common, we have tried to separate the session structure from the product catalog as much as possible. Following the previous example, if the sessions were defined in the product catalog, we would have 10 sessions x 365 days = 3650 sessions for each of the 5 tickets ("Adult Ticket", "Child Ticket", "Junior Ticket", "Senior Ticket" and "Disabled Ticket").

Therefore, the session structure is defined to minimize the data load and organize the session catalog as well as possible.

Access method

POST activity/sessions

Request structure

To obtain the sessions we can use different filters in the body of the method. Each filter will be considered an AND.

  • SessionsGroupProfileIds: (list). Array of session group profiles.
    • (string): Session group profile identifier.
  • SessionsGroupIds: (list). Array of session groups.
    • (string): Session group identifier.
  • SessionContentProfileIds: (list). Array of session content profiles.
    • (string): Session content profile identifier.
  • FromDate: (string). Filter by start date. Does not allow values earlier than today. The default value is the current day. ISO 8601 format (yyyy-MM-dd).
  • ToDate: (string). Filter by end date. Its default value is the date corresponding to one year from now. ISO 8601 format (yyyy-MM-dd).
  • Dates: (list). Array of dates to filter by. ISO 8601 format (yyyy-MM-dd).
    • (date): Date to filter by.
  • LanguageCode: (string). Content language code.

Request examples

{
    "SessionsGroupProfileIds": 
    [
        "dj48vjsyufvyu",
        "ajr7v0alt62hl"
    ]
}
{
    "SessionContentProfileIds": 
    [
        "xar5v1blt61h2",
        "z2rrv6alvb2hs"
    ]
}
{
    "SessionsGroupIds": 
    [
        "ajr7v0alt62hl"
    ]
}
{
    "FromDate": "2000-01-06",
    "ToDate": "2000-01-20"
}
{
    "Dates": 
    [
        "2000-01-06",
        "2000-05-12",
        "2000-07-21"
    ]
}
{
   "SessionsGroupProfileIds": 
   [
       "dj48vjsyufvyu"
   ],
   "SessionContentProfileIds": 
   [
        "xar5v1blt61h2"
   ],
   "FromDate": "2000-01-06",
   "ToDate": "2000-10-20"
}

Response structure

  • SessionsGroupProfiles: (list). Array of session group profiles.
    • SessionsGroupProfileId: (string). Session group profile identifier.
    • SessionsGroupProfileName: (string). Session group profile name.
    • SessionTimeAvailabilityOffset: (int). Number of minutes before (if the value is negative) or after (if the value is positive) when the session can be on sale with respect to the session time.
    • SessionStartTimeType: (int). Numeric identifier that indicates the session access start type.
      • 0: (int): Access at the indicated time.
      • 1: (int): Access from the indicated time onwards.
    • SessionsGroups: (list). Array of session groups.
      • SessionsGroupId: (string). Session group identifier.
      • SessionsGroupName: (string). Session group name.
      • Sessions: (list). Array of sessions.
        • SessionId: (string). Session identifier.
        • SessionTime: (date). Session date and time.
        • AvailableCapacity: (int). Value that indicates the session capacity. If this field does not exist, there is no limited capacity. If you only want to check the capacity of a session, you can use the method described in Obtaining available capacity.
  • SessionContentProfiles: (list). Array of session content profiles.
    • SessionContentProfileId: (string). Session content profile identifier.
    • SessionContentProfileName: (string). Session content profile name.
    • SessionContents: (list). Array of session contents.
      • SessionContentId: (string). Session content identifier.
      • SessionContentName: (string). Session content name.
      • SessionContentDescription: (string). Session content description.
  • Success (boolean): value that indicates whether the call was processed correctly or not.
  • Timestamp (dateTime): time at which the request was processed. ISO 8601 format (yyyy-MM-ddThh:mm:ss.fffffff).
  • ErrorMessage (string): error message explaining why the request was not successful. If it was correct, it will return null.
  • ErrorCodes (string[]): list of codes that identify the errors that occurred in the call.
  • ErrorEntityBreakDown (list): list that contains objects with the name and ID in case of error.
    • Id (string): identifier
    • Name (string): related name of the identifier.

Response example

As an example, suppose we have a default session group profile and a default session content profile.

Within the session group profile we can see that there are two session groups:

  • Morning sessions, which group the 10:00 a.m. sessions.
  • Afternoon sessions, which group the 5:00 p.m. sessions.

In the session content profile we have three session contents, which define movies (1, 2 and 3).

Seen from the reverse point of view, the most important entities are sessions on one side and contents on the other. Both entities have higher-level groupings (groups and profiles), with the sole purpose of organizing the structure.

Important

At this point we have only defined which sessions and contents exist, but we do not know the relationship between sessions and contents. That is the responsibility of the sessions section of the product catalog.

{
    "SessionsGroupProfiles": 
    [
        {
            "SessionsGroupProfileId": "cwj3q99xa8ara",
            "SessionsGroupProfileName": "Perfil de grupos por defecto",
            "SessionStartTimeType": 0,
            "SessionsGroups": 
            [
                {
                    "SessionsGroupId": "7q59grjg1tuxw",
                    "SessionsGroupName": "Sesiones de mañana",
                    "Sessions": 
                    [
                        {
                            "SessionId": "5b8qkqnmhdmk1",
                            "SessionTime": "2017-06-21T10:00:00",
                            "AvailableCapacity": 165
                        },
                        {
                            "SessionId": "5o3bwhx1ze1m1",
                            "SessionTime": "2017-09-06T10:00:00",
                            "AvailableCapacity": 230
                        }
                    ]
                },
                {
                    "SessionsGroupId": "gg5dfgrg1t12w",
                    "SessionsGroupName": "Sesiones de tarde",
                    "Sessions": 
                    [
                        {
                            "SessionId": "8qkqhdmknm5b1",
                            "SessionTime": "2017-06-21T17:00:00",
                            "AvailableCapacity": 165
                        },
                        {
                            "SessionId": "5hx1z3bowe1m1",
                            "SessionTime": "2017-09-06T17:00:00",
                            "AvailableCapacity": 230
                        }
                    ]
                }
            ]
        }
    ],
    "SessionContentProfiles": 
    [
        {
            "SessionContentProfileId": "5e8f65nherwpc",
            "SessionContentProfileName": "Perfil de contenidos por defecto",
            "SessionContents": 
            [
                {
                    "SessionContentId": "fiajih99h79ak",
                    "SessionContentName": "Película 1"
                },
                {
                    "SessionContentId": "m6noaxhzr33an",
                    "SessionContentName": "Película 2"
                },
                {
                    "SessionContentId": "suefs1zzn5ser",
                    "SessionContentName": "Película 3"
                }
            ]
        }
    ],
    "Success": true,
    "Timestamp": "2022-02-18T17:02:27.8165916"
}