TicketUserServices

<back to all web services

SelfServiceAvailableSeatsRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/availableSeatsSeats a buyer may pick for a seated exchange, grouped by section and row
import Foundation
import ServiceStack

public class SelfServiceAvailableSeatsRequest : Codable
{
    public var ticketTokenId:String?
    public var buyerPhone:String?
    public var toEventId:Int?
    public var toOwnerTicketTypeId:Int?
    public var toSeriesTicketTypeId:Int?

    required public init(){}
}

public class SelfServiceAvailableSeatsResult : SelfServiceTransferResultBase
{
    public var toEventId:Int?
    public var toTicketTypeName:String?
    public var assignedSeatId:Int?
    public var assignedSeatLabel:String?
    public var sections:[SelfServiceSeatSection] = []
    public var totalSeats:Int?
    public var selectableSeats:Int?
    public var truncated:Bool?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case toEventId
        case toTicketTypeName
        case assignedSeatId
        case assignedSeatLabel
        case sections
        case totalSeats
        case selectableSeats
        case truncated
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        toEventId = try container.decodeIfPresent(Int.self, forKey: .toEventId)
        toTicketTypeName = try container.decodeIfPresent(String.self, forKey: .toTicketTypeName)
        assignedSeatId = try container.decodeIfPresent(Int.self, forKey: .assignedSeatId)
        assignedSeatLabel = try container.decodeIfPresent(String.self, forKey: .assignedSeatLabel)
        sections = try container.decodeIfPresent([SelfServiceSeatSection].self, forKey: .sections) ?? []
        totalSeats = try container.decodeIfPresent(Int.self, forKey: .totalSeats)
        selectableSeats = try container.decodeIfPresent(Int.self, forKey: .selectableSeats)
        truncated = try container.decodeIfPresent(Bool.self, forKey: .truncated)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if toEventId != nil { try container.encode(toEventId, forKey: .toEventId) }
        if toTicketTypeName != nil { try container.encode(toTicketTypeName, forKey: .toTicketTypeName) }
        if assignedSeatId != nil { try container.encode(assignedSeatId, forKey: .assignedSeatId) }
        if assignedSeatLabel != nil { try container.encode(assignedSeatLabel, forKey: .assignedSeatLabel) }
        if sections.count > 0 { try container.encode(sections, forKey: .sections) }
        if totalSeats != nil { try container.encode(totalSeats, forKey: .totalSeats) }
        if selectableSeats != nil { try container.encode(selectableSeats, forKey: .selectableSeats) }
        if truncated != nil { try container.encode(truncated, forKey: .truncated) }
    }
}

public class SelfServiceTransferResultBase : Codable
{
    public var ok:Bool?
    public var statusCode:Int?
    public var code:String?
    public var message:String?

    required public init(){}
}

public class SelfServiceSeatSection : Codable
{
    public var sectionId:Int?
    public var sectionName:String?
    public var positionX:Double?
    public var positionY:Double?
    public var rotation:Double?
    public var viewType:String?
    public var seats:[SelfServiceSeatOption] = []

    required public init(){}
}

public class SelfServiceSeatOption : Codable
{
    public var seatId:Int?
    public var seatName:String?
    public var label:String?
    public var status:String?
    public var isSeat:Bool?
    public var selectable:Bool?
    public var positionX:Double?
    public var positionY:Double?
    public var rotation:Double?
    public var sortOrder:Double?
    public var rowId:Int?
    public var rowName:String?

    required public init(){}
}


Swift SelfServiceAvailableSeatsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /selfService/transferTicket/availableSeats HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SelfServiceAvailableSeatsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <BuyerPhone>String</BuyerPhone>
  <TicketTokenId>String</TicketTokenId>
  <ToEventId>0</ToEventId>
  <ToOwnerTicketTypeId>0</ToOwnerTicketTypeId>
  <ToSeriesTicketTypeId>0</ToSeriesTicketTypeId>
</SelfServiceAvailableSeatsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SelfServiceAvailableSeatsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Code>String</Code>
  <Message>String</Message>
  <Ok>false</Ok>
  <StatusCode>0</StatusCode>
  <AssignedSeatId>0</AssignedSeatId>
  <AssignedSeatLabel>String</AssignedSeatLabel>
  <Sections>
    <SelfServiceSeatSection>
      <PositionX>0</PositionX>
      <PositionY>0</PositionY>
      <Rotation>0</Rotation>
      <Seats>
        <SelfServiceSeatOption>
          <IsSeat>false</IsSeat>
          <Label>String</Label>
          <PositionX>0</PositionX>
          <PositionY>0</PositionY>
          <Rotation>0</Rotation>
          <RowId>0</RowId>
          <RowName>String</RowName>
          <SeatId>0</SeatId>
          <SeatName>String</SeatName>
          <Selectable>false</Selectable>
          <SortOrder>0</SortOrder>
          <Status>String</Status>
        </SelfServiceSeatOption>
      </Seats>
      <SectionId>0</SectionId>
      <SectionName>String</SectionName>
      <ViewType>String</ViewType>
    </SelfServiceSeatSection>
  </Sections>
  <SelectableSeats>0</SelectableSeats>
  <ToEventId>0</ToEventId>
  <ToTicketTypeName>String</ToTicketTypeName>
  <TotalSeats>0</TotalSeats>
  <Truncated>false</Truncated>
</SelfServiceAvailableSeatsResult>