Department

create

request
POST /api/v2/departments HTTP/1.1

{
  "name" : "123 магазин",
  "location" : {
    "data" : {
      "city_kladr_id" : "6000000100000",
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "country_iso_code" : "RU",
      "tax_office_legal" : "6027",
      "street_kladr_id" : "60000001000047600",
      "region_with_type" : "Псковская обл",
      "fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "house_type_full" : "дом",
      "qc_geo" : "2",
      "okato" : "58401000000",
      "city_with_type" : "г Псков",
      "kladr_id" : "60000001000047600",
      "fias_level" : "7",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "region_type_full" : "область",
      "country" : "Россия",
      "region_iso_code" : "RU-PSK",
      "tax_office" : "6027",
      "city_type_full" : "город",
      "city_type" : "г",
      "city" : "Псков",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "fias_actuality_state" : "0",
      "region_type" : "обл",
      "capital_marker" : "2",
      "federal_district" : "Северо-Западный",
      "geoname_id" : "504341",
      "geo_lon" : "28.367494",
      "oktmo" : "58701000001",
      "fias_code" : "6000000100000000476",
      "house_type" : "д",
      "street_with_type" : "ул Льва Толстого",
      "region_kladr_id" : "6000000000000",
      "region" : "Псковская",
      "street" : "Льва Толстого",
      "postal_code" : "180004",
      "street_type_full" : "улица",
      "street_type" : "ул",
      "geo_lat" : "57.811618",
      "house" : "123"
    },
    "string" : "ул Льва Толстого, д 123"
  },
  "city" : "Псков",
  "description" : "ул.Льва Толстого, дом 123",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 0,
  "frMode" : false,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : null,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : 1000000002,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null,
  "type" : "STORE"
}
Table 150. request description
Path Type Description Constraints

type

String

the department’s type

Must not be null

name

String

the department’s name

Must not be blank.
Size must be between 0 and 50 inclusive

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

Size must be between 0 and 50 inclusive

description

String

the department’s address (old format)

Size must be between 0 and 280 inclusive

phone

String

the department’s phone

Size must be between 0 and 30 inclusive

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

Must not be null

hasServices

Boolean

Does the department provide/sell services? (for stores only)

Must not be null

legalEntityId

Number

the department’s main legal entity id

Must not be null

storeBrandId

Number

The department’s store brand id

otherDepartmentSearchId

Number

Id of basic department for search

depotId

Number

Id of basic depot for the department (for stores only)

productionId

Number

Id of basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

grayAccountId

collectionGrayAccountId

Number

collectionGrayAccountId

response
HTTP/1.1 200 OK

{
  "id" : 1000000009,
  "type" : "STORE",
  "name" : "123 магазин",
  "location" : {
    "data" : {
      "city_kladr_id" : "6000000100000",
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "country_iso_code" : "RU",
      "tax_office_legal" : "6027",
      "street_kladr_id" : "60000001000047600",
      "region_with_type" : "Псковская обл",
      "fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "house_type_full" : "дом",
      "qc_geo" : "2",
      "okato" : "58401000000",
      "city_with_type" : "г Псков",
      "kladr_id" : "60000001000047600",
      "fias_level" : "7",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "region_type_full" : "область",
      "country" : "Россия",
      "region_iso_code" : "RU-PSK",
      "tax_office" : "6027",
      "city_type_full" : "город",
      "city_type" : "г",
      "city" : "Псков",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "fias_actuality_state" : "0",
      "region_type" : "обл",
      "capital_marker" : "2",
      "federal_district" : "Северо-Западный",
      "geoname_id" : "504341",
      "geo_lon" : "28.367494",
      "oktmo" : "58701000001",
      "fias_code" : "6000000100000000476",
      "house_type" : "д",
      "street_with_type" : "ул Льва Толстого",
      "region_kladr_id" : "6000000000000",
      "region" : "Псковская",
      "street" : "Льва Толстого",
      "postal_code" : "180004",
      "street_type_full" : "улица",
      "street_type" : "ул",
      "geo_lat" : "57.811618",
      "house" : "123"
    },
    "string" : "ул Льва Толстого, д 123"
  },
  "city" : "Псков",
  "description" : "ул.Льва Толстого, дом 123",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 0,
  "closed" : false,
  "frMode" : false,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : 1000000002,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
}
Table 151. response description
Path Type Description

id

Number

id

type

String

the department’s type

name

String

the department’s name

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

description

String

the department’s additional info (usually address as on print forms)

phone

String

the department’s phone

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

hasServices

Boolean

Does the department provide/sell services? (for stores only)

legalEntityId

Number

the department’s main legal entity

storeBrandId

Number

The department’s brand (for stores only)

otherDepartmentSearchId

Number

Basic department for search

depotId

Number

Basic depot for the department (for stores only)

productionId

Number

Basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

Подразделение (for stores only)

collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

list

request
GET /api/v2/departments?closed=false&size=3 HTTP/1.1
Table 152. request description
Parameter Description

closed

Is department closed?

types

List of department types (e. g. types=OFFICE,STORE)

pageable

