Update a Vatcode
Update a Vatcode to your company.
PUT vatcodes/:vatCodeUniqueId
Request details
The put request will contain all the required information to update a Vatcode in your company.
Request properties
| Property | Type | Description | Optional |
|---|---|---|---|
| VatCodeUniqueId | Guid | The Vatcode id to update. | No |
| Request | Vatcode request object | The Vatcode request to update. | No |
For Vatcode update request object properties see details.
Example Vatcode request
{
"externalId": "07-purchase",
"code": "07",
"name": "07 21% inc",
"percentages": [
{
"id": "6db0c2e4-219d-4b3c-b52b-029479369687",
"percentage": 0.21000,
"startDate": null,
"externalId": "f775e1ab-df9c-42d1-ac21-24d937411a20",
"name": "0.21%"
}
],
"isIcp": false,
"vatCodeType": "purchase",
"isExclusive": false,
"companyId": "72d7c981-19a3-449a-bd8a-ab1cbc6ace46"
}
Response
Upon successful update of a Vatcode in the Basecone system, a 200 http status code will be returned. If something goes wrong, an error message with failure details will be given together with a suitable http error status code.
Example response
{
"vatCodeUniqueId": "cb43b612-bc67-4815-b7b5-83ccbf26d97d",
"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 | User have no access to this resource. |
| 404 | resource_not_found | The requested resource is not found. |
