Validate ticket discount code
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}', 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/discount-codes/tickets/validate/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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/discount-codes/tickets/validate/{code}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "abc123discount",
"organizationId": "org123456789",
"eventId": "event987654321",
"code": "WELCOME2025",
"fixedAmount": 5,
"percentage": 20,
"minAmount": 30,
"minUnits": 2,
"maxUnits": 10,
"maxRedeems": 1,
"maxSales": 50
}
],
"success": true
}Discount Codes
Validate ticket discount code
Validate ticket discount code
POST
/
discount-codes
/
tickets
/
validate
/
{code}
Validate ticket discount code
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}', 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/discount-codes/tickets/validate/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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/discount-codes/tickets/validate/{code}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/discount-codes/tickets/validate/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "abc123discount",
"organizationId": "org123456789",
"eventId": "event987654321",
"code": "WELCOME2025",
"fixedAmount": 5,
"percentage": 20,
"minAmount": 30,
"minUnits": 2,
"maxUnits": 10,
"maxRedeems": 1,
"maxSales": 50
}
],
"success": true
}Authorizations
Path Parameters
The code of the discount
Query Parameters
The unique ID of the rate this discount will be applied to
The total price of the supplements selected by the user
The number of tickets selected by the user
⌘I