CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 2 of 16

Update the VAT number

Saves or clears (vat_number: null) the billing account's VAT number, which changes the VAT on invoices issued from now on, and answers the account's VAT basis as it now stands. Send the account's version as you last read it: when the details were changed since, the save is refused 409 stale and nothing is written. A European Union number is saved as pending and checked afterwards.

PUT/api/corestack/billing/account/vat-number

Query parameters

accountinteger

The billing account to read, by its id (see GET /corestack/billing/account). Left out, the request acts on your company's default billing account. An account that does not exist and one that is not your company's answer the same 404. At least 1.

account_idinteger

The same as account, under the name the MCP tools use. Send one of the two: when they name different accounts the request is refused 422 invalid on account_id. At least 1.

Body

vat_numberstring or null

The VAT number; null clears it. Spaces, dots and hyphens are taken out and letters are made upper case before it is judged, so the 255 characters are only what the field takes as sent. What is left may hold letters, digits, + and *. For an account in a European Union country, a number that starts with neither a European Union country's prefix nor GB is given the account's (EL for Greece): 123456789 on a German account is saved as DE123456789; one that already starts with such a prefix is saved as sent. The number as it is saved, prefix included, is at most 20 characters. On a United Kingdom account it must have the United Kingdom's shape: GB and nine or twelve digits, or GBGD or GBHA and three digits.

versionintegerRequired

The account's version as you last read it. At least 0.

Returns

200 The account's VAT basis after the save.

Fields of the 200 answer
vatobjectRequired

The VAT basis of the account.

Fields
buyerstring or nullRequired

Whether Corefinity has recorded the buyer as a business or a consumer, when it has.

checkobject or any or nullRequired

An open check of the account's VAT by Corefinity, or null.

countrystringRequired

The country VAT is judged for, as a two-letter code.

kindstringRequired

How VAT applies, such as standard, reverse_charge or outside_scope.

labelstringRequired

The basis in words, as invoices carry it.

rate_percentnumberRequired
validationobjectRequired
Fields
statestringRequired

The state of the VAT number. none: there is no number. pending: it is being checked. valid and invalid: the outcome. unverified: it could not be checked. not_applicable: numbers of that country are not checked.

validunverifiedinvalidnonenot_applicablepending
validated_atstring or nullRequired

Format: date-time.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403billing_forbiddenBilling is for the organisation's owner and billing contacts. Ask one of them to do this.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409staleWhat you read has changed since you read it. Read it again, then send the change with its new version or quote.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PUT https://manage.corefinity.com/api/corestack/billing/account/vat-number \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "vat_number": "GB123456789",
    "version": 1184934486
  }'
{
  "vat": {
    "buyer": null,
    "check": null,
    "country": "GB",
    "kind": "standard",
    "label": "UK VAT 20 %",
    "rate_percent": 20,
    "validation": {
      "state": "valid",
      "validated_at": null
    }
  }
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT