Eventos
Finalizar evento
Status → finished (+ job de campeonato)
POST
/
events
/
{event}
/
finalize
Finalizar evento
curl --request POST \
--url http://localhost/api/v1/events/{event}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost/api/v1/events/{event}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost/api/v1/events/{event}/finalize', 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 => "http://localhost/api/v1/events/{event}/finalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/v1/events/{event}/finalize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/api/v1/events/{event}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/v1/events/{event}/finalize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"code": "<string>",
"name": "<string>",
"status": "<string>",
"date": "<string>",
"city": "<string>",
"state": "<string>",
"document": "<string>",
"organizer_id": 123,
"hub_unit_id": 123,
"salesperson_person_id": 123,
"expected_athletes": 123,
"bib_count": 123,
"tag_count": 123,
"paid_tag_base_count": 123,
"difficulty_grade": "<string>",
"technical_description": "<string>",
"commercial_description": "<string>",
"regulation": "<string>",
"regulation_acceptance_required": true,
"regulation_extra_text": "<string>",
"has_cronoself": true,
"has_qrcode_list": true,
"has_medrace": true,
"registration_support_whatsapp": "<string>",
"certificate_enabled": true,
"sales_mode": "<string>",
"external_registration_url": "<string>",
"is_free": true,
"registration_open": true,
"registration_opens_at": "<string>",
"registration_closes_at": "<string>",
"max_registrations": 123,
"hub_fee_percent": "<string>",
"service_fee_cents": 123,
"service_fee_mode": "<string>",
"refund_window_days": 123,
"refund_summary": "<string>",
"logo_url": "<string>",
"banner_url": "<string>",
"regulation_pdf_url": "<string>",
"pipeline_stage_id": 123,
"created_at": "<string>",
"updated_at": "<string>",
"organizer": {
"id": 123,
"name": "<string>"
},
"races": [
{
"id": 123,
"event_id": 123,
"code": "<string>",
"name": "<string>",
"distance": 123,
"distance_label": "<string>",
"sort_order": 123,
"starts_at": "<string>",
"type": "<string>",
"scoring_type": "<string>",
"duration_minutes": 123,
"lap_count": 123,
"lap_distance": 123,
"registration_limit": 123,
"sem_classificacao": true,
"status": "<string>",
"results_status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modalities": [
{
"id": 123,
"name": "<string>",
"is_default": true
}
],
"categories": [
{
"id": 123,
"race_id": 123,
"event_id": 123,
"name": "<string>",
"type": "<string>",
"modality_id": 123,
"category_group_id": "<string>",
"sex": "<string>",
"age_min": 123,
"age_max": 123,
"award_count": 123,
"is_pwd": true,
"is_team": true,
"sort_order": 123,
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modality": {
"id": 123,
"name": "<string>"
}
}
],
"prize_rules": [
{
"id": 123,
"race_id": 123,
"event_id": 123,
"seq": 123,
"modality_id": 123,
"ranking_type": "<string>",
"ranking_cut": 123,
"gender_filter": "<string>",
"pne_filter": "<string>",
"dupla_prem": [
"<unknown>"
],
"tipo_premiacao": "<string>",
"eqp_apuracao": "<string>",
"eqp_n_melhores": 123,
"eqp_base_ranking": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modality": {
"id": 123,
"name": "<string>"
}
}
],
"categories_count": "<string>"
}
],
"batches": [
{
"id": 123,
"event_id": 123,
"name": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"includes_kit": true,
"max_quantity": 123,
"quantity_sold": 123,
"quantity_reserved": 123,
"is_active": true,
"installments_enabled": true,
"max_installments": 123,
"absorb_installment_interest": true,
"sort_order": 123,
"race_prices": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>"
}
],
"counters": {
"registrations": "<string>",
"results": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}⌘I
Finalizar evento
curl --request POST \
--url http://localhost/api/v1/events/{event}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost/api/v1/events/{event}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost/api/v1/events/{event}/finalize', 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 => "http://localhost/api/v1/events/{event}/finalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/v1/events/{event}/finalize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/api/v1/events/{event}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/v1/events/{event}/finalize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"code": "<string>",
"name": "<string>",
"status": "<string>",
"date": "<string>",
"city": "<string>",
"state": "<string>",
"document": "<string>",
"organizer_id": 123,
"hub_unit_id": 123,
"salesperson_person_id": 123,
"expected_athletes": 123,
"bib_count": 123,
"tag_count": 123,
"paid_tag_base_count": 123,
"difficulty_grade": "<string>",
"technical_description": "<string>",
"commercial_description": "<string>",
"regulation": "<string>",
"regulation_acceptance_required": true,
"regulation_extra_text": "<string>",
"has_cronoself": true,
"has_qrcode_list": true,
"has_medrace": true,
"registration_support_whatsapp": "<string>",
"certificate_enabled": true,
"sales_mode": "<string>",
"external_registration_url": "<string>",
"is_free": true,
"registration_open": true,
"registration_opens_at": "<string>",
"registration_closes_at": "<string>",
"max_registrations": 123,
"hub_fee_percent": "<string>",
"service_fee_cents": 123,
"service_fee_mode": "<string>",
"refund_window_days": 123,
"refund_summary": "<string>",
"logo_url": "<string>",
"banner_url": "<string>",
"regulation_pdf_url": "<string>",
"pipeline_stage_id": 123,
"created_at": "<string>",
"updated_at": "<string>",
"organizer": {
"id": 123,
"name": "<string>"
},
"races": [
{
"id": 123,
"event_id": 123,
"code": "<string>",
"name": "<string>",
"distance": 123,
"distance_label": "<string>",
"sort_order": 123,
"starts_at": "<string>",
"type": "<string>",
"scoring_type": "<string>",
"duration_minutes": 123,
"lap_count": 123,
"lap_distance": 123,
"registration_limit": 123,
"sem_classificacao": true,
"status": "<string>",
"results_status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modalities": [
{
"id": 123,
"name": "<string>",
"is_default": true
}
],
"categories": [
{
"id": 123,
"race_id": 123,
"event_id": 123,
"name": "<string>",
"type": "<string>",
"modality_id": 123,
"category_group_id": "<string>",
"sex": "<string>",
"age_min": 123,
"age_max": 123,
"award_count": 123,
"is_pwd": true,
"is_team": true,
"sort_order": 123,
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modality": {
"id": 123,
"name": "<string>"
}
}
],
"prize_rules": [
{
"id": 123,
"race_id": 123,
"event_id": 123,
"seq": 123,
"modality_id": 123,
"ranking_type": "<string>",
"ranking_cut": 123,
"gender_filter": "<string>",
"pne_filter": "<string>",
"dupla_prem": [
"<unknown>"
],
"tipo_premiacao": "<string>",
"eqp_apuracao": "<string>",
"eqp_n_melhores": 123,
"eqp_base_ranking": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"modality": {
"id": 123,
"name": "<string>"
}
}
],
"categories_count": "<string>"
}
],
"batches": [
{
"id": 123,
"event_id": 123,
"name": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"includes_kit": true,
"max_quantity": 123,
"quantity_sold": 123,
"quantity_reserved": 123,
"is_active": true,
"installments_enabled": true,
"max_installments": 123,
"absorb_installment_interest": true,
"sort_order": 123,
"race_prices": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>"
}
],
"counters": {
"registrations": "<string>",
"results": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}