Pageable description

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "id" : 1000000008,
    "type" : "STORE",
    "name" : "Третий магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "16",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "0",
        "region" : "Псковская",
        "source" : null,
        "street" : "Рижский",
        "country" : "Россия",
        "fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
        "geo_lat" : "57.817608",
        "geo_lon" : "28.315544",
        "entrance" : null,
        "kladr_id" : "6000000100002470023",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "8",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180007",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "пр-кт",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : "6000000100002470023",
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "36af3b40-3790-43cf-bac9-a19268dc7cda",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000024700",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "проспект",
        "street_with_type" : "Рижский пр-кт",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, Рижский пр-кт, д 16"
    },
    "city" : "Псков",
    "description" : "Рижский проспект, д.16",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : true,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  }, {
    "id" : 1000000007,
    "type" : "STORE",
    "name" : "Второй магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "5",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "0",
        "region" : "Псковская",
        "source" : null,
        "street" : "Юрия Гагарина",
        "country" : "Россия",
        "fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
        "geo_lat" : "57.80946",
        "geo_lon" : "28.357496",
        "entrance" : null,
        "kladr_id" : "6000000100000390004",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "8",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180004",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "ул",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : "6000000100000390004",
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "536cfb32-332b-45b6-938f-f8ff3dd7871a",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000003900",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "улица",
        "street_with_type" : "ул Юрия Гагарина",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, ул Юрия Гагарина, д 5"
    },
    "city" : "Псков",
    "description" : "Ул. Гагарина, д.5",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : true,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  }, {
    "id" : 1000000006,
    "type" : "STORE",
    "name" : "Четвертый магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "23",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "2",
        "region" : "Псковская",
        "source" : null,
        "street" : "Пушкина",
        "country" : "Россия",
        "fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
        "geo_lat" : "57.81716",
        "geo_lon" : "28.338973",
        "entrance" : null,
        "kladr_id" : "60000001000023100",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "7",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180000",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "ул",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : null,
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : null,
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000023100",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "улица",
        "street_with_type" : "ул Пушкина",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, ул Пушкина, д 23"
    },
    "city" : "Псков",
    "description" : "ул. Пушкина, 23",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : false,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : null,
    "productionId" : null,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 3,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : false,
  "totalElements" : 7,
  "totalPages" : 3,
  "first" : true,
  "size" : 3,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 3,
  "empty" : false
}
Table 153. response description
Path Type Description

id

Number

id

type

String

the department’s type

name

String

the department’s name

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

description

String

the department’s additional info (usually address as on print forms)

phone

String

the department’s phone

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

hasServices

Boolean

Does the department provide/sell services? (for stores only)

legalEntityId

Number

the department’s main legal entity

storeBrandId

Number

The department’s brand (for stores only)

otherDepartmentSearchId

Number

Basic department for search

depotId

Number

Basic depot for the department (for stores only)

productionId

Number

Basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

Подразделение (for stores only)

collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

labels

request
GET /api/v2/departments/labels?types=STORE&types=DEPOT HTTP/1.1
request description

Unresolved directive in index.adoc - include::/builds/itigris/optima-core/optima/optima-2-backend/target/generated-snippets/department-labels/request-parameters.adoc[] .response

HTTP/1.1 200 OK

[ {
  "id" : 1000000007,
  "name" : "Второй магазин"
}, {
  "id" : 1000000003,
  "name" : "Первый магазин"
}, {
  "id" : 1000000005,
  "name" : "Склад"
}, {
  "id" : 1000000008,
  "name" : "Третий магазин"
}, {
  "id" : 1000000006,
  "name" : "Четвертый магазин"
} ]
Table 154. response description
Path Type Description

id

Number

id

name

String

name

list by UserGroup

request
GET /api/v2/departments/by-user-group?userGroupId=1000000003 HTTP/1.1
Table 155. request description
Parameter Description

userGroupId

list for UserGroup
Example: ?userGroupId=1000000003

pageable

