Tax rule

get

request
GET /api/v2/legal-entities/1/tax-rules HTTP/1.1
Table 223. /api/v2/legal-entities/{legalEntityId}/tax-rules
Parameter Description

legalEntityId

Id of legal entity in the tax rule

response
HTTP/1.1 200 OK

{
  "baseTaxScheme" : "ENVD",
  "servesTaxScheme" : null,
  "accessoryCategories" : { },
  "orderTypes" : { },
  "sellableCategories" : {
    "SUNGLASSES" : null,
    "GLASSES" : "PATENT",
    "CONTACT_LENS" : "ENVD"
  },
  "servesTypes" : { }
}
Table 224. response description
Path Type Description

generalTaxScheme

String

The legal entity’s general tax scheme

servicesTaxScheme

String

The legal entity’s services tax scheme

accessoryCategories

Object

The legal entity’s accessory categories tax rules

orderTypes

Object

The legal entity’s order types tax rules

sellableCategories

Object

The legal entity’s sellable categories tax rules

serviceTypes

Object

The legal entity’s service types tax rules

available sellable category list

request
GET /api/v2/tax-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" : "SEMIFINISHED_LENS",
  "localName" : "Полузаготовки"
} ]
Table 225. response description
Path Type Description

[]

Array

list of sellable categories available for tax rules

[].id

String

The sellable category’s id

[].localName

String

Localized name of the sellable category

create for accessory category

request
POST /api/v2/legal-entities/3/tax-rules/accessories/categories?accessoryCategoryName=%D0%A1%D0%BF%D1%80%D0%B5%D0%B9 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Table 226. /api/v2/legal-entities/{legalEntityId}/tax-rules/accessories/categories
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Parameter Description

accessoryCategoryName

Accessory category

taxScheme

tax scheme

response
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/accessories/categories

create for order type

request
POST /api/v2/legal-entities/3/tax-rules/orders/types HTTP/1.1

{
  "orderType" : "GLASSES",
  "taxScheme" : null
}
Table 227. /api/v2/legal-entities/{legalEntityId}/tax-rules/orders/types
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

orderType

String

Order type in the tax rule

taxScheme

Null

Tax Scheme in the tax rule

response
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/orders/types

create for sellable category

request
POST /api/v2/legal-entities/5/tax-rules/sellable-categories HTTP/1.1

{
  "sellableCategory" : "CONTACT_LENS",
  "taxScheme" : null
}
Table 228. /api/v2/legal-entities/{legalEntityId}/tax-rules/sellable-categories
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

sellableCategory

String

Sellable category in the tax rule

taxScheme

Null

Tax Scheme in the tax rule

response
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/5/tax-rules/sellable-categories

create for serve type

request
POST /api/v2/legal-entities/3/tax-rules/serves/types HTTP/1.1

{
  "serveTypeId" : 1000000001,
  "taxScheme" : null
}
Table 229. /api/v2/legal-entities/{legalEntityId}/tax-rules/serves/types
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

serveTypeId

NUMBER

Id of service type in the rule

taxScheme

Null

Tax Scheme in the tax rule

response
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/serves/types

update for accessory category

request
PUT /api/v2/legal-entities/4/tax-rules/accessories/categories?accessoryCategoryName=%D0%9D%D0%B5%20%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D1%83%D0%B5%D0%BC%D1%8B%D0%B5%20%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D1%8B&taxScheme=PATENT HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Table 230. /api/v2/legal-entities/{legalEntityId}/tax-rules/accessories/categories
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Parameter Description

accessoryCategoryName

Accessory category

taxScheme

tax scheme

response
HTTP/1.1 200 OK

update for serve type

request
PUT /api/v2/legal-entities/3/tax-rules/serves/types HTTP/1.1

{
  "serveTypeId" : 1000000002,
  "taxScheme" : "PATENT"
}
Table 231. /api/v2/legal-entities/{legalEntityId}/tax-rules/serves/types
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

serveTypeId

NUMBER

Id of service type in the rule

taxScheme

String

Tax Scheme in the tax rule

response
HTTP/1.1 200 OK

update for order type

request
PUT /api/v2/legal-entities/4/tax-rules/orders/types HTTP/1.1

{
  "orderType" : "GLASSES",
  "taxScheme" : "PATENT"
}
Table 232. /api/v2/legal-entities/{legalEntityId}/tax-rules/orders/types
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

orderType

String

Order type in the tax rule

taxScheme

String

Tax Scheme in the tax rule

response
HTTP/1.1 200 OK

update for sellable category

request
PUT /api/v2/legal-entities/3/tax-rules/sellable-categories HTTP/1.1

{
  "sellableCategory" : "EXTRA",
  "taxScheme" : "PATENT"
}
Table 233. /api/v2/legal-entities/{legalEntityId}/tax-rules/sellable-categories
Parameter Description

legalEntityId

Id of legal entity in the tax rule

Path Type Description Constraints

sellableCategory

String

Sellable category in the tax rule

taxScheme

String

Tax Scheme in the tax rule

response
HTTP/1.1 200 OK

delete serve type

request
DELETE /api/v2/legal-entities/1/tax-rules/serves/types HTTP/1.1

{
  "serveTypeIds" : [ 1000000102 ]
}
Table 234. /api/v2/legal-entities/{legalEntityId}/tax-rules/serves/types
Parameter Description

legalEntityId

Id of legal entity in the tax rule

response
HTTP/1.1 200 OK

delete accessory category

request
DELETE /api/v2/legal-entities/1/tax-rules/accessories/categories HTTP/1.1

{
  "accessoryCategoryNames" : [ "Клипса" ]
}
Table 235. /api/v2/legal-entities/{legalEntityId}/tax-rules/accessories/categories
Parameter Description

legalEntityId

Id of legal entity in the tax rule

response
HTTP/1.1 200 OK