Skip to main content
PATCH
Update the fiscal profile
Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
A field that fails validation is reported in errors and the valid fields are still saved, so the response is 200 either way: read errors. A postal code fills in the province and the tax territory (deduced).

Authorizations

Authorization
string
header
required

Your partner secret key, mk_live_… for real companies or mk_test_… for test companies. Keep it 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

DNI or NIE for an autónomo, CIF for an empresa, with a valid check character.

Maximum string length: 300
trade_name
string
Maximum string length: 300
address
string
Maximum string length: 300
postal_code
string

Fills in province and tax_territory.

Pattern: ^[0-9]{5}$
city
string
Maximum string length: 300
province
string
Maximum string length: 300
tax_territory
enum<string>
Available options:
comun,
alava,
bizkaia,
gipuzkoa,
navarra,
canarias,
ceuta,
melilla
vat_regime
enum<string>

Must fit the tax territory.

Available options:
general,
recargo_equivalencia,
simplificado,
reagp,
exento,
igic_general,
igic_simplificado,
igic_repep,
ipsi
activity_type
enum<string>

An empresa is always empresarial.

Available options:
profesional,
empresarial
activity_description
string
Maximum string length: 300
iae_code
string
Pattern: ^[0-9]{1,4}(\.[0-9]{1,2})?$
registration_status
enum<string>

pendiente while the autónomo is not registered yet.

Available options:
alta,
pendiente
registered_on
string

YYYY-MM or YYYY-MM-DD, not in the future.

irpf_method
enum<string>

Autónomos only.

Available options:
directa_simplificada,
directa_normal,
modulos
irpf_retention_rate
number

Autónomos only.

Required range: 0 <= x <= 100
eu_operator
boolean

Registered in the ROI for intra-community operations.

vat_sii
boolean

Keeps its VAT books through the SII.

vat_redeme
boolean

Registered for monthly VAT refunds.

is_large_company
boolean

Gran empresa

client_types
enum<string>[]
Minimum array length: 1
Available options:
es_business,
es_individual,
eu_business,
non_eu_business
invoice_series
string
Maximum string length: 40
next_invoice_number
integer
Required range: 1 <= x <= 1000000000
iban
string

Returned masked.

clear
string[]

Fields to empty.

Response

The whole profile, with errors for any field not saved.

profile
object
required
missing
string[]
required
errors
object

The fields not saved, each with the reason.

deduced
object

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

invoice_missing
string[]

What is still needed to invoice.

tax_missing
string[]

What is still needed to calculate returns.