Pageable description

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "id" : 1000000003,
    "type" : "STORE",
    "name" : "Первый магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "1",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "0",
        "region" : "Псковская",
        "source" : null,
        "street" : "Льва Толстого",
        "country" : "Россия",
        "fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
        "geo_lat" : "57.814117",
        "geo_lon" : "28.347668",
        "entrance" : null,
        "kladr_id" : "6000000100004760126",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "8",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180000",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "ул",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : "6000000100004760126",
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000047600",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "улица",
        "street_with_type" : "ул Льва Толстого",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г. Санкт-Петербург, ул. Оптиков, д. 1"
    },
    "city" : "Псков",
    "description" : "ул. Льва Толстого, д.1",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : true,
    "hasServices" : true,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "cashAccountId" : 1000000002,
    "cardAccountId" : 1000000003,
    "collectionAccountId" : null,
    "grayAccountId" : 1000000004,
    "collectionGrayAccountId" : null,
    "departmentOid" : "9999",
    "departmentGuid" : null,
    "departmentLpuId" : null
  }, {
    "id" : 1000000006,
    "type" : "STORE",
    "name" : "Четвертый магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "23",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "2",
        "region" : "Псковская",
        "source" : null,
        "street" : "Пушкина",
        "country" : "Россия",
        "fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
        "geo_lat" : "57.81716",
        "geo_lon" : "28.338973",
        "entrance" : null,
        "kladr_id" : "60000001000023100",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "7",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180000",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "ул",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : null,
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : null,
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000023100",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "улица",
        "street_with_type" : "ул Пушкина",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, ул Пушкина, д 23"
    },
    "city" : "Псков",
    "description" : "ул. Пушкина, 23",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : false,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : null,
    "productionId" : null,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  }, {
    "id" : 1000000007,
    "type" : "STORE",
    "name" : "Второй магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "5",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "0",
        "region" : "Псковская",
        "source" : null,
        "street" : "Юрия Гагарина",
        "country" : "Россия",
        "fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
        "geo_lat" : "57.80946",
        "geo_lon" : "28.357496",
        "entrance" : null,
        "kladr_id" : "6000000100000390004",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "8",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180004",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "ул",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : "6000000100000390004",
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "536cfb32-332b-45b6-938f-f8ff3dd7871a",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000003900",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "улица",
        "street_with_type" : "ул Юрия Гагарина",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, ул Юрия Гагарина, д 5"
    },
    "city" : "Псков",
    "description" : "Ул. Гагарина, д.5",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : true,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  }, {
    "id" : 1000000008,
    "type" : "STORE",
    "name" : "Третий магазин",
    "location" : {
      "data" : {
        "qc" : null,
        "area" : null,
        "city" : "Псков",
        "flat" : null,
        "block" : null,
        "floor" : null,
        "house" : "16",
        "metro" : null,
        "okato" : "58401000000",
        "oktmo" : "58701000001",
        "stead" : null,
        "qc_geo" : "0",
        "region" : "Псковская",
        "source" : null,
        "street" : "Рижский",
        "country" : "Россия",
        "fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
        "geo_lat" : "57.817608",
        "geo_lon" : "28.315544",
        "entrance" : null,
        "kladr_id" : "6000000100002470023",
        "qc_house" : null,
        "timezone" : null,
        "area_type" : null,
        "city_area" : null,
        "city_type" : "г",
        "divisions" : null,
        "fias_code" : null,
        "flat_area" : null,
        "flat_type" : null,
        "block_type" : null,
        "fias_level" : "8",
        "flat_price" : null,
        "geoname_id" : "504341",
        "house_type" : "д",
        "postal_box" : null,
        "settlement" : null,
        "stead_type" : null,
        "tax_office" : "6027",
        "beltway_hit" : null,
        "flat_cadnum" : null,
        "postal_code" : "180007",
        "qc_complete" : null,
        "region_type" : "обл",
        "street_type" : "пр-кт",
        "area_fias_id" : null,
        "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
        "flat_fias_id" : null,
        "house_cadnum" : null,
        "stead_cadnum" : null,
        "area_kladr_id" : null,
        "city_district" : null,
        "city_kladr_id" : "6000000100000",
        "house_fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
        "stead_fias_id" : null,
        "area_type_full" : null,
        "area_with_type" : null,
        "capital_marker" : "2",
        "city_type_full" : "город",
        "city_with_type" : "г Псков",
        "flat_type_full" : null,
        "history_values" : null,
        "house_kladr_id" : "6000000100002470023",
        "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
        "street_fias_id" : "36af3b40-3790-43cf-bac9-a19268dc7cda",
        "unparsed_parts" : null,
        "block_type_full" : null,
        "house_type_full" : "дом",
        "region_iso_code" : "RU-PSK",
        "region_kladr_id" : "6000000000000",
        "settlement_type" : null,
        "stead_type_full" : null,
        "street_kladr_id" : "60000001000024700",
        "beltway_distance" : null,
        "country_iso_code" : "RU",
        "federal_district" : "Северо-Западный",
        "region_type_full" : "область",
        "region_with_type" : "Псковская обл",
        "street_type_full" : "проспект",
        "street_with_type" : "Рижский пр-кт",
        "tax_office_legal" : "6027",
        "city_district_type" : null,
        "settlement_fias_id" : null,
        "square_meter_price" : null,
        "settlement_kladr_id" : null,
        "fias_actuality_state" : "0",
        "settlement_type_full" : null,
        "settlement_with_type" : null,
        "city_district_fias_id" : null,
        "city_district_kladr_id" : null,
        "city_district_type_full" : null,
        "city_district_with_type" : null
      },
      "string" : "г Псков, Рижский пр-кт, д 16"
    },
    "city" : "Псков",
    "description" : "Рижский проспект, д.16",
    "phone" : "+7(812) 425-64-22",
    "timeZone" : 180,
    "closed" : false,
    "frMode" : false,
    "hasServices" : true,
    "legalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "cashAccountId" : null,
    "cardAccountId" : null,
    "collectionAccountId" : null,
    "grayAccountId" : null,
    "collectionGrayAccountId" : null,
    "departmentOid" : null,
    "departmentGuid" : null,
    "departmentLpuId" : null
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 4,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 4,
  "empty" : false
}
Table 156. response description
Path Type Description

id

Number

id

type

String

the department’s type

name

String

the department’s name

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

description

String

the department’s additional info (usually address as on print forms)

phone

String

the department’s phone

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

hasServices

Boolean

Does the department provide/sell services? (for stores only)

legalEntityId

Number

the department’s main legal entity

storeBrandId

Number

The department’s brand (for stores only)

otherDepartmentSearchId

Number

Basic department for search

depotId

Number

Basic depot for the department (for stores only)

productionId

Number

Basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

