Skip to main content
POST
/
events
/
waitlist
/
claim
Claim Waitlist Spot via Signed Link
curl --request POST \
  --url https://api.marzipan.co/v1/events/waitlist/claim \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "eventWaitlist": "1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b",
  "expires": "1786000000",
  "signature": "9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978",
  "cartId": "893ff86d-4453-4134-9f62-5c9b7a70d74e"
}
'
import requests

url = "https://api.marzipan.co/v1/events/waitlist/claim"

payload = {
"eventWaitlist": "1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b",
"expires": "1786000000",
"signature": "9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978",
"cartId": "893ff86d-4453-4134-9f62-5c9b7a70d74e"
}
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({
eventWaitlist: '1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b',
expires: '1786000000',
signature: '9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978',
cartId: '893ff86d-4453-4134-9f62-5c9b7a70d74e'
})
};

fetch('https://api.marzipan.co/v1/events/waitlist/claim', 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.marzipan.co/v1/events/waitlist/claim",
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([
'eventWaitlist' => '1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b',
'expires' => '1786000000',
'signature' => '9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978',
'cartId' => '893ff86d-4453-4134-9f62-5c9b7a70d74e'
]),
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://api.marzipan.co/v1/events/waitlist/claim"

payload := strings.NewReader("{\n \"eventWaitlist\": \"1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b\",\n \"expires\": \"1786000000\",\n \"signature\": \"9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978\",\n \"cartId\": \"893ff86d-4453-4134-9f62-5c9b7a70d74e\"\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://api.marzipan.co/v1/events/waitlist/claim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventWaitlist\": \"1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b\",\n \"expires\": \"1786000000\",\n \"signature\": \"9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978\",\n \"cartId\": \"893ff86d-4453-4134-9f62-5c9b7a70d74e\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.marzipan.co/v1/events/waitlist/claim")

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 \"eventWaitlist\": \"1a2b3c4d-5e6f-4071-8a9b-0c1d2e3f4a5b\",\n \"expires\": \"1786000000\",\n \"signature\": \"9f8e7d6c5b4a3928170615243342515e6d7c8b9a0f1e2d3c4b5a6978\",\n \"cartId\": \"893ff86d-4453-4134-9f62-5c9b7a70d74e\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "893ff86d-4453-4134-9f62-5c9b7a70d74e",
  "email": "alex@example.com",
  "subtotal": 80,
  "grandTotal": 80
}
{
"message": "The event waitlist field is required.",
"errors": {
"eventWaitlist": [
"The event waitlist field is required."
]
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API token.

Body

application/json
eventWaitlist
string<uuid>
required

The identifier of the waitlist entry.

expires
string
required

The expiry timestamp from the signed URL.

signature
string
required

The signature from the signed URL.

cartId
string<uuid>

An existing cart to add the event to. If omitted, a new cart is created.

Response

The waitlist spot was claimed and the event added to the cart.

The cart resource with the event added.

id
string<uuid>
email
string<email>
subtotal
number
grandTotal
number