Home Reference Source

lib/api/order.js

import { get } from '../methods/get';
import { post } from '../methods/post';
import { put } from '../methods/put';

/**
 * GET /admin/orders/{order_id}.json
 *
 * Examples:
 *
 *      insales.getOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1'
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 51,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:31.069+03:00",
 *            "updated_at": "2026-10-21T23:27:31.069+03:00",
 *            "field_id": 360,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 1,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 300,
 *            "total_price": 300,
 *            "full_total_price": 300,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": [
 *              "code1",
 *              "code2"
 *            ],
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 43,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:30.994+03:00",
 *              "updated_at": "2026-10-21T23:27:30.994+03:00",
 *              "field_id": 352,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 352,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:30.973+03:00",
 *              "updated_at": "2026-10-21T23:27:30.973+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:30.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 35,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:30.943+03:00",
 *              "updated_at": "2026-10-21T23:27:30.943+03:00",
 *              "field_id": 344,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 1600,
 *        "paid_amount": 0,
 *        "items_price": 1500,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:31.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1500.0",
 *        "warehouse_id": null
 *      }
 * @param {Object} options
 * @param {string} options.token Required, access token for shop
 * @param {string} options.url Required, shop url
 * @param {number|string} options.orderid Required, order id
 * @param {Number|String} id Required, app id
 * @returns {Promise}
 */
export function getOrder(options, id) {
  return get({
    id,
    token: options.token,
    url: options.url,
    api: `orders/${options.orderid}`
  });
}

