TicketUserServices

<back to all web services

SelfServiceTransferConfirmRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/confirmExecute a buyer-initiated ticket exchange
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 SelfServiceTransferResultBase:
    ok: Optional[bool] = None
    status_code: Optional[int] = None
    code: Optional[str] = None
    message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TransferTopupInstruction:
    amount_isk: Optional[Decimal] = None
    payment_link_url: Optional[str] = None
    session_token: Optional[str] = None
    expires_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SelfServiceTransferConfirmResult(SelfServiceTransferResultBase):
    transfer_log_id: Optional[int] = None
    new_ticket_token_id: Optional[str] = None
    direction: Optional[str] = None
    price_difference: Optional[Decimal] = None
    original_ticket_price: Optional[Decimal] = None
    target_ticket_price: Optional[Decimal] = None
    assigned_seat_id: Optional[int] = None
    assigned_seat_label: Optional[str] = None
    topup: Optional[TransferTopupInstruction] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SelfServiceTransferConfirmRequest:
    ticket_token_id: Optional[str] = None
    buyer_phone: Optional[str] = None
    to_event_id: Optional[int] = None
    to_owner_ticket_type_id: Optional[int] = None
    to_series_ticket_type_id: Optional[int] = None
    to_seat_id: Optional[int] = None
    idempotency_key: Optional[str] = None
    expected_price_difference: Optional[Decimal] = None

Python SelfServiceTransferConfirmRequest 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 /selfService/transferTicket/confirm HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ticketTokenId: String,
	buyerPhone: String,
	toEventId: 0,
	toOwnerTicketTypeId: 0,
	toSeriesTicketTypeId: 0,
	toSeatId: 0,
	idempotencyKey: String,
	expectedPriceDifference: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	transferLogId: 0,
	newTicketTokenId: String,
	direction: String,
	priceDifference: 0,
	originalTicketPrice: 0,
	targetTicketPrice: 0,
	assignedSeatId: 0,
	assignedSeatLabel: String,
	topup: 
	{
		amountIsk: 0,
		paymentLinkUrl: String,
		sessionToken: String,
		expiresAt: 0001-01-01
	},
	ok: False,
	statusCode: 0,
	code: String,
	message: String
}