Dokumentacja API
Share kit
The share kit's leaderboard.
#Get the share kit leaderboard
GET/events/{eventId}/share-kit/leaderboard
Gets who spread the word best: speakers and sponsors by name with the clicks, orders and tickets their link or code brought, and attendees together.
- Uprawnienia
- sharekit:read
- Moduł
sharekitOdrzucane z kodem moduleOff, gdy organizator wydarzenia wyłączył ten moduł.
Parametry
ścieżka
eventIdstring (uuid)wymaganeThe event's id.
zapytanie
limitinteger (int32)How many rows, up to 100.
Domyślnie:
25
Odpowiedzi
- 200 The leaderboard. ShareLeaderboard
Pola
eventIdstring (uuid)The event's id.
currencystringISO 4217.
dataobject[]The rows, most tickets first.
Pokaż pola
rankinteger (int32)Its place.
kindstringSpeaker or sponsor.
namestringTheir name.
codestring lub nullTheir personal discount code.
clicksinteger (int32)Clicks on their link.
ordersByLinkinteger (int32)Orders through their link.
ordersByCodeinteger (int32)Orders with their code.
ordersinteger (int32)Orders in all.
ticketsinteger (int32)Tickets in them.
revenuenumberWhat they came to. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.
postsinteger (int32)Posts made from the kit.
attendeesobjectEvery attendee who shared, together.
Pokaż pola
ambassadorsinteger (int32)How many shared.
clicksinteger (int32)Clicks.
ordersinteger (int32)Orders.
ticketsinteger (int32)Tickets.
revenuenumberRevenue. With the currency's own decimals: 147.00 in EUR, 147 in JPY, 147.000 in KWD.
- 401 invalidKey, keyExpired, keyRevoked.
- 403 missingScope.
- 404 eventNotFound.
- 409 moduleOff.
- 429 rateLimited.
Odmowy
invalidKey keyExpired keyRevoked rateLimited missingScope moduleOff eventNotFound
Żądanie
curl "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard?limit=2" \
-H "Authorization: Bearer $ATTENDBEACON_KEY"const response = await fetch("https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard?limit=2", {
headers: {
Authorization: `Bearer ${process.env.ATTENDBEACON_KEY}`
}
});
if (!response.ok) throw new Error((await response.json()).detail);
const data = await response.json();using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ATTENDBEACON_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard?limit=2");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();import os
import requests
response = requests.get(
"https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard", params={"limit": 2},
headers={
"Authorization": f"Bearer {os.environ['ATTENDBEACON_KEY']}"
}
)
response.raise_for_status()
data = response.json()$headers = @{
Authorization = "Bearer $env:ATTENDBEACON_KEY"
}
$data = Invoke-RestMethod -Method Get -Uri "https://attendbeacon.com/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard?limit=2" -Headers $headers200 Przykładowa odpowiedź
{
"eventId": "b3ac0000-0000-4000-8000-000000000001",
"currency": "EUR",
"data": [
{
"rank": 1,
"kind": "speaker",
"name": "Ada Verhoeven",
"code": "ADA150",
"clicks": 447,
"ordersByLink": 8,
"ordersByCode": 0,
"orders": 8,
"tickets": 8,
"revenue": 1580,
"posts": 1
},
{
"rank": 2,
"kind": "sponsor",
"name": "Northwind Cloud",
"code": "NORTHWIND150",
"clicks": 230,
"ordersByLink": 5,
"ordersByCode": 0,
"orders": 5,
"tickets": 5,
"revenue": 395,
"posts": 0
}
],
"attendees": {
"ambassadors": 3,
"clicks": 21,
"orders": 0,
"tickets": 0,
"revenue": 0
}
}401 invalidKey, keyExpired, keyRevoked.
{
"type": "https://attendbeacon.com/developers/errors#invalidKey",
"title": "No working API key",
"status": 401,
"detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
"instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/share-kit/leaderboard",
"code": "invalidKey",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
}Przewodniki i ta witryna są w twoim języku. Opisy w samej dokumentacji API są po angielsku, tak jak mówi samo API.