Tax rule
get
GET /api/v2/legal-entities/1/tax-rules HTTP/1.1
Parameter | Description |
---|---|
|
Id of legal entity in the tax rule |
HTTP/1.1 200 OK
{
"baseTaxScheme" : "ENVD",
"servesTaxScheme" : null,
"accessoryCategories" : { },
"orderTypes" : { },
"sellableCategories" : {
"SUNGLASSES" : null,
"GLASSES" : "PATENT",
"CONTACT_LENS" : "ENVD"
},
"servesTypes" : { }
}
Path | Type | Description |
---|---|---|
|
|
The legal entity’s general tax scheme |
|
|
The legal entity’s services tax scheme |
|
|
The legal entity’s accessory categories tax rules |
|
|
The legal entity’s order types tax rules |
|
|
The legal entity’s sellable categories tax rules |
|
|
The legal entity’s service types tax rules |
available sellable category list
GET /api/v2/tax-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" : "SEMIFINISHED_LENS",
"localName" : "Полузаготовки"
} ]
Path | Type | Description |
---|---|---|
|
|
list of sellable categories available for tax rules |
|
|
The sellable category’s id |
|
|
Localized name of the sellable category |
create for accessory category
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
Parameter | Description |
---|---|
|
Id of legal entity in the tax rule |
Parameter | Description |
---|---|
|
Accessory category |
|
tax scheme |
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/accessories/categories
create for order type
POST /api/v2/legal-entities/3/tax-rules/orders/types HTTP/1.1
{
"orderType" : "GLASSES",
"taxScheme" : null
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/orders/types
create for sellable category
POST /api/v2/legal-entities/5/tax-rules/sellable-categories HTTP/1.1
{
"sellableCategory" : "CONTACT_LENS",
"taxScheme" : null
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/5/tax-rules/sellable-categories
create for serve type
POST /api/v2/legal-entities/3/tax-rules/serves/types HTTP/1.1
{
"serveTypeId" : 1000000001,
"taxScheme" : null
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 201 Created
Location: /api/v2/legal-entities/3/tax-rules/serves/types
update for accessory category
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
Parameter | Description |
---|---|
|
Id of legal entity in the tax rule |
Parameter | Description |
---|---|
|
Accessory category |
|
tax scheme |
HTTP/1.1 200 OK
update for serve type
PUT /api/v2/legal-entities/3/tax-rules/serves/types HTTP/1.1
{
"serveTypeId" : 1000000002,
"taxScheme" : "PATENT"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
update for order type
PUT /api/v2/legal-entities/4/tax-rules/orders/types HTTP/1.1
{
"orderType" : "GLASSES",
"taxScheme" : "PATENT"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
update for sellable category
PUT /api/v2/legal-entities/3/tax-rules/sellable-categories HTTP/1.1
{
"sellableCategory" : "EXTRA",
"taxScheme" : "PATENT"
}
Parameter | Description |
---|---|
|
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 |
HTTP/1.1 200 OK
delete serve type
DELETE /api/v2/legal-entities/1/tax-rules/serves/types HTTP/1.1
{
"serveTypeIds" : [ 1000000102 ]
}
Parameter | Description |
---|---|
|
Id of legal entity in the tax rule |
HTTP/1.1 200 OK
delete accessory category
DELETE /api/v2/legal-entities/1/tax-rules/accessories/categories HTTP/1.1
{
"accessoryCategoryNames" : [ "Клипса" ]
}
Parameter | Description |
---|---|
|
Id of legal entity in the tax rule |
HTTP/1.1 200 OK