### GET get_key_info Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve key information and the corresponding XML response. ```http Запрос: GET https://ip:port/tm_tapi/1.0/get_key_info Content-Type: application/x-www-form-urlencoded signature=6f03bc45d3aa17f7738672180a3ee5de Ответ: 0 OK company_name>ООО БИТ-Мастер 000 1 10 1 1 30 1 ``` -------------------------------- ### GET get_clients_info Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve client information and the corresponding JSON response. ```http Запрос: GET https://ip:port/common_api/1.0/get_clients_info?text=test&max_clients_count=10&client_group_id=1&parent_id=20&fields=name,number HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "clients_info":[ { "client_id":390, "name":"tester1", "number":"001" }, { "client_id":394, "name":"tester2", "number":"002" } ] } } ``` -------------------------------- ### Create new order calculation GET request Source: https://help.taximaster.ru/index.php/TMAPI Example of a GET request to calculate order costs with various parameters. ```http GET https://ip:port/common_api/1.0/calc_order_cost?tariff_id=1&source_time=20120501100000&is_prior=false&client_id=1&client_employee_id=11&discount_id=1&disc_card_id=1& source_zone_id=1&dest_zone_id=2&distance_city=10&distance_country=20&source_distance_country=5&is_country=true&waiting_minutes=10&is_hourly=false&hourly_minutes=60& is_prize=true&back_way=false&services=1;2;3&order_params=1;2;3 HTTP/1.1 Signature: <...> ``` -------------------------------- ### GET Request with Parameters Source: https://help.taximaster.ru/index.php/TMAPI Example of a GET request passing parameters directly in the URI. ```http GET https://ip:port/common_api/1.0/calc_order_cost?tariff_id=1&distance_city=10 HTTP/1.1 Signature: <...> ``` -------------------------------- ### GET get_info_by_order_id request and response example Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example of a GET request to get_info_by_order_id with order_id=60 and fields list, followed by the XML response. The response contains the requested fields, e.g., SOURCE_TIME. ```http GET https://ip:port/tm_tapi/1.0/get_info_by_order_id?order_id=60&fields=DRIVER_SOURCETIME-MARKCOLOR- GOSNUMBER-IS_PRIOR-MOBILE_PHONE-SOURCE_TIME&signature=fdcd04e570443b56176b83f44748dc23 ``` ```xml 0 OK 20140929134911 ``` -------------------------------- ### GET get_client_info Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve client information and the corresponding JSON response structure. ```http Запрос: GET https://ip:port/common_api/1.0/get_client_info?client_id=140 Signature: <...> Ответ: { "code": 0, "descr": "OK", "data": { "client_id": 20, "parent_id": 0, "name": "Юр. лицо1", "number": "111", "address": "Адрес Юр. лицо1", "gender": "", "birthday": "22.01.2016", "phones": [ "105", "123456789", "100" ], "balance": 10, "bonus_balance": 333, "login": "111", "password": "111", "client_group_id": 1, "tariff_id": 39, "prize_tariff_id": 0, "tariff_shift_id": 0, "discount_id": 2, "prize_discount_id": 0, "min_balance": 0, "min_balance_for_use_cashless": null, "min_bonus_balance_for_use_bonus": null, "is_locked": false, "lock_description": "", "use_cashless_account": true, "use_cashless": true, "remain_prize": 0, "email": "Юр. лицо1@ss.ru", "use_email_informing": true, "default_crew_group": 6, "comment": "Сотрудник СВР. ``` -------------------------------- ### Get Discounts List Request Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Retrieves a list of available discounts. The example shows the HTTP GET request and the corresponding JSON response. ```http Запрос: GET https://ip:port/common_api/1.0/get_discounts_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "discounts":[ { "id":1, "name":"DISCOUNT1", "sum":100, "percent":0 }, { "id":2, "name":"DISCOUNT2" "sum":0, "percent":10 } ] } } ``` -------------------------------- ### get_info_by_phone request and response example Source: https://help.taximaster.ru/index.php/TMAPI Example GET request to https://ip:port/tm_tapi/1.0/get_info_by_phone with phone, fields, and signature parameters. The response is an XML document with a code, description, and data fields. ```http Запрос: GET https://ip:port/tm_tapi/1.0/get_info_by_phone?phone=89058800565l&fields=PHONE_TYPE-PHONE_ TO_DIAL-CREW_ID-ORDER_ID&signature=d35ab2765f2968d48c096d5f5327db26 ``` ```xml Ответ: 0 OK 0 3 6 20140929134911 20141007105050 ``` -------------------------------- ### GET get_driver_plan_shifts - Request and Response Example Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example request and response for the get_driver_plan_shifts method. The request uses GET with start_time and finish_time parameters. The response contains a data object with an array of plan_shifts, each including plan_shift_id, plan_shift_name, plan_shift_comment, plan_shift_cost, plan_shift_type, plan_shift_start_time, plan_shift_finish_time, plan_shift_length, plan_shift_crew_group_id, max_sell_count, and sold_count. ```http Запрос: GET https://ip:port/common_api/1.0/get_driver_plan_shifts?start_time=20140101101010&finish_time=20140101202020 Signature: <...> ``` ```json Ответ: { "code":0, "descr":"OK", "data":{ "plan_shifts":[ { "plan_shift_id":1, "plan_shift_name":"PLAN_SHIFT_1", "plan_shift_comment":"PLAN_SHIFT_COMMENT_1", "plan_shift_cost":100, "plan_shift_type":"limited", "plan_shift_start_time":"20140101101010", "plan_shift_finish_time":"20140101101010", "plan_shift_length":null, "plan_shift_crew_group_id":1, "max_sell_count":100, "sold_count":10 }, { "plan_shift_id":2, "plan_shift_name":"PLAN_SHIFT_2", "plan_shift_comment":"PLAN_SHIFT_COMMENT_2", "plan_shift_cost":200, "plan_shift_type":"unlimited", "plan_shift_start_time":null, "plan_shift_finish_time":null, "plan_shift_length":8, "plan_shift_crew_group_id":2, "max_sell_count":200, "sold_count":20 } ] } } ``` -------------------------------- ### Example request and response for register_client Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 A POST request example for registering a client and the corresponding successful JSON response. ```http POST https://ip:port/common_api/1.0/register_client Signature: <...> Content-Type: application/x-www-form-urlencoded Content-Length: 104 name=NAME&phones=88,99&login=LOGIN&password=PASSWORD&birthday=19930218115517&gender=male&address=ADDRESS&client_group=1&parent_id=10&email=mail%40ya.ru&use_email_informing=true&use_own_account=false Ответ: { "code":0, "descr":"OK", "data":{ "client_id":140 } } ``` -------------------------------- ### get_addresses_like2 - Request and Response Example Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example HTTP GET request to get_addresses_like2 with parameters get_streets, get_points, get_houses, and address, followed by the JSON response containing an array of addresses with coordinates. ```http Запрос: GET https://ip:port/common_api/1.0/get_addresses_like2?get_streets=true&get_points=true&get_houses=true&address=STR12 HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "addresses":[ { "address_source":"tm", "kind":"street", "city":"CITY ", "point":"", "street":"STREET", "house":"12", "comment":"", "coords":{ "lat":11.11111, "lon":22.222222 } }, { "address_source":"tm", "kind":"street", "city":"CITY ", "point":"", "street":"STREET", "house":"120", "comment":"", "coords":{ "lat":11.11111, "lon":22.222222 } } ] } } ``` -------------------------------- ### get_addresses_like example: request and response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example HTTP GET request to get_addresses_like with parameters get_streets=true, get_points=true, get_houses=false, and street=STREE, followed by the JSON response containing matching addresses. ```http GET https://ip:port/common_api/1.0/get_addresses_like?get_streets=true&get_points=true&get_houses=false&street=STREE HTTP/1.1 Signature: <...> ``` ```json { "code":0, "descr":"OK", "data":{ "addresses":[ { "address_source":"tm", "street":"STREET1", "house":"", "kind":"street", "comment":"", "coords":{ "lat":0, "lon":0 } }, { "address_source":"tm", "street":"STREET2", "house":"", "kind":"street", "comment":"", "coords":{ "lat":0, "lon":0 } }, { "address_source":"tm", "street":"POINT_STREET1", "house":"", "kind":"point", "comment":"Point at street STREET1", "coords":{ "lat":11.111111, "lon":22.222222 } } ] } } ``` -------------------------------- ### Get Car Info Request and Response Source: https://help.taximaster.ru/index.php?oldid=26287&title=TM_API Example GET request to retrieve car information and the corresponding JSON response. ```http GET https://ip:port/common_api/1.0/get_car_info?car_id=1&need_photo=false HTTP/1.1 Signature: <...> ``` ```json { "code":0, "descr":"OK", "data":{ "car_id":1, "code":"123", "name":"CAR_NAME", "gos_number":"a123bc", "color":"COLOR", "mark":"MARK", "model":"MODEL", "short_name":"SHORT_NAME", "production_year":2000, "is_locked":false, "fuel_level":8.15, "order_params":[1,2], "attribute_values": [ { "id": 1, "bool_value": true }, { "id": 2, "num_value": 1 }, { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ] } } ``` -------------------------------- ### Retrieve Driver Information via GET Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example request and response for fetching driver information using the get_drivers_info endpoint. ```http Запрос: GET https://ip:port/common_api/1.0/get_drivers_info?locked_drivers=true&dismissed_drivers=true HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "drivers_info":[ { "driver_id":1, "name":"DRIVER_NAME1", "balance":100.00, "birthday":"01.01.1980", "number":"111", "car_id":1, "license":"1234567890", "home_phone":"79999999999", "mobile_phone":"79999999999", "is_locked":false, "is_dismissed":false, "order_params":[3,4], "phones":[ { "phone":"79999999999", "is_default":true, “use_for_call”: true }, { "phone":"79999999999", "is_default":false, “use_for_call”: true } ], "term_account":"00008", "attribute_values": [ { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ], "kpi":3.12 }, { "driver_id":2, "name":"DRIVER_NAME2", "balance":-50.00, "birthday":"01.01.1980", "number":"222", "car_id":2, "license":"1234567899", "is_locked":true, "is_dismissed":true, "order_params":[5,6], "phones":[ { "phone":"79999999999", "is_default":true, “use_for_call”: true }, { "phone":"79999999999", "is_default":false, “use_for_call”: false } ], "term_account":"00009", "attribute_values": [ { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ], "kpi":3.12 } ] } } ``` -------------------------------- ### Get global attributes request Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example of a GET request to retrieve global system attributes. ```http Пример запроса: GET https://ip:port/common_api/1.0/get_global_attributes Пример ответа: { "code":0, "descr":"OK", "data":{ "global_attributes":[ { "id":123, "bool_value":true }, { "id":124, "num_value":314 }, { "id":125, "str_value": "AAA" } ] } } ``` -------------------------------- ### GET request example for get_info_by_phone Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to the TM API. The signature parameter is required and is an MD5 hash of the request parameters concatenated with the secret key. ```HTTP GET https://ip:port/tm_tapi/1.0/get_info_by_phone?phone=89058800565&fields=PHONE_TYPE-PHONE_ TO_DIAL&signature=661ce071eeefcb4f7fc8bc1f17bd520b ``` -------------------------------- ### Get Crew Information Request Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example GET request to retrieve crew information. ```http GET https://ip:port/common_api/1.0/get_crew_info?crew_id=1 HTTP/1.1 Signature: <...> Ответ: ``` -------------------------------- ### Get order states list request Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example of a GET request to retrieve the list of available order states. ```http GET https://ip:port/common_api/1.0/get_order_states_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "order_states":[ { "id":1, "name":"Принят", "state_type":"accepted" }, { "id":2, "name":"В работе", "state_type":"in_work" }, ... ] } } ``` -------------------------------- ### Get security key information Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example request and response for retrieving license and company information associated with the security key using the get_key_info method. ```http Запрос: GET https://ip:port/tm_tapi/1.0/get_key_info Content-Type: application/x-www-form-urlencoded signature=6f03bc45d3aa17f7738672180a3ee5de Ответ: 0 OK company_name>ООО БИТ-Мастер 000 1 10 1 1 30 1 ``` -------------------------------- ### Basic GET Request Format Source: https://help.taximaster.ru/index.php/TMAPI Example of a standard GET request structure for the TM API. ```http GET https://ip:port/common_api/1.0/get_crew_groups_list HTTP/1.1 ``` -------------------------------- ### get_tariffs_list request example Source: https://help.taximaster.ru/index.php/TMAPI GET request to retrieve the list of tariffs. Returns tariffs array with id, name, and is_active fields. The example shows the request with Signature header and the JSON response. ```http Запрос: GET https://ip:port/common_api/1.0/get_tariffs_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "tariffs":[ { "id":1, "name":"TARIFF1" "is_active":true }, { "id":2, "name":"TARIFF2" "is_active":true } ] } } ``` -------------------------------- ### GET get_driver_shifts - Request and Response Example Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example request and response for the get_driver_shifts method. The request uses GET with start_time and finish_time parameters in ГГГГММДДччммсс format. The response contains a data object with an array of shifts, each including shift_id, driver_id, driver_name, plan_shift details, shift_state, buy_time, is_returned, return_time, orders_count, orders_sum, and fact_length. ```http Запрос: GET https://ip:port/common_api/1.0/get_driver_shifts?start_time=20140101101010&finish_time=20140101202020 Signature: <...> ``` ```json Ответ: { "code":0, "descr":"OK", "data":{ "shifts":[ { "shift_id":1, "driver_id":1, "driver_name":"DRIVER_1", "plan_shift_id":1, "plan_shift_name":"PLAN_SHIFT_1", "plan_shift_cost":100, "plan_shift_type":"limited", "plan_shift_start_time":"20140101101010", "plan_shift_finish_time":"20140101101010", "plan_shift_length":null, "plan_shift_crew_group_id":1, "shift_state":new, "buy_time":"20140101101010", "is_returned":false, "return_time":null, "orders_count":10, "orders_sum":1000, "fact_length":1.2 }, { "shift_id":2, "driver_id":2, "driver_name":"DRIVER_2", "plan_shift_id":2, "plan_shift_name":"PLAN_SHIFT_2", "plan_shift_cost":200, "plan_shift_type":"unlimited", "plan_shift_start_time":null, "plan_shift_finish_time":null, "plan_shift_length":8, "plan_shift_crew_group_id":null, "shift_state":new, "buy_time":"20140101101010", "is_returned":true, "return_time":"20140101101010", "orders_count":0, "orders_sum":0, "fact_length":0 } ] } } ``` -------------------------------- ### Get Order Parameters List Request Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Retrieves a list of order parameters. The example shows the HTTP GET request and the corresponding JSON response. ```http Запрос: GET https://ip:port/common_api/1.0/get_order_params_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "order_params":[ { "id":1, "name":"PARAM1", "sum":100, "percent":0, "order_access_control":true }, { "id":2, "name":"PARAM2", "sum":0, "percent":10, "order_access_control":false } ] } } ``` -------------------------------- ### get_addresses_like2 Request and Response Example Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example of a GET request to the get_addresses_like2 endpoint and the corresponding JSON response containing a list of found addresses. ```http GET https://ip:port/common_api/1.0/get_addresses_like2?get_streets=true&get_points=true&get_houses=true&address=STR12 HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "addresses":[ { "address_source":"tm", "kind":"street", "city":"CITY ", "point":"", "street":"STREET", "house":"12", "comment":"", "coords":{ "lat":11.11111, "lon":22.222222 } }, { "address_source":"tm", "kind":"street", "city":"CITY ", "point":"", "street":"STREET", "house":"120", "comment":"", "coords":{ "lat":11.11111, "lon":22.222222 } } ] } } ``` -------------------------------- ### Create New Order 2 Request and Response Source: https://help.taximaster.ru/index.php?oldid=26287&title=TM_API Example of a GET request for calculating order costs and the corresponding JSON response. ```http GET https://ip:port/common_api/1.0/calc_order_cost?tariff_id=1&source_time=20120501100000&is_prior=false&client_id=1&client_employee_id=11&discount_id=1&disc_card_id=1& source_zone_id=1&dest_zone_id=2&distance_city=10&distance_country=20&source_distance_country=5&is_country=true&waiting_minutes=10&is_hourly=false&hourly_minutes=60& is_prize=true&back_way=false&services=1;2;3&order_params=1;2;3 HTTP/1.1 Signature: <...> ``` ```json { "code":0, "descr":"OK", "data":{ "sum":1000, "info":[ { "comment":"SUM1", "sum":"100" }, { "comment":"SUM2", "sum":"200" } ] } } ``` -------------------------------- ### get_client_groups_list request example Source: https://help.taximaster.ru/index.php/TMAPI GET request to retrieve the list of client groups. Returns client_groups array with id and name fields. The example shows the request with Signature header and the JSON response. ```http Запрос: GET https://ip:port/common_api/1.0/get_client_groups_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "client_groups":[ { "id":1, "name":"CLIENT_GROUP1" }, { "id":2, "name":"CLIENT_GROUP2" } ] } } ``` -------------------------------- ### GET get_driver_info Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve specific driver information and the corresponding JSON response structure. ```http Запрос: GET https://ip:port/common_api/1.0/get_driver_info?driver_id=1&need_photo=false HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "driver_id":1, "name":"DRIVER_NAME", "balance":100, "birthday":"01.01.1980", "number":"111", "car_id":1, "license":"1234567890", "home_phone":"79999999999", "mobile_phone":"79999999999", "is_locked":false, "is_dismissed":false, "order_params":[3,4], "phones":[ { "phone":"79999999999", "is_default":true, “use_for_call”:true }, { "phone":"79999999999", "is_default":false, “use_for_call”:false } ], "term_account":"00008", "name_for_taxophone":"NameForTaxoPhone", "accounts": [ { "account_kind":0, "balance":1000993.00 }, { "account_kind":1000, "balance":600.00 } ], "attribute_values": [ { "id": 1, "bool_value": true }, { "id": 2, "num_value": 1 }, { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ], "kpi":3.12 } } ``` -------------------------------- ### get_addresses_like example: house search request and response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example HTTP GET request to get_addresses_like with get_streets=false, get_points=false, get_houses=true, street=STREET1, house=1, and max_addresses_count=10, followed by the JSON response containing matching houses. ```http GET https://ip:port/common_api/1.0/get_addresses_like?get_streets=false&get_points=false&get_houses=true&street=STREET1&house=1&max_addresses_count=10 HTTP/1.1 Signature: <...> ``` ```json { "code":0, "descr":"OK", "data":{ "addresses":[ { "address_source":"tm", "street":"STREET1", "house":"1", "kind":"house", "comment":"", "coords":{ "lat":11.111111, "lon":22.222222 } }, { "address_source":"tm", "street":"STREET1", "house":"10", "kind":"house", "comment":"", "coords":{ "lat":33.333333, "lon":44.444444 } } ] } } ``` -------------------------------- ### Query Order State via GET Request Source: https://help.taximaster.ru/index.php/TMAPI Example of a GET request to retrieve the state of an order using the common_api endpoint. ```http GET https://ip:port/common_api/1.0/get_order_state?order_id=1 HTTP/1.1 Signature: <...> ``` -------------------------------- ### GET get_info_by_phone Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve information by phone number and the corresponding XML response. ```http Запрос: GET https://ip:port/tm_tapi/1.0/get_info_by_phone?phone=89058800565l&fields=PHONE_TYPE-PHONE_ TO_DIAL-CREW_ID-ORDER_ID&signature=d35ab2765f2968d48c096d5f5327db26 Ответ: 0 OK 0 3 6 20140929134911 20141007105050 ``` -------------------------------- ### update_driver_info request and response example Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example HTTP request and JSON response for the update_driver_info method. The request includes driver_id, name, car_id, password, birthday, comment, order_params, name_for_taxophone, phones array, and attribute_values. The response returns code 0 and empty data on success. ```http Запрос: POST https://ip:port/common_api/1.0/update_driver_info HTTP/1.1 Signature: <...> Content-Type: application/json Content-Length: <...> { "driver_id":10 "name":"NAME", "car_id":140, "password":"PASSWORD", "birthday":"19930218000000", "comment":"COMMENT", "order_params":[3,4], "name_for_taxophone":"NameForTaxoPhone", "phones":[ { "phone":"79999999999", "is_default":true, “use_for_call”: true }, { "phone":"79999999999", "is_default":false, “use_for_call”: false } ], "attribute_values": [ { "id": 1, "bool_value": true }, { "id": 2, "num_value": 1 }, { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ] } ``` ```json Ответ: { "code":0, "descr":"OK", "data":{} } ``` -------------------------------- ### GET get_client_operations Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of retrieving client operations within a specified time range and account type. ```http Запрос: GET https://ip:port/common_api/1.0/get_client_operations?client_id=112&start_time=20130201092112&finish_time=20130221092112&account_kind=0 HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "operations":[ { "oper_id":111, "oper_time":"20130219091328", "sum":"21,8", "order_id":11800, "oper_type":"receipt", "pay_type":"cash", "account_kind":0, "name":"Пополнение счета", "comment":"Комментарий", "cancelled_by_oper_id":0, "cancelled_oper_id":112 }, { "oper_id":112, "oper_time":"20130220112245", "sum":"4500", "order_id":11801, "oper_type":"receipt", "pay_type":"cash", "account_kind":0, "name":"Пополнение счета", "comment":"Комментарий" "cancelled_by_oper_id":111, "cancelled_oper_id":0 } ] } } ``` -------------------------------- ### Create Order 2 Request and Response Source: https://help.taximaster.ru/index.php?oldid=26287&title=TM_API Example of a POST request to create a new order and the corresponding successful JSON response. ```http POST https://ip:port/common_api/1.0/create_order2 HTTP/1.1 Signature: <...> Content-Type: application/json Content-Length: <...> { "server_time_offset":2, "source_time":"20140415172811", "is_prior":false, "check_duplicate":true, "phone":"123456", "phone_to_dial":"654321", "client_id":1, "client_employee_id":4, "customer":"CUSTOMER", "passenger":"PASSENGER", "comment":"COMMENT", "crew_group_id":1, "uds_id":1, "tariff_id":1, "addresses": [ { "address": "SOURCE", "lat": 56.896817, "lon": 53.14783 "zone_id": 1, "parking_id": 1 }, { "address": "STOP1", "lat": 56.845452, "lon": 53.226775 "zone_id": 2, "parking_id": 2 }, { "address": "STOP2" }, { "address": "DESTINATION", "lat": 56.86123, "lon": 53.24187 } ] "services":[1,2], "crew_props":[1], "order_params":[3,4], "total_cost":370, "client_id":28, "use_cashless":false, "use_bonus":false, "cashless_sum":700, "bonus_sum":350, "email":"email@gmail.com", "prior_to_current_before_minutes":30, "flight_number":"130-qwe2", "need_custom_validate":false, "attribute_values": [ { "id": 1, "bool_value": true }, { "id": 2, "num_value": 1 }, { "id": 3, "num_value": 10 }, { "id": 4, "str_value": "строка" } ], "payment_pay_system": "qr" } Ответ: { "code":0, "descr":"OK", "data":{ "order_id":1672 } } ``` -------------------------------- ### Register Client via register_client Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a POST request to register a client using application/x-www-form-urlencoded format. ```http Запрос: POST https://ip:port/common_api/1.0/register_client Signature: <...> Content-Type: application/x-www-form-urlencoded Content-Length: 104 name=NAME&phones=88,99&login=LOGIN&password=PASSWORD&birthday=19930218115517&gender=male&address=ADDRESS&client_group=1&parent_id=10&email=mail%40ya.ru&use_email_informing=true&use_own_account=false Ответ: { "code":0, "descr":"OK", "data":{ "client_id":140 } } ``` -------------------------------- ### Create New Order via make_new_order Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example request and response for creating a new order using the make_new_order endpoint. ```http Запрос: POST https://ip:port/tm_tapi/1.0/make_new_order Content-Type: application/x-www-form-urlencoded Content-Length: 206 PHONE=89058770593&ORDER_STATE_ID=10&DISCOUNTED_SUMM=100&signature=afc947f610eba380df6d0e441b03ddad Ответ: 0 OK 27 ``` -------------------------------- ### Signature Calculation Example Source: https://help.taximaster.ru/index.php/TMAPI Demonstration of how to calculate the MD5 signature using request parameters and a secret key. ```text Запрос: GET https://ip:port/common_api/1.0/calc_order_cost?tariff_id=1&distance_city=10 HTTP/1.1 Секретный ключ: 1234567890 Signature = MD5("tariff_id=1&distance_city=10" + "1234567890") = d7b8fb11b5499b64d750b8efe53e2877 ``` -------------------------------- ### analyze_route2 Request and Response Example Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example HTTP request and response for the analyze_route2 endpoint. The request includes addresses with coordinates and an optional flag get_full_route_coords. The response contains address details, distances, and full route coordinates if requested. ```http POST https://ip:port/common_api/1.0/analyze_route2 HTTP/1.1 Content-Type: application/json Content-Length: <...> Signature: <...> { "get_full_route_coords":true, "addresses":[ { "address":"STREET1, 1", "lat":11.111111, "lon":22.222222 }, { "address":"STREET2, 2", "lat":33.333333, "lon":44.444444 } ] } ``` ```json { "code":0, "descr":"OK", "data":{ "addresses":[ { "lat":11.111111, "lon":22.222222, "zone_id":1, "parking_id":1 }, { "lat":33.333333, "lon":44.444444, "zone_id":2, "parking_id":2 } ], "city_dist":0, "country_dist":2.647, "source_country_dist":3.412, "full_route_coords":[ { "lat":55.833603, "lon":37.515537 }, { "lat":55.832855, "lon":37.516315 }, { "lat":55.833405, "lon":37.51799 }, ... ] } } ``` -------------------------------- ### POST request example for change_order_state Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a POST request to the TM API. Parameters are sent in the request body in application/x-www-form-urlencoded format. ```HTTP POST https://ip:port/tm_tapi/1.0/change_order_state Content-Type: application/x-www-form-urlencoded Content-Length: 71 order_id=98798&need_state=12&signature=a204c50c7e48f0c6849a87485fe5e171 ``` -------------------------------- ### BeginCoordsSending Method Syntax Source: https://help.taximaster.ru/index.php/TMManager Syntax for the BeginCoordsSending method used to initialize coordinate transmission. ```cpp HRESULT BeginCoordsSending(); ``` -------------------------------- ### Get Crew Info Request Source: https://help.taximaster.ru/index.php/%D0%95%D0%AC_%D0%A4%D0%97%D0%A8 Example of a GET request to retrieve information about a specific crew member. ```http GET https://ip:port/common_api/1.0/get_crew_info?crew_id=1 HTTP/1.1 Signature: <...> ``` -------------------------------- ### Create Record Link Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a POST request to create a record link and the corresponding XML response. ```http Запрос: POST https://ip:port/tm_tapi/1.0/create_record_link HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: <...> RECORD_DATE=20130122180949&RECORD_LENGTH=215&CALL_ID=12345&PHONE=8987564&FILE_PATH=d%3A%5Ctemp%5CTM%5Ctrunk%5CSource%5CDevUtils%5CTMAPITest%5C&CALL_TYPE=1&CALL_RESULT=no_answer&signature=<...> Ответ: 0 OK 25 ``` -------------------------------- ### Get crew states list request Source: https://help.taximaster.ru/index.php/%D0%90%D0%BF%D0%B8 Example of a GET request to retrieve the list of available crew states. ```http GET https://ip:port/common_api/1.0/get_crew_states_list HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "crew_states":[ { "id":1, "name":"Свободен", "state_type":"waiting" }, { "id":2, "name":"Не работает", "state_type":"not_available" }, ... ] } } ``` -------------------------------- ### Настройка init в lcell.conf: добавление +CPMS=? Source: https://help.taximaster.ru/index.php/%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0_%D1%81%D0%BE%D1%82%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE_%D1%82%D0%B5%D0%BB%D0%B5%D1%84%D0%BE%D0%BD%D0%B0_%28%D0%90%D1%80%D1%85%D0%B8%D0%B2%29 Исходная строка init в файле конфигурации устройства связи (по умолчанию lcell.conf). К ней добавляется +CPMS=? для проверки поддержки банков памяти телефоном. ```plaintext init = Z^E0+CLIP=1^+CMGF=0^+CSMS=0^+CNMI=1,1,0,2^ ``` ```plaintext init = Z^E0+CLIP=1^+CMGF=0^+CSMS=0^+CNMI=1,1,0,2^+CPMS=?^ ``` -------------------------------- ### Calculate Order Cost 2 Request Source: https://help.taximaster.ru/index.php?oldid=26287&title=TM_API Example of a POST request structure for the calc_order_cost2 method. ```http POST https://ip:port/common_api/1.0/calc_order_cost2 HTTP/1.1 Signature: <...> Content-Type: application/json Content-Length: <...> ``` -------------------------------- ### MediaWiki:Common.js Empty Initialization Source: https://help.taximaster.ru/api.php?action=feedcontributions&feedformat=atom&user=Sanevt Initial state of the Common.js file containing only a comment. ```javascript /* Размещённый здесь JavaScript код будет загружаться всем пользователям при обращении к каждой странице */ ``` -------------------------------- ### GET get_current_orders Request and Response Source: https://help.taximaster.ru/index.php?action=edit&title=TM_API Example of a GET request to retrieve current orders and the corresponding JSON response structure. ```http Запрос: GET https://ip:port/common_api/1.0/get_current_orders?client_id=140&phone=18 HTTP/1.1 Signature: <...> Ответ: { "code":0, "descr":"OK", "data":{ "orders":[ { "order_id":1, "state_id":12, "state_kind":"car_at_place", "crew_id":1, "prior_crew_id":0, "driver_id":2, "car_id":3, "server_time_offset":0, "start_time":"20130117125641", "source_time":"20130117132617", "source":"30 Лет Победы ул. \/Ижевск\/, 4Б", "source_lat":56.863613, "source_lon":53.186539, "source_parking_id":1, "destination":"Кирова ул. \/Ижевск\/, 56", "destination_lat":56.862202, "destination_lon":53.187485, "destination_parking_id":2, "stops":[ { "address":"30 Лет Победы ул. \/Ижевск\/, 8", "lat":56.863388, "lon":53.184269 } ], "customer":"Слепаков", "passenger":"Слепаков", "phone":"8800", "client_id":1, "client_employee_id":1, "order_crew_group_id":1, "tariff_id":1, "car_mark":"Ауди", "car_model":"Q7", "car_color":"черный", "car_number":"А777АА", "confirmed":"confirmed_by_oper", "crew_coords":{ "lat":56.833981, "lon":53.220249 }, "order_params":[ 1, 2, 5 ], "creation_way":"operator", "is_prior":true, "is_really_prior":false, "email":"mail@mail.ru", "prior_to_current_before_minutes":30, "flight_number":"A-0501/123", "sum":50.5, "total_sum":80, "cash_sum":20.1, "cashless_sum":10, "bonus_sum":5.2, "bank_card_sum":15, "attribute_values":[ { "id":1, "bool_value":true }, { "id":2, "num_value":1 }, { "id":3, "num_value":10 }, { "id":4, "str_value":"строка" } ], "bill":[ { "code":"BOARDING", "text":"Посадка", "value":"", "sum":"20,00" }, { "code":"TRIP_TIME", "text":"Общее время", "value":"0:00:00", "sum":"" }, { "code":"TRIP_DIST", "text":"Общее расстояние", "value":"0,00 км", "sum":"" }, { "code":"BEFORE_DISC", "text":"Сумма без скидки", "value":"", "sum":"20,00" }, { "code":"AFTER_DISC", "text":"Сумма со скидкой", "value":"", "sum":"20,00" }, { "code":"MINIMUM", "text":"Минималка", "value":"", "sum":"60,00" } ], "is_auction":false, "payment_pay_system":"qr" } ] } } ```