TicketUserServices

<back to all web services

EventsSearchRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/Event/Search
import 'package:servicestack/servicestack.dart';

class Event implements IConvertible
{
    int? id;
    String? name;
    String? description;
    String? externalReference;
    DateTime? timeOfEvent;
    int? eventLocationId;
    int? eventSeriesId;
    int? eventOwnerId;
    bool? eventActive;
    String? defaultValues;
    String? externalReferenceType;
    bool? postponedNoDate;
    String? awayTeamExternalId;
    String? sportGenderId;
    bool? saleIsActive;
    String? seatingImageUrl;
    int? venueId;
    int? awayTeamOwnerId;
    String? detailedDescription;
    String? imageUrl;
    String? directAccessCode;
    String? imageUrl2;
    bool? hideEvent;
    bool? ownerCardsNotAllowed;
    DateTime? endOfEvent;
    DateTime? endOfEventUTC;
    String? timeZone;
    DateTime? timeOfEventUTC;

    Event({this.id,this.name,this.description,this.externalReference,this.timeOfEvent,this.eventLocationId,this.eventSeriesId,this.eventOwnerId,this.eventActive,this.defaultValues,this.externalReferenceType,this.postponedNoDate,this.awayTeamExternalId,this.sportGenderId,this.saleIsActive,this.seatingImageUrl,this.venueId,this.awayTeamOwnerId,this.detailedDescription,this.imageUrl,this.directAccessCode,this.imageUrl2,this.hideEvent,this.ownerCardsNotAllowed,this.endOfEvent,this.endOfEventUTC,this.timeZone,this.timeOfEventUTC});
    Event.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        description = json['description'];
        externalReference = json['externalReference'];
        timeOfEvent = JsonConverters.fromJson(json['timeOfEvent'],'DateTime',context!);
        eventLocationId = json['eventLocationId'];
        eventSeriesId = json['eventSeriesId'];
        eventOwnerId = json['eventOwnerId'];
        eventActive = json['eventActive'];
        defaultValues = json['defaultValues'];
        externalReferenceType = json['externalReferenceType'];
        postponedNoDate = json['postponedNoDate'];
        awayTeamExternalId = json['awayTeamExternalId'];
        sportGenderId = json['sportGenderId'];
        saleIsActive = json['saleIsActive'];
        seatingImageUrl = json['seatingImageUrl'];
        venueId = json['venueId'];
        awayTeamOwnerId = json['awayTeamOwnerId'];
        detailedDescription = json['detailedDescription'];
        imageUrl = json['imageUrl'];
        directAccessCode = json['directAccessCode'];
        imageUrl2 = json['imageUrl2'];
        hideEvent = json['hideEvent'];
        ownerCardsNotAllowed = json['ownerCardsNotAllowed'];
        endOfEvent = JsonConverters.fromJson(json['endOfEvent'],'DateTime',context!);
        endOfEventUTC = JsonConverters.fromJson(json['endOfEventUTC'],'DateTime',context!);
        timeZone = json['timeZone'];
        timeOfEventUTC = JsonConverters.fromJson(json['timeOfEventUTC'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'description': description,
        'externalReference': externalReference,
        'timeOfEvent': JsonConverters.toJson(timeOfEvent,'DateTime',context!),
        'eventLocationId': eventLocationId,
        'eventSeriesId': eventSeriesId,
        'eventOwnerId': eventOwnerId,
        'eventActive': eventActive,
        'defaultValues': defaultValues,
        'externalReferenceType': externalReferenceType,
        'postponedNoDate': postponedNoDate,
        'awayTeamExternalId': awayTeamExternalId,
        'sportGenderId': sportGenderId,
        'saleIsActive': saleIsActive,
        'seatingImageUrl': seatingImageUrl,
        'venueId': venueId,
        'awayTeamOwnerId': awayTeamOwnerId,
        'detailedDescription': detailedDescription,
        'imageUrl': imageUrl,
        'directAccessCode': directAccessCode,
        'imageUrl2': imageUrl2,
        'hideEvent': hideEvent,
        'ownerCardsNotAllowed': ownerCardsNotAllowed,
        'endOfEvent': JsonConverters.toJson(endOfEvent,'DateTime',context!),
        'endOfEventUTC': JsonConverters.toJson(endOfEventUTC,'DateTime',context!),
        'timeZone': timeZone,
        'timeOfEventUTC': JsonConverters.toJson(timeOfEventUTC,'DateTime',context!)
    };

    getTypeName() => "Event";
    TypeContext? context = _ctx;
}

class EventsResult implements IConvertible
{
    List<Event>? items;
    int? statusCode;
    String? message;

