Create ticket
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"total_price": 10,
"qr_code": "ABCDE12345",
"fee": 1,
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"warranty": {
"enabled": true,
"hours": 12
},
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1643064796675",
"price": 12,
"quantity": 1
}
]
}
],
"discount_code": "DISCOUNT_CODE",
"send_resources": true
}
'import requests
url = "https://channels-service-alpha.fourvenues.com/tickets"
payload = {
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"total_price": 10,
"qr_code": "ABCDE12345",
"fee": 1,
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"warranty": {
"enabled": True,
"hours": 12
},
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1643064796675",
"price": 12,
"quantity": 1
}
]
}
],
"discount_code": "DISCOUNT_CODE",
"send_resources": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ticket_rate_id: '5f8d0f8b9d2b3b0017b6d8a0',
tickets: [
{
price_id: '1234567890',
total_price: 10,
qr_code: 'ABCDE12345',
fee: 1,
full_name: 'John Doe',
phone: '+34666666666',
email: 'john@fourvenues.com',
birthday: '1990-01-01',
address: '123 Main St, New York, NY 10001',
postal_code: '10001',
country_code: 'ES',
personal_document_type: 'dni',
personal_document_number: '1234567890',
warranty: {enabled: true, hours: 12},
answers: [{question_id: '1234567890', answer: 'Answer'}],
supplements: [{supplement_id: '1643064796675', price: 12, quantity: 1}]
}
],
discount_code: 'DISCOUNT_CODE',
send_resources: true
})
};
fetch('https://channels-service-alpha.fourvenues.com/tickets', 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://channels-service-alpha.fourvenues.com/tickets",
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([
'ticket_rate_id' => '5f8d0f8b9d2b3b0017b6d8a0',
'tickets' => [
[
'price_id' => '1234567890',
'total_price' => 10,
'qr_code' => 'ABCDE12345',
'fee' => 1,
'full_name' => 'John Doe',
'phone' => '+34666666666',
'email' => 'john@fourvenues.com',
'birthday' => '1990-01-01',
'address' => '123 Main St, New York, NY 10001',
'postal_code' => '10001',
'country_code' => 'ES',
'personal_document_type' => 'dni',
'personal_document_number' => '1234567890',
'warranty' => [
'enabled' => true,
'hours' => 12
],
'answers' => [
[
'question_id' => '1234567890',
'answer' => 'Answer'
]
],
'supplements' => [
[
'supplement_id' => '1643064796675',
'price' => 12,
'quantity' => 1
]
]
]
],
'discount_code' => 'DISCOUNT_CODE',
'send_resources' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://channels-service-alpha.fourvenues.com/tickets"
payload := strings.NewReader("{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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://channels-service-alpha.fourvenues.com/tickets")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "5f8d0f8b9d2b3b0017b6d8a0",
"event_id": "5f8d0f8b9d2b3b0017b6d8a0",
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"qr_code": "ABCDE12345",
"status": "active",
"price": {
"price": 12,
"valid_until": "2022-01-01T00:00:00.000Z",
"quantity": 0,
"includes": "1 Drink",
"additional_info": "Only valid before 2:00 am.",
"_id": "1643064796675",
"name": "Early Bird",
"fee_type": "percentage",
"fee_quantity": 10,
"used": "55"
},
"payment_currency": "EUR",
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"fees": {
"organization": 1.1,
"discocil": 0.7
},
"full_name": "John Doe",
"phone": "1234567890",
"email": "john.appleseed@fourvenues.com",
"gender": 0,
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"_id": "1643064796675",
"supplement_id": "1643064796675",
"label": "1 Copa",
"price": 12,
"has_fake_price": true,
"fake_price": 15,
"description": "Includes one drink at the bar",
"total_price": 24,
"supplement_units": 2,
"product_quantity": 4,
"redemption_deadline_value": 1798851600
}
],
"refunded": 10,
"refunded_at": "2020-10-19T07:00:00.000Z",
"refunds": [
{
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"amount": 10,
"at": "2020-10-19T07:00:00.000Z"
}
],
"for": 1,
"enter": 1,
"entry_time": "2022-07-19T07:00:00.000Z",
"total_supplements": 2,
"supplements_service_charge_total": 0.6,
"total_fees": 1.1,
"total_price": 16.1,
"warranty": {
"total": 1,
"hours": 12,
"cost": 0.2
},
"discount_amount": 5
}
],
"success": true
}Tickets
Create ticket
Creates one or more active tickets (external gateway). Supplements require supplement_id and price per unit; optional quantity applies purchase_limit validation after collapsing duplicate supplement_id entries. For external payments, you may also send service_charge_amount (absolute amount per unit) for a supplement; it will be stored separately as service_charge_amount/service_charge_type=fixed and added into the stored unit price. Free supplements from the ticket rate are NOT auto-added here; the selection must be provided by the client.
POST
/
tickets
Create ticket
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"total_price": 10,
"qr_code": "ABCDE12345",
"fee": 1,
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"warranty": {
"enabled": true,
"hours": 12
},
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1643064796675",
"price": 12,
"quantity": 1
}
]
}
],
"discount_code": "DISCOUNT_CODE",
"send_resources": true
}
'import requests
url = "https://channels-service-alpha.fourvenues.com/tickets"
payload = {
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"total_price": 10,
"qr_code": "ABCDE12345",
"fee": 1,
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"warranty": {
"enabled": True,
"hours": 12
},
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1643064796675",
"price": 12,
"quantity": 1
}
]
}
],
"discount_code": "DISCOUNT_CODE",
"send_resources": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ticket_rate_id: '5f8d0f8b9d2b3b0017b6d8a0',
tickets: [
{
price_id: '1234567890',
total_price: 10,
qr_code: 'ABCDE12345',
fee: 1,
full_name: 'John Doe',
phone: '+34666666666',
email: 'john@fourvenues.com',
birthday: '1990-01-01',
address: '123 Main St, New York, NY 10001',
postal_code: '10001',
country_code: 'ES',
personal_document_type: 'dni',
personal_document_number: '1234567890',
warranty: {enabled: true, hours: 12},
answers: [{question_id: '1234567890', answer: 'Answer'}],
supplements: [{supplement_id: '1643064796675', price: 12, quantity: 1}]
}
],
discount_code: 'DISCOUNT_CODE',
send_resources: true
})
};
fetch('https://channels-service-alpha.fourvenues.com/tickets', 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://channels-service-alpha.fourvenues.com/tickets",
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([
'ticket_rate_id' => '5f8d0f8b9d2b3b0017b6d8a0',
'tickets' => [
[
'price_id' => '1234567890',
'total_price' => 10,
'qr_code' => 'ABCDE12345',
'fee' => 1,
'full_name' => 'John Doe',
'phone' => '+34666666666',
'email' => 'john@fourvenues.com',
'birthday' => '1990-01-01',
'address' => '123 Main St, New York, NY 10001',
'postal_code' => '10001',
'country_code' => 'ES',
'personal_document_type' => 'dni',
'personal_document_number' => '1234567890',
'warranty' => [
'enabled' => true,
'hours' => 12
],
'answers' => [
[
'question_id' => '1234567890',
'answer' => 'Answer'
]
],
'supplements' => [
[
'supplement_id' => '1643064796675',
'price' => 12,
'quantity' => 1
]
]
]
],
'discount_code' => 'DISCOUNT_CODE',
'send_resources' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://channels-service-alpha.fourvenues.com/tickets"
payload := strings.NewReader("{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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://channels-service-alpha.fourvenues.com/tickets")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticket_rate_id\": \"5f8d0f8b9d2b3b0017b6d8a0\",\n \"tickets\": [\n {\n \"price_id\": \"1234567890\",\n \"total_price\": 10,\n \"qr_code\": \"ABCDE12345\",\n \"fee\": 1,\n \"full_name\": \"John Doe\",\n \"phone\": \"+34666666666\",\n \"email\": \"john@fourvenues.com\",\n \"birthday\": \"1990-01-01\",\n \"address\": \"123 Main St, New York, NY 10001\",\n \"postal_code\": \"10001\",\n \"country_code\": \"ES\",\n \"personal_document_type\": \"dni\",\n \"personal_document_number\": \"1234567890\",\n \"warranty\": {\n \"enabled\": true,\n \"hours\": 12\n },\n \"answers\": [\n {\n \"question_id\": \"1234567890\",\n \"answer\": \"Answer\"\n }\n ],\n \"supplements\": [\n {\n \"supplement_id\": \"1643064796675\",\n \"price\": 12,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"discount_code\": \"DISCOUNT_CODE\",\n \"send_resources\": true\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "5f8d0f8b9d2b3b0017b6d8a0",
"event_id": "5f8d0f8b9d2b3b0017b6d8a0",
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"qr_code": "ABCDE12345",
"status": "active",
"price": {
"price": 12,
"valid_until": "2022-01-01T00:00:00.000Z",
"quantity": 0,
"includes": "1 Drink",
"additional_info": "Only valid before 2:00 am.",
"_id": "1643064796675",
"name": "Early Bird",
"fee_type": "percentage",
"fee_quantity": 10,
"used": "55"
},
"payment_currency": "EUR",
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"fees": {
"organization": 1.1,
"discocil": 0.7
},
"full_name": "John Doe",
"phone": "1234567890",
"email": "john.appleseed@fourvenues.com",
"gender": 0,
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"_id": "1643064796675",
"supplement_id": "1643064796675",
"label": "1 Copa",
"price": 12,
"has_fake_price": true,
"fake_price": 15,
"description": "Includes one drink at the bar",
"total_price": 24,
"supplement_units": 2,
"product_quantity": 4,
"redemption_deadline_value": 1798851600
}
],
"refunded": 10,
"refunded_at": "2020-10-19T07:00:00.000Z",
"refunds": [
{
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"amount": 10,
"at": "2020-10-19T07:00:00.000Z"
}
],
"for": 1,
"enter": 1,
"entry_time": "2022-07-19T07:00:00.000Z",
"total_supplements": 2,
"supplements_service_charge_total": 0.6,
"total_fees": 1.1,
"total_price": 16.1,
"warranty": {
"total": 1,
"hours": 12,
"cost": 0.2
},
"discount_amount": 5
}
],
"success": true
}Authorizations
Body
application/json
⌘I