Подразделение (for stores only)

collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

get current user

request
GET /api/v2/me HTTP/1.1
response
HTTP/1.1 200 OK

{
  "id" : 1000000014,
  "firstName" : "Тимофей",
  "familyName" : "Кадын",
  "patronymic" : "Юрьевич",
  "currentDepartment" : {
    "id" : 1000000003,
    "name" : "Первый магазин",
    "otherDepartmentSearchId" : null,
    "otherDepartmentSearchName" : null
  },
  "userGroup" : {
    "id" : 1000000006,
    "name" : "Продавцы",
    "user" : null,
    "users" : [ ]
  },
  "roles" : [ "clientCancellationChange", "clientsExcel", "frCorrection", "servicePurchasingPrice", "supplyModify" ],
  "hasLegalEntitySosnilsToken" : false
}
Table 157. response description
Path Type Description

id

Number

Id

firstName

String

Имя

familyName

String

Фамилия

patronymic

String

Отчество

currentDepartment

Object

Текущий департамент

currentDepartment.id

Number

Id текущего департамента

currentDepartment.name

String

Название текущего департамента

currentDepartment.otherDepartmentSearchId

Number

Id департамента, которое нужно использовать по умолчанию при поиске линз/контактных линз в другом департаменте (заказ)

currentDepartment.otherDepartmentSearchName

String

Название департамента, которое нужно использовать по умолчанию при поиске линз/контактных линз в другом департаменте (заказ)

userGroup

Object

Юзергруппа

get

request
GET /api/v2/departments/1000000009 HTTP/1.1
Table 158. /api/v2/departments/{departmentId}
Parameter Description

departmentId

departmentId

response
HTTP/1.1 200 OK

{
  "id" : 1000000009,
  "type" : "STORE",
  "name" : "1 магазин",
  "location" : {
    "data" : {
      "city" : "Псков",
      "house" : "123",
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "qc_geo" : "2",
      "region" : "Псковская",
      "street" : "Льва Толстого",
      "country" : "Россия",
      "fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "geo_lat" : "57.811618",
      "geo_lon" : "28.367494",
      "kladr_id" : "60000001000047600",
      "city_type" : "г",
      "fias_code" : "6000000100000000476",
      "fias_level" : "7",
      "geoname_id" : "504341",
      "house_type" : "д",
      "tax_office" : "6027",
      "postal_code" : "180004",
      "region_type" : "обл",
      "street_type" : "ул",
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "city_kladr_id" : "6000000100000",
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "street_kladr_id" : "60000001000047600",
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "улица",
      "street_with_type" : "ул Льва Толстого",
      "tax_office_legal" : "6027",
      "fias_actuality_state" : "0"
    },
    "string" : "ул Льва Толстого, д 123"
  },
  "city" : "Порхов",
  "description" : "ул.Льва Толстого, дом 1",
  "phone" : "+7(812) 425-64-52",
  "timeZone" : 0,
  "closed" : false,
  "frMode" : true,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : 1000000002,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
}
Table 159. response description
Path Type Description

id

Number

id

type

String

the department’s type

name

String

the department’s name

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

description

String

the department’s additional info (usually address as on print forms)

phone

String

the department’s phone

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

hasServices

Boolean

Does the department provide/sell services? (for stores only)

legalEntityId

Number

the department’s main legal entity

storeBrandId

Number

The department’s brand (for stores only)

otherDepartmentSearchId

Number

Basic department for search

depotId

Number

Basic depot for the department (for stores only)

productionId

Number

Basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

Подразделение (for stores only)

collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

update

request
PUT /api/v2/departments/1000000009 HTTP/1.1

{
  "name" : "1 магазин",
  "location" : {
    "data" : {
      "city_kladr_id" : "6000000100000",
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "country_iso_code" : "RU",
      "tax_office_legal" : "6027",
      "street_kladr_id" : "60000001000047600",
      "region_with_type" : "Псковская обл",
      "fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "house_type_full" : "дом",
      "qc_geo" : "2",
      "okato" : "58401000000",
      "city_with_type" : "г Псков",
      "kladr_id" : "60000001000047600",
      "fias_level" : "7",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "region_type_full" : "область",
      "country" : "Россия",
      "region_iso_code" : "RU-PSK",
      "tax_office" : "6027",
      "city_type_full" : "город",
      "city_type" : "г",
      "city" : "Псков",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "fias_actuality_state" : "0",
      "region_type" : "обл",
      "capital_marker" : "2",
      "federal_district" : "Северо-Западный",
      "geoname_id" : "504341",
      "geo_lon" : "28.367494",
      "oktmo" : "58701000001",
      "fias_code" : "6000000100000000476",
      "house_type" : "д",
      "street_with_type" : "ул Льва Толстого",
      "region_kladr_id" : "6000000000000",
      "region" : "Псковская",
      "street" : "Льва Толстого",
      "postal_code" : "180004",
      "street_type_full" : "улица",
      "street_type" : "ул",
      "geo_lat" : "57.811618",
      "house" : "123"
    },
    "string" : "ул Льва Толстого, д 123"
  },
  "city" : "Порхов",
  "description" : "ул.Льва Толстого, дом 1",
  "phone" : "+7(812) 425-64-52",
  "timeZone" : 0,
  "frMode" : true,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : null,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : 1000000002,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
}
Table 160. /api/v2/departments/{departmentId}
Parameter Description

