DataMobile

docs (PUT)

Тип метода

PUT

Назначение

  • Создание документа
  • Выгрузка документа

Где используется

  • В списке документов
  • В документе

Запрос

Параметры

Наименование Тип Описание
device_id string Идентификатор устройства
username string Имя пользователя

Тело

Наименование Тип Описание
template_id string Идентификатор шаблона
doc object Объект документа
client_id string Идентификатор контрагента
warehouse_id string Идентификатор склада

Пример запроса #1

Создание нового документа с указанием склада и контрагента на форме создания документа

http://192.168.1.1/DM/hs/DataMobileExch/api/docs?device_id=1&username=Администратор

{
    "template_id": "17",
    "client_id": "8k-d8b56d04-a268-11e5-92f1-0050568b35ac",
    "warehouse_1_id": "2e46ec48-7025-11e6-accf-0050568b35ac"
}

Пример запроса #2

Выгрузка обычного документа

http://192.168.1.1/DM/hs/DataMobileExch/api/docs?device_id=1&username=Администратор

{
    "doc": {
        "details": {
            "insert": [],
            "select": [
                {
                    "egais": {
                        "blank_b": "",
                        "blank_a": "",
                        "bate_bottling": "",
                        "mark": "22N000004EN86MA2XWN0CFK80626001000105DZDRQA66798X0QQJOPB0AYZN9VXMJPQ",
                        "alcocode": "0016112000002677287"
                    },
                    "date": "14.02.2022 15:39:43",
                    "pack_attributes": "",
                    "created_at": 1644842383,
                    "weight_task": 0,
                    "barcode": {
                        "is_deleted": false,
                        "use_sn_mode": 2,
                        "unit_coef": 1,
                        "unit_name": "",
                        "value": ""
                    },
                    "qty": 1,
                    "box_pack": "01000000014810118000000169",
                    "pack": "",
                    "comment": "",
                    "marking": {
                        "raw_barcode": "",
                        "tnvd": "",
                        "raw_mrc": "",
                        "decoded_mrc": "",
                        "mark": "",
                        "sn": "",
                        "ean": "",
                        "gtin": ""
                    },
                    "limit_qty": 0,
                    "task_qty": 0,
                    "tare": {
                        "name": "",
                        "barcode": ""
                    },
                    "price": 0,
                    "data_matrix_barcode": "",
                    "changed_price": 0,
                    "art": {
                        "barcodes": [],
                        "rest": 0,
                        "measure_type": 0,
                        "is_deleted": false,
                        "is_use_sn": false,
                        "sn_types": [],
                        "price": 0,
                        "attributes": {
                            "attr_9": "",
                            "attr_8": "",
                            "attr_10": "",
                            "attr_7": "",
                            "attr_6": "",
                            "attr_5": "",
                            "attr_4": "",
                            "attr_3": "",
                            "attr_2": "",
                            "attr_1": ""
                        },
                        "mark_type": 0,
                        "price_discount": 0,
                        "name": "Вино географического наименования Ведерниковское сухое розовое ''Губернаторское розовое''",
                        "id": ""
                    },
                    "sn": "",
                    "gs1_barcode": "",
                    "cell": {
                        "name": "",
                        "barcode": ""
                    },
                    "egais_art": {
                        "sn": "",
                        "is_need_date_bottling": true,
                        "is_need_blank_b": false,
                        "is_need_blank_a": false,
                        "type_alco": "",
                        "percent_alco": 0,
                        "is_registered": false,
                        "capacity": 0,
                        "importer": "",
                        "box_coef": 1,
                        "manufacturer": "",
                        "alcocode": "0016112000002677287",
                        "name": "Вино географического наименования Ведерниковское сухое розовое ''Губернаторское розовое''",
                        "id": "8e-cf92cb65-9101-e2f6-f4c7-fbacf7e657c0"
                    },
                    "child_doc_out_id": "",
                    "group_row_id": "",
                    "row_id": 1
                }
            ]
        },
        "warehouse_2": {
            "name": "",
            "id": ""
        },
        "warehouse_1": {
            "name": "",
            "id": ""
        },
        "template": {},
        "inn": "",
        "priority": 0,
        "is_parent": false,
        "is_finished": false,
        "barcode": "78522941844762084498805351348101447752",
        "forms": [],
        "comment": "",
        "parent_doc_id": "",
        "is_deleted": false,
        "date": "23.11.2021 0:00:00",
        "is_loaded": false,
        "number": "00000000001",
        "id": "d82-2b098337-4388-11ec-b09f-50465db6e599"
    },
    "is_finished": true
}

Пример запроса #3

Выгрузка документа ЕГАИС

