Agentivity API

<back to all web services

GetHotelSegments

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

public class dtos
{

    @DataContract(Namespace="schemas.agentivity.com/types")
    public static class GetHotelSegments extends CompanyLevelRequestBase
    {
        /**
        * Date in format YYYYMMDD
        */
        @DataMember
        public String DateStart = null;

        /**
        * Date in format YYYYMMDD
        */
        @DataMember
        public String DateEnd = null;

        /**
        * Comma Delimited List of Accounts
        */
        @DataMember
        public ArrayList<String> Account = null;

        /**
        * 3 letter city code
        */
        @DataMember
        public String CityCode = null;

        /**
        * Include Notepad Entry: 1=Yes
        */
        @DataMember
        public String WithNotepad = null;

        /**
        * Comma Delimited List of PCCs
        */
        @DataMember
        public ArrayList<String> OwningAgencyLocationID = null;

        /**
        * Comma Delimited List of CountryCodes
        */
        @DataMember
        public ArrayList<String> OwningAgencyCountryCode = null;

        /**
        * Date search type option, a single character (A to search by Arrival dates, C to search by booking creation dates, S to search by segment creation dates).
        */
        @DataMember
        public String DateSearchType = null;

        /**
        * IsGDS=0 (bookings from Non-GDS eg Supplier Direct). IsGDS=1 (bookings from GDS).
        */
        @DataMember
        public String IsGDS = null;

        /**
        * IsPassive=0 (only include non-passive segments). IsPassive=1 (only include passive segments).
        */
        @DataMember
        public String IsPassive = null;

        /**
        * Comma Delimited List of Custom Fields
        */
        @DataMember
        public ArrayList<String> CustomField = null;
        
        public String getDateStart() { return DateStart; }
        public GetHotelSegments setDateStart(String value) { this.DateStart = value; return this; }
        public String getDateEnd() { return DateEnd; }
        public GetHotelSegments setDateEnd(String value) { this.DateEnd = value; return this; }
        public ArrayList<String> getAccount() { return Account; }
        public GetHotelSegments setAccount(ArrayList<String> value) { this.Account = value; return this; }
        public String getCityCode() { return CityCode; }
        public GetHotelSegments setCityCode(String value) { this.CityCode = value; return this; }
        public String getWithNotepad() { return WithNotepad; }
        public GetHotelSegments setWithNotepad(String value) { this.WithNotepad = value; return this; }
        public ArrayList<String> getOwningAgencyLocationID() { return OwningAgencyLocationID; }
        public GetHotelSegments setOwningAgencyLocationID(ArrayList<String> value) { this.OwningAgencyLocationID = value; return this; }
        public ArrayList<String> getOwningAgencyCountryCode() { return OwningAgencyCountryCode; }
        public GetHotelSegments setOwningAgencyCountryCode(ArrayList<String> value) { this.OwningAgencyCountryCode = value; return this; }
        public String getDateSearchType() { return DateSearchType; }
        public GetHotelSegments setDateSearchType(String value) { this.DateSearchType = value; return this; }
        public String getIsGDS() { return IsGDS; }
        public GetHotelSegments setIsGDS(String value) { this.IsGDS = value; return this; }
        public String getIsPassive() { return IsPassive; }
        public GetHotelSegments setIsPassive(String value) { this.IsPassive = value; return this; }
        public ArrayList<String> getCustomField() { return CustomField; }
        public GetHotelSegments setCustomField(ArrayList<String> value) { this.CustomField = value; return this; }
    }

    @DataContract(Namespace="schemas.agentivity.com/types")
    public static class CompanyLevelRequestBase extends PagingMetadata implements IMemberUsername, IMemberOwningCompanyCode
    {
        /**
        * Comma Delimited List of Owning Company Codes
        */
        @DataMember
        public ArrayList<String> OwningCompanyCode = null;

        /**
        * UserName in form of an email address
        */
        @DataMember
        public String UserName = null;
        