departmentId

departmentId

Path Type Description Constraints

name

String

the department’s name

Must not be blank.
Size must be between 0 and 50 inclusive

location.data

Object

Full DaData object of the department’s address

location.string

String

DaData description of the department’s address

city

String

city where the department is located

Size must be between 0 and 50 inclusive

description

String

the department’s address (old format)

Size must be between 0 and 280 inclusive

phone

String

the department’s phone

Size must be between 0 and 30 inclusive

timeZone

Number

the department’s time zone in minutes in respect to UTC

closed

Boolean

Is the department closed/deleted?

frMode

Boolean

Does the department have fiscal registers? (for stores only)

Must not be null

hasServices

Boolean

Does the department provide/sell services? (for stores only)

Must not be null

legalEntityId

Number

the department’s main legal entity id

Must not be null

storeBrandId

Number

The department’s store brand id

otherDepartmentSearchId

Number

Id of basic department for search

depotId

Number

Id of basic depot for the department (for stores only)

productionId

Number

Id of basic production department for the department (for stores only)

cashAccountId

Number

The department’s cash account (for stores only)

cardAccountId

Number

The department’s card (non-cash) account (for stores only)

collectionAccountId

Number

The department’s account for collection (for stores only)

grayAccountId

Number

grayAccountId

collectionGrayAccountId

Number

collectionGrayAccountId

response
HTTP/1.1 200 OK

delete

request
DELETE /api/v2/departments/1000000009 HTTP/1.1
Table 161. /api/v2/departments/{departmentId}
Parameter Description

departmentId

departmentId

response
HTTP/1.1 200 OK

restore

request
PUT /api/v2/departments/restore/1000000009 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Table 162. /api/v2/departments/restore/{departmentId}
Parameter Description

departmentId

departmentId

response
HTTP/1.1 200 OK

list types

request
GET /api/v2/departments/types HTTP/1.1
response
HTTP/1.1 200 OK

[ {
  "id" : "DEPOT",
  "name" : "Склад"
}, {
  "id" : "OFFICE",
  "name" : "Офис"
}, {
  "id" : "PRODUCTION",
  "name" : "Цех"
}, {
  "id" : "STORE",
  "name" : "Магазин"
} ]
Table 163. response description
Path Type Description

id

String

type’s id

name

String

type’s name

stores

request
GET /api/v2/departments/stores HTTP/1.1
response
HTTP/1.1 200 OK

