create for sellable category

request
POST /api/v2/departments/1000000003/legal-entity-rules/sellable-categories HTTP/1.1

{
  "legalEntityId" : 4,
  "sellableCategory" : "CONTACT_LENS"
}
Table 236. /api/v2/departments/{departmentId}/legal-entity-rules/sellable-categories
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

goodCategory

String

Sellable category in the rule

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

create for order type

request
POST /api/v2/departments/1000000003/legal-entity-rules/order-types HTTP/1.1

{
  "legalEntityId" : 6,
  "orderType" : "REPAIR"
}
Table 237. /api/v2/departments/{departmentId}/legal-entity-rules/order-types
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

orderType

String

Order type in the rule

Must not be null

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

create for accessory category

request
POST /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1

{
  "legalEntityId" : 5,
  "accessoryCategoryName" : "Готовые очки"
}
Table 238. /api/v2/departments/{departmentId}/legal-entity-rules/accessory-categories
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

accessoryCategoryName

String

Name of accessory category in the rule

Must not be null

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

create for service type

request
POST /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1

{
  "legalEntityId" : 4,
  "serviceTypeId" : 1000000100
}
Table 239. /api/v2/departments/{departmentId}/legal-entity-rules/service-types
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

serveTypeId

Number

Id of service type in the rule

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

get

request
GET /api/v2/departments/1000000003/legal-entity-rules HTTP/1.1
Table 240. /api/v2/departments/{departmentId}/legal-entity-rules
Parameter Description

departmentId

The department’s id

response
HTTP/1.1 200 OK

{
  "accessoryCategories" : {
    "Готовые очки" : 5
  },
  "orderTypes" : {
    "REPAIR" : 6
  },
  "sellableCategories" : {
    "CONTACT_LENS" : 4,
    "SERVE" : 5
  },
  "serviceTypes" : {
    "1000000100" : 4
  }
}
Table 241. response description
Path Type Description

accessoryCategories

Object

Legal entity rules for accessory categories, keys are accessory categories and values are legal entities' ids

orderTypes

Object

Legal entity rules for order types, keys are order types and values are legal entities' ids

sellableCategories

Object

Legal entity rules for sellable categories (including accessories and services), keys are good categories and values are legal entities' ids

serviceTypes

Object

Legal entity rules for service types, keys are order types and values are legal entities' ids

update for sellable category

request
PUT /api/v2/departments/1000000003/legal-entity-rules/sellable-categories HTTP/1.1

{
  "legalEntityId" : 5,
  "sellableCategory" : "CONTACT_LENS"
}
Table 242. /api/v2/departments/{departmentId}/legal-entity-rules/sellable-categories
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

goodCategory

String

Sellable category in the rule

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

update for order type

request
PUT /api/v2/departments/1000000003/legal-entity-rules/order-types HTTP/1.1

{
  "legalEntityId" : 5,
  "orderType" : "REPAIR"
}
Table 243. /api/v2/departments/{departmentId}/legal-entity-rules/order-types
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

orderType

String

Order type in the rule

Must not be null

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

update for accessory category

request
PUT /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1

{
  "legalEntityId" : 4,
  "accessoryCategoryName" : "Готовые очки"
}
Table 244. /api/v2/departments/{departmentId}/legal-entity-rules/accessory-categories
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

accessoryCategoryName

String

Name of accessory category in the rule

Must not be null

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

update for service type

request
PUT /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1

{
  "legalEntityId" : 5,
  "serviceTypeId" : 1000000100
}
Table 245. /api/v2/departments/{departmentId}/legal-entity-rules/service-types
Parameter Description

departmentId

The department’s id

Path Type Description Constraints

serveTypeId

Number

Id of service type in the rule

legalEntityId

Number

Id of legal entity in the rule

Must not be null

response
HTTP/1.1 200 OK

delete for sellable category

request
DELETE /api/v2/departments/1000000003/legal-entity-rules/sellable-categories/CONTACT_LENS HTTP/1.1
Table 246. /api/v2/departments/{departmentId}/legal-entity-rules/sellable-categories/{id}
Parameter Description

departmentId

The department’s id

id

Sellable category

response
HTTP/1.1 200 OK

delete for order type

request
DELETE /api/v2/departments/1000000003/legal-entity-rules/order-types/REPAIR HTTP/1.1
Table 247. /api/v2/departments/{departmentId}/legal-entity-rules/order-types/{id}
Parameter Description

departmentId

The department’s id

id

Order type

response
HTTP/1.1 200 OK

delete for accessory category

request
DELETE /api/v2/departments/1000000003/legal-entity-rules/accessory-categories/%D0%93%D0%BE%D1%82%D0%BE%D0%B2%D1%8B%D0%B5%20%D0%BE%D1%87%D0%BA%D0%B8 HTTP/1.1
Table 248. /api/v2/departments/{departmentId}/legal-entity-rules/accessory-categories/{id}
Parameter Description

departmentId

The department’s id

id

Accessory category’s name

response
HTTP/1.1 200 OK

delete for service type

request
DELETE /api/v2/departments/1000000003/legal-entity-rules/service-types/1000000100 HTTP/1.1
Table 249. /api/v2/departments/{departmentId}/legal-entity-rules/service-types/{id}
Parameter Description

departmentId

The department’s id

id

Service type’s id

response
HTTP/1.1 200 OK

list possible for accessory categories

request
GET /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1
Table 250. /api/v2/departments/{departmentId}/legal-entity-rules/accessory-categories
Parameter Description

departmentId

The department’s id

response
HTTP/1.1 200 OK

{
  "Готовые очки" : [ 1, 5, 4 ]
}

list possible for service types

request
GET /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1
Table 251. /api/v2/departments/{departmentId}/legal-entity-rules/service-types
Parameter Description

departmentId

The department’s id

response
HTTP/1.1 200 OK

{
  "1000000100" : [ 1, 5, 4 ]
}

available sellable categories

request
GET /api/v2/legal-entity-rules/sellable-categories HTTP/1.1
response
HTTP/1.1 200 OK

[ {
  "id" : "ACCESSORY",
  "localName" : "Аксессуары"
}, {
  "id" : "CONTACT_LENS",
  "localName" : "Контактные линзы"
}, {
  "id" : "LENS",
  "localName" : "Линзы"
}, {
  "id" : "GLASSES",
  "localName" : "Оправы"
}, {
  "id" : "EXTRA",
  "localName" : "Массовка"
}, {
  "id" : "SUNGLASSES",
  "localName" : "Солнцезащитные очки"
}, {
  "id" : "GIFT_CERTIFICATE",
  "localName" : "Подарочные сертификаты"
}, {
  "id" : "SERVE",
  "localName" : "Услуги"
} ]
Table 252. response description
Path Type Description

[]

Array

list of sellable categories available for rules

[].id

String

The sellable category’s id

[].localName

String

Localized name of the sellable category