Skip to content

User Contracts

List of valid attributes:

Attribute Description Specifics
discarded_at Null or timestamp of removal Cannot be set
name Name of the contract Can only be updated
status Status of the contract Cannot be set, is always one of: creating reviewing signing completed
wording Content of the contract Can only be updated

Meta data: Permissions

Group Description
actions Contains permissions to edit or delete a contract
signing_process Returns permissions if current user can create or delete a signing process

Example request:

{
"data": {
"type": "contract",
"attributes": {
"contract_template_id": "70f2da60-67cf-4d6f-8f68-9a5d6e46df3d"
}
}
}

Example response:

{
"data": {
"id": "86d82a79-7c3a-4e6c-a1d5-2be1f9dbfe0a",
"type": "contract",
"attributes": {
...
}
}
}

On success, this endpoint creates a new contract for a user, from the given template.

POST /api/v1/users/:user_id/contracts

Parameter Description
user_id ID of the user to whom the contract is attached

Example response:

{
"data": {
"id": "11ed62a0-d0fb-4603-a1aa-60a8e2a4a12a",
"type": "contract",
"attributes": {
...
}
}
}

This endpoint returns a single contract.

GET /api/v1/users/:user_id/contracts/:contract_id

Parameter Description
contract_id ID of the contract to return
user_id ID of the user to whom the contract is attached

Example response:

{
"data": [
{
"id": "1e9f83a6-51a7-445a-bd6e-5e0350f24c93",
"type": "contract",
"attributes": {
...
}
},
{
...
}
]
}

This endpoint returns a list of contracts.

GET /api/v1/users/:user_id/contracts

Parameter Description
user_id ID of the user to whom the contract is attached

Example request:

{
"data": {
"type": "contract",
"attributes": {
"name": "Updated contract"
"wording": "Updated contract content"
}
}
}

Example response:

{
"data": {
"id": "41206789-af28-4b29-bc57-3e9fbb2bc389",
"type": "contract",
"attributes": {
...
}
}
}

This endpoint updates a contract.

PUT /api/v1/users/:user_id/contracts/:contract_id

Parameter Description
contract_id ID of the contract to be updated
user_id ID of the user to whom the contract is attached

Example response:

{
"data": {
"id": "41206789-af28-4b29-bc57-3e9fbb2bc389",
"type": "contract",
"attributes": {
...
}
}
}

This endpoint deletes a contract.

DELETE /api/v1/users/:user_id/contracts/:contract_id

Parameter Description
contract_id ID of the contract to be deleted
user_id ID of the user to whom the contract is attached