Update a training
curl --request PUT \
--url https://api-{region}.sesametime.com/training/v1/trainings/{trainingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Nombre de la formación",
"typeId": "961b95cf-55d0-4eb6-9b98-20693f50852a",
"currency": "EUR",
"amountType": "per_person",
"amount": 120.5,
"durationInHours": 1.5,
"startDate": "2024-11-30",
"endDate": "2024-12-30",
"bonusable": false,
"trainingEntity": "Epresa de formación",
"description": "Descripción de la formación",
"durationHours": 1,
"durationMinutes": 30,
"bonusPercent": 0,
"email": "email@email.com",
"teacher": "Profesor de la formación",
"businessName": "Razón Social de la empresa formadora",
"cif": "B52603690",
"phone": "+34 695 36 98 80"
}
'import requests
url = "https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}"
payload = {
"name": "Nombre de la formación",
"typeId": "961b95cf-55d0-4eb6-9b98-20693f50852a",
"currency": "EUR",
"amountType": "per_person",
"amount": 120.5,
"durationInHours": 1.5,
"startDate": "2024-11-30",
"endDate": "2024-12-30",
"bonusable": False,
"trainingEntity": "Epresa de formación",
"description": "Descripción de la formación",
"durationHours": 1,
"durationMinutes": 30,
"bonusPercent": 0,
"email": "email@email.com",
"teacher": "Profesor de la formación",
"businessName": "Razón Social de la empresa formadora",
"cif": "B52603690",
"phone": "+34 695 36 98 80"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Nombre de la formación',
typeId: '961b95cf-55d0-4eb6-9b98-20693f50852a',
currency: 'EUR',
amountType: 'per_person',
amount: 120.5,
durationInHours: 1.5,
startDate: '2024-11-30',
endDate: '2024-12-30',
bonusable: false,
trainingEntity: 'Epresa de formación',
description: 'Descripción de la formación',
durationHours: 1,
durationMinutes: 30,
bonusPercent: 0,
email: 'email@email.com',
teacher: 'Profesor de la formación',
businessName: 'Razón Social de la empresa formadora',
cif: 'B52603690',
phone: '+34 695 36 98 80'
})
};
fetch('https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}', 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/training/v1/trainings/{trainingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Nombre de la formación',
'typeId' => '961b95cf-55d0-4eb6-9b98-20693f50852a',
'currency' => 'EUR',
'amountType' => 'per_person',
'amount' => 120.5,
'durationInHours' => 1.5,
'startDate' => '2024-11-30',
'endDate' => '2024-12-30',
'bonusable' => false,
'trainingEntity' => 'Epresa de formación',
'description' => 'Descripción de la formación',
'durationHours' => 1,
'durationMinutes' => 30,
'bonusPercent' => 0,
'email' => 'email@email.com',
'teacher' => 'Profesor de la formación',
'businessName' => 'Razón Social de la empresa formadora',
'cif' => 'B52603690',
'phone' => '+34 695 36 98 80'
]),
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/training/v1/trainings/{trainingId}"
payload := strings.NewReader("{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "707ee040-4d5b-4e48-abfa-199dcefb37a3",
"name": "Nombre de la formación",
"description": "Descripción de la formación",
"durationInHours": 1.5,
"durationHours": 1,
"durationMinutes": 30,
"amount": 1200,
"currency": "EUR",
"startDate": "2024-11-29T23:00:00+00:00",
"endDate": "2024-12-29T23:00:00+00:00",
"trainingEntity": "Entidad formadora"
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}Trainings
Update a training
PUT
/
training
/
v1
/
trainings
/
{trainingId}
Update a training
curl --request PUT \
--url https://api-{region}.sesametime.com/training/v1/trainings/{trainingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Nombre de la formación",
"typeId": "961b95cf-55d0-4eb6-9b98-20693f50852a",
"currency": "EUR",
"amountType": "per_person",
"amount": 120.5,
"durationInHours": 1.5,
"startDate": "2024-11-30",
"endDate": "2024-12-30",
"bonusable": false,
"trainingEntity": "Epresa de formación",
"description": "Descripción de la formación",
"durationHours": 1,
"durationMinutes": 30,
"bonusPercent": 0,
"email": "email@email.com",
"teacher": "Profesor de la formación",
"businessName": "Razón Social de la empresa formadora",
"cif": "B52603690",
"phone": "+34 695 36 98 80"
}
'import requests
url = "https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}"
payload = {
"name": "Nombre de la formación",
"typeId": "961b95cf-55d0-4eb6-9b98-20693f50852a",
"currency": "EUR",
"amountType": "per_person",
"amount": 120.5,
"durationInHours": 1.5,
"startDate": "2024-11-30",
"endDate": "2024-12-30",
"bonusable": False,
"trainingEntity": "Epresa de formación",
"description": "Descripción de la formación",
"durationHours": 1,
"durationMinutes": 30,
"bonusPercent": 0,
"email": "email@email.com",
"teacher": "Profesor de la formación",
"businessName": "Razón Social de la empresa formadora",
"cif": "B52603690",
"phone": "+34 695 36 98 80"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Nombre de la formación',
typeId: '961b95cf-55d0-4eb6-9b98-20693f50852a',
currency: 'EUR',
amountType: 'per_person',
amount: 120.5,
durationInHours: 1.5,
startDate: '2024-11-30',
endDate: '2024-12-30',
bonusable: false,
trainingEntity: 'Epresa de formación',
description: 'Descripción de la formación',
durationHours: 1,
durationMinutes: 30,
bonusPercent: 0,
email: 'email@email.com',
teacher: 'Profesor de la formación',
businessName: 'Razón Social de la empresa formadora',
cif: 'B52603690',
phone: '+34 695 36 98 80'
})
};
fetch('https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}', 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/training/v1/trainings/{trainingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Nombre de la formación',
'typeId' => '961b95cf-55d0-4eb6-9b98-20693f50852a',
'currency' => 'EUR',
'amountType' => 'per_person',
'amount' => 120.5,
'durationInHours' => 1.5,
'startDate' => '2024-11-30',
'endDate' => '2024-12-30',
'bonusable' => false,
'trainingEntity' => 'Epresa de formación',
'description' => 'Descripción de la formación',
'durationHours' => 1,
'durationMinutes' => 30,
'bonusPercent' => 0,
'email' => 'email@email.com',
'teacher' => 'Profesor de la formación',
'businessName' => 'Razón Social de la empresa formadora',
'cif' => 'B52603690',
'phone' => '+34 695 36 98 80'
]),
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/training/v1/trainings/{trainingId}"
payload := strings.NewReader("{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/training/v1/trainings/{trainingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Nombre de la formación\",\n \"typeId\": \"961b95cf-55d0-4eb6-9b98-20693f50852a\",\n \"currency\": \"EUR\",\n \"amountType\": \"per_person\",\n \"amount\": 120.5,\n \"durationInHours\": 1.5,\n \"startDate\": \"2024-11-30\",\n \"endDate\": \"2024-12-30\",\n \"bonusable\": false,\n \"trainingEntity\": \"Epresa de formación\",\n \"description\": \"Descripción de la formación\",\n \"durationHours\": 1,\n \"durationMinutes\": 30,\n \"bonusPercent\": 0,\n \"email\": \"email@email.com\",\n \"teacher\": \"Profesor de la formación\",\n \"businessName\": \"Razón Social de la empresa formadora\",\n \"cif\": \"B52603690\",\n \"phone\": \"+34 695 36 98 80\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "707ee040-4d5b-4e48-abfa-199dcefb37a3",
"name": "Nombre de la formación",
"description": "Descripción de la formación",
"durationInHours": 1.5,
"durationHours": 1,
"durationMinutes": 30,
"amount": 1200,
"currency": "EUR",
"startDate": "2024-11-29T23:00:00+00:00",
"endDate": "2024-12-29T23:00:00+00:00",
"trainingEntity": "Entidad formadora"
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Training ID
Body
application/json
Training object that needs to be updated
Example:
"Nombre de la formación"
Example:
"961b95cf-55d0-4eb6-9b98-20693f50852a"
Example:
"EUR"
Available options:
per_course, per_person Example:
120.5
Duration in hours (decimal)
Example:
1.5
Example:
"2024-11-30"
Example:
"2024-12-30"
Example:
false
Example:
"Epresa de formación"
Example:
"Descripción de la formación"
Duration hours component (optional, alternative input)
Example:
1
Duration minutes component (optional, alternative input)
Example:
30
Example:
0
Example:
"email@email.com"
Example:
"Profesor de la formación"
Example:
"Razón Social de la empresa formadora"
Example:
"B52603690"
Example:
"+34 695 36 98 80"
Was this page helpful?
⌘I