Импорт водителей
/rest/2/distribution-api/objects/importPerformers
Все возможные атрибуты для performer:
...
Пример (перечислены все доступные поля):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiRequest>
<sessionID>6345e0588e384fc4acc3a2e63e9a4d39<<sessionID>6345e0588e384fc4acc3a2e63e9a4d39</sessionID >
<performersDetails>
<units timeZone="Greenwich Mean Time" timeZoneOffset="GMT+0:00" currency="POUND" distanceUnits="MILE" speedUnits="MILES_PER_HOUR" durationUnits="MINUTE" weightUnits="Kg" volumeUnits="m3"/>
<performers>
<performer name="Driver_API_3782387" phone="00000" email="Driver_API_3782387@gmail.com"
login="Driver_API_3782387121" password="mam" comments = "test comment AP_Driver_API_3782387I"
priceForOneHour = "10.5" breakShift="30"
dailyDrivingLimit="720" allowDailyDrivingLimit="1"
dailyWorkingLimit="720" allowDailyWorkingLimit="1"
areaOfControl="chippenhamzone" scheduleZonesId="71">
<homeLocation name="Frogwell" address="Drake Crescent, Chippenham, Wiltshire, SN14, GB" latitude="51.453891" longitude="-2.148895"/>
<availabilities>
<availability weekDay="monday" from="05:00" to="19:00" breakFrom="10:00" endDayShift="0" breakTo="10:45"/>
<availability weekDay="thursday" from="04:30" to="19:00" breakFrom="10:00" breakTo="10:45"/>
<availability weekDay="friday" from="06:30" to="19:00" breakFrom="10:00" breakTo="10:45"/>
<availability weekDay="saturday" from="05:00" to="19:00" breakFrom="10:00" breakTo="10:45"/>
<availability weekDay="sunday" from="05:00" to="19:00" breakFrom="10:00" breakTo="10:45"/>
</availabilities>
</performer>
</performers>
</performersDetails>
</apiRequest>
Ответ, если все прошло хорошо:
<apiResponse version="1.0">
<performers>
<performer>
<name>Driver<name>Driver_API_3782387<3782387</name>
<login>Driver<login>Driver_API_3782387121<3782387121</login>
</performer>
</performers>
</apiResponse>
Экспорт водителей
rest/2/distribution-api/objects/exportPerformers
...
rest/2/distribution-api/objects/exportPerformers?sessionID=a5fad852a18149468d1b9845bbd8e1a8
Возвращает ответ
<apiResponse version="1.0">
<performersDetails>
<units timeZone="GMT+01:00" timeZoneOffset="GMT+1:00" currency="POUND" distanceUnits="MILE" speedUnits="MILES_PER_HOUR" durationUnits="MINUTE" weightUnits="units"/>
<performers>
<performer name="Andy Marey" externalId="2675d0e99a1047e6bd0ebafc326bb939" email="andy@magentaandy@magenta.com" login="andy" passwordHash="42767516990368493138776584305024125808" maxWorkingHours="40" allowedOvertimePerWeek="0" priceForOneHour="0" dailyDrivingLimit="480" allowDailyDrivingLimit="false" dailyWorkingLimit="660" allowDailyWorkingLimit="false" breakShift="0" areaOfControl="FrogwellZone">
<homeLocation name="Frogwell" address="Drake Crescent, Chippenham, Wiltshire, SN14, GB" latitude="51.453891" longitude="-2.148895"/>
<availabilities>
<availability weekDay="thursday" from="06:00" to="22:00" fixedDayStart="false"/>
</availabilities>
</performer>
<performersDetails>
</apiResponse>