Update a ticket type
curl --request PATCH \
--url https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"capacity": 500000,
"allowWaitlist": true,
"isPublic": true,
"requiresApproval": true,
"opensAt": "2023-11-07T05:31:56Z",
"closesAt": "2023-11-07T05:31:56Z",
"priceAmount": 50000000,
"sortOrder": 5000
}
'import requests
url = "https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}"
payload = {
"name": "<string>",
"description": "<string>",
"capacity": 500000,
"allowWaitlist": True,
"isPublic": True,
"requiresApproval": True,
"opensAt": "2023-11-07T05:31:56Z",
"closesAt": "2023-11-07T05:31:56Z",
"priceAmount": 50000000,
"sortOrder": 5000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
capacity: 500000,
allowWaitlist: true,
isPublic: true,
requiresApproval: true,
opensAt: '2023-11-07T05:31:56Z',
closesAt: '2023-11-07T05:31:56Z',
priceAmount: 50000000,
sortOrder: 5000
})
};
fetch('https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}', 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}/ticket-types/{typeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'capacity' => 500000,
'allowWaitlist' => true,
'isPublic' => true,
'requiresApproval' => true,
'opensAt' => '2023-11-07T05:31:56Z',
'closesAt' => '2023-11-07T05:31:56Z',
'priceAmount' => 50000000,
'sortOrder' => 5000
]),
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}/ticket-types/{typeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"eventId": "<string>",
"name": "<string>",
"description": "<string>",
"capacity": 123,
"allowWaitlist": true,
"isPublic": true,
"requiresApproval": true,
"status": "draft",
"opensAt": "<string>",
"closesAt": "<string>",
"priceAmount": 123,
"sortOrder": 123,
"counts": {
"confirmed": 123,
"waitlisted": 123
},
"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>"
]
}
}Ticket types
Update a ticket type
Statuses move draft → open ⇄ closed → archived; repricing never rewrites sold orders. There is no DELETE — a ticket type’s life ends at archived.
PATCH
/
v1
/
events
/
{eventId}
/
ticket-types
/
{typeId}
Update a ticket type
curl --request PATCH \
--url https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"capacity": 500000,
"allowWaitlist": true,
"isPublic": true,
"requiresApproval": true,
"opensAt": "2023-11-07T05:31:56Z",
"closesAt": "2023-11-07T05:31:56Z",
"priceAmount": 50000000,
"sortOrder": 5000
}
'import requests
url = "https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}"
payload = {
"name": "<string>",
"description": "<string>",
"capacity": 500000,
"allowWaitlist": True,
"isPublic": True,
"requiresApproval": True,
"opensAt": "2023-11-07T05:31:56Z",
"closesAt": "2023-11-07T05:31:56Z",
"priceAmount": 50000000,
"sortOrder": 5000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
capacity: 500000,
allowWaitlist: true,
isPublic: true,
requiresApproval: true,
opensAt: '2023-11-07T05:31:56Z',
closesAt: '2023-11-07T05:31:56Z',
priceAmount: 50000000,
sortOrder: 5000
})
};
fetch('https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}', 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}/ticket-types/{typeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'capacity' => 500000,
'allowWaitlist' => true,
'isPublic' => true,
'requiresApproval' => true,
'opensAt' => '2023-11-07T05:31:56Z',
'closesAt' => '2023-11-07T05:31:56Z',
'priceAmount' => 50000000,
'sortOrder' => 5000
]),
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}/ticket-types/{typeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.orriven.com/v1/events/{eventId}/ticket-types/{typeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"capacity\": 500000,\n \"allowWaitlist\": true,\n \"isPublic\": true,\n \"requiresApproval\": true,\n \"opensAt\": \"2023-11-07T05:31:56Z\",\n \"closesAt\": \"2023-11-07T05:31:56Z\",\n \"priceAmount\": 50000000,\n \"sortOrder\": 5000\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"eventId": "<string>",
"name": "<string>",
"description": "<string>",
"capacity": 123,
"allowWaitlist": true,
"isPublic": true,
"requiresApproval": true,
"status": "draft",
"opensAt": "<string>",
"closesAt": "<string>",
"priceAmount": 123,
"sortOrder": 123,
"counts": {
"confirmed": 123,
"waitlisted": 123
},
"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>"
]
}
}授权
The API key's secret (osk_…), shown once when the key is created in the console.
请求体
application/json
Required string length:
1 - 200Maximum string length:
2000必填范围:
1 <= x <= 1000000必填范围:
0 <= x <= 100000000可用选项:
draft, open, closed, archived 必填范围:
0 <= x <= 10000响应
The updated ticket type.
可用选项:
draft, open, closed, archived Show child attributes
Show child attributes
⌘I