Skip to main content
POST
Request an alta, baja or variación
Preview. A contract we are building with design partners. It is not callable yet, and fields can still change. See Availability.
Timing is the law’s, not Melso’s: an alta must reach the TGSS before the employee starts work, and a baja or a variación within three calendar days of the event. Send the request as soon as your platform knows.

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.

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes a retried create safe. Reusing a key with a different body is refused.

Maximum string length: 255

Path Parameters

company_id
string<uuid>
required

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

Body

application/json
employee_id
string<uuid>
required

The employee, with tax_id, social_security_number and employment filled.

action
enum<string>
required
Available options:
alta,
baja,
variacion
effective_date
string<date>
required
termination_reason
enum<string>

Required for a baja.

Available options:
end_of_contract,
dismissal,
objective_dismissal,
voluntary_resignation,
probation_not_passed,
retirement,
other
unused_vacation_days
integer

For a baja, the vacation paid and not taken, which extends the contribution period.

Required range: x >= 0
changes
object

For a variacion, the new employment data.

Response

The request, pending until it reaches the TGSS.

id
string<uuid>
required
employee_id
string<uuid>
required
action
enum<string>
required
Available options:
alta,
baja,
variacion
effective_date
string<date>
required
status
enum<string>
required
Available options:
pending,
submitted,
accepted,
rejected
created_at
string<date-time>
required
submitted_at
string<date-time> | null
resolution
object | null

The TGSS's resolution once accepted.

rejection_reason
string | null