Quote public event registration
Requires grouped-registration V2 to be enabled. Prices active available tickets/packages, promo discount, donation and optional fees in event currency; reserves no stock. Quote expires after five minutes. A waitlist offer credits pre-reserved matching ticket units. Check payment requires the event offline option and disables fee coverage.
curl --request POST \
--url https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote \
--header 'Content-Type: application/json' \
--data '
{
"tickets": [
{
"ticket_type_id": 42,
"quantity": 1
}
],
"sponsor_packages": [
{
"sponsor_package_id": 42,
"quantity": 1
}
],
"promo_code": "WELCOME",
"donation_amount": 25,
"cover_fees": false,
"payment_method": "card",
"currency": "USD",
"waitlist_offer_token": "issued-offer-token"
}
'import requests
url = "https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote"
payload = {
"tickets": [
{
"ticket_type_id": 42,
"quantity": 1
}
],
"sponsor_packages": [
{
"sponsor_package_id": 42,
"quantity": 1
}
],
"promo_code": "WELCOME",
"donation_amount": 25,
"cover_fees": False,
"payment_method": "card",
"currency": "USD",
"waitlist_offer_token": "issued-offer-token"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
tickets: [{ticket_type_id: 42, quantity: 1}],
sponsor_packages: [{sponsor_package_id: 42, quantity: 1}],
promo_code: 'WELCOME',
donation_amount: 25,
cover_fees: false,
payment_method: 'card',
currency: 'USD',
waitlist_offer_token: 'issued-offer-token'
})
};
fetch('https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote', 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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote",
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([
'tickets' => [
[
'ticket_type_id' => 42,
'quantity' => 1
]
],
'sponsor_packages' => [
[
'sponsor_package_id' => 42,
'quantity' => 1
]
],
'promo_code' => 'WELCOME',
'donation_amount' => 25,
'cover_fees' => false,
'payment_method' => 'card',
'currency' => 'USD',
'waitlist_offer_token' => 'issued-offer-token'
]),
CURLOPT_HTTPHEADER => [
"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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote"
payload := strings.NewReader("{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote")
.header("Content-Type", "application/json")
.body("{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quote_fingerprint": "sha256:1792497900:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"expires_at": "2026-10-20T12:00:00Z",
"currency": "USD",
"availability": {
"event_state": "open",
"admissions_requested": 42,
"admissions_remaining": 42
},
"lines": [
{
"source": "ticket",
"source_id": 42,
"label": "General admission",
"units": 42,
"admissions_per_unit": 42,
"admissions": 42,
"pre_reserved_units": 42,
"unit_amount": "25.00",
"fair_market_value": "25.00",
"subtotal": "25.00",
"discount": "25.00",
"total": "25.00",
"non_deductible": "25.00",
"snapshot": {
"name": "General admission",
"code": "Example",
"tier": "Example",
"registration_group_kind": "individual",
"group_label_prompt": "Example",
"attendee_details_timing": "checkout",
"admissions_per_unit": 42,
"unit_amount": "25.00",
"fair_market_value": "25.00"
}
}
],
"promo_code_id": 42,
"promo_code": "Example",
"subtotal": "25.00",
"discount": "25.00",
"fee_coverage": "25.00",
"donation": "25.00",
"tax_deductible": "25.00",
"non_deductible": "25.00",
"total": "25.00",
"attendee_slots": 42
}
}{
"message": "Not Found",
"status": "error"
}{
"message": "Inventory, quote, reservation or retry-key conflict.",
"error_code": "invalid_reference",
"details": {}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}Headers
Invitation capability required to reach an invite-only event; invite_token input is an alternative.
"issued-invitation-token"
An active waitlist offer can authorize the invite-only page; waitlist_offer_token input is an alternative.
"issued-offer-token"
Path Parameters
Public organization slug or numeric ID.
"example-foundation"
Event slug within the organization.
"annual-gala"
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Active event promo code; validity/redemption limits apply.
80"WELCOME"
Optional donation add-on, suppressed when event settings disable it.
0 <= x <= 99999999.9925
Request server-calculated V2 fee coverage; ignored for check payment.
false
Selected payment method; check disables fee coverage.
card, paypal, check, offline, cash, free, null "card"
Three-character hint; event currency determines the quote.
3"USD"
Valid waitlist offer capability for the matching ticket and exact offered quantity.
128"issued-offer-token"
Response
Quote public event registration completed.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote \
--header 'Content-Type: application/json' \
--data '
{
"tickets": [
{
"ticket_type_id": 42,
"quantity": 1
}
],
"sponsor_packages": [
{
"sponsor_package_id": 42,
"quantity": 1
}
],
"promo_code": "WELCOME",
"donation_amount": 25,
"cover_fees": false,
"payment_method": "card",
"currency": "USD",
"waitlist_offer_token": "issued-offer-token"
}
'import requests
url = "https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote"
payload = {
"tickets": [
{
"ticket_type_id": 42,
"quantity": 1
}
],
"sponsor_packages": [
{
"sponsor_package_id": 42,
"quantity": 1
}
],
"promo_code": "WELCOME",
"donation_amount": 25,
"cover_fees": False,
"payment_method": "card",
"currency": "USD",
"waitlist_offer_token": "issued-offer-token"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
tickets: [{ticket_type_id: 42, quantity: 1}],
sponsor_packages: [{sponsor_package_id: 42, quantity: 1}],
promo_code: 'WELCOME',
donation_amount: 25,
cover_fees: false,
payment_method: 'card',
currency: 'USD',
waitlist_offer_token: 'issued-offer-token'
})
};
fetch('https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote', 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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote",
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([
'tickets' => [
[
'ticket_type_id' => 42,
'quantity' => 1
]
],
'sponsor_packages' => [
[
'sponsor_package_id' => 42,
'quantity' => 1
]
],
'promo_code' => 'WELCOME',
'donation_amount' => 25,
'cover_fees' => false,
'payment_method' => 'card',
'currency' => 'USD',
'waitlist_offer_token' => 'issued-offer-token'
]),
CURLOPT_HTTPHEADER => [
"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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote"
payload := strings.NewReader("{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote")
.header("Content-Type", "application/json")
.body("{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/frontend/public/events/{clientSlugOrId}/{eventSlug}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"tickets\": [\n {\n \"ticket_type_id\": 42,\n \"quantity\": 1\n }\n ],\n \"sponsor_packages\": [\n {\n \"sponsor_package_id\": 42,\n \"quantity\": 1\n }\n ],\n \"promo_code\": \"WELCOME\",\n \"donation_amount\": 25,\n \"cover_fees\": false,\n \"payment_method\": \"card\",\n \"currency\": \"USD\",\n \"waitlist_offer_token\": \"issued-offer-token\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quote_fingerprint": "sha256:1792497900:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"expires_at": "2026-10-20T12:00:00Z",
"currency": "USD",
"availability": {
"event_state": "open",
"admissions_requested": 42,
"admissions_remaining": 42
},
"lines": [
{
"source": "ticket",
"source_id": 42,
"label": "General admission",
"units": 42,
"admissions_per_unit": 42,
"admissions": 42,
"pre_reserved_units": 42,
"unit_amount": "25.00",
"fair_market_value": "25.00",
"subtotal": "25.00",
"discount": "25.00",
"total": "25.00",
"non_deductible": "25.00",
"snapshot": {
"name": "General admission",
"code": "Example",
"tier": "Example",
"registration_group_kind": "individual",
"group_label_prompt": "Example",
"attendee_details_timing": "checkout",
"admissions_per_unit": 42,
"unit_amount": "25.00",
"fair_market_value": "25.00"
}
}
],
"promo_code_id": 42,
"promo_code": "Example",
"subtotal": "25.00",
"discount": "25.00",
"fee_coverage": "25.00",
"donation": "25.00",
"tax_deductible": "25.00",
"non_deductible": "25.00",
"total": "25.00",
"attendee_slots": 42
}
}{
"message": "Not Found",
"status": "error"
}{
"message": "Inventory, quote, reservation or retry-key conflict.",
"error_code": "invalid_reference",
"details": {}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}