Mint redemption codes
curl --request POST \
--url https://openapi.orriven.com/v1/events/{eventId}/redemption-codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrationTypeId": "<string>",
"count": 250,
"code": "<string>",
"label": "<string>",
"maxUses": 500000,
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://openapi.orriven.com/v1/events/{eventId}/redemption-codes"
payload = {
"registrationTypeId": "<string>",
"count": 250,
"code": "<string>",
"label": "<string>",
"maxUses": 500000,
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrationTypeId: '<string>',
count: 250,
code: '<string>',
label: '<string>',
maxUses: 500000,
expiresAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://openapi.orriven.com/v1/events/{eventId}/redemption-codes', 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://openapi.orriven.com/v1/events/{eventId}/redemption-codes",
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([
'registrationTypeId' => '<string>',
'count' => 250,
'code' => '<string>',
'label' => '<string>',
'maxUses' => 500000,
'expiresAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://openapi.orriven.com/v1/events/{eventId}/redemption-codes"
payload := strings.NewReader("{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://openapi.orriven.com/v1/events/{eventId}/redemption-codes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.orriven.com/v1/events/{eventId}/redemption-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"redemptionCodes": [
{
"id": "<string>",
"eventId": "<string>",
"registrationTypeId": "<string>",
"code": "<string>",
"label": "<string>",
"maxUses": 123,
"uses": 123,
"status": "active",
"expiresAt": "<string>",
"createdAt": "<string>"
}
]
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}Redemption codes
Mint redemption codes
A code grants access to its ticket type, never a place — capacity and sale windows still apply. A custom code colliding with an existing one answers 409.
POST
/
v1
/
events
/
{eventId}
/
redemption-codes
Mint redemption codes
curl --request POST \
--url https://openapi.orriven.com/v1/events/{eventId}/redemption-codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrationTypeId": "<string>",
"count": 250,
"code": "<string>",
"label": "<string>",
"maxUses": 500000,
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://openapi.orriven.com/v1/events/{eventId}/redemption-codes"
payload = {
"registrationTypeId": "<string>",
"count": 250,
"code": "<string>",
"label": "<string>",
"maxUses": 500000,
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrationTypeId: '<string>',
count: 250,
code: '<string>',
label: '<string>',
maxUses: 500000,
expiresAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://openapi.orriven.com/v1/events/{eventId}/redemption-codes', 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://openapi.orriven.com/v1/events/{eventId}/redemption-codes",
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([
'registrationTypeId' => '<string>',
'count' => 250,
'code' => '<string>',
'label' => '<string>',
'maxUses' => 500000,
'expiresAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://openapi.orriven.com/v1/events/{eventId}/redemption-codes"
payload := strings.NewReader("{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://openapi.orriven.com/v1/events/{eventId}/redemption-codes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.orriven.com/v1/events/{eventId}/redemption-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"registrationTypeId\": \"<string>\",\n \"count\": 250,\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"maxUses\": 500000,\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"redemptionCodes": [
{
"id": "<string>",
"eventId": "<string>",
"registrationTypeId": "<string>",
"code": "<string>",
"label": "<string>",
"maxUses": 123,
"uses": 123,
"status": "active",
"expiresAt": "<string>",
"createdAt": "<string>"
}
]
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}{
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Event not found.",
"details": [
"<unknown>"
]
}
}Authorizations
The API key's secret (osk_…), shown once when the key is created in the console.
Path Parameters
Body
application/json
Response
The minted codes.
Show child attributes
Show child attributes
⌘I