Skip to main content
PATCH
Update the fiscal profile
Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
The answer is the profile with errors (each refused field and why), deduced (what Melso filled in, such as the province from the postal code) and missing. An empty value does not empty a field: name it in clear.

Authorizations

Authorization
string
header
required

A company API key, mk_live_…, that the company's owner creates in the Melso app under Settings, Connect your AI, API keys. It works in that one company with the owner's authority. Test keys (mk_test_…) are not issued. Keep the key on your servers. See Authentication.

Path Parameters

company_id
string<uuid>
required

The company's ID. Every company-scoped call works in exactly this company.

Body

application/json
tax_id
string

The NIF: a DNI, NIE or CIF. Its control character is checked.

The full name on the DNI or NIE, or the company's registered name.

trade_name
string

The name the business trades under

address
string

Fiscal address: street, number, floor.

postal_code
string

Five digits. Also sets the province and the tax territory.

city
string

Municipality.

province
string

Normally deduced from the postal code.

tax_territory
enum<string>

Normally deduced from the postal code. Send it only to correct that.

Available options:
comun,
alava,
bizkaia,
gipuzkoa,
navarra,
canarias,
ceuta,
melilla
activity_type
enum<string>

A self-employed person's main activity. A company's is always empresarial.

Available options:
profesional,
empresarial
activity_description
string

What the business does.

iae_code
string

The main IAE heading, such as 671.4 for a restaurant or 673.2 for a bar.

activities
object[]

The other activities beside the main one, one per other IAE heading in the census (modelo 036). Sending it replaces the list: send every other activity, each saved one with its id. Removing one that has invoices, income or expenses is refused; set its ended_on instead.

client_types
enum<string>[]

Who the business invoices, every kind that applies. Sending it replaces the list. Without eu_business, eu_operator is saved as false.

Available options:
es_business,
es_individual,
eu_business,
non_eu_business
eu_operator
boolean

Registered as an intra-community operator (ROI).

vat_regime
enum<string>

Defaults to general, IGIC in the Canary Islands and IPSI in Ceuta and Melilla.

Available options:
general,
recargo_equivalencia,
simplificado,
reagp,
exento,
igic_general,
igic_simplificado,
igic_repep,
ipsi
vat_sii
boolean

Keeps its VAT books in the AEAT's SII, compulsory for large companies.

vat_redeme
boolean

In the monthly VAT refund register (REDEME), so it files VAT monthly.

is_large_company
boolean

Volume of operations over 6,010,121.04 euros last year: VAT and withholdings are filed monthly.

irpf_method
enum<string>
default:directa_simplificada

Self-employed only.

Available options:
directa_simplificada,
directa_normal,
modulos
irpf_retention_rate
number

Income tax withheld on a self-employed person's invoices, in percent. Defaults to 15 for a professional. Self-employed only.

Required range: 0 <= x <= 100
registration_status
enum<string>

Self-employed only: alta when already registered.

Available options:
alta,
pendiente
registered_on
string

When the self-employed person registered: YYYY-MM, or YYYY-MM-DD when the day is known.

invoice_series
string

Invoice series prefix.

next_invoice_number
integer

The number the next invoice takes, continuing the business's own numbering.

Required range: x >= 1
iban
string

The account invoices are collected in. Masked when read.

clear
string[]

Names of fields to empty.

Response

The saved profile.

fiscal_profile
object
required
deduced
string[]
required

Fields Melso filled in, such as province from the postal code.

errors
object[]
required

Each refused field and why.

missing
string[]
required

What Melso still needs before it can do the taxes, such as iae_code or certificate.