GuidesAPI ReferenceChangelog
Guides

Sign a contract

Learn how to sign a contract when hiring a contractor.

After creating a contract, both you (the employer) and the independent contractor are required to sign the contract agreement. There are two ways to sign a contract:

Before you begin

To sign a contract, make sure to have:

Sign using the default contract template

When signing a contract, the default contract template is used automatically when a custom contract template is not specified.

This section explains how to sign a contract using the default contract template.

Step 1. (Optional) Preview contract agreement

Preview the contract agreement as HTML using the Preview a contract agreement endpoint.

curl --request GET \
     --url 'https://api.letsdeel.com/rest/v2/contracts/CONTRACT_ID/preview' \
     --header 'authorization: Bearer TOKEN' \
     --header 'accept: text/html' \

In the path:

NameRequiredTypeFormatDescriptionExample
CONTRACT_IDtruestringUUIDThe ID of the agreement being previewed.d3m0d3m0

A successful response (200) will return the contract agreement in HTML format.

<!DOCTYPE html>
<html>
CONTRACT_CONTENT
</html>

In the body, CONTRACT_CONTENT is the contract agreement in HTML format.

Step 2. Sign the contract

Once the contract has been previewed, both parties can sign it. By default, you are required to sign the contract first, and then invite the contractor to sign it afterwards.

To sign the contract, make a POST request to the Sign contract endpoint.

curl --request POST \
     --url 'https://api.letsdeel.com/rest/v2/contracts/CONTRACT_ID/signatures' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "client_signature": "Michael Scott"
      }
}
'

In the path:

NameRequiredTypeFormatDescriptionExample
CONTRACT_IDtruestringUUIDThe ID of the agreement being signedd3m0d3m0

In the body:

NameRequiredTypeFormatDescriptionExample
client_signaturetruestringFull nameThe name of the person signing the contractMichael Scott

A successful response (200) will return a confirmation message that the contract has been created.

{
  "data": {
    "created": true
  }
}

Sign using a custom contract template

You can also sign a contract using a custom template that was created in the UI.
To do this, retrieve the template ID and use it when previewing or signing the contract.

📘

Only showing additional parameters

This section expands on the default process for signing a contract, only additional calls and parameters are explained. Use these calls and parameters to complement the ones explained for the default process.

Step 1. Retrieve the contract template ID

To retrieve the contract template ID, make a GET request to the Get contract templates endpoint.

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/contract-templates \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN'

A successful response (200) returns the list of the available contract templates. The title field can help identifying the template. Save the id of the contract template, you need it in the next steps to preview and sign the contract.

{
  "data": [
    {
      "id": "d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0",
      "title": "My demo contract template"
    },
    {
      "id": "d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0",
      "title": "My other demo contract template"
    }
  ]
}

Step 2. Preview the contract agreement using a custom contract template

When previewing the contract agreement, a custom contract template can be used instead of the default one.

To preview the contract using a custom contract template, include its ID in the request body when making a GET request to the Preview contract agreement endpoint.

curl --request GET \
     --url 'https://api.letsdeel.com/rest/v2/contracts/CONTRACT_ID/preview?templateId=TEMPLATE_ID' \
     --header 'accept: text/html' \
     --header 'authorization: Bearer TOKEN'

In the query:

NameRequiredTypeFormatDescriptionExample
TEMPLATE_IDfalsestringUUIDThe ID of the contract template to use for the previewd3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0

Step 3. Sign the contract using a custom contract template

When signing the contract with a custom contract template, include the template ID in the request body of the Sign contract endpoint.

curl --request POST \
     --url https://api.letsdeel.com/rest/v2/contracts/CONTRACT_ID/signatures \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "client_signature": "Michael Scott",
    "contract_template_id": "d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0"
  }
}
'

In the body:

NameRequiredTypeFormatDescriptionExample
data.contract_template_idfalsestringUUIDThe ID of the contract template being used to sign the contract. When the contract_template_id is not specified, contracts are created with Deel's default contract template.d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0

What’s Next

Now that the contract has been signed, it's time to invite the contractor to sign it.