Validate booking discount code
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/discount-codes/bookings/validate/{code} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://channels-service-alpha.fourvenues.com/discount-codes/bookings/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/bookings/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/bookings/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/bookings/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/bookings/validate/{code}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/discount-codes/bookings/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 booking discount code
Validate booking discount code
POST
/
discount-codes
/
bookings
/
validate
/
{code}
Validate booking discount code
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/discount-codes/bookings/validate/{code} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://channels-service-alpha.fourvenues.com/discount-codes/bookings/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/bookings/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/bookings/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/bookings/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/bookings/validate/{code}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/discount-codes/bookings/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
Event id the discount code belongs to
Rate id the discount is being applied to
Quantity of people the booking is for
⌘I