Skip to main content
POST
/
contract
/
v1
/
contracts
/
{contractId}
/
annexes
Create a contract annex
curl --request POST \
  --url https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "startAt": "2023-12-25",
  "endAt": "2023-12-25",
  "expiredAt": "2023-12-25",
  "jobChargeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workdayTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contractTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agreementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "degreeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "jobLevelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "holidays": 49,
  "comment": "<string>",
  "code": "<string>",
  "socialSecurityNumber": "<string>",
  "cbo": "<string>",
  "remoteWork": true,
  "seniorityDate": "2023-12-25",
  "jobPositionDescription": "<string>",
  "weeklyHours": 123,
  "maxLegalWeeklyHours": 123,
  "maxLegalAnnualHours": 123,
  "percentageWorkDay": 123,
  "fte": 0.5,
  "workDays": [
    {
      "hour": 123
    }
  ],
  "trialPeriod": {
    "trialPeriodType": "months",
    "quantity": "6"
  },
  "trialPeriodEndDate": "2023-12-25",
  "details": "<string>"
}
'
import requests

url = "https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes"

payload = {
"startAt": "2023-12-25",
"endAt": "2023-12-25",
"expiredAt": "2023-12-25",
"jobChargeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workdayTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"degreeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"jobLevelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"holidays": 49,
"comment": "<string>",
"code": "<string>",
"socialSecurityNumber": "<string>",
"cbo": "<string>",
"remoteWork": True,
"seniorityDate": "2023-12-25",
"jobPositionDescription": "<string>",
"weeklyHours": 123,
"maxLegalWeeklyHours": 123,
"maxLegalAnnualHours": 123,
"percentageWorkDay": 123,
"fte": 0.5,
"workDays": [{ "hour": 123 }],
"trialPeriod": {
"trialPeriodType": "months",
"quantity": "6"
},
"trialPeriodEndDate": "2023-12-25",
"details": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startAt: '2023-12-25',
endAt: '2023-12-25',
expiredAt: '2023-12-25',
jobChargeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workdayTypeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contractTypeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agreementId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
degreeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
jobLevelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
holidays: 49,
comment: '<string>',
code: '<string>',
socialSecurityNumber: '<string>',
cbo: '<string>',
remoteWork: true,
seniorityDate: '2023-12-25',
jobPositionDescription: '<string>',
weeklyHours: 123,
maxLegalWeeklyHours: 123,
maxLegalAnnualHours: 123,
percentageWorkDay: 123,
fte: 0.5,
workDays: [{hour: 123}],
trialPeriod: {trialPeriodType: 'months', quantity: '6'},
trialPeriodEndDate: '2023-12-25',
details: '<string>'
})
};