http://192.168.1.1/DM/hs/DataMobileExch/api/docs?device_id=1&username=Администратор

{
    "doc": {
        "details": {
            "insert": [],
            "select": [
                {
                    "egais": {
                        "blank_b": "",
                        "blank_a": "",
                        "date_bottling": "",
                        "mark": "173400005111261018001AS2J5OHBUJFFWSWFXEOG7SKNRQODUXTN4VXDQO54DT3KJ5TK7Q2BORDR6GYCOAQJ6K5JNALFBOO7EISFHIMYCT2BOGVB3YI6L7JRCIS7SQDMPV37QTDMHA7A6UB56DN4Y",
                        "alcocode": ""
                    },
                    "date": "15.02.2022 13:28:07",
                    "pack_attributes": "",
                    "created_at": 1644920887,
                    "weight_task": 0,
                    "barcode": {
                        "is_deleted": false,
                        "use_sn_mode": 2,
                        "unit_coef": 1,
                        "unit_name": "",
                        "value": ""
                    },
                    "qty": 1,
                    "box_pack": "01000000014611219000176673",
                    "pack": "",
                    "comment": "",
                    "marking": {
                        "raw_barcode": "",
                        "tnvd": "",
                        "raw_mrc": "",
                        "decoded_mrc": "",
                        "mark": "",
                        "sn": "",
                        "ean": "",
                        "gtin": ""
                    },
                    "limit_qty": 0,
                    "task_qty": 0,
                    "tare": {
                        "name": "",
                        "barcode": ""
                    },
                    "price": 0,
                    "data_matrix_barcode": "",
                    "changed_price": 0,
                    "art": {
                        "barcodes": [],
                        "rest": 0,
                        "measure_type": 0,
                        "is_deleted": false,
                        "is_use_sn": false,
                        "sn_types": [],
                        "price": 0,
                        "attributes": {
                            "attr_9": "",
                            "attr_8": "",
                            "attr_10": "",
                            "attr_7": "",
                            "attr_6": "",
                            "attr_5": "",
                            "attr_4": "",
                            "attr_3": "",
                            "attr_2": "",
                            "attr_1": ""
                        },
                        "mark_type": 0,
                        "price_discount": 0,
                        "name": "Российское шампанское брют белое ''Абрау-Дюрсо''",
                        "id": ""
                    },
                    "sn": "",
                    "gs1_barcode": "",
                    "cell": {
                        "name": "",
                        "barcode": ""
                    },
                    "egais_art": {
                        "sn": "",
                        "is_need_date_bottling": true,
                        "is_need_blank_b": false,
                        "is_need_blank_a": false,
                        "type_alco": "",
                        "percent_alco": 0,
                        "is_registered": false,
                        "capacity": 0,
                        "importer": "",
                        "box_coef": 1,
                        "manufacturer": "",
                        "alcocode": "",
                        "name": "Российское шампанское брют белое ''Абрау-Дюрсо''",
                        "id": "8e-00000000-0000-0001-2389-000001423569"
                    },
                    "child_doc_out_id": "",
                    "group_row_id": "",
                    "row_id": 1
                },
            ]
        },
        "warehouse_2": {
            "name": "",
            "id": ""
        },
        "warehouse_1": {
            "name": "магазин \"Фирменный  №1\"",
            "id": "f96e6cd1-a32c-11e5-80d1-00155d080542"
        },
        "template": {},
        "inn": "2315152138",
        "priority": 0,
        "is_parent": false,
        "is_finished": false,
        "barcode": "171647141925512695858279041922991103305",
        "forms": [],
        "comment": "Выполнено в DataMobile  25.01.2019 17:12:00",
        "parent_doc_id": "",
        "is_deleted": false,
        "date": "31.01.2019 0:00:00",
        "is_loaded": false,
        "number": "0CЦБ-000013",
        "id": "d82-59805049-8014-11ec-941f-902b346e641d"
    },
    "is_finished": true
}

Ответ

Тело

Наименование Тип Описание
doc обязательное object Параметры документа
is_success обязательное boolean Признак успешного выполнения операции

Пример ответа #1

Возвращается объект doc