[ {
  "id" : 1000000007,
  "type" : "STORE",
  "name" : "Второй магазин",
  "location" : {
    "data" : {
      "qc" : null,
      "area" : null,
      "city" : "Псков",
      "flat" : null,
      "block" : null,
      "floor" : null,
      "house" : "5",
      "metro" : null,
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "stead" : null,
      "qc_geo" : "0",
      "region" : "Псковская",
      "source" : null,
      "street" : "Юрия Гагарина",
      "country" : "Россия",
      "fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
      "geo_lat" : "57.80946",
      "geo_lon" : "28.357496",
      "entrance" : null,
      "kladr_id" : "6000000100000390004",
      "qc_house" : null,
      "timezone" : null,
      "area_type" : null,
      "city_area" : null,
      "city_type" : "г",
      "divisions" : null,
      "fias_code" : null,
      "flat_area" : null,
      "flat_type" : null,
      "block_type" : null,
      "fias_level" : "8",
      "flat_price" : null,
      "geoname_id" : "504341",
      "house_type" : "д",
      "postal_box" : null,
      "settlement" : null,
      "stead_type" : null,
      "tax_office" : "6027",
      "beltway_hit" : null,
      "flat_cadnum" : null,
      "postal_code" : "180004",
      "qc_complete" : null,
      "region_type" : "обл",
      "street_type" : "ул",
      "area_fias_id" : null,
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "flat_fias_id" : null,
      "house_cadnum" : null,
      "stead_cadnum" : null,
      "area_kladr_id" : null,
      "city_district" : null,
      "city_kladr_id" : "6000000100000",
      "house_fias_id" : "fe412909-55f4-4e1c-9c13-aa05a9f4dd24",
      "stead_fias_id" : null,
      "area_type_full" : null,
      "area_with_type" : null,
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "flat_type_full" : null,
      "history_values" : null,
      "house_kladr_id" : "6000000100000390004",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "536cfb32-332b-45b6-938f-f8ff3dd7871a",
      "unparsed_parts" : null,
      "block_type_full" : null,
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "settlement_type" : null,
      "stead_type_full" : null,
      "street_kladr_id" : "60000001000003900",
      "beltway_distance" : null,
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "улица",
      "street_with_type" : "ул Юрия Гагарина",
      "tax_office_legal" : "6027",
      "city_district_type" : null,
      "settlement_fias_id" : null,
      "square_meter_price" : null,
      "settlement_kladr_id" : null,
      "fias_actuality_state" : "0",
      "settlement_type_full" : null,
      "settlement_with_type" : null,
      "city_district_fias_id" : null,
      "city_district_kladr_id" : null,
      "city_district_type_full" : null,
      "city_district_with_type" : null
    },
    "string" : "г Псков, ул Юрия Гагарина, д 5"
  },
  "city" : "Псков",
  "description" : "Ул. Гагарина, д.5",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 180,
  "closed" : false,
  "frMode" : false,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : null,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
}, {
  "id" : 1000000003,
  "type" : "STORE",
  "name" : "Первый магазин",
  "location" : {
    "data" : {
      "qc" : null,
      "area" : null,
      "city" : "Псков",
      "flat" : null,
      "block" : null,
      "floor" : null,
      "house" : "1",
      "metro" : null,
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "stead" : null,
      "qc_geo" : "0",
      "region" : "Псковская",
      "source" : null,
      "street" : "Льва Толстого",
      "country" : "Россия",
      "fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
      "geo_lat" : "57.814117",
      "geo_lon" : "28.347668",
      "entrance" : null,
      "kladr_id" : "6000000100004760126",
      "qc_house" : null,
      "timezone" : null,
      "area_type" : null,
      "city_area" : null,
      "city_type" : "г",
      "divisions" : null,
      "fias_code" : null,
      "flat_area" : null,
      "flat_type" : null,
      "block_type" : null,
      "fias_level" : "8",
      "flat_price" : null,
      "geoname_id" : "504341",
      "house_type" : "д",
      "postal_box" : null,
      "settlement" : null,
      "stead_type" : null,
      "tax_office" : "6027",
      "beltway_hit" : null,
      "flat_cadnum" : null,
      "postal_code" : "180000",
      "qc_complete" : null,
      "region_type" : "обл",
      "street_type" : "ул",
      "area_fias_id" : null,
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "flat_fias_id" : null,
      "house_cadnum" : null,
      "stead_cadnum" : null,
      "area_kladr_id" : null,
      "city_district" : null,
      "city_kladr_id" : "6000000100000",
      "house_fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
      "stead_fias_id" : null,
      "area_type_full" : null,
      "area_with_type" : null,
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "flat_type_full" : null,
      "history_values" : null,
      "house_kladr_id" : "6000000100004760126",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "unparsed_parts" : null,
      "block_type_full" : null,
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "settlement_type" : null,
      "stead_type_full" : null,
      "street_kladr_id" : "60000001000047600",
      "beltway_distance" : null,
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "улица",
      "street_with_type" : "ул Льва Толстого",
      "tax_office_legal" : "6027",
      "city_district_type" : null,
      "settlement_fias_id" : null,
      "square_meter_price" : null,
      "settlement_kladr_id" : null,
      "fias_actuality_state" : "0",
      "settlement_type_full" : null,
      "settlement_with_type" : null,
      "city_district_fias_id" : null,
      "city_district_kladr_id" : null,
      "city_district_type_full" : null,
      "city_district_with_type" : null
    },
    "string" : "г. Санкт-Петербург, ул. Оптиков, д. 1"
  },
  "city" : "Псков",
  "description" : "ул. Льва Толстого, д.1",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 180,
  "closed" : false,
  "frMode" : true,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : 1000000002,
  "cardAccountId" : 1000000003,
  "collectionAccountId" : null,
  "grayAccountId" : 1000000004,
  "collectionGrayAccountId" : null,
  "departmentOid" : "9999",
  "departmentGuid" : null,
  "departmentLpuId" : null
}, {
  "id" : 1000000008,
  "type" : "STORE",
  "name" : "Третий магазин",
  "location" : {
    "data" : {
      "qc" : null,
      "area" : null,
      "city" : "Псков",
      "flat" : null,
      "block" : null,
      "floor" : null,
      "house" : "16",
      "metro" : null,
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "stead" : null,
      "qc_geo" : "0",
      "region" : "Псковская",
      "source" : null,
      "street" : "Рижский",
      "country" : "Россия",
      "fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
      "geo_lat" : "57.817608",
      "geo_lon" : "28.315544",
      "entrance" : null,
      "kladr_id" : "6000000100002470023",
      "qc_house" : null,
      "timezone" : null,
      "area_type" : null,
      "city_area" : null,
      "city_type" : "г",
      "divisions" : null,
      "fias_code" : null,
      "flat_area" : null,
      "flat_type" : null,
      "block_type" : null,
      "fias_level" : "8",
      "flat_price" : null,
      "geoname_id" : "504341",
      "house_type" : "д",
      "postal_box" : null,
      "settlement" : null,
      "stead_type" : null,
      "tax_office" : "6027",
      "beltway_hit" : null,
      "flat_cadnum" : null,
      "postal_code" : "180007",
      "qc_complete" : null,
      "region_type" : "обл",
      "street_type" : "пр-кт",
      "area_fias_id" : null,
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "flat_fias_id" : null,
      "house_cadnum" : null,
      "stead_cadnum" : null,
      "area_kladr_id" : null,
      "city_district" : null,
      "city_kladr_id" : "6000000100000",
      "house_fias_id" : "23b3ef2f-48f8-4964-8501-2243a0e2a855",
      "stead_fias_id" : null,
      "area_type_full" : null,
      "area_with_type" : null,
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "flat_type_full" : null,
      "history_values" : null,
      "house_kladr_id" : "6000000100002470023",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "36af3b40-3790-43cf-bac9-a19268dc7cda",
      "unparsed_parts" : null,
      "block_type_full" : null,
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "settlement_type" : null,
      "stead_type_full" : null,
      "street_kladr_id" : "60000001000024700",
      "beltway_distance" : null,
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "проспект",
      "street_with_type" : "Рижский пр-кт",
      "tax_office_legal" : "6027",
      "city_district_type" : null,
      "settlement_fias_id" : null,
      "square_meter_price" : null,
      "settlement_kladr_id" : null,
      "fias_actuality_state" : "0",
      "settlement_type_full" : null,
      "settlement_with_type" : null,
      "city_district_fias_id" : null,
      "city_district_kladr_id" : null,
      "city_district_type_full" : null,
      "city_district_with_type" : null
    },
    "string" : "г Псков, Рижский пр-кт, д 16"
  },
  "city" : "Псков",
  "description" : "Рижский проспект, д.16",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 180,
  "closed" : false,
  "frMode" : false,
  "hasServices" : true,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "cashAccountId" : null,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
}, {
  "id" : 1000000006,
  "type" : "STORE",
  "name" : "Четвертый магазин",
  "location" : {
    "data" : {
      "qc" : null,
      "area" : null,
      "city" : "Псков",
      "flat" : null,
      "block" : null,
      "floor" : null,
      "house" : "23",
      "metro" : null,
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "stead" : null,
      "qc_geo" : "2",
      "region" : "Псковская",
      "source" : null,
      "street" : "Пушкина",
      "country" : "Россия",
      "fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
      "geo_lat" : "57.81716",
      "geo_lon" : "28.338973",
      "entrance" : null,
      "kladr_id" : "60000001000023100",
      "qc_house" : null,
      "timezone" : null,
      "area_type" : null,
      "city_area" : null,
      "city_type" : "г",
      "divisions" : null,
      "fias_code" : null,
      "flat_area" : null,
      "flat_type" : null,
      "block_type" : null,
      "fias_level" : "7",
      "flat_price" : null,
      "geoname_id" : "504341",
      "house_type" : "д",
      "postal_box" : null,
      "settlement" : null,
      "stead_type" : null,
      "tax_office" : "6027",
      "beltway_hit" : null,
      "flat_cadnum" : null,
      "postal_code" : "180000",
      "qc_complete" : null,
      "region_type" : "обл",
      "street_type" : "ул",
      "area_fias_id" : null,
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "flat_fias_id" : null,
      "house_cadnum" : null,
      "stead_cadnum" : null,
      "area_kladr_id" : null,
      "city_district" : null,
      "city_kladr_id" : "6000000100000",
      "house_fias_id" : null,
      "stead_fias_id" : null,
      "area_type_full" : null,
      "area_with_type" : null,
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "flat_type_full" : null,
      "history_values" : null,
      "house_kladr_id" : null,
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "a3fa3ca2-83fb-4c7e-8565-97157befb9c5",
      "unparsed_parts" : null,
      "block_type_full" : null,
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "settlement_type" : null,
      "stead_type_full" : null,
      "street_kladr_id" : "60000001000023100",
      "beltway_distance" : null,
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "улица",
      "street_with_type" : "ул Пушкина",
      "tax_office_legal" : "6027",
      "city_district_type" : null,
      "settlement_fias_id" : null,
      "square_meter_price" : null,
      "settlement_kladr_id" : null,
      "fias_actuality_state" : "0",
      "settlement_type_full" : null,
      "settlement_with_type" : null,
      "city_district_fias_id" : null,
      "city_district_kladr_id" : null,
      "city_district_type_full" : null,
      "city_district_with_type" : null
    },
    "string" : "г Псков, ул Пушкина, д 23"
  },
  "city" : "Псков",
  "description" : "ул. Пушкина, 23",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 180,
  "closed" : false,
  "frMode" : false,
  "hasServices" : false,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : null,
  "productionId" : null,
  "cashAccountId" : null,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
} ]
Table 164. response description
Path Type Description

