Skip to main content
POST
Create a contract
Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
Send what Contrat@, the affiliation files and the written contract need. The draft months it reaches are calculated again.

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.

Headers

Idempotency-Key
string

A unique key of yours, such as a UUID, that makes a retried create safe. For 24 hours a retry with the same key and body gets the first answer again, with Idempotent-Replayed: true. The same key with another body answers 422 idempotency_key_reused; while the first request runs, 409 idempotency_key_in_use. A 5xx answer is not kept, so its retry runs again. See Conventions.

Maximum string length: 255

Path Parameters

company_id
string<uuid>
required

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

employee_id
string<uuid>
required

Body

application/json

A contract as the SEPE and the Social Security know it. Send only what the person confirmed.

event
enum<string>
required
Available options:
initial,
extension,
conversion
start_date
string<date>
required
code
string
required

The SEPE clave, 3 digits: 100 indefinite full time, 200 part time, 300 fijo discontinuo, 402 circumstances of production, 410 replacement and so on.

previous_id
string<uuid>

The contract an extension or conversion follows.

end_date
string<date> | null

A fixed-term contract's agreed end.

account
string

The id of a Social Security account from the labour settings.

occupation
string

The CNO-11 occupation

position
string
duties
string

What the INSS reads.

Maximum string length: 260
group
integer
Required range: 1 <= x <= 11
weekly_hours
string
full_time_hours
string
annual_hours
string

For a fijo discontinuo, or the hours a year a part-time contract agrees.

document
object

The written contract's own terms: trial period, schedule, holidays and pay.

Response

The contract.

A contract as the SEPE and the Social Security know it. Send only what the person confirmed.

event
enum<string>
required
Available options:
initial,
extension,
conversion
start_date
string<date>
required
code
string
required

The SEPE clave, 3 digits: 100 indefinite full time, 200 part time, 300 fijo discontinuo, 402 circumstances of production, 410 replacement and so on.

id
string<uuid>
required
previous_id
string<uuid>

The contract an extension or conversion follows.

end_date
string<date> | null

A fixed-term contract's agreed end.

account
string

The id of a Social Security account from the labour settings.

occupation
string

The CNO-11 occupation

position
string
duties
string

What the INSS reads.

Maximum string length: 260
group
integer
Required range: 1 <= x <= 11
weekly_hours
string
full_time_hours
string
annual_hours
string

For a fijo discontinuo, or the hours a year a part-time contract agrees.

document
object

The written contract's own terms: trial period, schedule, holidays and pay.

contrata_status
enum<string> | null

The latest send to Contrat@.

Available options:
pending,
received,
rejected,
unknown,
null