XML - словари/Экспорт связи - топливный сбор-страна прилета — различия между версиями

Материал из TourClient - Руководство пользователя
Перейти к: навигация, поиск
(Ответ)
 
Строка 26: Строка 26:
  
 
<source lang="xml">
 
<source lang="xml">
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<Result>
 
<Result>
     <Count>23</Count>
+
     <Count>206</Count>
     <FeeFuelResorts>
+
     <Relations>
         <FeeFuelResort>
+
         <Relation>
             <operator>29</operator>
+
             <operatorId>44</operatorId>
             <country>12</country>
+
             <countryId>12</countryId>
             <feeMax>40</feeMax>
+
             <trash>false</trash>
             <feeMin>40</feeMin>
+
             <updated>3962342861</updated>
             <currency>1</currency>
+
             <feeFuel>
            <trash>false</trash> <!-- флаг удаления записи-->
+
                <max>0</max>
             <updated>3954835401</updated>
+
                <min>0</min>
         </FeeFuelResort>
+
                <currency>1</currency>
         <FeeFuelResort>
+
             </feeFuel>
             <operator>29</operator>
+
         </Relation>
             <country>12</country>
+
         <Relation>
             <feeMax>40</feeMax>
+
             <operatorId>44</operatorId>
             <feeMin>40</feeMin>
+
             <countryId>12</countryId>
             <currency>1</currency>
+
             <trash>false</trash>
            <trash>false</trash> <!-- флаг удаления записи-->
+
             <updated>3962342860</updated>
             <updated>3954835402</updated>
+
             <feeFuel>
         </FeeFuelResort>
+
                <max>0</max>
 +
                <min>0</min>
 +
                <currency>1</currency>
 +
             </feeFuel>
 +
         </Relation>
 
         ...
 
         ...
     </FeeFuelResorts>
+
     </Relations>
 
</Result>
 
</Result>
  
 
</source>
 
</source>

Текущая версия на 11:02, 29 декабря 2014

Экспорт топливных сборов курортов прилета осуществляется через выполнение POST запросов на адрес http://tourclient.ru/f/exml/user_id/dict_export .

Где user_id - ID пользователя AgentPassport.

POST-параметр request должен содержать xml запроса.

В результате будет возвращен ответ в формате xml.

Запрос

<Request>
    <DictRequest>
        <dataOffset>0</dataOffset> <!-- Необязательный параметр, если не указан = 0-->
        <dataLimit>50</dataLimit> <!-- Необязательный параметр, если не указан = 50-->
        <entity>FeeFuelResort</entity>
        <updated>123456789</updated> <!-- Необязательный параметр необходим для синхронизации. Если указан - будут возвращены записи имеющие значение больше указанного -->
    </DictRequest>
</Request>

Ответ

На запрос приходит ответ содержащий данные словаря топливных сборов курортов прилета

<?xml version="1.0" encoding="UTF-8"?>
<Result>
    <Count>206</Count>
    <Relations>
        <Relation>
            <operatorId>44</operatorId>
            <countryId>12</countryId>
            <trash>false</trash>
            <updated>3962342861</updated>
            <feeFuel>
                <max>0</max>
                <min>0</min>
                <currency>1</currency>
            </feeFuel>
        </Relation>
        <Relation>
            <operatorId>44</operatorId>
            <countryId>12</countryId>
            <trash>false</trash>
            <updated>3962342860</updated>
            <feeFuel>
                <max>0</max>
                <min>0</min>
                <currency>1</currency>
            </feeFuel>
        </Relation>
        ...
    </Relations>
</Result>