Skip to content

Latest commit

 

History

History
66 lines (40 loc) · 1.57 KB

File metadata and controls

66 lines (40 loc) · 1.57 KB

Retrieve Reservation Detail

Description

This method returns the detailed information of the reservations created through our reservation system in XML format. It covers reservations made from all sales channels.

Endpoint Documentation

See the API documentation page on Turkish Airlines Developer Portal

Endpoint Method

$this->client->retrieveReservationDetail($retrieveReservationDetailParameters);

Example with Factory Using JSON Query

<?php

use TK\API\ValueObject\Factory\RetrieveReservationDetailParametersFactory;

$json =<<<JSON
{
    "UniqueId": "TT8VN8",
    "Surname": "CELIKTAS"
}
JSON;
$parameterObject = RetrieveReservationDetailParametersFactory::createFromJson($json);
$response = $client->retrieveReservationDetail($parameterObject);

Example with Factory Using An Array

You can build an array that is basically json_encode version of the object mentioned in the previous example.

<?php

use TK\API\ValueObject\Factory\RetrieveReservationDetailParametersFactory;

$parameterObject = RetrieveReservationDetailParametersFactory::createFromArray($parametersArray);

$response = $client->retrieveReservationDetail($parameterObject);

Example with ValueObjects

<?php

use TK\API\ValueObject\RetrieveReservationDetailParameters;

$retrieveReservationDetailParameters = new RetrieveReservationDetailParameters(
	'TT8VN8',
	'CELIKTAS'
);

$response = $this->client->retrieveReservationDetail($retrieveReservationDetailParameters);