fetch('https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startAt' => '2023-12-25',
'endAt' => '2023-12-25',
'expiredAt' => '2023-12-25',
'jobChargeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workdayTypeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contractTypeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agreementId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'degreeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'jobLevelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'holidays' => 49,
'comment' => '<string>',
'code' => '<string>',
'socialSecurityNumber' => '<string>',
'cbo' => '<string>',
'remoteWork' => true,
'seniorityDate' => '2023-12-25',
'jobPositionDescription' => '<string>',
'weeklyHours' => 123,
'maxLegalWeeklyHours' => 123,
'maxLegalAnnualHours' => 123,
'percentageWorkDay' => 123,
'fte' => 0.5,
'workDays' => [
[
'hour' => 123
]
],
'trialPeriod' => [
'trialPeriodType' => 'months',
'quantity' => '6'
],
'trialPeriodEndDate' => '2023-12-25',
'details' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes"

payload := strings.NewReader("{\n \"startAt\": \"2023-12-25\",\n \"endAt\": \"2023-12-25\",\n \"expiredAt\": \"2023-12-25\",\n \"jobChargeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workdayTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"degreeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"jobLevelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"holidays\": 49,\n \"comment\": \"<string>\",\n \"code\": \"<string>\",\n \"socialSecurityNumber\": \"<string>\",\n \"cbo\": \"<string>\",\n \"remoteWork\": true,\n \"seniorityDate\": \"2023-12-25\",\n \"jobPositionDescription\": \"<string>\",\n \"weeklyHours\": 123,\n \"maxLegalWeeklyHours\": 123,\n \"maxLegalAnnualHours\": 123,\n \"percentageWorkDay\": 123,\n \"fte\": 0.5,\n \"workDays\": [\n {\n \"hour\": 123\n }\n ],\n \"trialPeriod\": {\n \"trialPeriodType\": \"months\",\n \"quantity\": \"6\"\n },\n \"trialPeriodEndDate\": \"2023-12-25\",\n \"details\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startAt\": \"2023-12-25\",\n \"endAt\": \"2023-12-25\",\n \"expiredAt\": \"2023-12-25\",\n \"jobChargeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workdayTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"degreeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"jobLevelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"holidays\": 49,\n \"comment\": \"<string>\",\n \"code\": \"<string>\",\n \"socialSecurityNumber\": \"<string>\",\n \"cbo\": \"<string>\",\n \"remoteWork\": true,\n \"seniorityDate\": \"2023-12-25\",\n \"jobPositionDescription\": \"<string>\",\n \"weeklyHours\": 123,\n \"maxLegalWeeklyHours\": 123,\n \"maxLegalAnnualHours\": 123,\n \"percentageWorkDay\": 123,\n \"fte\": 0.5,\n \"workDays\": [\n {\n \"hour\": 123\n }\n ],\n \"trialPeriod\": {\n \"trialPeriodType\": \"months\",\n \"quantity\": \"6\"\n },\n \"trialPeriodEndDate\": \"2023-12-25\",\n \"details\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-{region}.sesametime.com/contract/v1/contracts/{contractId}/annexes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startAt\": \"2023-12-25\",\n \"endAt\": \"2023-12-25\",\n \"expiredAt\": \"2023-12-25\",\n \"jobChargeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workdayTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractTypeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"degreeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"jobLevelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"holidays\": 49,\n \"comment\": \"<string>\",\n \"code\": \"<string>\",\n \"socialSecurityNumber\": \"<string>\",\n \"cbo\": \"<string>\",\n \"remoteWork\": true,\n \"seniorityDate\": \"2023-12-25\",\n \"jobPositionDescription\": \"<string>\",\n \"weeklyHours\": 123,\n \"maxLegalWeeklyHours\": 123,\n \"maxLegalAnnualHours\": 123,\n \"percentageWorkDay\": 123,\n \"fte\": 0.5,\n \"workDays\": [\n {\n \"hour\": 123\n }\n ],\n \"trialPeriod\": {\n \"trialPeriodType\": \"months\",\n \"quantity\": \"6\"\n },\n \"trialPeriodEndDate\": \"2023-12-25\",\n \"details\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "meta": {
    "currentPage": 1,
    "lastPage": 1,
    "total": 1,
    "perPage": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

contractId
string<uuid>
required

The ID of the contract

Body

application/json

Contract annex object that needs to be created

startAt
string<date>
required

Start date of the annex

endAt
string<date>

End date of the annex

expiredAt
string<date>

Expiration date of the annex

jobChargeId
string<uuid>

The ID of the job charge

workdayTypeId
string<uuid>

The ID of the workday type

contractTypeId
string<uuid>

The ID of the contract type

agreementId
string<uuid>

The ID of the agreement

degreeId
string<uuid>

The ID of the degree

jobLevelId
string<uuid>

The ID of the job level

holidays
integer

Number of holidays

Required range: 0 <= x <= 99
comment
string

Comments about the annex

Maximum string length: 500
code
string

Code of the annex

socialSecurityNumber
string

The social security number

cbo
string

Brazilian occupation code (CBO)

Pattern: ^\d{4}(-\d{2})?$
remoteWork
boolean

Whether remote work is allowed

seniorityDate
string<date>

Seniority date

jobPositionDescription
string

The job position description

Maximum string length: 500
weeklyHours
number<float>

Weekly working hours

Max legal weekly working hours

Max legal annual working hours

percentageWorkDay
number<float>

Percentage of workday

fte
number<float>

The FTE value should be between 0 and 1

Required range: 0 <= x <= 1
workDays
object[]

Working days configuration

trialPeriod
object
trialPeriodEndDate
string<date>

End date of the trial period

details
string

Additional details about the annex

Maximum string length: 500

Response

200 - application/json

Contract annex created successfully

data
object
meta
object