/**
 * GET /admin/orders.json
 *
 * Examples:
 *
 *      insales.listOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        fulfillment_status: ["new","delivered"],
 *        delivery_variant: ["1","2"],
 *        payment_gateway_id: ["1","3"]
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      [
 *        {
 *          "fields_values": [],
 *          "order_lines": [],
 *          "order_changes": [],
 *          "discount": null,
 *          "shipping_address": {
 *            "id": 9,
 *            "fields_values": [],
 *            "name": "Name Name",
 *            "surname": null,
 *            "middlename": null,
 *            "phone": "+7(495)888-99-06",
 *            "formatted_phone": "+7(495)888-99-06",
 *            "full_name": "Name Name",
 *            "full_locality_name": null,
 *            "full_delivery_address": "567887, state, Manchester, address",
 *            "address_for_gis": "567887, state, Manchester, address",
 *            "location_valid": true,
 *            "recipient_fields": [
 *              {
 *                "id": 11,
 *                "destiny": 2,
 *                "position": 1,
 *                "office_title": "Имя",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "name",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::ObligatoryTextField"
 *              },
 *              {
 *                "id": 12,
 *                "destiny": 2,
 *                "position": 2,
 *                "office_title": "Телефон",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "phone",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Phone"
 *              }
 *            ],
 *            "backoffice_fields": [
 *              {
 *                "id": 4,
 *                "destiny": 1,
 *                "position": 3,
 *                "office_title": "Адрес",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": "address",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextArea"
 *              },
 *              {
 *                "id": 448,
 *                "destiny": 1,
 *                "position": 22,
 *                "office_title": "special",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": null,
 *                "created_at": "2026-10-21T23:27:33.258+03:00",
 *                "updated_at": "2026-10-21T23:27:33.258+03:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": "special",
 *                "example": null,
 *                "type": "Field::TextField"
 *              },
 *              {
 *                "id": 1,
 *                "destiny": 1,
 *                "position": 0,
 *                "office_title": "Страна",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "country",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Country"
 *              },
 *              {
 *                "id": 2,
 *                "destiny": 1,
 *                "position": 1,
 *                "office_title": "Регион",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "state",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 3,
 *                "destiny": 1,
 *                "position": 2,
 *                "office_title": "Город",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "city",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 5,
 *                "destiny": 1,
 *                "position": 4,
 *                "office_title": "Почтовый индекс",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "zip",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              }
 *            ],
 *            "no_delivery": false,
 *            "kladr_autodetected_address": "",
 *            "country_options": [
 *              {
 *                "code": "RU",
 *                "title": "Россия",
 *                "selected": true
 *              }
 *            ],
 *            "address": "address",
 *            "country": "RU",
 *            "state": "state",
 *            "city": "Manchester",
 *            "zip": "567887",
 *            "street": null,
 *            "house": null,
 *            "flat": null,
 *            "entrance": null,
 *            "doorphone": null,
 *            "floor": null,
 *            "comment": null,
 *            "kladr_json": null,
 *            "location": {
 *              "kladr_code": null,
 *              "zip": "567887",
 *              "kladr_zip": null,
 *              "region_zip": null,
 *              "country": "RU",
 *              "state": "state",
 *              "state_type": null,
 *              "area": null,
 *              "area_type": null,
 *              "city": "Manchester",
 *              "city_type": null,
 *              "settlement": null,
 *              "settlement_type": null,
 *              "address": "address",
 *              "street": "address",
 *              "street_type": null,
 *              "house": null,
 *              "flat": null,
 *              "is_kladr": false,
 *              "latitude": null,
 *              "longitude": null,
 *              "autodetected": null
 *            }
 *          },
 *          "client": {
 *            "id": 3,
 *            "email": "some-one2@yandex.ru",
 *            "name": "Just Man",
 *            "phone": "+7(926)111-22-33",
 *            "created_at": "2009-04-30T04:37:32.000+04:00",
 *            "updated_at": "2009-04-30T12:20:34.000+04:00",
 *            "comment": null,
 *            "registered": false,
 *            "subscribe": true,
 *            "client_group_id": 1,
 *            "bonus_points": 0,
 *            "type": "Client::Individual",
 *            "correspondent_account": null,
 *            "settlement_account": null,
 *            "consent_to_personal_data": null,
 *            "o_auth_provider": null,
 *            "messenger_subscription": null,
 *            "external_id": null,
 *            "external_service": null,
 *            "contact_name": "Just Man",
 *            "surname": null,
 *            "middlename": null,
 *            "progressive_discount": "25.0",
 *            "group_discount": "25.0",
 *            "ip_addr": "",
 *            "fields_values": []
 *          },
 *          "discounts": [],
 *          "total_price": 0,
 *          "paid_amount": 0,
 *          "items_price": 0,
 *          "id": 8,
 *          "key": null,
 *          "number": 1008,
 *          "comment": "comment",
 *          "archived": false,
 *          "delivery_title": "самовывоз",
 *          "delivery_description": "самовывоз",
 *          "delivery_price": 0,
 *          "full_delivery_price": 0,
 *          "payment_description": null,
 *          "payment_title": "наличными курьеру",
 *          "first_referer": null,
 *          "first_current_location": null,
 *          "first_query": null,
 *          "first_source_domain": null,
 *          "first_source": "",
 *          "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *          "current_location": null,
 *          "query": null,
 *          "source_domain": null,
 *          "source": "",
 *          "fulfillment_status": "new",
 *          "custom_status": {
 *            "permalink": "new",
 *            "title": "Новый"
 *          },
 *          "delivered_at": null,
 *          "accepted_at": null,
 *          "created_at": "2011-03-18T10:53:14.000+03:00",
 *          "updated_at": "2011-03-18T10:53:15.000+03:00",
 *          "financial_status": "paid",
 *          "delivery_date": null,
 *          "delivery_from_hour": null,
 *          "delivery_from_minutes": null,
 *          "delivery_to_hour": null,
 *          "delivery_to_minutes": null,
 *          "delivery_time": "",
 *          "paid_at": null,
 *          "delivery_variant_id": 1,
 *          "payment_gateway_id": 3,
 *          "margin": "0.0",
 *          "margin_amount": "0.0",
 *          "client_transaction_id": null,
 *          "yandex_metrika_client_id": null,
 *          "currency_code": "RUR",
 *          "cookies": null,
 *          "account_id": 1,
 *          "manager_comment": null,
 *          "locale": "ru",
 *          "delivery_info": {
 *            "delivery_variant_id": null,
 *            "tariff_id": null,
 *            "title": null,
 *            "description": null,
 *            "price": null,
 *            "shipping_company": null,
 *            "shipping_company_handle": null,
 *            "delivery_interval": {
 *              "min_days": null,
 *              "max_days": null,
 *              "description": ""
 *            },
 *            "errors": [],
 *            "warnings": [],
 *            "outlet": {
 *              "id": null,
 *              "external_id": null,
 *              "latitude": null,
 *              "longitude": null,
 *              "type": null,
 *              "title": null,
 *              "description": null,
 *              "address": null,
 *              "payment_method": null,
 *              "source_id": null
 *            },
 *            "not_available": null
 *          },
 *          "responsible_user_id": null,
 *          "total_profit": "0.0",
 *          "warehouse_id": null
 *        },
 *        {
 *          "fields_values": [],
 *          "order_lines": [],
 *          "order_changes": [],
 *          "discount": null,
 *          "shipping_address": {
 *            "id": 2,
 *            "fields_values": [],
 *            "name": "JD",
 *            "surname": null,
 *            "middlename": null,
 *            "phone": "+7(495)111-11-11",
 *            "formatted_phone": "+7(495)111-11-11",
 *            "full_name": "JD",
 *            "full_locality_name": null,
 *            "full_delivery_address": "123456, Moscow, address",
 *            "address_for_gis": "123456, Moscow, address",
 *            "location_valid": true,
 *            "recipient_fields": [
 *              {
 *                "id": 11,
 *                "destiny": 2,
 *                "position": 1,
 *                "office_title": "Имя",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "name",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::ObligatoryTextField"
 *              },
 *              {
 *                "id": 12,
 *                "destiny": 2,
 *                "position": 2,
 *                "office_title": "Телефон",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "phone",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Phone"
 *              }
 *            ],
 *            "backoffice_fields": [
 *              {
 *                "id": 4,
 *                "destiny": 1,
 *                "position": 3,
 *                "office_title": "Адрес",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": "address",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextArea"
 *              },
 *              {
 *                "id": 448,
 *                "destiny": 1,
 *                "position": 22,
 *                "office_title": "special",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": null,
 *                "created_at": "2026-10-21T23:27:33.258+03:00",
 *                "updated_at": "2026-10-21T23:27:33.258+03:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": "special",
 *                "example": null,
 *                "type": "Field::TextField"
 *              },
 *              {
 *                "id": 1,
 *                "destiny": 1,
 *                "position": 0,
 *                "office_title": "Страна",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "country",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Country"
 *              },
 *              {
 *                "id": 2,
 *                "destiny": 1,
 *                "position": 1,
 *                "office_title": "Регион",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "state",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 3,
 *                "destiny": 1,
 *                "position": 2,
 *                "office_title": "Город",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "city",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 5,
 *                "destiny": 1,
 *                "position": 4,
 *                "office_title": "Почтовый индекс",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "zip",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              }
 *            ],
 *            "no_delivery": false,
 *            "kladr_autodetected_address": "",
 *            "country_options": [
 *              {
 *                "code": "RU",
 *                "title": "Россия",
 *                "selected": true
 *              }
 *            ],
 *            "address": "address",
 *            "country": "RU",
 *            "state": "Moscow",
 *            "city": "Moscow",
 *            "zip": "123456",
 *            "street": null,
 *            "house": null,
 *            "flat": null,
 *            "entrance": null,
 *            "doorphone": null,
 *            "floor": null,
 *            "comment": null,
 *            "kladr_json": null,
 *            "location": {
 *              "kladr_code": null,
 *              "zip": "123456",
 *              "kladr_zip": null,
 *              "region_zip": null,
 *              "country": "RU",
 *              "state": "Moscow",
 *              "state_type": null,
 *              "area": null,
 *              "area_type": null,
 *              "city": "Moscow",
 *              "city_type": null,
 *              "settlement": null,
 *              "settlement_type": null,
 *              "address": "address",
 *              "street": "address",
 *              "street_type": null,
 *              "house": null,
 *              "flat": null,
 *              "is_kladr": false,
 *              "latitude": null,
 *              "longitude": null,
 *              "autodetected": null
 *            }
 *          },
 *          "client": {
 *            "id": 7,
 *            "email": "john2@doe.com",
 *            "name": "John Doe",
 *            "phone": "+7(926)111-11-11",
 *            "created_at": "2009-03-30T04:37:32.000+04:00",
 *            "updated_at": "2009-03-31T12:20:34.000+04:00",
 *            "comment": null,
 *            "registered": false,
 *            "subscribe": true,
 *            "client_group_id": null,
 *            "bonus_points": 100,
 *            "type": "Client::Individual",
 *            "correspondent_account": null,
 *            "settlement_account": null,
 *            "consent_to_personal_data": null,
 *            "o_auth_provider": null,
 *            "messenger_subscription": null,
 *            "external_id": null,
 *            "external_service": null,
 *            "contact_name": "John Doe",
 *            "surname": null,
 *            "middlename": null,
 *            "progressive_discount": null,
 *            "group_discount": null,
 *            "ip_addr": "",
 *            "fields_values": []
 *          },
 *          "discounts": [],
 *          "total_price": 100,
 *          "paid_amount": 0,
 *          "items_price": 0,
 *          "id": 6,
 *          "key": "merged_client_order",
 *          "number": 10011,
 *          "comment": "comment",
 *          "archived": false,
 *          "delivery_title": "самовывоз",
 *          "delivery_description": "самовывоз",
 *          "delivery_price": 100,
 *          "full_delivery_price": 100,
 *          "payment_description": null,
 *          "payment_title": "наличными курьеру",
 *          "first_referer": "http://google.com?q=my_query",
 *          "first_current_location": "/my_query",
 *          "first_query": null,
 *          "first_source_domain": null,
 *          "first_source": "Google",
 *          "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *          "current_location": "/",
 *          "query": null,
 *          "source_domain": null,
 *          "source": "Прямой трафик",
 *          "fulfillment_status": "new",
 *          "custom_status": {
 *            "permalink": "new",
 *            "title": "Новый"
 *          },
 *          "delivered_at": null,
 *          "accepted_at": null,
 *          "created_at": "2009-03-18T10:53:14.000+03:00",
 *          "updated_at": "2009-03-18T10:53:15.000+03:00",
 *          "financial_status": "pending",
 *          "delivery_date": null,
 *          "delivery_from_hour": null,
 *          "delivery_from_minutes": null,
 *          "delivery_to_hour": null,
 *          "delivery_to_minutes": null,
 *          "delivery_time": "",
 *          "paid_at": null,
 *          "delivery_variant_id": 1,
 *          "payment_gateway_id": 1,
 *          "margin": "0.0",
 *          "margin_amount": "0.0",
 *          "client_transaction_id": null,
 *          "yandex_metrika_client_id": null,
 *          "currency_code": "RUR",
 *          "cookies": null,
 *          "account_id": 1,
 *          "manager_comment": "manager comment1",
 *          "locale": "ru",
 *          "delivery_info": {
 *            "delivery_variant_id": null,
 *            "tariff_id": null,
 *            "title": null,
 *            "description": null,
 *            "price": null,
 *            "shipping_company": null,
 *            "shipping_company_handle": null,
 *            "delivery_interval": {
 *              "min_days": null,
 *              "max_days": null,
 *              "description": ""
 *            },
 *            "errors": [],
 *            "warnings": [],
 *            "outlet": {
 *              "id": null,
 *              "external_id": null,
 *              "latitude": null,
 *              "longitude": null,
 *              "type": null,
 *              "title": null,
 *              "description": null,
 *              "address": null,
 *              "payment_method": null,
 *              "source_id": null
 *            },
 *            "not_available": null
 *          },
 *          "responsible_user_id": null,
 *          "total_profit": "0.0",
 *          "warehouse_id": null
 *        },
 *        {
 *          "fields_values": [
 *            {
 *              "id": 1,
 *              "value": "1234",
 *              "created_at": "2026-10-19T22:28:42.670+03:00",
 *              "updated_at": "2026-10-19T22:28:42.670+03:00",
 *              "field_id": 174,
 *              "type": "Текст",
 *              "name": "АКС айди отгрузки",
 *              "handle": "aks_shipment_id"
 *            }
 *          ],
 *          "order_lines": [
 *            {
 *              "id": 7,
 *              "order_id": 4,
 *              "sale_price": 800,
 *              "full_sale_price": 643.2,
 *              "total_price": 800,
 *              "full_total_price": 643.2,
 *              "discounts_amount": 264,
 *              "quantity": 1,
 *              "reserved_quantity": null,
 *              "weight": null,
 *              "dimensions": null,
 *              "variant_id": 1,
 *              "product_id": null,
 *              "sku": "425",
 *              "barcode": null,
 *              "title": "Cool t-shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2011-03-18T10:53:15.000+03:00",
 *              "created_at": "2011-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": -1,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": null,
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            },
 *            {
 *              "id": 8,
 *              "order_id": 4,
 *              "sale_price": 100,
 *              "full_sale_price": 80.4,
 *              "total_price": 200,
 *              "full_total_price": 160.8,
 *              "discounts_amount": 66,
 *              "quantity": 2,
 *              "reserved_quantity": null,
 *              "weight": "0.3",
 *              "dimensions": null,
 *              "variant_id": 2,
 *              "product_id": null,
 *              "sku": "426",
 *              "barcode": null,
 *              "title": "shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2009-03-18T10:53:15.000+03:00",
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": -1,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": null,
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            }
 *          ],
 *          "order_changes": [],
 *          "discount": {
 *            "id": 2,
 *            "description": "рублевая скидка",
 *            "warning": null,
 *            "type_id": 2,
 *            "amount": 330,
 *            "full_amount": 396,
 *            "percent": null,
 *            "discount": "330.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": null,
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "updated_at": "2009-03-18T10:53:15.000+03:00"
 *          },
 *          "shipping_address": null,
 *          "client": {
 *            "id": 3,
 *            "email": "some-one2@yandex.ru",
 *            "name": "Just Man",
 *            "phone": "+7(926)111-22-33",
 *            "created_at": "2009-04-30T04:37:32.000+04:00",
 *            "updated_at": "2009-04-30T12:20:34.000+04:00",
 *            "comment": null,
 *            "registered": false,
 *            "subscribe": true,
 *            "client_group_id": 1,
 *            "bonus_points": 0,
 *            "type": "Client::Individual",
 *            "correspondent_account": null,
 *            "settlement_account": null,
 *            "consent_to_personal_data": null,
 *            "o_auth_provider": null,
 *            "messenger_subscription": null,
 *            "external_id": null,
 *            "external_service": null,
 *            "contact_name": "Just Man",
 *            "surname": null,
 *            "middlename": null,
 *            "progressive_discount": "25.0",
 *            "group_discount": "25.0",
 *            "ip_addr": "",
 *            "fields_values": []
 *          },
 *          "discounts": [
 *            {
 *              "id": 2,
 *              "description": "рублевая скидка",
 *              "warning": null,
 *              "type_id": 2,
 *              "amount": 330,
 *              "full_amount": 396,
 *              "percent": null,
 *              "discount": "330.0",
 *              "reference_id": null,
 *              "reference_type": null,
 *              "discount_products_ids": [],
 *              "discount_order_lines_ids": [],
 *              "discount_code_id": null,
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "updated_at": "2009-03-18T10:53:15.000+03:00"
 *            }
 *          ],
 *          "total_price": 804,
 *          "paid_amount": 0,
 *          "items_price": 804,
 *          "id": 4,
 *          "key": null,
 *          "number": 1005,
 *          "comment": "comment",
 *          "archived": false,
 *          "delivery_title": "самовывоз",
 *          "delivery_description": "самовывоз",
 *          "delivery_price": 0,
 *          "full_delivery_price": 0,
 *          "payment_description": null,
 *          "payment_title": "наличными курьеру",
 *          "first_referer": null,
 *          "first_current_location": null,
 *          "first_query": null,
 *          "first_source_domain": null,
 *          "first_source": "",
 *          "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *          "current_location": null,
 *          "query": null,
 *          "source_domain": null,
 *          "source": "",
 *          "fulfillment_status": "new",
 *          "custom_status": {
 *            "permalink": "new",
 *            "title": "Новый"
 *          },
 *          "delivered_at": null,
 *          "accepted_at": null,
 *          "created_at": "2011-03-18T10:53:14.000+03:00",
 *          "updated_at": "2011-03-18T10:53:15.000+03:00",
 *          "financial_status": "paid",
 *          "delivery_date": null,
 *          "delivery_from_hour": null,
 *          "delivery_from_minutes": null,
 *          "delivery_to_hour": null,
 *          "delivery_to_minutes": null,
 *          "delivery_time": "",
 *          "paid_at": null,
 *          "delivery_variant_id": 1,
 *          "payment_gateway_id": 3,
 *          "margin": "20.0",
 *          "margin_amount": "134.0",
 *          "client_transaction_id": null,
 *          "yandex_metrika_client_id": null,
 *          "currency_code": "RUR",
 *          "cookies": null,
 *          "account_id": 1,
 *          "manager_comment": null,
 *          "locale": "ru",
 *          "delivery_info": {
 *            "delivery_variant_id": null,
 *            "tariff_id": null,
 *            "title": null,
 *            "description": null,
 *            "price": null,
 *            "shipping_company": null,
 *            "shipping_company_handle": null,
 *            "delivery_interval": {
 *              "min_days": null,
 *              "max_days": null,
 *              "description": ""
 *            },
 *            "errors": [],
 *            "warnings": [],
 *            "outlet": {
 *              "id": null,
 *              "external_id": null,
 *              "latitude": null,
 *              "longitude": null,
 *              "type": null,
 *              "title": null,
 *              "description": null,
 *              "address": null,
 *              "payment_method": null,
 *              "source_id": null
 *            },
 *            "not_available": null
 *          },
 *          "responsible_user_id": null,
 *          "total_profit": "804.0",
 *          "warehouse_id": null
 *        },
 *        {
 *          "fields_values": [
 *            {
 *              "id": 2,
 *              "value": "",
 *              "created_at": "2026-10-19T22:28:42.670+03:00",
 *              "updated_at": "2026-10-19T22:28:42.670+03:00",
 *              "field_id": 174,
 *              "type": "Текст",
 *              "name": "АКС айди отгрузки",
 *              "handle": "aks_shipment_id"
 *            }
 *          ],
 *          "order_lines": [
 *            {
 *              "id": 5,
 *              "order_id": 3,
 *              "sale_price": 800,
 *              "full_sale_price": 672,
 *              "total_price": 800,
 *              "full_total_price": 672,
 *              "discounts_amount": 240,
 *              "quantity": 1,
 *              "reserved_quantity": null,
 *              "weight": null,
 *              "dimensions": null,
 *              "variant_id": 1,
 *              "product_id": null,
 *              "sku": "425",
 *              "barcode": null,
 *              "title": "Cool t-shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2011-03-18T10:53:15.000+03:00",
 *              "created_at": "2011-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": -1,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": null,
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            },
 *            {
 *              "id": 6,
 *              "order_id": 3,
 *              "sale_price": 100,
 *              "full_sale_price": 84,
 *              "total_price": 200,
 *              "full_total_price": 168,
 *              "discounts_amount": 60,
 *              "quantity": 2,
 *              "reserved_quantity": null,
 *              "weight": "0.3",
 *              "dimensions": null,
 *              "variant_id": 2,
 *              "product_id": null,
 *              "sku": "426",
 *              "barcode": null,
 *              "title": "shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2009-03-18T10:53:15.000+03:00",
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": 0,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": null,
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            }
 *          ],
 *          "order_changes": [],
 *          "discount": {
 *            "id": 1,
 *            "description": "процентная скидка",
 *            "warning": null,
 *            "type_id": 1,
 *            "amount": 300,
 *            "full_amount": 360,
 *            "percent": "30.0",
 *            "discount": "30.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": null,
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "updated_at": "2009-03-18T10:53:15.000+03:00"
 *          },
 *          "shipping_address": {
 *            "id": 11,
 *            "fields_values": [],
 *            "name": "Name Name",
 *            "surname": null,
 *            "middlename": null,
 *            "phone": "+7(495)888-99-08",
 *            "formatted_phone": "+7(495)888-99-08",
 *            "full_name": "Name Name",
 *            "full_locality_name": null,
 *            "full_delivery_address": "567889, state, Manchester, address",
 *            "address_for_gis": "567889, state, Manchester, address",
 *            "location_valid": true,
 *            "recipient_fields": [
 *              {
 *                "id": 11,
 *                "destiny": 2,
 *                "position": 1,
 *                "office_title": "Имя",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "name",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::ObligatoryTextField"
 *              },
 *              {
 *                "id": 12,
 *                "destiny": 2,
 *                "position": 2,
 *                "office_title": "Телефон",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "phone",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Phone"
 *              }
 *            ],
 *            "backoffice_fields": [
 *              {
 *                "id": 4,
 *                "destiny": 1,
 *                "position": 3,
 *                "office_title": "Адрес",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": "address",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextArea"
 *              },
 *              {
 *                "id": 448,
 *                "destiny": 1,
 *                "position": 22,
 *                "office_title": "special",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": null,
 *                "created_at": "2026-10-21T23:27:33.258+03:00",
 *                "updated_at": "2026-10-21T23:27:33.258+03:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": "special",
 *                "example": null,
 *                "type": "Field::TextField"
 *              },
 *              {
 *                "id": 1,
 *                "destiny": 1,
 *                "position": 0,
 *                "office_title": "Страна",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "country",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Country"
 *              },
 *              {
 *                "id": 2,
 *                "destiny": 1,
 *                "position": 1,
 *                "office_title": "Регион",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "state",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 3,
 *                "destiny": 1,
 *                "position": 2,
 *                "office_title": "Город",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "city",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 5,
 *                "destiny": 1,
 *                "position": 4,
 *                "office_title": "Почтовый индекс",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "zip",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              }
 *            ],
 *            "no_delivery": false,
 *            "kladr_autodetected_address": "",
 *            "country_options": [
 *              {
 *                "code": "RU",
 *                "title": "Россия",
 *                "selected": true
 *              }
 *            ],
 *            "address": "address",
 *            "country": "RU",
 *            "state": "state",
 *            "city": "Manchester",
 *            "zip": "567889",
 *            "street": null,
 *            "house": null,
 *            "flat": null,
 *            "entrance": null,
 *            "doorphone": null,
 *            "floor": null,
 *            "comment": null,
 *            "kladr_json": null,
 *            "location": {
 *              "kladr_code": null,
 *              "zip": "567889",
 *              "kladr_zip": null,
 *              "region_zip": null,
 *              "country": "RU",
 *              "state": "state",
 *              "state_type": null,
 *              "area": null,
 *              "area_type": null,
 *              "city": "Manchester",
 *              "city_type": null,
 *              "settlement": null,
 *              "settlement_type": null,
 *              "address": "address",
 *              "street": "address",
 *              "street_type": null,
 *              "house": null,
 *              "flat": null,
 *              "is_kladr": false,
 *              "latitude": null,
 *              "longitude": null,
 *              "autodetected": null
 *            }
 *          },
 *          "client": {
 *            "id": 3,
 *            "email": "some-one2@yandex.ru",
 *            "name": "Just Man",
 *            "phone": "+7(926)111-22-33",
 *            "created_at": "2009-04-30T04:37:32.000+04:00",
 *            "updated_at": "2009-04-30T12:20:34.000+04:00",
 *            "comment": null,
 *            "registered": false,
 *            "subscribe": true,
 *            "client_group_id": 1,
 *            "bonus_points": 0,
 *            "type": "Client::Individual",
 *            "correspondent_account": null,
 *            "settlement_account": null,
 *            "consent_to_personal_data": null,
 *            "o_auth_provider": null,
 *            "messenger_subscription": null,
 *            "external_id": null,
 *            "external_service": null,
 *            "contact_name": "Just Man",
 *            "surname": null,
 *            "middlename": null,
 *            "progressive_discount": "25.0",
 *            "group_discount": "25.0",
 *            "ip_addr": "",
 *            "fields_values": []
 *          },
 *          "discounts": [
 *            {
 *              "id": 1,
 *              "description": "процентная скидка",
 *              "warning": null,
 *              "type_id": 1,
 *              "amount": 300,
 *              "full_amount": 360,
 *              "percent": "30.0",
 *              "discount": "30.0",
 *              "reference_id": null,
 *              "reference_type": null,
 *              "discount_products_ids": [],
 *              "discount_order_lines_ids": [],
 *              "discount_code_id": null,
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "updated_at": "2009-03-18T10:53:15.000+03:00"
 *            }
 *          ],
 *          "total_price": 840,
 *          "paid_amount": 0,
 *          "items_price": 840,
 *          "id": 3,
 *          "key": null,
 *          "number": 1004,
 *          "comment": "comment",
 *          "archived": false,
 *          "delivery_title": "самовывоз",
 *          "delivery_description": "самовывоз",
 *          "delivery_price": 0,
 *          "full_delivery_price": 0,
 *          "payment_description": null,
 *          "payment_title": "наличными курьеру",
 *          "first_referer": null,
 *          "first_current_location": null,
 *          "first_query": null,
 *          "first_source_domain": null,
 *          "first_source": "",
 *          "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *          "current_location": null,
 *          "query": null,
 *          "source_domain": null,
 *          "source": "",
 *          "fulfillment_status": "new",
 *          "custom_status": {
 *            "permalink": "new",
 *            "title": "Новый"
 *          },
 *          "delivered_at": null,
 *          "accepted_at": null,
 *          "created_at": "2011-03-18T10:53:14.000+03:00",
 *          "updated_at": "2011-03-18T10:53:15.000+03:00",
 *          "financial_status": "paid",
 *          "delivery_date": null,
 *          "delivery_from_hour": null,
 *          "delivery_from_minutes": null,
 *          "delivery_to_hour": null,
 *          "delivery_to_minutes": null,
 *          "delivery_time": "",
 *          "paid_at": null,
 *          "delivery_variant_id": 1,
 *          "payment_gateway_id": 3,
 *          "margin": "20.0",
 *          "margin_amount": "140.0",
 *          "client_transaction_id": null,
 *          "yandex_metrika_client_id": null,
 *          "currency_code": "RUR",
 *          "cookies": null,
 *          "account_id": 1,
 *          "manager_comment": null,
 *          "locale": "ru",
 *          "delivery_info": {
 *            "delivery_variant_id": null,
 *            "tariff_id": null,
 *            "title": null,
 *            "description": null,
 *            "price": null,
 *            "shipping_company": null,
 *            "shipping_company_handle": null,
 *            "delivery_interval": {
 *              "min_days": null,
 *              "max_days": null,
 *              "description": ""
 *            },
 *            "errors": [],
 *            "warnings": [],
 *            "outlet": {
 *              "id": null,
 *              "external_id": null,
 *              "latitude": null,
 *              "longitude": null,
 *              "type": null,
 *              "title": null,
 *              "description": null,
 *              "address": null,
 *              "payment_method": null,
 *              "source_id": null
 *            },
 *            "not_available": null
 *          },
 *          "responsible_user_id": null,
 *          "total_profit": "840.0",
 *          "warehouse_id": null
 *        },
 *        {
 *          "fields_values": [
 *            {
 *              "id": 147,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:33.315+03:00",
 *              "updated_at": "2026-10-21T23:27:33.315+03:00",
 *              "field_id": 456,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": "my_awesome_field"
 *            }
 *          ],
 *          "order_lines": [
 *            {
 *              "id": 1,
 *              "order_id": 1,
 *              "sale_price": 300,
 *              "full_sale_price": 300,
 *              "total_price": 300,
 *              "full_total_price": 300,
 *              "discounts_amount": 0,
 *              "quantity": 1,
 *              "reserved_quantity": null,
 *              "weight": null,
 *              "dimensions": null,
 *              "variant_id": 1,
 *              "product_id": 1,
 *              "sku": "423",
 *              "barcode": null,
 *              "title": "Cool t-shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2009-03-18T10:53:15.000+03:00",
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": -1,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": [
 *                "code1",
 *                "code2"
 *              ],
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            },
 *            {
 *              "id": 2,
 *              "order_id": 1,
 *              "sale_price": 600,
 *              "full_sale_price": 600,
 *              "total_price": 1200,
 *              "full_total_price": 1200,
 *              "discounts_amount": 0,
 *              "quantity": 2,
 *              "reserved_quantity": null,
 *              "weight": "0.3",
 *              "dimensions": null,
 *              "variant_id": 2,
 *              "product_id": 2,
 *              "sku": "424",
 *              "barcode": null,
 *              "title": "shirt",
 *              "unit": "pce",
 *              "comment": null,
 *              "updated_at": "2009-03-18T10:53:15.000+03:00",
 *              "created_at": "2009-03-18T10:53:14.000+03:00",
 *              "bundle_id": null,
 *              "vat": 20,
 *              "fiscal_product_type": 1,
 *              "requires_marking": null,
 *              "marking_codes": null,
 *              "accessory_lines": [],
 *              "external_variant_id": null
 *            }
 *          ],
 *          "order_changes": [],
 *          "discount": null,
 *          "shipping_address": {
 *            "id": 1,
 *            "fields_values": [
 *              {
 *                "id": 139,
 *                "value": "old value",
 *                "created_at": "2026-10-21T23:27:33.272+03:00",
 *                "updated_at": "2026-10-21T23:27:33.272+03:00",
 *                "field_id": 448,
 *                "type": "Текст",
 *                "name": "special",
 *                "handle": null
 *              }
 *            ],
 *            "name": "Tom Dellay",
 *            "surname": null,
 *            "middlename": null,
 *            "phone": "+7(495)212-85-06",
 *            "formatted_phone": "+7(495)212-85-06",
 *            "full_name": "Tom Dellay",
 *            "full_locality_name": null,
 *            "full_delivery_address": "123456, state, London, address, old value",
 *            "address_for_gis": "123456, state, London, address",
 *            "location_valid": true,
 *            "recipient_fields": [
 *              {
 *                "id": 11,
 *                "destiny": 2,
 *                "position": 1,
 *                "office_title": "Имя",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "name",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::ObligatoryTextField"
 *              },
 *              {
 *                "id": 12,
 *                "destiny": 2,
 *                "position": 2,
 *                "office_title": "Телефон",
 *                "for_buyer": true,
 *                "obligatory": true,
 *                "active": true,
 *                "system_name": "phone",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Phone"
 *              }
 *            ],
 *            "backoffice_fields": [
 *              {
 *                "id": 4,
 *                "destiny": 1,
 *                "position": 3,
 *                "office_title": "Адрес",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": "address",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextArea"
 *              },
 *              {
 *                "id": 448,
 *                "destiny": 1,
 *                "position": 22,
 *                "office_title": "special",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": true,
 *                "system_name": null,
 *                "created_at": "2026-10-21T23:27:33.258+03:00",
 *                "updated_at": "2026-10-21T23:27:33.258+03:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": "special",
 *                "example": null,
 *                "type": "Field::TextField"
 *              },
 *              {
 *                "id": 1,
 *                "destiny": 1,
 *                "position": 0,
 *                "office_title": "Страна",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "country",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::Country"
 *              },
 *              {
 *                "id": 2,
 *                "destiny": 1,
 *                "position": 1,
 *                "office_title": "Регион",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "state",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 3,
 *                "destiny": 1,
 *                "position": 2,
 *                "office_title": "Город",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "city",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              },
 *              {
 *                "id": 5,
 *                "destiny": 1,
 *                "position": 4,
 *                "office_title": "Почтовый индекс",
 *                "for_buyer": true,
 *                "obligatory": false,
 *                "active": false,
 *                "system_name": "zip",
 *                "created_at": "2010-10-12T13:31:09.692+04:00",
 *                "updated_at": "2010-10-12T13:31:09.692+04:00",
 *                "show_in_result": true,
 *                "show_in_checkout": true,
 *                "is_indexed": null,
 *                "hide_in_backoffice": null,
 *                "handle": null,
 *                "placeholder": null,
 *                "title": null,
 *                "example": null,
 *                "type": "Field::SystemTextField"
 *              }
 *            ],
 *            "no_delivery": false,
 *            "kladr_autodetected_address": "",
 *            "country_options": [
 *              {
 *                "code": "RU",
 *                "title": "Россия",
 *                "selected": true
 *              }
 *            ],
 *            "address": "address",
 *            "country": "RU",
 *            "state": "state",
 *            "city": "London",
 *            "zip": "123456",
 *            "street": null,
 *            "house": null,
 *            "flat": null,
 *            "entrance": null,
 *            "doorphone": null,
 *            "floor": null,
 *            "comment": null,
 *            "kladr_json": null,
 *            "location": {
 *              "kladr_code": null,
 *              "zip": "123456",
 *              "kladr_zip": null,
 *              "region_zip": null,
 *              "country": "RU",
 *              "state": "state",
 *              "state_type": null,
 *              "area": null,
 *              "area_type": null,
 *              "city": "London",
 *              "city_type": null,
 *              "settlement": null,
 *              "settlement_type": null,
 *              "address": "address",
 *              "street": "address",
 *              "street_type": null,
 *              "house": null,
 *              "flat": null,
 *              "is_kladr": false,
 *              "latitude": null,
 *              "longitude": null,
 *              "autodetected": null
 *            }
 *          },
 *          "client": {
 *            "id": 2,
 *            "email": "some-one@yandex.ru",
 *            "name": "Mortimer Hant",
 *            "phone": "+79162128506",
 *            "created_at": "2009-03-30T04:37:32.000+04:00",
 *            "updated_at": "2026-10-21T23:27:33.000+03:00",
 *            "comment": null,
 *            "registered": false,
 *            "subscribe": true,
 *            "client_group_id": null,
 *            "bonus_points": 0,
 *            "type": "Client::Individual",
 *            "correspondent_account": null,
 *            "settlement_account": null,
 *            "consent_to_personal_data": null,
 *            "o_auth_provider": null,
 *            "messenger_subscription": null,
 *            "external_id": null,
 *            "external_service": null,
 *            "contact_name": "Mortimer Hant",
 *            "surname": null,
 *            "middlename": null,
 *            "progressive_discount": null,
 *            "group_discount": null,
 *            "ip_addr": "",
 *            "fields_values": [
 *              {
 *                "id": 131,
 *                "value": "old value",
 *                "created_at": "2026-10-21T23:27:33.240+03:00",
 *                "updated_at": "2026-10-21T23:27:33.240+03:00",
 *                "field_id": 440,
 *                "type": "Текст",
 *                "name": "special",
 *                "handle": null
 *              }
 *            ]
 *          },
 *          "discounts": [],
 *          "total_price": 1600,
 *          "paid_amount": 0,
 *          "items_price": 1500,
 *          "id": 1,
 *          "key": "teest",
 *          "number": 1001,
 *          "comment": "comment",
 *          "archived": false,
 *          "delivery_title": "самовывоз",
 *          "delivery_description": "самовывоз",
 *          "delivery_price": 100,
 *          "full_delivery_price": 100,
 *          "payment_description": null,
 *          "payment_title": "наличными курьеру",
 *          "first_referer": "http://google.com?q=my_query",
 *          "first_current_location": "/my_query",
 *          "first_query": null,
 *          "first_source_domain": null,
 *          "first_source": "Google",
 *          "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *          "current_location": "/",
 *          "query": null,
 *          "source_domain": null,
 *          "source": "Прямой трафик",
 *          "fulfillment_status": "new",
 *          "custom_status": {
 *            "permalink": "new",
 *            "title": "Новый"
 *          },
 *          "delivered_at": null,
 *          "accepted_at": null,
 *          "created_at": "2009-03-18T10:53:14.000+03:00",
 *          "updated_at": "2026-10-21T23:27:33.000+03:00",
 *          "financial_status": "pending",
 *          "delivery_date": null,
 *          "delivery_from_hour": null,
 *          "delivery_from_minutes": null,
 *          "delivery_to_hour": null,
 *          "delivery_to_minutes": null,
 *          "delivery_time": "",
 *          "paid_at": null,
 *          "delivery_variant_id": 1,
 *          "payment_gateway_id": 1,
 *          "margin": "0.0",
 *          "margin_amount": "0.0",
 *          "client_transaction_id": 1,
 *          "yandex_metrika_client_id": null,
 *          "currency_code": "RUR",
 *          "cookies": null,
 *          "account_id": 1,
 *          "manager_comment": "manager comment1",
 *          "locale": "ru",
 *          "delivery_info": {
 *            "delivery_variant_id": null,
 *            "tariff_id": null,
 *            "title": null,
 *            "description": null,
 *            "price": null,
 *            "shipping_company": null,
 *            "shipping_company_handle": null,
 *            "delivery_interval": {
 *              "min_days": null,
 *              "max_days": null,
 *              "description": ""
 *            },
 *            "errors": [],
 *            "warnings": [],
 *            "outlet": {
 *              "id": null,
 *              "external_id": null,
 *              "latitude": null,
 *              "longitude": null,
 *              "type": null,
 *              "title": null,
 *              "description": null,
 *              "address": null,
 *              "payment_method": null,
 *              "source_id": null
 *            },
 *            "not_available": null
 *          },
 *          "responsible_user_id": null,
 *          "total_profit": "1500.0",
 *          "warehouse_id": null
 *        }
 *      ]
 * @param {Object} options
 * @param {string} options.token Required, access token for shop
 * @param {string} options.url Required, shop url
 * @param {string|string[]} [options.fulfillment_status] Order status or array of statuses
 * @param {number|number[]} [options.delivery_variant] Delivery variant id or array of ids
 * @param {number|number[]} [options.payment_gateway_id] Payment gateway id or array of ids
 * @param {string} [options.updated_since] Orders updated since
 * @param {number|string} [options.from_id] Orders starting from this id
 * @param {number|string} [options.per_page] Orders per page
 * @param {number|string} [options.page] Page
 * @param {Number|String} id Required, app id
 * @returns {Promise}
 */
