Skip to main content
POST
Request a mandate
Preview. A contract we are building with design partners. It is not callable yet, and fields can still change. See Availability.
Returns a hosted signing_url where the company’s legal representative reviews and signs the mandate. A mandate is active once the administration has registered it; until then Melso does not act before that administration.

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
administration
enum<string>
required
Available options:
aeat,
tgss,
sepe
procedures
enum<string>[]
required
Minimum array length: 1

What Melso may do under the mandate. AEAT: tax_returns, notifications, certificates, census (036 and 037). TGSS: affiliation, contributions, notifications, certificates. SEPE: contracts (Contrat@), company_certificates (Certific@2).

Available options:
tax_returns,
notifications,
certificates,
census,
affiliation,
contributions,
contracts,
company_certificates
signer
object
required

The company's legal representative, or the autónomo.

return_url
string<uri>

Where the hosted signing page sends the person when they finish.

Response

The mandate, waiting for signature.

id
string<uuid>
required
administration
enum<string>
required
Available options:
aeat,
tgss,
sepe
procedures
enum<string>[]
required

What Melso may do under the mandate. AEAT: tax_returns, notifications, certificates, census (036 and 037). TGSS: affiliation, contributions, notifications, certificates. SEPE: contracts (Contrat@), company_certificates (Certific@2).

Available options:
tax_returns,
notifications,
certificates,
census,
affiliation,
contributions,
contracts,
company_certificates
status
enum<string>
required

signed: the company signed; Melso is registering it with the administration. active: registered, so Melso can act. rejected: the administration refused the registration; rejection_reason says why.

Available options:
pending_signature,
signed,
active,
rejected,
revoked,
expired
created_at
string<date-time>
required
signing_url
string<uri> | null

The hosted page where the signer signs. Present while pending_signature.

rejection_reason
string | null
signed_at
string<date-time> | null
activated_at
string<date-time> | null
revoked_at
string<date-time> | null
evidence
object