GET | /PassiveSegments |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
@DataContract(Namespace="schemas.agentivity.com/types")
open class PassiveSegmentsByUser : CompanyLevelRequestBase()
{
/**
* Date in format YYYYMMDD
*/
@DataMember
open var ArrivalDateEnd:String? = null
/**
* Date in format YYYYMMDD
*/
@DataMember
open var ArrivalDateStart:String? = null
/**
* Type of segment
*/
@DataMember
open var SegmentType:String? = null
/**
* Account
*/
@DataMember
open var Account:String? = null
/**
* 3 letter city code
*/
@DataMember
open var CityCode:String? = null
/**
* Date search type option, a single character (T to search by segment start dates, C to search by booking creation dates).
*/
@DataMember
open var DateSearchType:String? = null
}
@DataContract(Namespace="schemas.agentivity.com/types")
open class CompanyLevelRequestBase : PagingMetadata(), IMemberUsername, IMemberOwningCompanyCode
{
/**
* Comma Delimited List of Owning Company Codes
*/
@DataMember
override var OwningCompanyCode:ArrayList<String>? = null
/**
* UserName in form of an email address
*/
@DataMember
override var UserName:String? = null
}
@DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
open class PagingMetadata
{
/**
* Starting Record
*/
@DataMember
@ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
open var Offset:String? = null
/**
* Number of records to return (PageSize)
*/
@DataMember
@ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
open var Limit:String? = null
/**
* Total Number of Records in a Full Reponse (if no paging)
*/
@DataMember
@ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")
open var TotalRecords:Int? = null
/**
* Total Number of Records in this Reponse (on this page)
*/
@DataMember
@ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")
open var ResponseRecords:Int? = null
}
@DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
open class PassiveSegmentsResponse : ItemResponse<PassiveSegmentWithOwningInformation, PassiveSegmentsByUserResponseReport>()
{
}
@DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
open class ItemResponse<TItem, TReport>
{
@DataMember(Order=1)
open var ResponseMetadata:ResponseMetadata? = null
@DataMember(Order=2, EmitDefaultValue=false)
open var ResponseReport:TReport? = null
@DataMember(Order=3, EmitDefaultValue=false)
open var ResponseError:AgentivityError? = null
}
@DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
open class ResponseMetadata
{
@DataMember(Order=0)
open var Success:Boolean? = null
@DataMember(Order=1)
open var HasCache:Boolean? = null
@DataMember(Order=2)
open var HasPaging:Boolean? = null
@DataMember(Order=3, EmitDefaultValue=false)
open var CacheMetadata:CacheMetadata? = null
@DataMember(Order=4, EmitDefaultValue=false)
open var PagingMetadata:PagingMetadata? = null
}
@DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
open class CacheMetadata
{
@DataMember(Order=1)
open var CachedAt:Date? = null
@DataMember(Order=2)
open var CacheExpiresAt:Date? = null
@DataMember(Order=0)
open var IsFromCache:Boolean? = null
}
@DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
open class AgentivityError
{
@DataMember
open var ErrorCode:String? = null
@DataMember
open var Message:String? = null
@DataMember
open var StatusCode:String? = null
@DataMember
open var VerboseMessage:String? = null
}
@DataContract(Name="PassiveSegmentWithOwningInformation", Namespace="schemas.agentivity.com/types")
open class PassiveSegmentWithOwningInformation
{
@DataMember
open var AgentivityRef:Int? = null
@DataMember(Order=20)
open var OwningAgencyLocationID:String? = null
@DataMember(Order=10)
open var RecordLocator:String? = null
@DataMember
open var OwningConsultantID:String? = null
@DataMember(Order=30)
open var OwningConsultant:String? = null
@DataMember(Order=40)
open var Account:String? = null
@DataMember(Order=70)
open var SegmentStatus:String? = null
@DataMember
open var StartDate:String? = null
@DataMember(Order=60)
open var DepartureDate:String? = null
@DataMember
open var NbrNights:String? = null
@DataMember
open var VendorCode:String? = null
@DataMember
open var CityCode:String? = null
@DataMember
open var SegmentType:String? = null
@DataMember
open var Text:String? = null
@DataMember(Order=50)
open var Passenger:String? = null
@DataMember
open var Address:String? = null
@DataMember
open var BookingReasonCode:String? = null
@DataMember
open var BookingSource:String? = null
@DataMember
open var CommissionInformation:String? = null
@DataMember
open var ConfirmationNumber:String? = null
@DataMember
open var RateCode:String? = null
@DataMember
open var RateQuoted:String? = null
@DataMember
open var RateAccessCode:String? = null
@DataMember
open var PropertyName:String? = null
@DataMember
open var PropertyNumber:String? = null
@DataMember
open var ServiceInformation:String? = null
@DataMember
open var TotalAirSegs:String? = null
@DataMember
open var HotelCommission:String? = null
@DataMember
open var CountryName:String? = null
}
@DataContract(Name="PassiveSegmentWithOwningInformation", Namespace="schemas.agentivity.com/types")
open class PassiveSegmentsByUserResponseReport : Report<PassiveSegmentsResponse, PassiveSegmentWithOwningInformation>()
{
}
@DataContract(Namespace="schemas.agentivity.com/types")
open class Report<TItemResponse, TItem>
{
@DataMember(Order=1, EmitDefaultValue=false)
open var Item:TItem? = null
}
Kotlin PassiveSegmentsByUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /PassiveSegments HTTP/1.1 Host: api.agentivity.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ResponseMetadata":{"Success":false,"HasCache":false,"HasPaging":false,"CacheMetadata":{"IsFromCache":false,"CachedAt":"\/Date(-62135596800000-0000)\/","CacheExpiresAt":"\/Date(-62135596800000-0000)\/"},"PagingMetadata":{"Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}},"ResponseReport":{"Item":{"AgentivityRef":0,"OwningConsultantID":"String","StartDate":"String","NbrNights":"String","VendorCode":"String","CityCode":"String","SegmentType":"String","Text":"String","Address":"String","BookingReasonCode":"String","BookingSource":"String","CommissionInformation":"String","ConfirmationNumber":"String","RateCode":"String","RateQuoted":"String","RateAccessCode":"String","PropertyName":"String","PropertyNumber":"String","ServiceInformation":"String","TotalAirSegs":"String","HotelCommission":"String","CountryName":"String","RecordLocator":"String","OwningAgencyLocationID":"String","OwningConsultant":"String","Account":"String","Passenger":"String","DepartureDate":"String","SegmentStatus":"String"}},"ResponseError":{"ErrorCode":"String","Message":"String","StatusCode":"String","VerboseMessage":"String"}}