/{organizationId}/finance/accounting/taxesCreate tax
Creates a new tax in the accounting plan
Required permissions:
accountingPlan.edit
Path Parameters
organizationIdstringrequired Request Body required
Content-Type: application/json
taxCodestringrequired minLength: 1
maxLength: 5
typestringrequired Options:
prevatdatevCodeintegerrequired minimum: 1
maximum: 99
rateintegerrequired minimum: 0
maximum: 99
labelstringrequired minLength: 1
maxLength: 18
labelShortstringrequired minLength: 1
maxLength: 8
accountinteger | nulloptional Default: null
minimum: 1
maximum: 999999999
discountAccountinteger | nulloptional Default: null
minimum: 1
maximum: 999999999
reductionAccountinteger | nulloptional Default: null
minimum: 1
maximum: 999999999
depositAccountintegerrequired minimum: 1
maximum: 999999999
pendingAccountinteger | nulloptional Default: null
minimum: 1
maximum: 999999999
Authentication: X-API-Key
Request
curl --request POST 'https://cloud.campai.com/api/{organizationId}/finance/accounting/taxes' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"taxCode": "string",
"type": "pre",
"datevCode": 1,
"rate": 0,
"label": "string",
"labelShort": "string",
"depositAccount": 1
}'Responses
This endpoint returns different response codes based on the request outcome.
200Successful response
Content-Type: application/json
typestringrequired Options:
prevatcodestringrequired minLength: 1
maxLength: 5
datevCodeintegerrequired minimum: 1
maximum: 99
rateintegerrequired minimum: 0
maximum: 99
labelstringrequired minLength: 1
maxLength: 18
labelShortstringrequired minLength: 1
maxLength: 8
builtInbooleanrequired accountinteger | nullrequired minimum: 1
maximum: 999999999
discountAccountinteger | nullrequired minimum: 1
maximum: 999999999
reductionAccountinteger | nullrequired minimum: 1
maximum: 999999999
depositAccountintegerrequired minimum: 1
maximum: 999999999
pendingAccountinteger | nullrequired minimum: 1
maximum: 999999999
Response
{
"type": "pre",
"code": "string",
"datevCode": 1,
"rate": 0,
"label": "string",
"labelShort": "string",
"builtIn": true,
"account": 1,
"discountAccount": 1,
"reductionAccount": 1,
"depositAccount": 1,
"pendingAccount": 1
}400Invalid input data
Content-Type: application/json
The error information
messagestringrequired The error message
codestringrequired The error code
An array of issues that were responsible for the error
Response
{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}401Authorization not provided
Content-Type: application/json
The error information
messagestringrequired The error message
codestringrequired The error code
An array of issues that were responsible for the error
Response
{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}403Insufficient access
Content-Type: application/json
The error information
messagestringrequired The error message
codestringrequired The error code
An array of issues that were responsible for the error
Response
{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}500Internal server error
Content-Type: application/json
The error information
messagestringrequired The error message
codestringrequired The error code
An array of issues that were responsible for the error
Response
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}