content[].

Array

Available store departments

[].id

Number

id

[].type

String

the department’s type

[].name

String

the department’s name

[].location.data

Object

Full DaData object of the department’s address

[].location.string

String

DaData description of the department’s address

[].city

String

city where the department is located

[].description

String

the department’s additional info (usually address as on print forms)

[].phone

String

the department’s phone

[].timeZone

Number

the department’s time zone in minutes in respect to UTC

[].closed

Boolean

Is the department closed/deleted?

[].frMode

Boolean

Does the department have fiscal registers? (for stores only)

[].hasServices

Boolean

Does the department provide/sell services? (for stores only)

[].legalEntityId

Number

the department’s main legal entity

[].storeBrandId

Number

The department’s brand (for stores only)

[].otherDepartmentSearchId

Number

Basic department for search

[].depotId

Number

Basic depot for the department (for stores only)

[].productionId

Number

Basic production department for the department (for stores only)

[].cashAccountId

Number

The department’s cash account (for stores only)

[].cardAccountId

Number

The department’s card (non-cash) account (for stores only)

[].collectionAccountId

Number

The department’s account for collection (for stores only)

[].grayAccountId

Number

Подразделение (for stores only)

[].collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

productions

request
GET /api/v2/departments/productions HTTP/1.1
response
HTTP/1.1 200 OK