        public ArrayList<String> getOwningCompanyCode() { return OwningCompanyCode; }
        public CompanyLevelRequestBase setOwningCompanyCode(ArrayList<String> value) { this.OwningCompanyCode = value; return this; }
        public String getUserName() { return UserName; }
        public CompanyLevelRequestBase setUserName(String value) { this.UserName = value; return this; }
    }

    @DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
    public static class PagingMetadata
    {
        /**
        * Starting Record
        */
        @DataMember
        @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
        public String Offset = null;

        /**
        * Number of records to return (PageSize)
        */
        @DataMember
        @ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
        public String Limit = 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")
        public Integer TotalRecords = 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")
        public Integer ResponseRecords = null;
        
        public String getOffset() { return Offset; }
        public PagingMetadata setOffset(String value) { this.Offset = value; return this; }
        public String getLimit() { return Limit; }
        public PagingMetadata setLimit(String value) { this.Limit = value; return this; }
        public Integer getTotalRecords() { return TotalRecords; }
        public PagingMetadata setTotalRecords(Integer value) { this.TotalRecords = value; return this; }
        public Integer getResponseRecords() { return ResponseRecords; }
        public PagingMetadata setResponseRecords(Integer value) { this.ResponseRecords = value; return this; }
    }

    @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
    public static class HotelSegmentsItemResponse extends ItemResponse<HotelSegment, HotelSegmentsResponseReport>
    {
        
    }

    @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
    public static class ItemResponse<TItem, TReport>
    {
        @DataMember(Order=1)
        public ResponseMetadata ResponseMetadata = null;

        @DataMember(Order=2, EmitDefaultValue=false)
        public TReport ResponseReport = null;

        @DataMember(Order=3, EmitDefaultValue=false)
        public AgentivityError ResponseError = null;
        
        public ResponseMetadata getResponseMetadata() { return ResponseMetadata; }
        public ItemResponse<TItem, TReport> setResponseMetadata(ResponseMetadata value) { this.ResponseMetadata = value; return this; }
        public TReport getResponseReport() { return ResponseReport; }
        public ItemResponse<TItem, TReport> setResponseReport(TReport value) { this.ResponseReport = value; return this; }
        public AgentivityError getResponseError() { return ResponseError; }
        public ItemResponse<TItem, TReport> setResponseError(AgentivityError value) { this.ResponseError = value; return this; }
    }

    @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
    public static class ResponseMetadata
    {
        @DataMember(Order=0)
        public Boolean Success = null;

        @DataMember(Order=1)
        public Boolean HasCache = null;

        @DataMember(Order=2)
        public Boolean HasPaging = null;

        @DataMember(Order=3, EmitDefaultValue=false)
        public CacheMetadata CacheMetadata = null;

        @DataMember(Order=4, EmitDefaultValue=false)
        public PagingMetadata PagingMetadata = null;
        
        public Boolean isSuccess() { return Success; }
        public ResponseMetadata setSuccess(Boolean value) { this.Success = value; return this; }
        public Boolean isHasCache() { return HasCache; }
        public ResponseMetadata setHasCache(Boolean value) { this.HasCache = value; return this; }
        public Boolean isHasPaging() { return HasPaging; }
        public ResponseMetadata setHasPaging(Boolean value) { this.HasPaging = value; return this; }
        public CacheMetadata getCacheMetadata() { return CacheMetadata; }
        public ResponseMetadata setCacheMetadata(CacheMetadata value) { this.CacheMetadata = value; return this; }
        public PagingMetadata getPagingMetadata() { return PagingMetadata; }
        public ResponseMetadata setPagingMetadata(PagingMetadata value) { this.PagingMetadata = value; return this; }
    }

    @DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
    public static class CacheMetadata
    {
        @DataMember(Order=1)
        public Date CachedAt = null;

        @DataMember(Order=2)
        public Date CacheExpiresAt = null;

        @DataMember(Order=0)
        public Boolean IsFromCache = null;
        
        public Date getCachedAt() { return CachedAt; }
        public CacheMetadata setCachedAt(Date value) { this.CachedAt = value; return this; }
        public Date getCacheExpiresAt() { return CacheExpiresAt; }
        public CacheMetadata setCacheExpiresAt(Date value) { this.CacheExpiresAt = value; return this; }
        public Boolean getIsFromCache() { return IsFromCache; }
        public CacheMetadata setIsFromCache(Boolean value) { this.IsFromCache = value; return this; }
    }

