How to create an Employment Agreement

What is an Employment Agreement?

A Employment Agreement establishes the terms of employment between an employer and an individual employee. It sets out the representations made by the parties their liabilities under the contract and the duration of the employment.

How to create an Employment Agreement:

  • Create a user
  • Create a team that will create the Employment Agreement
  • Retrieve the contract fields of the Employment Agreement template
  • Create a contract and provide values for the contract fields
  • Add party members or collaborators
  • Sign the contract

Creating a team

Contracts are created in teams. A User can create a new Team or select an existing. In this guide we will create a "New Team for my NDA" with the create team endpoint:

curl --request POST \
     --url https://sandbox.legislate.tech/v1/users/{{userId}}/teams \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{APIkey}} \
     --header 'Content-Type: application/json' \
     --data '
{
     "name": "New Team for Employment Agreement"
}
'

A successful 204 response will return the new team ID.

{
  "id": {{teamId}},
  "name": "New Team for Employment Agreement",
  "created": "2022-06-12 12:45:52.871+0000",
  "_links": {
    "self": {
      "href": "https://sandbox.legislate.tech/v1/teams/{{teamId}}"
    }
  }
}

Fetching the contract fields of the Employment Agreement

The Employment Agreement is a public contract and we will retrieve the ID of the Employer Agreement by fetching the list of contracts which can be created in the new team. To do this, we will use the get contracts endpoint which requires the team ID as the parameter:

curl --request GET \
     --url https://sandbox.legislate.tech/v1/teams/{{teamId}}/contract-types \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{APIKey}}'

The successful 204 response will return the list of contracts which can be created in the team, the Employment Agreement will be in this list. The response should look something like this:

{
    "id": 6690589634461711,
    "name": "Section 8 Notice",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590809/contract-types/6690589634461711"
      },
      {
        "rel": "templates",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590809/contract-types/6690589634461711/templates"
      }
    ],
    "about_url": "www.legislate.tech"
  },
  {
    "id": 6690589634461712,
    "name": "Section 21 Notice",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590809/contract-types/6690589634461712"
      },
      {
        "rel": "templates",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590809/contract-types/6690589634461712/templates"
      }
    ],
    "about_url": "www.legislate.tech"
  },

The Employment Agreement type should look like this:

"id": 6303654856359936,
    "name": "Employment Offer Letter",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590839/contract-types/6303654856359936"
      },
      {
        "rel": "templates",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590839/contract-types/6303654856359936/templates"
      }
    ],
    "about_url": "https://help.legislate.tech/hc/en-gb/articles/360011024078",
    "about_html": "<p>An employment offer letter is an offer of employment sent by a director of a company to a prospective employee, establishing the key terms of employment.</p><p>The employer indicates the company&rsquo;s responsibilities in respect of the employee&rsquo;s salary and pension scheme. The offer also indicates which, if any, of the company&rsquo;s employment benefit schemes the employee is entitled to join. Further, the employee is informed of who and where to report to, and may be invited to complete an employment contract.</p>"
  },
  {

This shows the Employment Agreement type Id, and we can use this to get the template for the Employment Agreement using the Get Templates endpoint (https://developers.legislate.tech/reference/gettemplatesusingget) :

[
  {
    "id": 85,
    "version": "Last updated 11/10/2021",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590839/contract-types/6303654856359936/templates/85"
      },
      {
        "rel": "type",
        "href": "https://sandbox.legislate.tech/v1/teams/6753931778590839/contract-types/6303654856359936"
      },
      {
        "rel": "terms",
        "href": "https://sandbox.legislate.tech/v1/templates/85/terms"
      }
    ]
  }
]

This shows the Employment Agreement template ID. We can then use this to find the fields for the Employment Agreement using the get contract fields endpoint (https://developers.legislate.tech/reference/gettemplatetermsusingget) :-1:

[
  {
    "id": 2230,
    "label": "Salary",
    "name": "contract_currency",
    "options": [
      {
        "value": "&pound;"
      },
      {
        "value": "&dollar;"
      },
      {
        "value": "A&dollar;"
      }
    ],
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2230"
      }
    ]
  },
  {
    "id": 2231,
    "label": "Medical Insurance",
    "name": "contract_medicalInsurance",
    "options": [
      {
        "value": "yes"
      },
      {
        "value": "no",
        "nested_fields": [
          {
            "id": 2234,
            "label": "Line Manager",
            "name": "contract_lineManagerName",
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2234"
              }
            ]
          }
        ]
      }
    ],
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2231"
      }
    ]
  },
  {
    "id": 2232,
    "label": "Job title",
    "name": "contract_jobTitle",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2232"
      }
    ]
  },
  {
    "id": 2233,
    "label": "Work Location",
    "name": "contract_workLocation",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2233"
      }
    ]
  },
  {
    "id": 2235,
    "label": "Agreement Date",
    "name": "contract_agreementDate",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2235"
      }
    ]
  },
  {
    "id": 2237,
    "label": "Company Name",
    "name": "contract_companyName",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2237"
      }
    ]
  },
  {
    "id": 2238,
    "label": "Is the first party the line manager?",
    "name": "contract_lineManager",
    "options": [
      {
        "value": "yes"
      },
      {
        "value": "no",
        "nested_fields": [
          {
            "id": 2234,
            "label": "Line Manager",
            "name": "contract_lineManagerName",
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2234"
              }
            ]
          }
        ]
      }
    ],
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2238"
      }
    ]
  },
  {
    "id": 2240,
    "label": "Start Date",
    "name": "contract_startDate",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2240"
      }
    ]
  },
  {
    "id": 2241,
    "label": "Share Options",
    "name": "contract_shareOptions",
    "options": [
      {
        "value": "yesSo",
        "nested_fields": [
          {
            "id": 2229,
            "label": "Number of Share Options",
            "name": "contract_numberShareOptions",
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2229"
              }
            ]
          },
          {
            "id": 2236,
            "label": "Exercise Price",
            "name": "contract_exercisePrice",
            "options": [
              {
                "value": "&pound;"
              },
              {
                "value": "&dollar;"
              },
              {
                "value": "A&dollar;"
              }
            ],
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2236"
              }
            ]
          },
          {
            "id": 2239,
            "label": "Vesting Period",
            "name": "contract_vestingPeriod",
            "options": [
              {
                "value": "first anniversary"
              },
              {
                "value": "second anniversary"
              },
              {
                "value": "third anniversary"
              },
              {
                "value": "fourth anniversary"
              }
            ],
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2239"
              }
            ]
          }
        ]
      },
      {
        "value": "provisionaly"
      },
      {
        "value": "no",
        "nested_fields": [
          {
            "id": 2234,
            "label": "Line Manager",
            "name": "contract_lineManagerName",
            "links": [
              {
                "rel": "self",
                "href": "https://sandbox.legislate.tech/v1/terms/2234"
              }
            ]
          }
        ]
      }
    ],
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2241"
      }
    ]
  },
  {
    "id": 2242,
    "label": "Name",
    "name": "contract_name",
    "links": [
      {
        "rel": "self",
        "href": "https://sandbox.legislate.tech/v1/terms/2242"
      }
    ]
  }
]

Now that we have the fields, we can use the Create a contract with an auto-generated bundle endpoint (https://developers.legislate.tech/reference/postcontractusingpost_1-1), which uses user ID, team ID, and template ID as parameters to find the contractID, as well as being able to update these fields and give them values.

{
  "contract_name": "Employment offer letter",
  "_links": {
    "self": {
      "href": "https://sandbox.legislate.tech/v1/contracts/6697064968753806"
    }
  }