{
    "id": "d82-f586018c-8589-11ec-aa42-18c04d302a2e",
    "number": "DMO-82",
    "date": "04.02.2022 0:00:00",
    "date_timestamp": "1673864047",
    "comment": "",
    "barcode": "DMO-82",
    "is_deleted": false,
    "is_loaded": false,
    "is_parent": false,
    "is_finished": false,
    "parent_doc_id": "",
    "priority": 0,
    "inn": "",
    "template": {
        "id": 17,
        "is_deleted": false,
        "name": "Инвентаризация",
        "roles": [
        "1",
        "2"
    ], 
        "is_multi_sn_logic": false,
      "is_allow_create_on_device": true,
      "is_load_arts_with_doc": false,
      "is_load_rows_on_open_doc": false,
      "pack_list_generate_mode": 0,
      "is_use_barcode_templates": false,
      "is_use_select_log_as_insert_task": false,
      "unload_incorrect_doc_action": 0,
      "unload_incorrect_doc_option": 0,
      "is_scan_art_again": false,
      "is_use_all_barcodes": true,
      "is_unload_completed_child_doc": false,
      "is_unload_completed_doc": false,
      "required_pack_qty": 0,
      "is_use_second_warehouse": false,
      "is_disable_manual_change_client": false,
      "is_disable_manual_change_warehouse": false,
      "dest_template_id": null,
      "is_notify_getting_doc": false,
      "is_manual_apply_cell": false,
      "is_manual_apply_art": false,
      "is_use_additional_forms": false,
      "is_group_selection_forms": false,
      "is_update_forms_from_server": false,
      "is_can_skip_pack": false,
      "is_get_sn_list_from_server": false,
      "is_delete_left_task_qty": false,
      "new_art_action": 2,
      "is_multi_doc": false,
      "is_from_select_to_insert_art_by_art": false,
      "unique_barcode_mode": 0,
      "multi_doc_timeout": 0,
      "is_play_multi_doc_sound": false,
      "online_arts_catalog": 0,
      "create_mode": 0,
      "is_warehouse_required": false,
      "is_client_required": false,
      "is_check_unit_task": false,
      "is_check_remaining_expiration_date": false,
      "is_load_doc_logs": false,
      "selective_check_pack_mode": 0,
        "select": {
            "is_use_operation": true,
            "art_scan_action": 2,
            "task_exceed_action": 0,
            "limit_exceed_action": 0,
            "use_cell_mode": 0,
            "use_sn_mode": 0,
            "use_pack_mode": 0,
            "is_check_cell_by_task": false,
            "is_check_sn_by_task": false,
            "is_manual_quantity": true,
            "is_enter_to_commit": true,
            "is_send_row_to_server": true,
            "print_label_mode": 0,
            "enter_cell_type": 0,
            "is_get_cells_from_server": false,
            "is_use_unique_sn": false,
            "is_use_photo_fixation": false,
            "use_tare_mode": 0,
            "is_handle_whole_tare": false,
            "is_handle_whole_cell": false,
            "is_require_enter_sn": false,
            "sn_data_type": 0,
          "is_verify_row_on_server": false,
        "row_task_replace_mode": 0
        "use_kit_mode": 0
        },
        "insert": {
            "is_use_operation": false,
            "art_scan_action": 0,
            "task_exceed_action": 0,
            "limit_exceed_action": 0,
            "use_cell_mode": 0,
            "use_sn_mode": 0,
            "use_pack_mode": 0,
            "is_check_cell_by_task": false,
            "is_check_sn_by_task": false,
            "is_manual_quantity": false,
            "is_enter_to_commit": false,
            "is_send_row_to_server": false,
            "print_label_mode": 0,
            "enter_cell_type": 0,
            "is_get_cells_from_server": false,
            "is_use_unique_sn": false,
            "is_use_photo_fixation": false,
            "use_tare_mode": 0,
            "is_handle_whole_tare": false,
            "is_handle_whole_cell": false,
            "is_require_enter_sn": false,
            "sn_data_type": 0,
          "is_verify_row_on_server": false,
        "row_task_replace_mode": 0
        "use_kit_mode": 0
        },
        "egais": {
            "is_egais_doc": false,
            "enter_data_matrix_mode": 0,
            "is_use_bottling_date": false,
            "is_compare": false,
            "enter_pdf417_barcode_mode": 0,
            "is_check_mark_on_server": false,
            "version": 0,
            "is_use_blank_a": false,
            "is_use_blank_b": false,
            "is_get_bottling_date_from_server": false
        },
        "marking": {
            "is_marking_doc": false,
            "check_task_mode": 0,
            "is_ean_equals_gtin": false,
            "ean_scan_type": 0,
            "is_search_by_km": false,
            "is_only_mark_art": false,
            "without_km_enter_type": 0,
            "check_km_owner_action": 0,
            "check_km_status_action": 0,
          "sn_source": 0,
            "allowed_statuses": [
                        0,
                        1,
                        2,
                        6
      ]
        }
  },
    "forms": []
}

Пример ответа #2

{
    "is_success": true
}

Пример ответа #3

{
    "is_success": true
}

Полезные статьи

doc

Оценить статью