curl --request GET \
--url https://api-alpha.fourvenues.com/resellers/validate \
--header 'Authorization: <api-key>'import requests
url = "https://api-alpha.fourvenues.com/resellers/validate"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api-alpha.fourvenues.com/resellers/validate', 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-alpha.fourvenues.com/resellers/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api-alpha.fourvenues.com/resellers/validate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-alpha.fourvenues.com/resellers/validate")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-alpha.fourvenues.com/resellers/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "abcdefghijk1234567890",
"barcode": "ABCD1234",
"valid": true,
"swappable": true,
"event": {
"id": "abcdefghijk1234567890",
"name": "Saturdays at Ginger Klub",
"date_start": "2024-02-29T23:00:00.000Z",
"date_end": "2024-03-01T06:30:00.000Z",
"date_only": false
},
"type": {
"id": "abcdefghijk1234567890",
"name": "Entrada + 1 copa",
"date_start": "2024-01-30T18:15:00.000Z",
"date_end": "2024-01-30T18:30:00.000Z",
"date_only": false,
"price": "15",
"service_fee": "1.2",
"currency": "EUR"
}
}Validate reseller barcode
Validates a reseller’s barcode and checks if it’s valid and swappable.
A rule that blocks the resale is not an HTTP error. The barcode resolved, so the answer is 200 with swappable: false and an error naming the rule, and without event or type. Check swappable rather than the status code.
error | Meaning |
|---|---|
RESELL_NOT_ALLOWED | The ticket was already scanned, or its holder name was already changed. valid is false. |
RESELL_PENDING_NAME_CHANGE | A name change on the ticket is awaiting payment. |
RESELL_ALREADY_RESOLD | The ticket already came from a swap. A ticket can only be resold once. |
RESELL_NOT_SWAPPABLE | The ticket belongs to an organization your API key does not cover. |
When a ticket matches more than one rule, the first one in that order is the one reported.
curl --request GET \
--url https://api-alpha.fourvenues.com/resellers/validate \
--header 'Authorization: <api-key>'import requests
url = "https://api-alpha.fourvenues.com/resellers/validate"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api-alpha.fourvenues.com/resellers/validate', 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-alpha.fourvenues.com/resellers/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api-alpha.fourvenues.com/resellers/validate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-alpha.fourvenues.com/resellers/validate")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-alpha.fourvenues.com/resellers/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "abcdefghijk1234567890",
"barcode": "ABCD1234",
"valid": true,
"swappable": true,
"event": {
"id": "abcdefghijk1234567890",
"name": "Saturdays at Ginger Klub",
"date_start": "2024-02-29T23:00:00.000Z",
"date_end": "2024-03-01T06:30:00.000Z",
"date_only": false
},
"type": {
"id": "abcdefghijk1234567890",
"name": "Entrada + 1 copa",
"date_start": "2024-01-30T18:15:00.000Z",
"date_end": "2024-01-30T18:30:00.000Z",
"date_only": false,
"price": "15",
"service_fee": "1.2",
"currency": "EUR"
}
}Authorizations
Reseller API key, sent raw in the Authorization header: Authorization: rs_live_xxxxxxxxxxxxxxxx. Keys prefixed rs_test_ operate against the test environment. The same key serves v2 and the swap operations, and it only reaches the organizations Fourvenues authorized on it.
Query Parameters
The barcode (qrCode) to be validated
Response
Successful validation
"abcdefghijk1234567890"
"ABCD1234"
true
false when a rule blocks the resale. error then names the rule.
true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Only present when swappable is false.
RESELL_NOT_ALLOWED, RESELL_PENDING_NAME_CHANGE, RESELL_ALREADY_RESOLD, RESELL_NOT_SWAPPABLE "RESELL_ALREADY_RESOLD"