array
(
[ 'idTrip' ] = '' ;
[ 'mode' ] = 'price' ; // price | availability
// default value is 'price'
// 'price' checks room occupancy and returns priceTotal
// 'availability' checks room occupancy and availability and returns priceTotal and free places counter
[ 'loyaltyProgram' ][ 'groupName' ] = '' ; // optional
[ 'loyaltyProgram' ][ 'cardNumber' ] = '' ; // optional
[ 'agency' ][ 'id' ] = '' ; // optional - when is set returns agency Provision
[ 'agency' ][ 'subCode' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'birthDate' ] = '1981-04-30' ; // YYY-MM-DD, required,
[ 'participants' ] [ 0 ][ 'sex' ] = '' ; // 'male' | 'female' | 'other' ( default is other )y
[ 'participants' ] [ 0 ][ 'name' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'surname' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'address' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'city' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'postCode' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'phoneNumber' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'email' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'documentNumber' ] = '' ; // optional
[ 'participants' ] [ 0 ][ 'documentDateExp' ] = '' ; // optional
[ 'participants' ] [ 1 ] ...
...
[ 'participants' ] [ n ] // n is personNumber ( from 0 to perconCount - 1 )
[ 'services' ][0][ 'personNumber' ] = personNumber ; // when personNumber is empty string => service for all persons CHD/ADT
[ 'services' ][0][ 'idService' ] = idService ;
...
[ 'services' ][n][ 'personNumber' ] = ...
...
)
WARNING: personNumber value must start from 0.
require_once ( 'classUddsOx.php' ) ;
$udds = new classUddsOx ;
$udds->customerCode = [your_customerCode] ;
$udds->login = [your_login] ;
$udds->password = [your_password] ;
$udds->serverUrl = 'http://api.dlaoperatora.pl/udds/' ;
$myParams = array();
$myParams [ 'idTrip' ] = 1277; ;
$myParams [ 'participants' ] = array();
$myParams [ 'participants' ][0][ 'birthDate' ] = '1981-04-30' ;
$myParams [ 'participants' ][1][ 'birthDate' ] = '1978-05-24' ;
$myParams [ 'participants' ][2][ 'birthDate' ] = '2009-06-18' ;
$myParams [ 'participants' ][3][ 'birthDate' ] = '2007-07-12' ;
$myParams [ 'participants' ][4][ 'birthDate' ] = '2018-08-12' ;
$myParams [ 'participants' ][5][ 'birthDate' ] = '2010-10-10' ;
$myParams [ 'participants' ][6][ 'birthDate' ] = '2000-10-10' ;
$myParams [ 'services' ] = array();
$myParams [ 'services' ][0]['personNumber'] = 0 ;
$myParams [ 'services' ][0]['idService'] = 39 ;
$myParams [ 'services' ][1]['personNumber'] = 1 ;
$myParams [ 'services' ][1]['idService'] = 39 ;
$myParams [ 'services' ][2]['personNumber'] = 2 ;
$myParams [ 'services' ][2]['idService'] = 39 ;
$myParams [ 'services' ][3]['personNumber'] = 4 ;
$myParams [ 'services' ][3]['idService'] = 37 ;
$myParams [ 'services' ][4]['personNumber'] = '' ;
$myParams [ 'services' ][4]['idService'] = 14 ;
$myParams [ 'services' ][5]['personNumber'] = '' ;
$myParams [ 'services' ][5]['idService'] = 14 ;
$ret = $udds->checkAvailability( $myParams );
Returns $ret =
Array
(
[errors] => Array
(
[0] => Array
(
[code] => 87800
[message] => Z uczestnikiem nr 2 nie można powiązać usługi "Szkolenie Silver Junior" dla osób w wieku od 2 do 15 lat [id=39]
)
[1] => Array
(
[code] => 87800
[message] => Z uczestnikiem nr 5 nie można powiązać usługi "SKIPASS Mini" dla osób w wieku od 3 do 7 lat [id=37]
)
)
[trip] => Array
(
[details] => Array
(
[type] => db
[tripId] => 1277
[offerId] => 4
[tripName] =>
[dateFrom] => 2019-04-30
[dateTo] => 2019-05-07
[lengthDays] => 8
[lengthNights] => 7
[roomCode] => GRUPA
[roomDescription] => Wycieczka grupowa
[feeding] => All inclusive
[busStopId] => 3
[maxSeatsAvail] => 0
[extPricesOn] => 1
)
[room] => Array
(
[code] => GRUPA
[description] => Wycieczka grupowa
[minPax] => 1
[maxPax] => 56
[minAdt] => 1
[maxAdt] => 56
[maxInf] => 5
)
[priceExtList] => Array
(
[maxAgeChd] => 14
[maxAgeInf] => 2
[priceAdt1] => 160000
[priceAdt2] => 140000
[priceAdt3] => 130000
[priceAdt4] => 120000
[priceAdtX] => 110000
[priceChd1G1] => 90000
[priceChd2G1] => 80000
[priceChdXG1] => 70000
[priceChd1G2] => 55000
[priceChd2G2] => 55000
[priceChdXG2] => 55000
[priceChd1G3] => 54000
[priceChd2G3] => 54000
[priceChd3G3] => 54000
[priceChd1G4] => 53000
[priceChd2G4] => 53000
[priceChdXG4] => 53000
[priceInf1] => 100
[priceInfX] => 100
[priceCurrency] => PLN
)
[priceList] => Array
(
[pricePersonValue] => 160000
[pricePersonCurrency] => PLN
)
[priceTotalSummary] => Array
(
[firstPerson] => Array
(
[PLN] => 160000
)
[personsPLN] => 0
[personsCurrency] => Array
(
[PLN] => 740100
)
[base] => Array
(
[PLN] => 500
)
[toPayTotalCurrencies] => Array
(
[PLN] => 740600
)
[toPayTotalPLN] => 740600
[firstPersonPLN] => 160000
[exchangeRates] => Array
(
[current] => Array
(
[EUR] => 4.2405
[GBP] => 5.7553
[USD] => 3.7543
[PLN] => 1
)
[2018-09-14] => Array
(
[EUR] => 4.2405
[GBP] => 5.7553
[USD] => 3.7543
)
)
)
[error] => Array
(
[code] => 0
[errorMessage] => OK
)
[occupancyClassification] => Array
(
[ADT] => 3
[CHD_G1] => 1
[CHD_G2] => 2
[CHD_G3] => 0
[CHD_G4] => 0
[INF] => 1
[CHD_SUM] => 3
)
[participantsClassification] => Array
(
[0] => ADT
[1] => ADT
[2] => CHD_G2
[3] => CHD_G1
[4] => INF
[5] => CHD_G2
[6] => ADT
)
[sortBy_date] => 2019-04-30
[sortBy_firstAdt] => 160000
[sortBy_priceTot] => 740600
)
[usedServices] => Array
(
[0] => Array
(
[type] => reservation
[idService] => 42
[service] => Array
(
[idService] => 42
[autoService] => 1
[type] => dowolna
[code] => TS3
[webVisible] => 1
[name] => Auto na calosc
[description] => Automatik Kinomatik
[value] => 999
[currency] => PLN
[maxQuantity] => 1
[maxQuantityPerson] => 99
[ageFrom] => 0
[ageTo] => 100
[orderNo] => 0
)
)
[1] => Array
(
[type] => person
[idService] => 40
[personNumber] => 2
[participant] => Array
(
[birthDate] => 2009-06-18
[age] => 9
)
[service] => Array
(
[idService] => 40
[autoService] => 1
[type] => osoba
[code] => TS1
[webVisible] => 1
[name] => Cusik auto
[description] => Coś automatycznego
[value] => 66600
[currency] => USD
[maxQuantity] => 1
[maxQuantityPerson] => 99
[ageFrom] => 2
[ageTo] => 14
[orderNo] => 0
)
)
[2] => Array
(
[type] => person
[idService] => 41
[personNumber] => 0
[participant] => Array
(
[birthDate] => 1981-04-30
[age] => 38
)
[service] => Array
(
[idService] => 41
[autoService] => 1
[type] => osoba
[code] => TS2
[webVisible] => 1
[name] => Utocudo 2
[description] => Kolejny automacik
[value] => 77700
[currency] => EUR
[maxQuantity] => 2
[maxQuantityPerson] => 99
[ageFrom] => 14
[ageTo] => 100
[orderNo] => 0
)
)
[3] => Array
(
[type] => person
[idService] => 41
[personNumber] => 1
[participant] => Array
(
[birthDate] => 1978-05-24
[age] => 40
)
[service] => Array
(
[idService] => 41
[autoService] => 1
[type] => osoba
[code] => TS2
[webVisible] => 1
[name] => Utocudo 2
[description] => Kolejny automacik
[value] => 77700
[currency] => EUR
[maxQuantity] => 2
[maxQuantityPerson] => 99
[ageFrom] => 14
[ageTo] => 100
[orderNo] => 0
)
)
[4] => Array
(
[type] => reservation
[idService] => 39
[service] => Array
(
[idService] => 39
[autoService] => 0
[type] => osoba
[code] => SSCHDG1
[webVisible] => 1
[name] => Szkolenie Silver Junior
[description] =>
[value] => 25000
[currency] => PLN
[maxQuantity] => 4
[maxQuantityPerson] => 99
[ageFrom] => 2
[ageTo] => 15
[orderNo] => 0
)
)
[5] => Array
(
[type] => person
[idService] => 39
[personNumber] => 2
[participant] => Array
(
[birthDate] => 2009-06-18
[age] => 9
)
[service] => Array
(
[idService] => 39
[autoService] => 0
[type] => osoba
[code] => SSCHDG1
[webVisible] => 1
[name] => Szkolenie Silver Junior
[description] =>
[value] => 25000
[currency] => PLN
[maxQuantity] => 4
[maxQuantityPerson] => 99
[ageFrom] => 2
[ageTo] => 15
[orderNo] => 0
)
)
[6] => Array
(
[type] => reservation
[idService] => 14
[service] => Array
(
[idService] => 14
[autoService] => 0
[type] => dowolna
[code] => BICC
[webVisible] => 1
[name] => Extra parking na rower
[description] => Miejsce pod zadaszeniem i z zabezpieczeniem na jednego rowera.
[value] => 5000
[currency] => USD
[maxQuantity] => 2
[maxQuantityPerson] => 99
[ageFrom] => 3
[ageTo] => 100
[orderNo] => 0
)
)
[7] => Array
(
[type] => reservation
[idService] => 14
[service] => Array
(
[idService] => 14
[autoService] => 0
[type] => dowolna
[code] => BICC
[webVisible] => 1
[name] => Extra parking na rower
[description] => Miejsce pod zadaszeniem i z zabezpieczeniem na jednego rowera.
[value] => 5000
[currency] => USD
[maxQuantity] => 2
[maxQuantityPerson] => 99
[ageFrom] => 3
[ageTo] => 100
[orderNo] => 0
)
)
)
[priceSummary] => Array
(
[items] => Array
(
[0] => Array
(
[type] => participants
[subType] =>
[description] => Persons 3 x ADT, 3 x CHD, 1 x INF
[price] => 740600
[currency] => PLN
[pricePLN] => 740600
)
[1] => Array
(
[type] => serviceReservation
[subType] => auto
[description] => Auto na calosc
[price] => 999
[currency] => PLN
[pricePLN] => 999
)
[2] => Array
(
[type] => servicePerson
[subType] => auto
[description] => Cusik auto [os. nr 3]
[price] => 66600
[currency] => USD
[pricePLN] => 250036
)
[3] => Array
(
[type] => servicePerson
[subType] => auto
[description] => Utocudo 2 [os. nr 1]
[price] => 77700
[currency] => EUR
[pricePLN] => 329487
)
[4] => Array
(
[type] => servicePerson
[subType] => auto
[description] => Utocudo 2 [os. nr 2]
[price] => 77700
[currency] => EUR
[pricePLN] => 329487
)
[5] => Array
(
[type] => serviceReservation
[subType] =>
[description] => Szkolenie Silver Junior
[price] => 25000
[currency] => PLN
[pricePLN] => 25000
)
[6] => Array
(
[type] => servicePerson
[subType] =>
[description] => Szkolenie Silver Junior [os. nr 3]
[price] => 25000
[currency] => PLN
[pricePLN] => 25000
)
[7] => Array
(
[type] => serviceReservation
[subType] =>
[description] => Extra parking na rower
[price] => 5000
[currency] => USD
[pricePLN] => 18772
)
[8] => Array
(
[type] => serviceReservation
[subType] =>
[description] => Extra parking na rower
[price] => 5000
[currency] => USD
[pricePLN] => 18772
)
)
[total] => Array
(
[currencies] => Array
(
[PLN] => 791599
[USD] => 76600
[EUR] => 155400
)
[PLN] => 1738153
)
)
)