====== SOAP Structure ====== To understand ORS SOAP API you must first understant its structure. ===== Content types ===== ORS currently supports 5 different content types. Each type has its own characteristics and therefore you must use a correct call method to get a desired content. **Content types:** * ''pauschal'' : Under pauchal type are packages of Hotel accommodations and Charter flights. * ''hotel'' : This are accommodations only (without transfer) * ''trips'' : Trips (or Roundtrips) are special offers that includes different transfers from specified location and back (bus, plane, ship, train, ...). * ''dhotel'' : This content type is used for direct hotel connections (**NEW!**). * ''charter'' : charter plane tickets * ''oneway'' : Plane tickets for one way travel * ''extras'' : Extra services. This content type is for special services / items that user can buy through ORS. For example: festival tickets, massage, bike riding, transfer, insurrance, ... ===== Search parameters ===== Here is a list of possible ORS search parameters. * ''vnd'' : start date * ''bsd'' : end date * ''tdc'' : trip duration. Can also be a range ie: 5-8 , means from 5 to 8 days * ''toc'' : tour operator code (also known as CRS code). Each tour operator has its unique code. * ''epc'' : a number of adults traveling * ''ka1'' : an age of first child * ''ka2'' : an age of second child * ''ka3'' : an age of third child * ''rgc'' : region code (search by single region id -- it is better to use ''rgcs'' instead) * ''rgcs'' : extended ''rgc''! You can put here region group IDs and region IDs, separated by comma. * ''zhc'' : iata code for destination airport * ''ahc'' : iata code for departure airport * ''hon'' : city name * ''oid'' : city id * ''htc'' : hotel code (also known as product code). Each tour operator sets unique code for different offer/package. * ''gid'' : giata id (unique hotel id set by GIATA standards). * ''htn'' : hotel name (also used as a name of other products like bus trips and so fort) * ''stc'' : hotel category (a number of stars that hotel has) * ''vpc'' : service type code (HP - half board, OV - no service, UF - breakfast only, ...) * ''zac'' : room type code (DZ - double bed room, AP - appartment, ST - studio, ...) * ''hsc'' : unique hash code of trip. This is used for booking. * ''sid'' : bus stop id (only in use for content type trips) * ''typ'' : content type (hotel, paushal, trips, charter, oneway) * ''prc'' : booking number * ''bkc'' : ORS internal booking number * ''sub'' : offer type (lastmin, earlybird) - to search for Lastminute or Firstminute offers Some of the IDs for search parameters can be found on our CSV lists: **Service types:** [[http://ors.si/csvs/vpcs_en.csv]] **Room types:** [[http://ors.si/csvs/zacs_en.csv]] **Regions:** [[http://ors.si/csvs/regions_en.csv]] **City ID's:** [[http://ors.si/csvs/oids_en.csv]] **Hotel facts:** [[http://ors.si/csvs/facts_en.csv]] **IATA Codes (airports):** [[http://ors.si/csvs/ahcs_en.csv]] **Touroperators and their CRS codes:** [[http://ors.si/csvs/tocs.csv]] ===== SOAP Call ===== SOAP Call is combined with __api call__ and __arguments__. First argument is a ''string'' and represent call method. The rest of arguments are call method parameters. ==== API Call ==== To retrieve offers for a specific content type you must use a correct api call. **Syntax**: Use this __syntax__ for using a correct call method: ''orsxml_{$typ}_api_call'' where ''$typ'' is a one of the available ORS content types. **Usage:** // Example for 'hotel' call method // ...use $typ to create a valid call method $typ = 'hotel'; $soapClient->{"orsxml_{$typ}_api_call"}( 'regions', $searchParams, $header) // ...or without $typ $soapClient->orsxml_hotel_api_call( 'regions', $searchParams, $header) // Example for 'pauschal' call method $soapClient->orsxml_pauschal_api_call( 'regions', $searchParams, $header) // Example for 'trips' call method $soapClient->orsxml_trips_api_call( 'regions', $searchParams, $header) // Example for 'extras' call method $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header)