    @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
    public static class AgentivityError
    {
        @DataMember
        public String ErrorCode = null;

        @DataMember
        public String Message = null;

        @DataMember
        public String StatusCode = null;

        @DataMember
        public String VerboseMessage = null;
        
        public String getErrorCode() { return ErrorCode; }
        public AgentivityError setErrorCode(String value) { this.ErrorCode = value; return this; }
        public String getMessage() { return Message; }
        public AgentivityError setMessage(String value) { this.Message = value; return this; }
        public String getStatusCode() { return StatusCode; }
        public AgentivityError setStatusCode(String value) { this.StatusCode = value; return this; }
        public String getVerboseMessage() { return VerboseMessage; }
        public AgentivityError setVerboseMessage(String value) { this.VerboseMessage = value; return this; }
    }

    @DataContract(Name="Segment", Namespace="schemas.agentivity.com/types")
    public static class HotelSegment implements IBookingCustomFields
    {
        @DataMember(Order=10)
        public Integer AgentivityRef = null;

        @DataMember(Order=15)
        public Date PNRCreationDate = null;

        @DataMember(Order=20)
        public String HotelSegmentNbr = null;

        @DataMember(Order=30)
        public String RecordLocator = null;

        @DataMember(Order=50)
        public String OwningAgencyLocationID = null;

        @DataMember(Order=60)
        public String Account = null;

        @DataMember(Order=70)
        public String OwningConsultantID = null;

        @DataMember(Order=80)
        public String OwningConsultant = null;

        @DataMember(Order=90)
        public String StatusCode = null;

        @DataMember(Order=95)
        public Date SegmentCreationDate = null;

        @DataMember(Order=100)
        public Date ArrivalDate = null;

        @DataMember(Order=110)
        public Date DepartureDate = null;

        @DataMember(Order=120)
        public Integer NbrNights = null;

        @DataMember(Order=130)
        public String VendorCode = null;

        @DataMember(Order=140)
        public String PropertyName = null;

        @DataMember(Order=150)
        public String PropertyNbr = null;

        @DataMember(Order=160)
        public String PropertyAddress = null;

        @DataMember(Order=145)
        public String PropertyPhoneNbr = null;

        @DataMember(Order=170)
        public String CityCode = null;

        @DataMember(Order=170)
        public String CityName = null;

        @DataMember(Order=180)
        public String CountryCode = null;

        @DataMember(Order=190)
        public String CountryName = null;

        @DataMember(Order=200)
        public String Passenger = null;

        @DataMember(Order=210)
        public String ConfirmationNbr = null;

        @DataMember(Order=220)
        public String RateAccessCode = null;

        @DataMember(Order=230)
        public String RoomBookingCode = null;

        @DataMember(Order=240)
        public String CurrencyCode = null;

        @DataMember(Order=250)
        public String RateAmount = null;

        @DataMember(Order=260)
        public Integer NbrRooms = null;

        @DataMember(Order=270)
        public String BookedInName = null;

        @DataMember(Order=275)
        public String ServiceInformation = null;

        @DataMember(Order=280)
        public String TotalAirSegs = null;

        @DataMember(Order=290)
        public String CreatingAgencyIata = null;

        @DataMember(Order=310)
        public Boolean IsCommissionable = null;

        @DataMember(Order=320)
        public String Commission = null;

        @DataMember(Order=330)
        public Boolean IsPassive = null;

        @DataMember(Order=340)
        public CustomFieldsCollection CustomFields = null;

        @DataMember(Order=350)
        public String HotelNotepad = null;
        
