JouloDocs

Issue a machtiging signing link

Issues a link to the Joulo-hosted signing page for an account. You give the URL to the customer, who signs the machtiging there. If the connection already has an active machtiging, the response says so and issues no link.

POST
/v1/mandate-links
AuthorizationBearer <token>

OAuth 2.0 client credentials for a CPO client bound to one partner. Request a token with grant_type client_credentials and send client_id and client_secret in the body, as JSON or form data. The token endpoint does not accept HTTP Basic client authentication. The token lasts one hour and has no refresh token. Omit scope to get every scope your client holds. The /v1 routes refuse user tokens and personal API tokens.

In: header

Scope: cpo:mandates:write

account_idstring

The account to sign for. It must be an account you created through this API.

Formatuuid
connection_id?string

Picks the active connection when the account has more than one. Otherwise the first active connection is used.

Formatuuid

Response Body

curl -X POST "https://api.joulo.nl/functions/v1/api/v1/mandate-links" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "60092124-c768-4191-9c9d-55ef3fc49999"
  }'
{
  "ok": true,
  "mandate_status": "pending",
  "url": "http://example.com",
  "token": "string",
  "expires_at": "2019-08-24T14:15:22Z",
  "already_signed": true,
  "valid_from": "2019-08-24"
}
{
  "error": "invalid_json",
  "detail": "string"
}
{
  "error": "Missing or invalid API token"
}
{
  "error": "Insufficient scope",
  "detail": "string",
  "required_scope": "string"
}
{
  "error": "account_not_found",
  "detail": "string"
}
{
  "error": "no_connection",
  "detail": "string"
}
{
  "error": "Too many requests",
  "retry_after_seconds": 0
}
{
  "error": "link_create_failed",
  "detail": "string"
}
{
  "error": "string"
}