Agentivity API

<back to all web services

CarSegmentsByDate

The following routes are available for this service:
GET/CarSegmentsByDate
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


@DataContract(Namespace="schemas.agentivity.com/types")
open class CarSegmentsByDate : CompanyLevelRequestBase()
{
    /**
    * Type of segment
    */
    @DataMember
    open var SegmentType:CarSegmentType? = null

    /**
    * Date in format YYYYMMDD
    */
    @DataMember
    open var DateStart:String? = null

    /**
    * Date in format YYYYMMDD
    */
    @DataMember
    open var DateEnd: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
}

enum class CarSegmentType
{
    Active,
    Passive,
    All,
}

@DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
open class CarSegmentsByDateItemResponse : ItemResponse<CarSegmentByDate, CarSegmentsByDateResponseReport>()
{
}

@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="CarSegmentByDate", Namespace="schemas.agentivity.com/types")
open class CarSegmentByDate
{
    @DataMember(Order=10)
    open var AgentivityRef:String? = null

    @DataMember(Order=20)
    open var RecordLocator:String? = null

    @DataMember(Order=30)
    open var OwningAgencyLocationID:String? = null

    @DataMember(Order=40)
    open var OwningConsultant:String? = null

    @DataMember(Order=50)
    open var Account:String? = null

    @DataMember(Order=55)
    open var Passengers:String? = null

    @DataMember(Order=60)
    open var PickUpDate:Date? = null

    @DataMember(Order=70)
    open var DropOffDate:Date? = null

    @DataMember(Order=80)
    open var CarVendorCode:String? = null

    @DataMember(Order=90)
    open var VendorName:String? = null

    @DataMember(Order=100)
    open var SegmentStatus:String? = null

    @DataMember(Order=110)
    open var AirportCode:String? = null

    @DataMember(Order=120)
    open var ConfirmationNbr:String? = null

    @DataMember(Order=130)
    open var CurrencyCode:String? = null

    @DataMember(Order=140)
    open var RateAmount:String? = null

    @DataMember(Order=150)
    open var NbrOfCars:String? = null

    @DataMember(Order=160)
    open var CarType:String? = null

    @DataMember(Order=180)
    open var ServiceInformation:String? = null

    @DataMember(Order=190)
    open var BRInformation:String? = null

    @DataMember(Order=200)
    open var CarSegmentType:String? = null

    @DataMember(Order=210)
    open var CreatingAgencyIata:String? = null

    @DataMember(Order=220)
    open var CityCode:String? = null

    @DataMember(Order=230)
    open var Text:String? = null

    @DataMember(Order=240)
    open var Vouchers:String? = null

    @DataMember(Order=250)
    open var CarRateCode:String? = null
}

@DataContract(Name="CarSegmentByDate", Namespace="schemas.agentivity.com/types")
open class CarSegmentsByDateResponseReport : Report<CarSegmentsByDateItemResponse, CarSegmentByDate>()
{
}

@DataContract(Namespace="schemas.agentivity.com/types")
open class Report<TItemResponse, TItem>
{
    @DataMember(Order=1, EmitDefaultValue=false)
    open var Item:TItem? = null
}

Kotlin CarSegmentsByDate 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.

GET /CarSegmentsByDate HTTP/1.1 
Host: api.agentivity.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AgentivityResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="schemas.agentivity.com/types">
  <ResponseMetadata>
    <Success>false</Success>
    <HasCache>false</HasCache>
    <HasPaging>false</HasPaging>
    <CacheMetadata>
      <IsFromCache>false</IsFromCache>
      <CachedAt>0001-01-01T00:00:00</CachedAt>
      <CacheExpiresAt>0001-01-01T00:00:00</CacheExpiresAt>
    </CacheMetadata>
    <PagingMetadata>
      <Limit>String</Limit>
      <Offset>String</Offset>
      <ResponseRecords>0</ResponseRecords>
      <TotalRecords>0</TotalRecords>
    </PagingMetadata>
  </ResponseMetadata>
  <ResponseReport>
    <Item>
      <AgentivityRef>String</AgentivityRef>
      <RecordLocator>String</RecordLocator>
      <OwningAgencyLocationID>String</OwningAgencyLocationID>
      <OwningConsultant>String</OwningConsultant>
      <Account>String</Account>
      <Passengers>String</Passengers>
      <PickUpDate>0001-01-01T00:00:00</PickUpDate>
      <DropOffDate>0001-01-01T00:00:00</DropOffDate>
      <CarVendorCode>String</CarVendorCode>
      <VendorName>String</VendorName>
      <SegmentStatus>String</SegmentStatus>
      <AirportCode>String</AirportCode>
      <ConfirmationNbr>String</ConfirmationNbr>
      <CurrencyCode>String</CurrencyCode>
      <RateAmount>String</RateAmount>
      <NbrOfCars>String</NbrOfCars>
      <CarType>String</CarType>
      <ServiceInformation>String</ServiceInformation>
      <BRInformation>String</BRInformation>
      <CarSegmentType>String</CarSegmentType>
      <CreatingAgencyIata>String</CreatingAgencyIata>
      <CityCode>String</CityCode>
      <Text>String</Text>
      <Vouchers>String</Vouchers>
      <CarRateCode>String</CarRateCode>
    </Item>
  </ResponseReport>
  <ResponseError>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StatusCode>String</StatusCode>
    <VerboseMessage>String</VerboseMessage>
  </ResponseError>
</AgentivityResponse>