        public Integer getAgentivityRef() { return AgentivityRef; }
        public HotelSegment setAgentivityRef(Integer value) { this.AgentivityRef = value; return this; }
        public Date getPnrCreationDate() { return PNRCreationDate; }
        public HotelSegment setPnrCreationDate(Date value) { this.PNRCreationDate = value; return this; }
        public String getHotelSegmentNbr() { return HotelSegmentNbr; }
        public HotelSegment setHotelSegmentNbr(String value) { this.HotelSegmentNbr = value; return this; }
        public String getRecordLocator() { return RecordLocator; }
        public HotelSegment setRecordLocator(String value) { this.RecordLocator = value; return this; }
        public String getOwningAgencyLocationID() { return OwningAgencyLocationID; }
        public HotelSegment setOwningAgencyLocationID(String value) { this.OwningAgencyLocationID = value; return this; }
        public String getAccount() { return Account; }
        public HotelSegment setAccount(String value) { this.Account = value; return this; }
        public String getOwningConsultantID() { return OwningConsultantID; }
        public HotelSegment setOwningConsultantID(String value) { this.OwningConsultantID = value; return this; }
        public String getOwningConsultant() { return OwningConsultant; }
        public HotelSegment setOwningConsultant(String value) { this.OwningConsultant = value; return this; }
        public String getStatusCode() { return StatusCode; }
        public HotelSegment setStatusCode(String value) { this.StatusCode = value; return this; }
        public Date getSegmentCreationDate() { return SegmentCreationDate; }
        public HotelSegment setSegmentCreationDate(Date value) { this.SegmentCreationDate = value; return this; }
        public Date getArrivalDate() { return ArrivalDate; }
        public HotelSegment setArrivalDate(Date value) { this.ArrivalDate = value; return this; }
        public Date getDepartureDate() { return DepartureDate; }
        public HotelSegment setDepartureDate(Date value) { this.DepartureDate = value; return this; }
        public Integer getNbrNights() { return NbrNights; }
        public HotelSegment setNbrNights(Integer value) { this.NbrNights = value; return this; }
        public String getVendorCode() { return VendorCode; }
        public HotelSegment setVendorCode(String value) { this.VendorCode = value; return this; }
        public String getPropertyName() { return PropertyName; }
        public HotelSegment setPropertyName(String value) { this.PropertyName = value; return this; }
        public String getPropertyNbr() { return PropertyNbr; }
        public HotelSegment setPropertyNbr(String value) { this.PropertyNbr = value; return this; }
        public String getPropertyAddress() { return PropertyAddress; }
        public HotelSegment setPropertyAddress(String value) { this.PropertyAddress = value; return this; }
        public String getPropertyPhoneNbr() { return PropertyPhoneNbr; }
        public HotelSegment setPropertyPhoneNbr(String value) { this.PropertyPhoneNbr = value; return this; }
        public String getCityCode() { return CityCode; }
        public HotelSegment setCityCode(String value) { this.CityCode = value; return this; }
        public String getCityName() { return CityName; }
        public HotelSegment setCityName(String value) { this.CityName = value; return this; }
        public String getCountryCode() { return CountryCode; }
        public HotelSegment setCountryCode(String value) { this.CountryCode = value; return this; }
        public String getCountryName() { return CountryName; }
        public HotelSegment setCountryName(String value) { this.CountryName = value; return this; }
        public String getPassenger() { return Passenger; }
        public HotelSegment setPassenger(String value) { this.Passenger = value; return this; }
        public String getConfirmationNbr() { return ConfirmationNbr; }
        public HotelSegment setConfirmationNbr(String value) { this.ConfirmationNbr = value; return this; }
        public String getRateAccessCode() { return RateAccessCode; }
        public HotelSegment setRateAccessCode(String value) { this.RateAccessCode = value; return this; }
        public String getRoomBookingCode() { return RoomBookingCode; }
        public HotelSegment setRoomBookingCode(String value) { this.RoomBookingCode = value; return this; }
        public String getCurrencyCode() { return CurrencyCode; }
        public HotelSegment setCurrencyCode(String value) { this.CurrencyCode = value; return this; }
        public String getRateAmount() { return RateAmount; }
        public HotelSegment setRateAmount(String value) { this.RateAmount = value; return this; }
        public Integer getNbrRooms() { return NbrRooms; }
        public HotelSegment setNbrRooms(Integer value) { this.NbrRooms = value; return this; }
        public String getBookedInName() { return BookedInName; }
        public HotelSegment setBookedInName(String value) { this.BookedInName = value; return this; }
        public String getServiceInformation() { return ServiceInformation; }
        public HotelSegment setServiceInformation(String value) { this.ServiceInformation = value; return this; }
        public String getTotalAirSegs() { return TotalAirSegs; }
        public HotelSegment setTotalAirSegs(String value) { this.TotalAirSegs = value; return this; }
        public String getCreatingAgencyIata() { return CreatingAgencyIata; }
        public HotelSegment setCreatingAgencyIata(String value) { this.CreatingAgencyIata = value; return this; }
        public Boolean getIsCommissionable() { return IsCommissionable; }
        public HotelSegment setIsCommissionable(Boolean value) { this.IsCommissionable = value; return this; }
        public String getCommission() { return Commission; }
        public HotelSegment setCommission(String value) { this.Commission = value; return this; }
        public Boolean getIsPassive() { return IsPassive; }
        public HotelSegment setIsPassive(Boolean value) { this.IsPassive = value; return this; }
        public CustomFieldsCollection getCustomFields() { return CustomFields; }
        public HotelSegment setCustomFields(CustomFieldsCollection value) { this.CustomFields = value; return this; }
        public String getHotelNotepad() { return HotelNotepad; }
        public HotelSegment setHotelNotepad(String value) { this.HotelNotepad = value; return this; }
    }

