Skip to content

User Contracts

List of valid attributes:

AttributeDescriptionSpecifics
discarded_atNull or timestamp of removalCannot be set
nameName of the contractCan only be updated
statusStatus of the contractCannot be set, is always one of: creating reviewing signing completed
wordingContent of the contractCan only be updated

Meta data: Permissions

GroupDescription
actionsContains permissions to edit or delete a contract
signing_processReturns permissions if current user can create or delete a signing process

Create

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.

HTTP Request

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

URL Parameters

ParameterDescription
user_idID of the user to whom the contract is attached

Show

Example response:

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

This endpoint returns a single contract.

HTTP Request

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

URL Parameters

ParameterDescription
contract_idID of the contract to return
user_idID of the user to whom the contract is attached

List

Example response:

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

This endpoint returns a list of contracts.

HTTP Request

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

URL Parameters

ParameterDescription
user_idID of the user to whom the contract is attached

Update

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.

HTTP Request

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

URL Parameters

ParameterDescription
contract_idID of the contract to be updated
user_idID of the user to whom the contract is attached

Delete

Example response:

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

This endpoint deletes a contract.

HTTP Request

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

URL Parameters

ParameterDescription
contract_idID of the contract to be deleted
user_idID of the user to whom the contract is attached