export function listOrder(options, id) {
  const query = {};
  if (options.fulfillment_status) {
    query.fulfillment_status = options.fulfillment_status;
  }
  if (options.delivery_variant) {
    query.delivery_variant = options.delivery_variant;
  }
  if (options.payment_gateway_id) {
    query.payment_gateway_id = options.payment_gateway_id;
  }
  if (options.updated_since) {
    query.updated_since = options.updated_since;
  }
  if (options.from_id) {
    query.from_id = options.from_id;
  }
  if (options.per_page) {
    query.per_page = options.per_page;
  }
  if (options.page) {
    query.page = options.page;
  }
  return get({
    id,
    token: options.token,
    url: options.url,
    api: `orders`,
    query
  });
}

/**
 * GET /admin/orders/count.json
 *
 * Examples:
 *
 *      insales.countOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru'
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "count": 6
 *      }
 * @param {Object} options
 * @param {string} options.token Required, access token for shop
 * @param {string} options.url Required, shop url
 * @param {string|string[]} [options.fulfillment_status] Order status or array of statuses
 * @param {number|number[]} [options.delivery_variant] Delivery variant id or array of ids
 * @param {number|number[]} [options.payment_gateway_id] Payment gateway id or array of ids
 * @param {Number|String} id Required, app id
 * @returns {Promise}
 */
