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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Event:
    id: Optional[int] = None
    name: Optional[str] = None
    description: Optional[str] = None
    external_reference: Optional[str] = None
    time_of_event: Optional[datetime.datetime] = None
    event_location_id: Optional[int] = None
    event_series_id: Optional[int] = None
    event_owner_id: Optional[int] = None
    event_active: Optional[bool] = None
    default_values: Optional[str] = None
    external_reference_type: Optional[str] = None
    postponed_no_date: Optional[bool] = None
    away_team_external_id: Optional[str] = None
    sport_gender_id: Optional[str] = None
    sale_is_active: Optional[bool] = None
    seating_image_url: Optional[str] = None
    venue_id: Optional[int] = None
    away_team_owner_id: Optional[int] = None
    detailed_description: Optional[str] = None
    image_url: Optional[str] = None
    direct_access_code: Optional[str] = None
    image_url2: Optional[str] = None
    hide_event: Optional[bool] = None
    owner_cards_not_allowed: Optional[bool] = None
    end_of_event: Optional[datetime.datetime] = None
    end_of_event_u_t_c: Optional[datetime.datetime] = None
    time_zone: Optional[str] = None
    time_of_event_u_t_c: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventsResult:
    items: Optional[List[Event]] = None
    status_code: Optional[int] = None
    message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventsSearchRequest:
    name: Optional[str] = None
    external_i_d: Optional[str] = None
    external_id_type: Optional[str] = None

Python EventsSearchRequest DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	name: String,
	externalID: String,
	externalIdType: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	items: 
	[
		{
			id: 0,
			name: String,
			description: String,
			externalReference: String,
			timeOfEvent: 0001-01-01,
			eventLocationId: 0,
			eventSeriesId: 0,
			eventOwnerId: 0,
			eventActive: False,
			defaultValues: String,
			externalReferenceType: String,
			postponedNoDate: False,
			awayTeamExternalId: String,
			sportGenderId: String,
			saleIsActive: False,
			seatingImageUrl: String,
			venueId: 0,
			awayTeamOwnerId: 0,
			detailedDescription: String,
			imageUrl: String,
			directAccessCode: String,
			imageUrl2: String,
			hideEvent: False,
			ownerCardsNotAllowed: False,
			endOfEvent: 0001-01-01,
			endOfEventUTC: 0001-01-01,
			timeZone: String,
			timeOfEventUTC: 0001-01-01
		}
	],
	statusCode: 0,
	message: String
}