    EventsResult({this.items,this.statusCode,this.message});
    EventsResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        items = JsonConverters.fromJson(json['items'],'List<Event>',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'items': JsonConverters.toJson(items,'List<Event>',context!),
        'statusCode': statusCode,
        'message': message
    };

    getTypeName() => "EventsResult";
    TypeContext? context = _ctx;
}

class EventsSearchRequest implements IConvertible
{
    String? name;
    String? externalID;
    String? externalIdType;

    EventsSearchRequest({this.name,this.externalID,this.externalIdType});
    EventsSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        externalID = json['externalID'];
        externalIdType = json['externalIdType'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'externalID': externalID,
        'externalIdType': externalIdType
    };

    getTypeName() => "EventsSearchRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
    'Event': TypeInfo(TypeOf.Class, create:() => Event()),
    'EventsResult': TypeInfo(TypeOf.Class, create:() => EventsResult()),
    'List<Event>': TypeInfo(TypeOf.Class, create:() => <Event>[]),
    'EventsSearchRequest': TypeInfo(TypeOf.Class, create:() => EventsSearchRequest()),
});

Dart EventsSearchRequest 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 /Event/Search HTTP/1.1 
Host: stubbur-autoupdates-live.smartnewapis.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<EventsSearchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <ExternalID>String</ExternalID>
  <ExternalIdType>String</ExternalIdType>
  <Name>String</Name>
</EventsSearchRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EventsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
    <d2p1:Event>
      <d2p1:AwayTeamExternalId>String</d2p1:AwayTeamExternalId>
      <d2p1:AwayTeamOwnerId>0</d2p1:AwayTeamOwnerId>
      <d2p1:DefaultValues>String</d2p1:DefaultValues>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:DetailedDescription>String</d2p1:DetailedDescription>
      <d2p1:DirectAccessCode>String</d2p1:DirectAccessCode>
      <d2p1:EndOfEvent>0001-01-01T00:00:00</d2p1:EndOfEvent>
      <d2p1:EndOfEventUTC>0001-01-01T00:00:00</d2p1:EndOfEventUTC>
      <d2p1:EventActive>false</d2p1:EventActive>
      <d2p1:EventLocationId>0</d2p1:EventLocationId>
      <d2p1:EventOwnerId>0</d2p1:EventOwnerId>
      <d2p1:EventSeriesId>0</d2p1:EventSeriesId>
      <d2p1:ExternalReference>String</d2p1:ExternalReference>
      <d2p1:ExternalReferenceType>String</d2p1:ExternalReferenceType>
      <d2p1:HideEvent>false</d2p1:HideEvent>
      <d2p1:ID>0</d2p1:ID>
      <d2p1:ImageUrl>String</d2p1:ImageUrl>
      <d2p1:ImageUrl2>String</d2p1:ImageUrl2>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:OwnerCardsNotAllowed>false</d2p1:OwnerCardsNotAllowed>
      <d2p1:PostponedNoDate>false</d2p1:PostponedNoDate>
      <d2p1:SaleIsActive>false</d2p1:SaleIsActive>
      <d2p1:SeatingImageUrl>String</d2p1:SeatingImageUrl>
      <d2p1:SportGenderId>String</d2p1:SportGenderId>
      <d2p1:TimeOfEvent>0001-01-01T00:00:00</d2p1:TimeOfEvent>
      <d2p1:TimeOfEventUTC>0001-01-01T00:00:00</d2p1:TimeOfEventUTC>
      <d2p1:TimeZone>String</d2p1:TimeZone>
      <d2p1:VenueId>0</d2p1:VenueId>
    </d2p1:Event>
  </Items>
  <Message>String</Message>
  <StatusCode>0</StatusCode>
</EventsResult>