Pular para o conteúdo principal
PATCH
/
v1.0
/
events
/
{id}
Atualizar um evento específico
curl --request PATCH \
  --url https://api.thatsme.com.br/api/v1.0/events/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "state": "<string>",
  "city": "<string>",
  "country": "<string>",
  "latitude": 123,
  "longitude": 123,
  "timezone": "<string>",
  "address": "<string>",
  "initial_date": "<string>",
  "finish_date": "<string>",
  "official_url": "<string>",
  "image_url": "<string>",
  "image_key": "<string>",
  "is_private": true,
  "start_time": "<string>",
  "end_time": "<string>",
  "recurrence_start_date": "<string>",
  "connected_event_ids": [
    "<string>"
  ]
}
'
import requests

url = "https://api.thatsme.com.br/api/v1.0/events/{id}"

payload = {
"name": "<string>",
"description": "<string>",
"state": "<string>",
"city": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"address": "<string>",
"initial_date": "<string>",
"finish_date": "<string>",
"official_url": "<string>",
"image_url": "<string>",
"image_key": "<string>",
"is_private": True,
"start_time": "<string>",
"end_time": "<string>",
"recurrence_start_date": "<string>",
"connected_event_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
state: '<string>',
city: '<string>',
country: '<string>',
latitude: 123,
longitude: 123,
timezone: '<string>',
address: '<string>',
initial_date: '<string>',
finish_date: '<string>',
official_url: '<string>',
image_url: '<string>',
image_key: '<string>',
is_private: true,
start_time: '<string>',
end_time: '<string>',
recurrence_start_date: '<string>',
connected_event_ids: ['<string>']
})
};

fetch('https://api.thatsme.com.br/api/v1.0/events/{id}', 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.thatsme.com.br/api/v1.0/events/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'state' => '<string>',
'city' => '<string>',
'country' => '<string>',
'latitude' => 123,
'longitude' => 123,
'timezone' => '<string>',
'address' => '<string>',
'initial_date' => '<string>',
'finish_date' => '<string>',
'official_url' => '<string>',
'image_url' => '<string>',
'image_key' => '<string>',
'is_private' => true,
'start_time' => '<string>',
'end_time' => '<string>',
'recurrence_start_date' => '<string>',
'connected_event_ids' => [
'<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.thatsme.com.br/api/v1.0/events/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"timezone\": \"<string>\",\n \"address\": \"<string>\",\n \"initial_date\": \"<string>\",\n \"finish_date\": \"<string>\",\n \"official_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_key\": \"<string>\",\n \"is_private\": true,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"recurrence_start_date\": \"<string>\",\n \"connected_event_ids\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.thatsme.com.br/api/v1.0/events/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"timezone\": \"<string>\",\n \"address\": \"<string>\",\n \"initial_date\": \"<string>\",\n \"finish_date\": \"<string>\",\n \"official_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_key\": \"<string>\",\n \"is_private\": true,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"recurrence_start_date\": \"<string>\",\n \"connected_event_ids\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.thatsme.com.br/api/v1.0/events/{id}")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"timezone\": \"<string>\",\n \"address\": \"<string>\",\n \"initial_date\": \"<string>\",\n \"finish_date\": \"<string>\",\n \"official_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_key\": \"<string>\",\n \"is_private\": true,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"recurrence_start_date\": \"<string>\",\n \"connected_event_ids\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

id
string
obrigatório

ID do evento

Corpo

application/json
name
string

Nome do evento

description
string

Descrição do evento

category
enum<string>

Categoria do evento

Opções disponíveis:
SPORTS,
EDUCATION,
CORPORATE,
SOCIOCULTURAL
location_type
enum<string>

Tipo de localização do evento

Opções disponíveis:
PHYSICAL,
ONLINE
state
string | null

State or province of the event.

city
string | null

City of the event.

country
string | null

ISO 3166-1 alpha-2 country code.

latitude
number | null

Latitude of the event location.

longitude
number | null

Longitude of the event location.

timezone
string | null

IANA timezone identifier.

address
string | null

Full formatted address.

initial_date
string

Data de início em formato ISO 8601

finish_date
string

Data de término em formato ISO 8601

official_url
string

URL oficial do evento

image_url
string

URL pública da imagem do evento

image_key
string

Identificador da imagem no storage da That's Me (ex.: S3)

is_private
boolean

Define se o evento é privado

date_mode
enum<string>

Modo de datas do evento

Opções disponíveis:
SINGLE_DATE,
DATE_RANGE,
RECURRING,
ALWAYS_AVAILABLE
start_time
string

Horário de início (quando aplicável)

end_time
string

Horário de término (quando aplicável)

recurrence_type
enum<string>

Tipo de recorrência

Opções disponíveis:
WEEKLY,
BIWEEKLY,
MONTHLY,
BIMONTHLY,
QUARTERLY,
SEMIANNUAL,
ANNUAL
recurrence_start_date
string

Data de início da recorrência em formato ISO 8601

connected_event_ids
string[]

Lista de IDs de eventos conectados

Resposta

Evento atualizado com sucesso