Skip to content

Check auto assigned sessions

There may be products whose sessions cannot be chosen or it is not mandatory to choose them, in this case it is the system that assigns the sessions according to availability.

To find out if a product has auto-assigned sessions, check the TicketEnclosureAutoAssignSessionType property of the enclosure sessions node in the catalog.

Possible values of TicketEnclosureAutoAssignSessionType
  • 0: No. Sessions will not be auto-assigned. Must be defined during the sales flow.
  • 1: IfNotSet. Sessions will be auto-assigned if they have not been defined during the sales flow.
  • 2: ForceSet. Sessions will always be forcibly assigned, ignoring if they were defined during the sales flow.

Once the query is launched, the session that will be assigned when the cart is confirmed will be returned for information purposes.

The session obtained may not be the session assigned at the time of confirming the cart.

Access method

POST /autoassignsessions

Request structure

  • LanguageCode: (string). Defines the language in which the texts will be displayed. ISO 639-1 format.
  • Products: (list). Array of products for which you want to check the sessions.
    • ProductId: (string). Product identifier.
    • Quantity: (int). Product quantity.
    • AccessDate: (date). Access date. ISO 8601 format (yyyy-MM-dd).
    • Tickets: (list). Array of tickets for which we want to check auto assignment.
      • TicketId: (string). Ticket identifier.
      • AccessDate: (date) Optional. If indicated, it takes priority over the date indicated at the product level. ISO 8601 format (yyyy-MM-dd).

Request example

{
    "Products": 
    [
        {
            "ProductId": "hwuk9huaqopwo",
            "Quantity": 4,
            "AccessDate": "2022-06-02"
        }
    ]
}
{
    "Products": [
        {
            "ProductId": "hwuk9huaqopwo",
            "Quantity": 4,
            "AccessDate": "2022-06-02",
            "Tickets": 
            [
                {
                    "TicketId": "654e5ytetr"
                }
            ]
        }
    ]
}
{
    "Products": [
        {
            "ProductId": "hwuk9huaqopwo",
            "Quantity": 4,
            "AccessDate": "2022-06-02",
            "Tickets": 
            [
                {
                    "TicketId": "654e5ytetr",
                    "AccessDate": "2022-06-05"
                }
            ]
        }
    ]
}

Response structure

  • Products: (list). Array containing the requested products.

    • ProductId: (string). Product identifier.
    • AccessDate: (date). Product access date. ISO 8601 format (yyyy-MM-dd).
    • HasTicketEnclosures: (boolean). Boolean indicating whether the product has enclosures.
    • Tickets: (list). Array of requested product tickets.
      • TicketId: (string). Ticket identifier.
      • AccessDate: (date). Ticket access date. ISO 8601 format (yyyy-MM-dd).
      • TicketEnclosureId: (string). Enclosure identifier.
      • SessionId: (string). Assigned session identifier.
      • SessionTime: (date). Time of the assigned session in case one could be assigned.
      • SessionContentId: (string). Session content identifier.
      • SessionContentName: (string). Session content name.
      • 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.
      • ResultType: (byte). Attribute indicating the result of the auto assignment.

        Possible values
        • 0: Ok. Auto assignment was successful.
        • 1: HasNotTicketEnclosure. The product has no enclosures, therefore it is a product without sessions.
        • 2: TicketEnclosureSessionTypeIsNone. The product does not have sessions in any of its enclosures.
        • 3: TicketEnclosureDoesNotAcceptAutoAssign. The product does not have enclosures with sessions configured as auto-assignable.
        • 4: TicketEnclosureHasNoSessionsAvailable. There are no sessions available for the selected product and date.
  • 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

{
    "Products": 
    [
        {
            "ProductId": "hwuk9huaqopwo",
            "AccessDate": "2022-06-02",
            "HasTicketEnclosures": true,
            "Tickets": 
            [
                {
                    "TicketId": "654e5ytetr",
                    "AccessDate": "2022-06-02",
                    "TicketEnclosureId": "09aslkdfj354",
                    "SessionId": "lksdgjj4235",
                    "SessionTime": "18:00",
                    "SessionContentId": "nljkasdfjlk87",
                    "SessionContentName": "Viaje al centro de la tierra",
                    "ResultType": 0,
                    "SessionStartTimeType": 0
                }
            ]
        },
        {
            "ProductId": "6asd55fa6s5f",
            "AccessDate": "2022-06-02",
            "HasTicketEnclosures": true,
            "Tickets": 
            [
                {
                    "TicketId": "uy456i4yu654i",
                    "AccessDate": "2022-06-02",
                    "TicketEnclosureId": "09aslkdfj354",
                    "ResultType": 4,
                    "SessionStartTimeType": 1
                }
            ]
        }
    ],
    "Success": true,
    "Timestamp": "2022-02-18T17:02:27.8165916"
}