[ {
  "id" : 1000000004,
  "type" : "PRODUCTION",
  "name" : "Цех",
  "location" : {
    "data" : {
      "qc" : null,
      "area" : null,
      "city" : "Псков",
      "flat" : null,
      "block" : null,
      "floor" : null,
      "house" : "1",
      "metro" : null,
      "okato" : "58401000000",
      "oktmo" : "58701000001",
      "stead" : null,
      "qc_geo" : "0",
      "region" : "Псковская",
      "source" : null,
      "street" : "Льва Толстого",
      "country" : "Россия",
      "fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
      "geo_lat" : "57.814117",
      "geo_lon" : "28.347668",
      "entrance" : null,
      "kladr_id" : "6000000100004760126",
      "qc_house" : null,
      "timezone" : null,
      "area_type" : null,
      "city_area" : null,
      "city_type" : "г",
      "divisions" : null,
      "fias_code" : null,
      "flat_area" : null,
      "flat_type" : null,
      "block_type" : null,
      "fias_level" : "8",
      "flat_price" : null,
      "geoname_id" : "504341",
      "house_type" : "д",
      "postal_box" : null,
      "settlement" : null,
      "stead_type" : null,
      "tax_office" : "6027",
      "beltway_hit" : null,
      "flat_cadnum" : null,
      "postal_code" : "180000",
      "qc_complete" : null,
      "region_type" : "обл",
      "street_type" : "ул",
      "area_fias_id" : null,
      "city_fias_id" : "2858811e-448a-482e-9863-e03bf06bb5d4",
      "flat_fias_id" : null,
      "house_cadnum" : null,
      "stead_cadnum" : null,
      "area_kladr_id" : null,
      "city_district" : null,
      "city_kladr_id" : "6000000100000",
      "house_fias_id" : "863354b1-4be8-4020-9158-7559144fd932",
      "stead_fias_id" : null,
      "area_type_full" : null,
      "area_with_type" : null,
      "capital_marker" : "2",
      "city_type_full" : "город",
      "city_with_type" : "г Псков",
      "flat_type_full" : null,
      "history_values" : null,
      "house_kladr_id" : "6000000100004760126",
      "region_fias_id" : "f6e148a1-c9d0-4141-a608-93e3bd95e6c4",
      "street_fias_id" : "bd85e8d8-3064-41ca-baed-9fc3f57a07ed",
      "unparsed_parts" : null,
      "block_type_full" : null,
      "house_type_full" : "дом",
      "region_iso_code" : "RU-PSK",
      "region_kladr_id" : "6000000000000",
      "settlement_type" : null,
      "stead_type_full" : null,
      "street_kladr_id" : "60000001000047600",
      "beltway_distance" : null,
      "country_iso_code" : "RU",
      "federal_district" : "Северо-Западный",
      "region_type_full" : "область",
      "region_with_type" : "Псковская обл",
      "street_type_full" : "улица",
      "street_with_type" : "ул Льва Толстого",
      "tax_office_legal" : "6027",
      "city_district_type" : null,
      "settlement_fias_id" : null,
      "square_meter_price" : null,
      "settlement_kladr_id" : null,
      "fias_actuality_state" : "0",
      "settlement_type_full" : null,
      "settlement_with_type" : null,
      "city_district_fias_id" : null,
      "city_district_kladr_id" : null,
      "city_district_type_full" : null,
      "city_district_with_type" : null
    },
    "string" : "г Псков, ул Льва Толстого, д 1"
  },
  "city" : "Псков",
  "description" : "ул. Льва Толстого, д.1",
  "phone" : "+7(812) 425-64-22",
  "timeZone" : 180,
  "closed" : false,
  "frMode" : false,
  "hasServices" : false,
  "legalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : null,
  "productionId" : null,
  "cashAccountId" : null,
  "cardAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
} ]
Table 165. response description
Path Type Description

content[].

Array

Available production departments

[].id

Number

id

[].type

String

the department’s type

[].name

String

the department’s name

[].location.data

Object

Full DaData object of the department’s address

[].location.string

String

DaData description of the department’s address

[].city

String

city where the department is located

[].description

String

the department’s additional info (usually address as on print forms)

[].phone

String

the department’s phone

[].timeZone

Number

the department’s time zone in minutes in respect to UTC

[].closed

Boolean

Is the department closed/deleted?

[].frMode

Boolean

Does the department have fiscal registers? (for stores only)

[].hasServices

Boolean

Does the department provide/sell services? (for stores only)

[].legalEntityId

Number

the department’s main legal entity

[].storeBrandId

Number

The department’s brand (for stores only)

[].otherDepartmentSearchId

Number

Basic department for search

[].depotId

Number

Basic depot for the department (for stores only)

[].productionId

Number

Basic production department for the department (for stores only)

[].cashAccountId

Number

The department’s cash account (for stores only)

[].cardAccountId

Number

The department’s card (non-cash) account (for stores only)

[].collectionAccountId

Number

The department’s account for collection (for stores only)

[].grayAccountId

Number

Подразделение (for stores only)

[].collectionGrayAccountId

Number

Подарочный сертификат (for stores only)

active store count

request
GET /api/v2/departments/stores/active/count?from=2019-04-01&to=2019-04-30 HTTP/1.1
Table 166. request description
Parameter Description

from

First date to search for opened orders

to

Last date to search for opened orders

response
HTTP/1.1 200 OK

2