Legal entity rule
create for sellable category
POST /api/v2/departments/1000000003/legal-entity-rules/sellable-categories HTTP/1.1
{
"legalEntityId" : 4,
"sellableCategory" : "CONTACT_LENS"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
create for order type
POST /api/v2/departments/1000000003/legal-entity-rules/order-types HTTP/1.1
{
"legalEntityId" : 6,
"orderType" : "REPAIR"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
create for accessory category
POST /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1
{
"legalEntityId" : 5,
"accessoryCategoryName" : "Готовые очки"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
create for service type
POST /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1
{
"legalEntityId" : 4,
"serviceTypeId" : 1000000100
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
get
GET /api/v2/departments/1000000003/legal-entity-rules HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
HTTP/1.1 200 OK
{
"accessoryCategories" : {
"Готовые очки" : 5
},
"orderTypes" : {
"REPAIR" : 6
},
"sellableCategories" : {
"CONTACT_LENS" : 4,
"SERVE" : 5
},
"serviceTypes" : {
"1000000100" : 4
}
}
Path | Type | Description |
---|---|---|
|
|
Legal entity rules for accessory categories, keys are accessory categories and values are legal entities' ids |
|
|
Legal entity rules for order types, keys are order types and values are legal entities' ids |
|
|
Legal entity rules for sellable categories (including accessories and services), keys are good categories and values are legal entities' ids |
|
|
Legal entity rules for service types, keys are order types and values are legal entities' ids |
update for sellable category
PUT /api/v2/departments/1000000003/legal-entity-rules/sellable-categories HTTP/1.1
{
"legalEntityId" : 5,
"sellableCategory" : "CONTACT_LENS"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
update for order type
PUT /api/v2/departments/1000000003/legal-entity-rules/order-types HTTP/1.1
{
"legalEntityId" : 5,
"orderType" : "REPAIR"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
update for accessory category
PUT /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1
{
"legalEntityId" : 4,
"accessoryCategoryName" : "Готовые очки"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
update for service type
PUT /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1
{
"legalEntityId" : 5,
"serviceTypeId" : 1000000100
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
delete for sellable category
DELETE /api/v2/departments/1000000003/legal-entity-rules/sellable-categories/CONTACT_LENS HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
|
Sellable category |
HTTP/1.1 200 OK
delete for order type
DELETE /api/v2/departments/1000000003/legal-entity-rules/order-types/REPAIR HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
|
Order type |
HTTP/1.1 200 OK
delete for accessory category
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
Parameter | Description |
---|---|
|
The department’s id |
|
Accessory category’s name |
HTTP/1.1 200 OK
delete for service type
DELETE /api/v2/departments/1000000003/legal-entity-rules/service-types/1000000100 HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
|
Service type’s id |
HTTP/1.1 200 OK
list possible for accessory categories
GET /api/v2/departments/1000000003/legal-entity-rules/accessory-categories HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
HTTP/1.1 200 OK
{
"Готовые очки" : [ 1, 5, 4 ]
}
list possible for service types
GET /api/v2/departments/1000000003/legal-entity-rules/service-types HTTP/1.1
Parameter | Description |
---|---|
|
The department’s id |
HTTP/1.1 200 OK
{
"1000000100" : [ 1, 5, 4 ]
}
available sellable categories
GET /api/v2/legal-entity-rules/sellable-categories HTTP/1.1
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" : "Услуги"
} ]
Path | Type | Description |
---|---|---|
|
|
list of sellable categories available for rules |
|
|
The sellable category’s id |
|
|
Localized name of the sellable category |