Create one or multiple VAT changes in a company

POST /company/companies/@id/vat-changes

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int Change the VAT in a given company

Body

Pass the following properties via application/json or form encoding in the body of the request.

Array of company.VATChange: [company.VATChange]

company.VATChange

Field Type Description
product_id Int? Nullable. The ID of the product where this VAT percentage is applied.
product_price_id Int? Nullable. The ID of the product price where this VAT percentage is applied.
product_option_id Int? Nullable. The ID of the product option where this VAT percentage is applied.
percentage Float The VAT percentage
method String The take out method for which this VAT percentage should get applied
start_date Date? Nullable. When this VAT percentage will take effect. Use null to apply since the beginning.

Example request 1

POST /company/companies/16/vat-changes HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.2.1
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 593
[
    {
        "product_id": 15,
        "product_price_id": 16,
        "product_option_id": 18,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31"
    },
    {
        "product_id": 18,
        "product_price_id": 11,
        "product_option_id": 11,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31"
    },
    {
        "product_id": 11,
        "product_price_id": 12,
        "product_option_id": 18,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31"
    }
]

Response

Array of company.VATChange: [company.VATChange]

company.VATChange

Field Type Description
product_id Int? Nullable. The ID of the product where this VAT percentage is applied.
product_price_id Int? Nullable. The ID of the product price where this VAT percentage is applied.
product_option_id Int? Nullable. The ID of the product option where this VAT percentage is applied.
percentage Float The VAT percentage
method String The take out method for which this VAT percentage should get applied
start_date Date? Nullable. When this VAT percentage will take effect. Use null to apply since the beginning.
id Int The unique ID of this VAT change

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 647

[
    {
        "product_id": 10,
        "product_price_id": 17,
        "product_option_id": 13,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31",
        "id": 12
    },
    {
        "product_id": 18,
        "product_price_id": 13,
        "product_option_id": 16,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31",
        "id": 16
    },
    {
        "product_id": 11,
        "product_price_id": 17,
        "product_option_id": 10,
        "percentage": 9.67,
        "method": "delivery",
        "start_date": "2019-01-31",
        "id": 17
    }
]
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.1 stable