Department

create

request
POST /api/v2/departments HTTP/1.1

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

baseLegalEntityId

Number

the department’s base 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)

pointOfSale

Object

Point of sale in the department

pointOfSale.name

String

The point of sale’s printed name

pointOfSale.legalEntity

Object

Data linking the base legal entity with the point of sale it is working at, see here

response
HTTP/1.1 200 OK

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

legalEntityIds

Array

IDs of legal entities working at the department

pointOfSales

Array

Point of sales in the department

pointOfSales[].id

Number

The point of sale’s id

pointOfSales[].name

String

The point of sale’s printed name

pointOfSales[].legalEntities

Array

Data linking legal entities with the point of sale they are working at

pointOfSales[].legalEntities[].legalEntityId

Number

ID of the legal entity working at the point of sale

pointOfSales[].legalEntities[].fiscalRegisterId

Number

ID of non-Native fiscal register serving the legal entity at the point of sale

pointOfSales[].legalEntities[].fiscalRegisterType

String

Type of fiscal register serving the legal entity at the point of sale, see here

cashAccountId

Number

Cash account’s id of the department

collectionAccountId

Number

Collection account’s id of the department

grayAccountId

Number

collectionGrayAccountId

Number

pointOfSales[].legalEntities[].cardAccountId

Number

Card account’s id of the legal entity at the point of sale

list

request
GET /api/v2/departments?closed=false&size=3 HTTP/1.1
Table 157. 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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : null,
    "productionId" : 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 158. 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 base 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)

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 159. 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 160. 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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : null,
    "productionId" : 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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "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,
    "baseLegalEntityId" : 1,
    "storeBrandId" : 1,
    "otherDepartmentSearchId" : null,
    "depotId" : 1000000005,
    "productionId" : 1000000004,
    "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 161. 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 base 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)

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
  },
  "pointOfSales" : [ {
    "id" : 4,
    "name" : "Кассовое место 1"
  } ],
  "userGroup" : {
    "id" : 1000000006,
    "name" : "Продавцы",
    "user" : null,
    "users" : [ ]
  },
  "roles" : [ "clientCancellationChange", "clientsExcel", "frCorrection", "servicePurchasingPrice", "supplyModify" ],
  "hasLegalEntitySosnilsToken" : false
}
Table 162. 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

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

pointOfSales

Array

Кассовые места текущего департамента

userGroup

Object

Юзергруппа

get

request
GET /api/v2/departments/999999999 HTTP/1.1
Table 163. /api/v2/departments/{departmentId}
Parameter Description

departmentId

departmentId

response
HTTP/1.1 200 OK

{
  "id" : 999999999,
  "type" : "STORE",
  "name" : "Test store",
  "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" : 180,
  "closed" : false,
  "frMode" : false,
  "hasServices" : true,
  "baseLegalEntityId" : 1,
  "storeBrandId" : null,
  "otherDepartmentSearchId" : null,
  "depotId" : null,
  "productionId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null,
  "legalEntityIds" : [ 1, 6 ],
  "pointOfSales" : [ {
    "id" : 999999999,
    "name" : "Кассовое место 1",
    "legalEntities" : [ {
      "legalEntityId" : 1,
      "fiscalRegisterId" : null,
      "fiscalRegisterType" : "ATOL",
      "cardAccountId" : 1000000005
    }, {
      "legalEntityId" : 6,
      "fiscalRegisterId" : null,
      "fiscalRegisterType" : null,
      "cardAccountId" : 1000000003
    } ]
  } ],
  "cashAccountId" : null,
  "collectionAccountId" : null,
  "grayAccountId" : null,
  "collectionGrayAccountId" : null
}
Table 164. 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 base 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)

legalEntityIds

Array

IDs of legal entities working at the department

pointOfSales

Array

Point of sales in the department

pointOfSales[].id

Number

The point of sale’s id

pointOfSales[].name

String

The point of sale’s printed name

pointOfSales[].legalEntities

Array

Data linking legal entities with the point of sale they are working at

pointOfSales[].legalEntities[].legalEntityId

Number

ID of the legal entity working at the point of sale

pointOfSales[].legalEntities[].fiscalRegisterId

Number

ID of non-Native fiscal register serving the legal entity at the point of sale

pointOfSales[].legalEntities[].fiscalRegisterType

String

Type of fiscal register serving the legal entity at the point of sale, see here

cashAccountId

Number

Cash account’s id of the department

collectionAccountId

Number

Collection account’s id of the department

grayAccountId

Number

collectionGrayAccountId

Number

pointOfSales[].legalEntities[].cardAccountId

Number

Card account’s id of the legal entity at the point of sale

update

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

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

baseLegalEntityId

Number

the department’s base 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)

pointOfSales

Array

Point of sales in the department

Size must be between 0 and 1 inclusive

pointOfSales[].id

Number

The point of sale’s id

pointOfSales[].name

String

The point of sale’s printed name

pointOfSales[].legalEntities

Array

Data linking legal entities with the point of sale they are working at

response
HTTP/1.1 200 OK

delete

request
DELETE /api/v2/departments/999999999 HTTP/1.1
Table 166. /api/v2/departments/{departmentId}
Parameter Description

departmentId

departmentId

response
HTTP/1.1 200 OK

restore

request
PUT /api/v2/departments/restore/999999999 HTTP/1.1

{
  "baseLegalEntityId" : 1
}
Table 167. /api/v2/departments/restore/{departmentId}
Parameter Description

departmentId

departmentId

Path Type Description Constraints

baseLegalEntityId

Number

Department’s new base legal entity id

Must not be null

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 168. 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,
  "baseLegalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "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,
  "baseLegalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "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,
  "baseLegalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : 1000000005,
  "productionId" : 1000000004,
  "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,
  "baseLegalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : null,
  "productionId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
} ]
Table 169. 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 base 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)

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,
  "baseLegalEntityId" : 1,
  "storeBrandId" : 1,
  "otherDepartmentSearchId" : null,
  "depotId" : null,
  "productionId" : null,
  "departmentOid" : null,
  "departmentGuid" : null,
  "departmentLpuId" : null
} ]
Table 170. 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 base 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)

active store count

request
GET /api/v2/departments/stores/active/count?from=2019-04-01&to=2019-04-30 HTTP/1.1
Table 171. 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