export function countOrder(options, id) {
  const query = {};
  if (options.fulfillment_status) {
    query.fulfillment_status = options.fulfillment_status;
  }
  if (options.delivery_variant) {
    query.delivery_variant = options.delivery_variant;
  }
  if (options.payment_gateway_id) {
    query.payment_gateway_id = options.payment_gateway_id;
  }
  return get({
    id,
    token: options.token,
    url: options.url,
    api: `orders/count`,
    query
  });
}

/**
 * POST /admin/orders.json
 *
 * Examples:
 *
 *      insales.createOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "variant_id": 3,
 *                "quantity": 2,
 *                "vat": 10
 *              }
 *            ],
 *            "client": {
 *              "name": "Vasya",
 *              "email": "vasya@example.com",
 *              "phone": "79111112233"
 *            },
 *            "shipping_address_attributes": {
 *              "address": "Moscow, Krasnaya Presna 24"
 *            },
 *            "delivery_variant_id": 1,
 *            "payment_gateway_id": 1,
 *            "coupon": "20% discount"
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [],
 *        "order_lines": [
 *          {
 *            "id": 26,
 *            "order_id": 19,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 3,
 *            "product_id": 3,
 *            "sku": "425",
 *            "barcode": null,
 *            "title": "pants (Базовая)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:35.000+03:00",
 *            "created_at": "2026-10-21T23:27:35.000+03:00",
 *            "bundle_id": null,
 *            "vat": 10,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": {
 *          "id": 19,
 *          "description": "Скидка по купону 20% discount",
 *          "warning": null,
 *          "type_id": 1,
 *          "amount": 240,
 *          "full_amount": 240,
 *          "percent": "20.0",
 *          "discount": "20.0",
 *          "reference_id": 188,
 *          "reference_type": "DiscountCode",
 *          "discount_products_ids": [],
 *          "discount_order_lines_ids": [],
 *          "discount_code_id": 188,
 *          "created_at": "2026-10-21T23:27:35.000+03:00",
 *          "updated_at": "2026-10-21T23:27:35.000+03:00"
 *        },
 *        "shipping_address": {
 *          "id": 29,
 *          "fields_values": [],
 *          "name": "Vasya",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "79111112233",
 *          "formatted_phone": "7(911)111-22-33",
 *          "full_name": "Vasya",
 *          "full_locality_name": "",
 *          "full_delivery_address": "Moscow, Krasnaya Presna 24",
 *          "address_for_gis": "Moscow, Krasnaya Presna 24",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 496,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:35.453+03:00",
 *              "updated_at": "2026-10-21T23:27:35.453+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": false
 *            }
 *          ],
 *          "address": "Moscow, Krasnaya Presna 24",
 *          "country": null,
 *          "state": null,
 *          "city": null,
 *          "zip": null,
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": null,
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": null,
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": null,
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "Moscow, Krasnaya Presna 24",
 *            "street": "Moscow",
 *            "street_type": null,
 *            "house": "Krasnaya Presna 24",
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 193,
 *          "email": "vasya@example.com",
 *          "name": "Vasya",
 *          "phone": "79111112233",
 *          "created_at": "2026-10-21T23:27:35.000+03:00",
 *          "updated_at": "2026-10-21T23:27:35.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Vasya",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": []
 *        },
 *        "discounts": [
 *          {
 *            "id": 19,
 *            "description": "Скидка по купону 20% discount",
 *            "warning": null,
 *            "type_id": 1,
 *            "amount": 240,
 *            "full_amount": 240,
 *            "percent": "20.0",
 *            "discount": "20.0",
 *            "reference_id": 188,
 *            "reference_type": "DiscountCode",
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": 188,
 *            "created_at": "2026-10-21T23:27:35.000+03:00",
 *            "updated_at": "2026-10-21T23:27:35.000+03:00"
 *          }
 *        ],
 *        "total_price": 1060,
 *        "paid_amount": 0,
 *        "items_price": 960,
 *        "id": 19,
 *        "key": "b690ba78abba2ad8a36abf996eed56f4",
 *        "number": 1006,
 *        "comment": null,
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз (самовывоз из офиса)",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "Наличными курьеру",
 *        "first_referer": null,
 *        "first_current_location": null,
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Прямой трафик",
 *        "referer": "app:digital-goods-dev",
 *        "current_location": null,
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Приложение",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2026-10-21T23:27:35.000+03:00",
 *        "updated_at": "2026-10-21T23:27:35.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": null,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": {},
 *        "account_id": 1,
 *        "manager_comment": null,
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": 1,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": 100,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": [],
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "960.0",
 *        "warehouse_id": 1
 *      }
 *
 *      insales.createOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "variant_id": 5,
 *                "quantity": 2
 *              }
 *            ],
 *            "client": {
 *              "name": "Vasya",
 *              "email": "vasya@example.com",
 *              "phone": "79111112233",
 *              "consent_to_personal_data": true
 *            },
 *            "shipping_address_attributes": {
 *              "address": "Moscow, Krasnaya Presna 24",
 *              "full_locality_name": "Moscow"
 *            },
 *            "delivery_variant_id": 1,
 *            "payment_gateway_id": 1,
 *            "coupon": "20% discount"
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [],
 *        "order_lines": [
 *          {
 *            "id": 29,
 *            "order_id": 21,
 *            "sale_price": 375,
 *            "full_sale_price": 375,
 *            "total_price": 750,
 *            "full_total_price": 750,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt (Зеленый / Синий)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:37.000+03:00",
 *            "created_at": "2026-10-21T23:27:37.000+03:00",
 *            "bundle_id": 5,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 30,
 *            "order_id": 21,
 *            "sale_price": 375,
 *            "full_sale_price": 375,
 *            "total_price": 750,
 *            "full_total_price": 750,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 3,
 *            "product_id": 3,
 *            "sku": "425",
 *            "barcode": null,
 *            "title": "pants (Базовая)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:37.000+03:00",
 *            "created_at": "2026-10-21T23:27:37.000+03:00",
 *            "bundle_id": 5,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": {
 *          "id": 35,
 *          "description": "Скидка по купону 20% discount",
 *          "warning": null,
 *          "type_id": 1,
 *          "amount": 300,
 *          "full_amount": 300,
 *          "percent": "20.0",
 *          "discount": "20.0",
 *          "reference_id": 204,
 *          "reference_type": "DiscountCode",
 *          "discount_products_ids": [],
 *          "discount_order_lines_ids": [],
 *          "discount_code_id": 204,
 *          "created_at": "2026-10-21T23:27:37.000+03:00",
 *          "updated_at": "2026-10-21T23:27:37.000+03:00"
 *        },
 *        "shipping_address": {
 *          "id": 31,
 *          "fields_values": [],
 *          "name": "Vasya",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "79111112233",
 *          "formatted_phone": "7(911)111-22-33",
 *          "full_name": "Vasya",
 *          "full_locality_name": "",
 *          "full_delivery_address": "Moscow, Krasnaya Presna 24",
 *          "address_for_gis": "Moscow, Krasnaya Presna 24",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 544,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:37.138+03:00",
 *              "updated_at": "2026-10-21T23:27:37.138+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": false
 *            }
 *          ],
 *          "address": "Moscow, Krasnaya Presna 24",
 *          "country": null,
 *          "state": null,
 *          "city": null,
 *          "zip": null,
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": null,
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": null,
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": null,
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "Moscow, Krasnaya Presna 24",
 *            "street": "Moscow",
 *            "street_type": null,
 *            "house": "Krasnaya Presna 24",
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 209,
 *          "email": "vasya@example.com",
 *          "name": "Vasya",
 *          "phone": "79111112233",
 *          "created_at": "2026-10-21T23:27:37.000+03:00",
 *          "updated_at": "2026-10-21T23:27:37.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Vasya",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": []
 *        },
 *        "discounts": [
 *          {
 *            "id": 35,
 *            "description": "Скидка по купону 20% discount",
 *            "warning": null,
 *            "type_id": 1,
 *            "amount": 300,
 *            "full_amount": 300,
 *            "percent": "20.0",
 *            "discount": "20.0",
 *            "reference_id": 204,
 *            "reference_type": "DiscountCode",
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": 204,
 *            "created_at": "2026-10-21T23:27:37.000+03:00",
 *            "updated_at": "2026-10-21T23:27:37.000+03:00"
 *          }
 *        ],
 *        "total_price": 1300,
 *        "paid_amount": 0,
 *        "items_price": 1200,
 *        "id": 21,
 *        "key": "c51b61c9928677af0203cdf8af6b971c",
 *        "number": 1006,
 *        "comment": null,
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз (самовывоз из офиса)",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "Наличными курьеру",
 *        "first_referer": null,
 *        "first_current_location": null,
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Прямой трафик",
 *        "referer": "app:digital-goods-dev",
 *        "current_location": null,
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Приложение",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2026-10-21T23:27:37.000+03:00",
 *        "updated_at": "2026-10-21T23:27:37.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": null,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": {},
 *        "account_id": 1,
 *        "manager_comment": null,
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": 1,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": 100,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": [],
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1200.0",
 *        "warehouse_id": 1
 *      }
 * @param {Object} options
 * @param {string} options.token Required, access token for shop
 * @param {string} options.url Required, shop url
 * @param {object} options.order Required, order
 * @param {Number|String} id Required, app id
 * @returns {Promise}
 */