    public static class CustomFieldsCollection extends ArrayList<CustomFieldData>
    {
        
    }

    @DataContract(Name="CustomField", Namespace="schemas.agentivity.com/types")
    public static class CustomFieldData
    {
        @DataMember(Order=20)
        public String FieldName = null;

        @DataMember(Order=30)
        public String FieldValue = null;
        
        public String getFieldName() { return FieldName; }
        public CustomFieldData setFieldName(String value) { this.FieldName = value; return this; }
        public String getFieldValue() { return FieldValue; }
        public CustomFieldData setFieldValue(String value) { this.FieldValue = value; return this; }
    }

    @DataContract(Name="HotelSegment", Namespace="schemas.agentivity.com/types")
    public static class HotelSegmentsResponseReport extends Report<HotelSegmentsItemResponse, HotelSegment>
    {
        
    }

    @DataContract(Namespace="schemas.agentivity.com/types")
    public static class Report<TItemResponse, TItem>
    {
        @DataMember(Order=1, EmitDefaultValue=false)
        public TItem Item = null;
        
        public TItem getItem() { return Item; }
        public Report<TItemResponse, TItem> setItem(TItem value) { this.Item = value; return this; }
    }

}

Java GetHotelSegments DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /HotelSegments HTTP/1.1 
Host: api.agentivity.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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,"PNRCreationDate":"\/Date(-62135596800000-0000)\/","HotelSegmentNbr":"String","RecordLocator":"String","OwningAgencyLocationID":"String","Account":"String","OwningConsultantID":"String","OwningConsultant":"String","StatusCode":"String","SegmentCreationDate":"\/Date(-62135596800000-0000)\/","ArrivalDate":"\/Date(-62135596800000-0000)\/","DepartureDate":"\/Date(-62135596800000-0000)\/","NbrNights":0,"VendorCode":"String","PropertyName":"String","PropertyPhoneNbr":"String","PropertyNbr":"String","PropertyAddress":"String","CityCode":"String","CityName":"String","CountryCode":"String","CountryName":"String","Passenger":"String","ConfirmationNbr":"String","RateAccessCode":"String","RoomBookingCode":"String","CurrencyCode":"String","RateAmount":"String","NbrRooms":0,"BookedInName":"String","ServiceInformation":"String","TotalAirSegs":"String","CreatingAgencyIata":"String","IsCommissionable":false,"Commission":"String","IsPassive":false,"CustomFields":[{"FieldName":"String","FieldValue":"String"}],"HotelNotepad":"String"}},"ResponseError":{"ErrorCode":"String","Message":"String","StatusCode":"String","VerboseMessage":"String"}}