Atualizar configurações de inscrição
curl --request PUT \
--url http://localhost/api/v1/events/{event}/registration-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_free": true,
"external_registration_url": "<string>",
"registration_opens_at": "2023-11-07T05:31:56Z",
"registration_closes_at": "2023-11-07T05:31:56Z",
"max_registrations": 500000,
"hub_fee_percent": 50,
"service_fee_cents": 5000000,
"refund_window_days": 182,
"regulation_acceptance_required": true
}
'import requests
url = "http://localhost/api/v1/events/{event}/registration-settings"
payload = {
"is_free": True,
"external_registration_url": "<string>",
"registration_opens_at": "2023-11-07T05:31:56Z",
"registration_closes_at": "2023-11-07T05:31:56Z",
"max_registrations": 500000,
"hub_fee_percent": 50,
"service_fee_cents": 5000000,
"refund_window_days": 182,
"regulation_acceptance_required": True
}
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({
is_free: true,
external_registration_url: '<string>',
registration_opens_at: '2023-11-07T05:31:56Z',
registration_closes_at: '2023-11-07T05:31:56Z',
max_registrations: 500000,
hub_fee_percent: 50,
service_fee_cents: 5000000,
refund_window_days: 182,
regulation_acceptance_required: true
})
};
fetch('http://localhost/api/v1/events/{event}/registration-settings', 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}/registration-settings",
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([
'is_free' => true,
'external_registration_url' => '<string>',
'registration_opens_at' => '2023-11-07T05:31:56Z',
'registration_closes_at' => '2023-11-07T05:31:56Z',
'max_registrations' => 500000,
'hub_fee_percent' => 50,
'service_fee_cents' => 5000000,
'refund_window_days' => 182,
'regulation_acceptance_required' => true
]),
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 := "http://localhost/api/v1/events/{event}/registration-settings"
payload := strings.NewReader("{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\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("http://localhost/api/v1/events/{event}/registration-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/v1/events/{event}/registration-settings")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\n}"
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": {}
}Authorizations
API key do hub com escopo manage. Header: Authorization: Bearer <api_key>.
Path Parameters
Body
PUT /api/v1/events/{event}/registration-settings — config de venda do evento.
Espelha EventSales::saveStatus/saveExternalUrl (colunas em events).
Modo de venda do evento (Fase 02 Parte 03). - internal: vende no checkout do Eventor (lotes, cupons, etc.) - external: redireciona pro link de uma plataforma externa
internal, external 5001 <= x <= 10000000 <= x <= 1000 <= x <= 10000000Como a taxa de serviço (valor fixo por inscrição) do Hub é cobrada (Fase 02 Parte 05). embedded → sai do ingresso (organizador recebe menos; atleta não paga a mais); passed → repassada ao atleta (paga por cima; organizador não absorve a taxa fixa). Decisão 2026-06-01: no modo passed só a TAXA FIXA é repassada — o hub_fee_percent sempre sai do ingresso (organizador recebe ticket × (1 − hub_fee%)).
embedded, passed 0 <= x <= 365Response
JsonResource
Show child attributes
Show child attributes
curl --request PUT \
--url http://localhost/api/v1/events/{event}/registration-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_free": true,
"external_registration_url": "<string>",
"registration_opens_at": "2023-11-07T05:31:56Z",
"registration_closes_at": "2023-11-07T05:31:56Z",
"max_registrations": 500000,
"hub_fee_percent": 50,
"service_fee_cents": 5000000,
"refund_window_days": 182,
"regulation_acceptance_required": true
}
'import requests
url = "http://localhost/api/v1/events/{event}/registration-settings"
payload = {
"is_free": True,
"external_registration_url": "<string>",
"registration_opens_at": "2023-11-07T05:31:56Z",
"registration_closes_at": "2023-11-07T05:31:56Z",
"max_registrations": 500000,
"hub_fee_percent": 50,
"service_fee_cents": 5000000,
"refund_window_days": 182,
"regulation_acceptance_required": True
}
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({
is_free: true,
external_registration_url: '<string>',
registration_opens_at: '2023-11-07T05:31:56Z',
registration_closes_at: '2023-11-07T05:31:56Z',
max_registrations: 500000,
hub_fee_percent: 50,
service_fee_cents: 5000000,
refund_window_days: 182,
regulation_acceptance_required: true
})
};
fetch('http://localhost/api/v1/events/{event}/registration-settings', 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}/registration-settings",
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([
'is_free' => true,
'external_registration_url' => '<string>',
'registration_opens_at' => '2023-11-07T05:31:56Z',
'registration_closes_at' => '2023-11-07T05:31:56Z',
'max_registrations' => 500000,
'hub_fee_percent' => 50,
'service_fee_cents' => 5000000,
'refund_window_days' => 182,
'regulation_acceptance_required' => true
]),
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 := "http://localhost/api/v1/events/{event}/registration-settings"
payload := strings.NewReader("{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\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("http://localhost/api/v1/events/{event}/registration-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/v1/events/{event}/registration-settings")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_free\": true,\n \"external_registration_url\": \"<string>\",\n \"registration_opens_at\": \"2023-11-07T05:31:56Z\",\n \"registration_closes_at\": \"2023-11-07T05:31:56Z\",\n \"max_registrations\": 500000,\n \"hub_fee_percent\": 50,\n \"service_fee_cents\": 5000000,\n \"refund_window_days\": 182,\n \"regulation_acceptance_required\": true\n}"
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": {}
}