Create a vatcode
Create a Vatcode to your company.
POST vatcodes/
Request details
The post request will contain all the required information to create a Vatcode in your company.
Request properties
| Property | Type | Description | Optional |
|---|---|---|---|
| Request | Vatcode request object | The Vatcode request to add. | No |
For Vatcode create request object properties see details.
Example request
{
"externalId": "15-purchase",
"code": "15",
"name": "No VAT-Test",
"percentages": [
{
"percentage": 0.00000,
"startDate": null,
"name": "NAME TESTE"
}
],
"isIcp": false,
"vatCodeType": "purchase",
"isExclusive": true,
"companyId": "72d7c981-19a3-449a-bd8a-ab1cbc6ace46"
}
Response
Upon successful creation of a Vatcode in the Basecone system, a 201 http status code will be returned together with the newly created Vatcode unique identifier. If something goes wrong, an error message with failure details will be given together with a suitable http error status code.
Example response
{
"vatCodeUniqueId": "4bdb7b4d-bd6d-4d9b-b3e0-f8e833d01e7d",
"error": null,
"hasError": false
}
Possible error responses
| Status code | Error code | Details |
|---|---|---|
| 400 | json_parse_error | Unable to parse JSON. |
| 400 | invalid_request_payload | The Vatcode value provided is invalid. |
| 400 | validation_error | The Code is required. |
| 400 | validation_error | The ExternalId is required. |
| 400 | validation_error | The CompanyId is required. |
| 403 | forbidden | Forbidden access to the requested resource. |