export function createOrder(options, id) {
  return post({
    id,
    token: options.token,
    url: options.url,
    api: `orders`,
    obj: options.order
  });
}

/**
 * PUT /admin/orders/{order_id}.json
 *
 * Examples:
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "client_attributes": {
 *              "id": 2,
 *              "name": "Ivan",
 *              "email": "ivan@example.com",
 *              "phone": "79111113344",
 *              "fields_values_attributes": [
 *                {
 *                  "field_id": 800,
 *                  "value": "new!"
 *                }
 *              ]
 *            },
 *            "delivery_variant_id": 4,
 *            "payment_gateway_id": 4,
 *            "coupon": "20% discount",
 *            "comment": "Please call from 9 to 18",
 *            "manager_comment": "New client",
 *            "financial_status": "paid",
 *            "fields_values_attributes": [
 *              {
 *                "handle": "my_awesome_field",
 *                "value": "new value"
 *              }
 *            ],
 *            "shipping_address_attributes": {
 *              "fields_values_attributes": [
 *                {
 *                  "field_id": 808,
 *                  "value": "new value!"
 *                }
 *              ]
 *            },
 *            "warehouse_id": 89
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 507,
 *            "value": "new value",
 *            "created_at": "2026-10-21T23:27:45.398+03:00",
 *            "updated_at": "2026-10-21T23:27:45.790+03:00",
 *            "field_id": 816,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 1,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 240,
 *            "total_price": 300,
 *            "full_total_price": 240,
 *            "discounts_amount": 60,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": [
 *              "code1",
 *              "code2"
 *            ],
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 480,
 *            "total_price": 1200,
 *            "full_total_price": 960,
 *            "discounts_amount": 240,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": {
 *          "id": 91,
 *          "description": "Скидка по купону 20% discount",
 *          "warning": null,
 *          "type_id": 1,
 *          "amount": 300,
 *          "full_amount": 300,
 *          "percent": "20.0",
 *          "discount": "20.0",
 *          "reference_id": 220,
 *          "reference_type": "DiscountCode",
 *          "discount_products_ids": [],
 *          "discount_order_lines_ids": [],
 *          "discount_code_id": 220,
 *          "created_at": "2026-10-21T23:27:45.000+03:00",
 *          "updated_at": "2026-10-21T23:27:45.000+03:00"
 *        },
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 499,
 *              "value": "new value!",
 *              "created_at": "2026-10-21T23:27:45.356+03:00",
 *              "updated_at": "2026-10-21T23:27:45.799+03:00",
 *              "field_id": 808,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+74952128506",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": "",
 *          "full_delivery_address": "123456, state, London, address, new value!",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 808,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:45.344+03:00",
 *              "updated_at": "2026-10-21T23:27:45.344+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "ivan@example.com",
 *          "name": "Ivan",
 *          "phone": "79111113344",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:45.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Ivan",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 491,
 *              "value": "new!",
 *              "created_at": "2026-10-21T23:27:45.326+03:00",
 *              "updated_at": "2026-10-21T23:27:45.700+03:00",
 *              "field_id": 800,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [
 *          {
 *            "id": 91,
 *            "description": "Скидка по купону 20% discount",
 *            "warning": null,
 *            "type_id": 1,
 *            "amount": 300,
 *            "full_amount": 300,
 *            "percent": "20.0",
 *            "discount": "20.0",
 *            "reference_id": 220,
 *            "reference_type": "DiscountCode",
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": 220,
 *            "created_at": "2026-10-21T23:27:45.000+03:00",
 *            "updated_at": "2026-10-21T23:27:45.000+03:00"
 *          }
 *        ],
 *        "total_price": 1200,
 *        "paid_amount": 1500,
 *        "items_price": 1200,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "Please call from 9 to 18",
 *        "archived": false,
 *        "delivery_title": "Внешний",
 *        "delivery_description": "Внешний (Внешний способ)",
 *        "delivery_price": 0,
 *        "full_delivery_price": 0,
 *        "payment_description": null,
 *        "payment_title": "Выставление счета для юр. лиц 2.",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:45.000+03:00",
 *        "financial_status": "paid",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": "2026-10-21T23:27:45.000+03:00",
 *        "delivery_variant_id": 4,
 *        "payment_gateway_id": 4,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "New client",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": 4,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": 0,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": [],
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1200.0",
 *        "warehouse_id": 89
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "custom_status_permalink": "v-obrabotke"
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 531,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:46.150+03:00",
 *            "updated_at": "2026-10-21T23:27:46.150+03:00",
 *            "field_id": 840,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 1,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 300,
 *            "total_price": 300,
 *            "full_total_price": 300,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": [
 *              "code1",
 *              "code2"
 *            ],
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 523,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:46.109+03:00",
 *              "updated_at": "2026-10-21T23:27:46.109+03:00",
 *              "field_id": 832,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 832,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:46.096+03:00",
 *              "updated_at": "2026-10-21T23:27:46.096+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:46.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 515,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:46.078+03:00",
 *              "updated_at": "2026-10-21T23:27:46.078+03:00",
 *              "field_id": 824,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 1600,
 *        "paid_amount": 0,
 *        "items_price": 1500,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "accepted",
 *        "custom_status": {
 *          "permalink": "accepted",
 *          "title": "В обработке"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": "2026-10-21T23:27:46.000+03:00",
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:46.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1500.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "variant_id": 1,
 *                "quantity": 1,
 *                "vat": -1
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 555,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:46.747+03:00",
 *            "updated_at": "2026-10-21T23:27:46.747+03:00",
 *            "field_id": 864,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 39,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 300,
 *            "total_price": 300,
 *            "full_total_price": 300,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": "10x20x30",
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt (Red)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:47.000+03:00",
 *            "created_at": "2026-10-21T23:27:47.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 547,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:46.706+03:00",
 *              "updated_at": "2026-10-21T23:27:46.706+03:00",
 *              "field_id": 856,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 856,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:46.693+03:00",
 *              "updated_at": "2026-10-21T23:27:46.693+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:46.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 539,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:46.676+03:00",
 *              "updated_at": "2026-10-21T23:27:46.676+03:00",
 *              "field_id": 848,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 400,
 *        "paid_amount": 0,
 *        "items_price": 300,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:47.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "210.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "product_id": 1,
 *                "quantity": 1,
 *                "vat": 22
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 579,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:47.361+03:00",
 *            "updated_at": "2026-10-21T23:27:47.361+03:00",
 *            "field_id": 888,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 40,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 300,
 *            "total_price": 300,
 *            "full_total_price": 300,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": "10x20x30",
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt (Red)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:47.000+03:00",
 *            "created_at": "2026-10-21T23:27:47.000+03:00",
 *            "bundle_id": null,
 *            "vat": 22,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 571,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:47.318+03:00",
 *              "updated_at": "2026-10-21T23:27:47.318+03:00",
 *              "field_id": 880,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 880,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:47.304+03:00",
 *              "updated_at": "2026-10-21T23:27:47.304+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:47.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 563,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:47.288+03:00",
 *              "updated_at": "2026-10-21T23:27:47.288+03:00",
 *              "field_id": 872,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 400,
 *        "paid_amount": 0,
 *        "items_price": 300,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:47.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "210.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "id": 1,
 *                "_destroy": true
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 603,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:47.963+03:00",
 *            "updated_at": "2026-10-21T23:27:47.963+03:00",
 *            "field_id": 912,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:48.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 595,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:47.927+03:00",
 *              "updated_at": "2026-10-21T23:27:47.927+03:00",
 *              "field_id": 904,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 904,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:47.914+03:00",
 *              "updated_at": "2026-10-21T23:27:47.914+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:47.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 587,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:47.893+03:00",
 *              "updated_at": "2026-10-21T23:27:47.893+03:00",
 *              "field_id": 896,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 1300,
 *        "paid_amount": 0,
 *        "items_price": 1200,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:48.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1200.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "order_lines_attributes": [
 *              {
 *                "id": 1,
 *                "sale_price": 100,
 *                "quantity": 2,
 *                "comment": "New comment",
 *                "vat": 0,
 *                "marking_codes": [
 *                  "931d10a7096421d8cced",
 *                  "d5aa6dc515ad881b0117"
 *                ]
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 627,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:48.406+03:00",
 *            "updated_at": "2026-10-21T23:27:48.406+03:00",
 *            "field_id": 936,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 1,
 *            "order_id": 1,
 *            "sale_price": 100,
 *            "full_sale_price": 100,
 *            "total_price": 200,
 *            "full_total_price": 200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt",
 *            "unit": "pce",
 *            "comment": "New comment",
 *            "updated_at": "2026-10-21T23:27:48.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 0,
 *            "fiscal_product_type": 1,
 *            "requires_marking": true,
 *            "marking_codes": [
 *              "931d10a7096421d8cced",
 *              "d5aa6dc515ad881b0117"
 *            ],
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:48.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 619,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:48.365+03:00",
 *              "updated_at": "2026-10-21T23:27:48.365+03:00",
 *              "field_id": 928,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 928,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:48.351+03:00",
 *              "updated_at": "2026-10-21T23:27:48.351+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:48.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 611,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:48.334+03:00",
 *              "updated_at": "2026-10-21T23:27:48.334+03:00",
 *              "field_id": 920,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 1500,
 *        "paid_amount": 0,
 *        "items_price": 1400,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:48.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1400.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "discounts_attributes": [
 *              {
 *                "discount": 100,
 *                "type_id": 2,
 *                "description": "-100 (absolute)"
 *              },
 *              {
 *                "discount": 10,
 *                "description": "10% only for first order line",
 *                "discount_order_lines_ids": [
 *                  41
 *                ]
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 651,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:48.886+03:00",
 *            "updated_at": "2026-10-21T23:27:48.886+03:00",
 *            "field_id": 960,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 41,
 *            "order_id": 1,
 *            "sale_price": 100,
 *            "full_sale_price": 55.72,
 *            "total_price": 200,
 *            "full_total_price": 111.43,
 *            "discounts_amount": 88.57,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": "10x20x30",
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt (Red)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:49.000+03:00",
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 42,
 *            "order_id": 1,
 *            "sale_price": 150,
 *            "full_sale_price": 98.57,
 *            "total_price": 150,
 *            "full_total_price": 98.57,
 *            "discounts_amount": 51.43,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt (Зеленый / Синий)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:49.000+03:00",
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": {
 *          "id": 99,
 *          "description": "-20 (absolute)",
 *          "warning": null,
 *          "type_id": 2,
 *          "amount": 20,
 *          "full_amount": 20,
 *          "percent": null,
 *          "discount": "20.0",
 *          "reference_id": null,
 *          "reference_type": null,
 *          "discount_products_ids": [],
 *          "discount_order_lines_ids": [],
 *          "discount_code_id": null,
 *          "created_at": "2026-10-21T23:27:49.000+03:00",
 *          "updated_at": "2026-10-21T23:27:49.000+03:00"
 *        },
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 643,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:48.848+03:00",
 *              "updated_at": "2026-10-21T23:27:48.848+03:00",
 *              "field_id": 952,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 952,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:48.835+03:00",
 *              "updated_at": "2026-10-21T23:27:48.835+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:48.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 635,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:48.820+03:00",
 *              "updated_at": "2026-10-21T23:27:48.820+03:00",
 *              "field_id": 944,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [
 *          {
 *            "id": 99,
 *            "description": "-20 (absolute)",
 *            "warning": null,
 *            "type_id": 2,
 *            "amount": 20,
 *            "full_amount": 20,
 *            "percent": null,
 *            "discount": "20.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": null,
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "updated_at": "2026-10-21T23:27:49.000+03:00"
 *          },
 *          {
 *            "id": 107,
 *            "description": "-100 (absolute)",
 *            "warning": null,
 *            "type_id": 2,
 *            "amount": 100,
 *            "full_amount": 100,
 *            "percent": null,
 *            "discount": "100.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [],
 *            "discount_order_lines_ids": [],
 *            "discount_code_id": null,
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "updated_at": "2026-10-21T23:27:49.000+03:00"
 *          },
 *          {
 *            "id": 115,
 *            "description": "10% only for first order line",
 *            "warning": null,
 *            "type_id": 1,
 *            "amount": 20,
 *            "full_amount": 20,
 *            "percent": "10.0",
 *            "discount": "10.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [
 *              1
 *            ],
 *            "discount_order_lines_ids": [
 *              41
 *            ],
 *            "discount_code_id": null,
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "updated_at": "2026-10-21T23:27:49.000+03:00"
 *          }
 *        ],
 *        "total_price": 310,
 *        "paid_amount": 0,
 *        "items_price": 210,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:49.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "30.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "discounts_attributes": [
 *              {
 *                "id": 123,
 *                "_destroy": true
 *              }
 *            ]
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 675,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:49.772+03:00",
 *            "updated_at": "2026-10-21T23:27:49.772+03:00",
 *            "field_id": 984,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 43,
 *            "order_id": 1,
 *            "sale_price": 100,
 *            "full_sale_price": 100,
 *            "total_price": 200,
 *            "full_total_price": 200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": "10x20x30",
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt (Red)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:50.000+03:00",
 *            "created_at": "2026-10-21T23:27:49.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 44,
 *            "order_id": 1,
 *            "sale_price": 150,
 *            "full_sale_price": 150,
 *            "total_price": 150,
 *            "full_total_price": 150,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt (Зеленый / Синий)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:50.000+03:00",
 *            "created_at": "2026-10-21T23:27:50.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 667,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:49.733+03:00",
 *              "updated_at": "2026-10-21T23:27:49.733+03:00",
 *              "field_id": 976,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 976,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:49.720+03:00",
 *              "updated_at": "2026-10-21T23:27:49.720+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:49.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 659,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:49.704+03:00",
 *              "updated_at": "2026-10-21T23:27:49.704+03:00",
 *              "field_id": 968,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 450,
 *        "paid_amount": 0,
 *        "items_price": 350,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:50.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "170.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "discounts_attributes": {
 *              "1": {
 *                "id": 139,
 *                "discount_order_lines_ids": [
 *                  47
 *                ]
 *              }
 *            }
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 723,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:51.399+03:00",
 *            "updated_at": "2026-10-21T23:27:51.399+03:00",
 *            "field_id": 1032,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 47,
 *            "order_id": 1,
 *            "sale_price": 100,
 *            "full_sale_price": 90,
 *            "total_price": 200,
 *            "full_total_price": 180,
 *            "discounts_amount": 20,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": "10x20x30",
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt (Red)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:51.000+03:00",
 *            "created_at": "2026-10-21T23:27:51.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 48,
 *            "order_id": 1,
 *            "sale_price": 150,
 *            "full_sale_price": 150,
 *            "total_price": 150,
 *            "full_total_price": 150,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt (Зеленый / Синий)",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2026-10-21T23:27:51.000+03:00",
 *            "created_at": "2026-10-21T23:27:51.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": {
 *          "id": 139,
 *          "description": "-20 (absolute)",
 *          "warning": null,
 *          "type_id": 2,
 *          "amount": 20,
 *          "full_amount": 20,
 *          "percent": null,
 *          "discount": "20.0",
 *          "reference_id": null,
 *          "reference_type": null,
 *          "discount_products_ids": [
 *            1
 *          ],
 *          "discount_order_lines_ids": [
 *            47
 *          ],
 *          "discount_code_id": null,
 *          "created_at": "2026-10-21T23:27:51.000+03:00",
 *          "updated_at": "2026-10-21T23:27:51.000+03:00"
 *        },
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 715,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:51.361+03:00",
 *              "updated_at": "2026-10-21T23:27:51.361+03:00",
 *              "field_id": 1024,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+7(495)212-85-06",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": null,
 *          "full_delivery_address": "123456, state, London, address, old value",
 *          "address_for_gis": "123456, state, London, address",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 1024,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:51.349+03:00",
 *              "updated_at": "2026-10-21T23:27:51.349+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "address",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "address",
 *            "street": "address",
 *            "street_type": null,
 *            "house": null,
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:51.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 707,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:51.334+03:00",
 *              "updated_at": "2026-10-21T23:27:51.334+03:00",
 *              "field_id": 1016,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [
 *          {
 *            "id": 139,
 *            "description": "-20 (absolute)",
 *            "warning": null,
 *            "type_id": 2,
 *            "amount": 20,
 *            "full_amount": 20,
 *            "percent": null,
 *            "discount": "20.0",
 *            "reference_id": null,
 *            "reference_type": null,
 *            "discount_products_ids": [
 *              1
 *            ],
 *            "discount_order_lines_ids": [
 *              47
 *            ],
 *            "discount_code_id": null,
 *            "created_at": "2026-10-21T23:27:51.000+03:00",
 *            "updated_at": "2026-10-21T23:27:51.000+03:00"
 *          }
 *        ],
 *        "total_price": 430,
 *        "paid_amount": 0,
 *        "items_price": 330,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:51.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "150.0",
 *        "warehouse_id": null
 *      }
 *
 *      insales.editOrder({
 *        token: '1234567890',
 *        url: 'shop-test.myinsales.ru',
 *        orderid: '1',
 *        order: {
 *          "order": {
 *            "shipping_address_attributes": {
 *              "address": "Moscow, Znamenka 12"
 *            }
 *          }
 *        }
 *      }).then(response => {
 *        console.info(response.data);
 *      }).catch(err => {
 *        console.error(err);
 *      });
 * Output:
 *
 *      {
 *        "fields_values": [
 *          {
 *            "id": 747,
 *            "value": "old value",
 *            "created_at": "2026-10-21T23:27:52.167+03:00",
 *            "updated_at": "2026-10-21T23:27:52.167+03:00",
 *            "field_id": 1056,
 *            "type": "Текст",
 *            "name": "special",
 *            "handle": "my_awesome_field"
 *          }
 *        ],
 *        "order_lines": [
 *          {
 *            "id": 1,
 *            "order_id": 1,
 *            "sale_price": 300,
 *            "full_sale_price": 300,
 *            "total_price": 300,
 *            "full_total_price": 300,
 *            "discounts_amount": 0,
 *            "quantity": 1,
 *            "reserved_quantity": null,
 *            "weight": null,
 *            "dimensions": null,
 *            "variant_id": 1,
 *            "product_id": 1,
 *            "sku": "423",
 *            "barcode": null,
 *            "title": "Cool t-shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": -1,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": [
 *              "code1",
 *              "code2"
 *            ],
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          },
 *          {
 *            "id": 2,
 *            "order_id": 1,
 *            "sale_price": 600,
 *            "full_sale_price": 600,
 *            "total_price": 1200,
 *            "full_total_price": 1200,
 *            "discounts_amount": 0,
 *            "quantity": 2,
 *            "reserved_quantity": null,
 *            "weight": "0.3",
 *            "dimensions": null,
 *            "variant_id": 2,
 *            "product_id": 2,
 *            "sku": "424",
 *            "barcode": null,
 *            "title": "shirt",
 *            "unit": "pce",
 *            "comment": null,
 *            "updated_at": "2009-03-18T10:53:15.000+03:00",
 *            "created_at": "2009-03-18T10:53:14.000+03:00",
 *            "bundle_id": null,
 *            "vat": 20,
 *            "fiscal_product_type": 1,
 *            "requires_marking": null,
 *            "marking_codes": null,
 *            "accessory_lines": [],
 *            "external_variant_id": null
 *          }
 *        ],
 *        "order_changes": [],
 *        "discount": null,
 *        "shipping_address": {
 *          "id": 1,
 *          "fields_values": [
 *            {
 *              "id": 739,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:52.131+03:00",
 *              "updated_at": "2026-10-21T23:27:52.131+03:00",
 *              "field_id": 1048,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ],
 *          "name": "Tom Dellay",
 *          "surname": null,
 *          "middlename": null,
 *          "phone": "+74952128506",
 *          "formatted_phone": "+7(495)212-85-06",
 *          "full_name": "Tom Dellay",
 *          "full_locality_name": "",
 *          "full_delivery_address": "123456, state, London, Moscow, Znamenka 12, old value",
 *          "address_for_gis": "123456, state, London, Moscow, Znamenka 12",
 *          "location_valid": true,
 *          "recipient_fields": [
 *            {
 *              "id": 11,
 *              "destiny": 2,
 *              "position": 1,
 *              "office_title": "Имя",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "name",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::ObligatoryTextField"
 *            },
 *            {
 *              "id": 12,
 *              "destiny": 2,
 *              "position": 2,
 *              "office_title": "Телефон",
 *              "for_buyer": true,
 *              "obligatory": true,
 *              "active": true,
 *              "system_name": "phone",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Phone"
 *            }
 *          ],
 *          "backoffice_fields": [
 *            {
 *              "id": 4,
 *              "destiny": 1,
 *              "position": 3,
 *              "office_title": "Адрес",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": "address",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextArea"
 *            },
 *            {
 *              "id": 1048,
 *              "destiny": 1,
 *              "position": 22,
 *              "office_title": "special",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": true,
 *              "system_name": null,
 *              "created_at": "2026-10-21T23:27:52.120+03:00",
 *              "updated_at": "2026-10-21T23:27:52.120+03:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": "special",
 *              "example": null,
 *              "type": "Field::TextField"
 *            },
 *            {
 *              "id": 1,
 *              "destiny": 1,
 *              "position": 0,
 *              "office_title": "Страна",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "country",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::Country"
 *            },
 *            {
 *              "id": 2,
 *              "destiny": 1,
 *              "position": 1,
 *              "office_title": "Регион",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "state",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 3,
 *              "destiny": 1,
 *              "position": 2,
 *              "office_title": "Город",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "city",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            },
 *            {
 *              "id": 5,
 *              "destiny": 1,
 *              "position": 4,
 *              "office_title": "Почтовый индекс",
 *              "for_buyer": true,
 *              "obligatory": false,
 *              "active": false,
 *              "system_name": "zip",
 *              "created_at": "2010-10-12T13:31:09.692+04:00",
 *              "updated_at": "2010-10-12T13:31:09.692+04:00",
 *              "show_in_result": true,
 *              "show_in_checkout": true,
 *              "is_indexed": null,
 *              "hide_in_backoffice": null,
 *              "handle": null,
 *              "placeholder": null,
 *              "title": null,
 *              "example": null,
 *              "type": "Field::SystemTextField"
 *            }
 *          ],
 *          "no_delivery": false,
 *          "kladr_autodetected_address": "",
 *          "country_options": [
 *            {
 *              "code": "RU",
 *              "title": "Россия",
 *              "selected": true
 *            }
 *          ],
 *          "address": "Moscow, Znamenka 12",
 *          "country": "RU",
 *          "state": "state",
 *          "city": "London",
 *          "zip": "123456",
 *          "street": null,
 *          "house": null,
 *          "flat": null,
 *          "entrance": null,
 *          "doorphone": null,
 *          "floor": null,
 *          "comment": null,
 *          "kladr_json": null,
 *          "location": {
 *            "kladr_code": null,
 *            "zip": "123456",
 *            "kladr_zip": null,
 *            "region_zip": null,
 *            "country": "RU",
 *            "state": "state",
 *            "state_type": null,
 *            "area": null,
 *            "area_type": null,
 *            "city": "London",
 *            "city_type": null,
 *            "settlement": null,
 *            "settlement_type": null,
 *            "address": "Moscow, Znamenka 12",
 *            "street": "Moscow",
 *            "street_type": null,
 *            "house": "Znamenka 12",
 *            "flat": null,
 *            "is_kladr": false,
 *            "latitude": null,
 *            "longitude": null,
 *            "autodetected": null
 *          }
 *        },
 *        "client": {
 *          "id": 2,
 *          "email": "some-one@yandex.ru",
 *          "name": "Mortimer Hant",
 *          "phone": "+79162128506",
 *          "created_at": "2009-03-30T04:37:32.000+04:00",
 *          "updated_at": "2026-10-21T23:27:52.000+03:00",
 *          "comment": null,
 *          "registered": false,
 *          "subscribe": true,
 *          "client_group_id": null,
 *          "bonus_points": 0,
 *          "type": "Client::Individual",
 *          "correspondent_account": null,
 *          "settlement_account": null,
 *          "consent_to_personal_data": null,
 *          "o_auth_provider": null,
 *          "messenger_subscription": null,
 *          "external_id": null,
 *          "external_service": null,
 *          "contact_name": "Mortimer Hant",
 *          "surname": null,
 *          "middlename": null,
 *          "progressive_discount": null,
 *          "group_discount": null,
 *          "ip_addr": "",
 *          "fields_values": [
 *            {
 *              "id": 731,
 *              "value": "old value",
 *              "created_at": "2026-10-21T23:27:52.106+03:00",
 *              "updated_at": "2026-10-21T23:27:52.106+03:00",
 *              "field_id": 1040,
 *              "type": "Текст",
 *              "name": "special",
 *              "handle": null
 *            }
 *          ]
 *        },
 *        "discounts": [],
 *        "total_price": 1600,
 *        "paid_amount": 0,
 *        "items_price": 1500,
 *        "id": 1,
 *        "key": "teest",
 *        "number": 1001,
 *        "comment": "comment",
 *        "archived": false,
 *        "delivery_title": "самовывоз",
 *        "delivery_description": "самовывоз",
 *        "delivery_price": 100,
 *        "full_delivery_price": 100,
 *        "payment_description": null,
 *        "payment_title": "наличными курьеру",
 *        "first_referer": "http://google.com?q=my_query",
 *        "first_current_location": "/my_query",
 *        "first_query": null,
 *        "first_source_domain": null,
 *        "first_source": "Google",
 *        "referer": "http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&stpar2=%2Fh1%2Ftm7%2Fs1&stpar4=%2Fs1&stpar1=%2Fu1&stpar3=%2Fm3%2Ftc14%2Fnc1",
 *        "current_location": "/",
 *        "query": null,
 *        "source_domain": null,
 *        "source": "Прямой трафик",
 *        "fulfillment_status": "new",
 *        "custom_status": {
 *          "permalink": "new",
 *          "title": "Новый"
 *        },
 *        "delivered_at": null,
 *        "accepted_at": null,
 *        "created_at": "2009-03-18T10:53:14.000+03:00",
 *        "updated_at": "2026-10-21T23:27:52.000+03:00",
 *        "financial_status": "pending",
 *        "delivery_date": null,
 *        "delivery_from_hour": null,
 *        "delivery_from_minutes": null,
 *        "delivery_to_hour": null,
 *        "delivery_to_minutes": null,
 *        "delivery_time": "",
 *        "paid_at": null,
 *        "delivery_variant_id": 1,
 *        "payment_gateway_id": 1,
 *        "margin": "0.0",
 *        "margin_amount": "0.0",
 *        "client_transaction_id": 1,
 *        "yandex_metrika_client_id": null,
 *        "currency_code": "RUR",
 *        "cookies": null,
 *        "account_id": 1,
 *        "manager_comment": "manager comment1",
 *        "locale": "ru",
 *        "delivery_info": {
 *          "delivery_variant_id": null,
 *          "tariff_id": null,
 *          "title": null,
 *          "description": null,
 *          "price": null,
 *          "shipping_company": null,
 *          "shipping_company_handle": null,
 *          "delivery_interval": {
 *            "min_days": null,
 *            "max_days": null,
 *            "description": ""
 *          },
 *          "errors": [],
 *          "warnings": [],
 *          "outlet": {
 *            "id": null,
 *            "external_id": null,
 *            "latitude": null,
 *            "longitude": null,
 *            "type": null,
 *            "title": null,
 *            "description": null,
 *            "address": null,
 *            "payment_method": null,
 *            "source_id": null
 *          },
 *          "not_available": null
 *        },
 *        "responsible_user_id": null,
 *        "total_profit": "1500.0",
 *        "warehouse_id": null
 *      }
 * @param {Object} options
 * @param {string} options.token Required, access token for shop
 * @param {string} options.url Required, shop url
 * @param {number|string} options.orderid Required, order id
 * @param {object} options.order Required, order
 * @param {Number|String} id Required, app id
 * @returns {Promise}
 */
export function editOrder(options, id) {
  return put({
    id,
    token: options.token,
    url: options.url,
    api: `orders/${options.orderid}`,
    obj: options.order
  });
}