BackstageClient
@ticketlayer/backstage / BackstageClient
Class: BackstageClient
Defined in: client.ts:381
Constructors
Constructor
new BackstageClient(config: BackstageClientConfig): BackstageClient;
Defined in: client.ts:394
Parameters
| Parameter | Type |
|---|---|
config | BackstageClientConfig |
Returns
BackstageClient
Methods
clearAccessToken()
clearAccessToken(): void;
Defined in: client.ts:449
Clear the access token
Returns
void
getAccessToken()
getAccessToken(): string | undefined;
Defined in: client.ts:456
Get the current access token
Returns
string | undefined
getRefreshToken()
getRefreshToken(): string | undefined;
Defined in: client.ts:470
Get the current refresh token
Returns
string | undefined
setAccessToken()
setAccessToken(token: string): void;
Defined in: client.ts:442
Set the access token for authenticated requests
Parameters
| Parameter | Type |
|---|---|
token | string |
Returns
void
setRefreshToken()
setRefreshToken(token: string): void;
Defined in: client.ts:463
Set the refresh token
Parameters
| Parameter | Type |
|---|---|
token | string |
Returns
void
Properties
accounts
accounts: {
create: (request: {
name: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
delete: (id: string) => Promise<{
id: string;
success: boolean;
}>;
get: (id: string) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
list: (options?: {
search?: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}[]>;
update: (id: string, request: {
name?: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
};
Defined in: client.ts:973
Accounts methods
create()
create: (request: {
name: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
Create account Create a new account in the organisation
Parameters
| Parameter | Type |
|---|---|
request | { name: string; status?: "active" | "inactive"; } |
request.name | string |
request.status? | "active" | "inactive" |
Returns
Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>
Operation Id
createAccount
delete()
delete: (id: string) => Promise<{
id: string;
success: boolean;
}>;
Delete account Delete an account (soft delete)
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
id: string;
success: boolean;
}>
Operation Id
deleteAccount
get()
get: (id: string) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
Get account Get a specific account by ID
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>
Operation Id
getAccount
list()
list: (options?: {
search?: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}[]>;
List accounts List all accounts for the organisation with optional filtering
Parameters
| Parameter | Type |
|---|---|
options? | { search?: string; status?: "active" | "inactive"; } |
options.search? | string |
options.status? | "active" | "inactive" |
Returns
Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}[]>
Operation Id
listAccounts
update()
update: (id: string, request: {
name?: string;
status?: "active" | "inactive";
}) => Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>;
Update account Update an existing account
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { name?: string; status?: "active" | "inactive"; } |
request.name? | string |
request.status? | "active" | "inactive" |
Returns
Promise<{
createdAt: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
status: "active" | "inactive";
updatedAt: string;
}>
Operation Id
updateAccount
assets()
assets: (assetId: string) => {
assets: {
delete: (id: string) => Promise<boolean>;
get: (id: string) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
list: (options?: {
accountId?: string;
ownerId?: string;
ownerType?: string;
purpose?: string;
q?: string;
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}[]>;
upload: (request: {
accountId?: string;
cdn?: any;
name?: string;
ownerId?: string;
ownerType?: string;
purpose?: | "event_image"
| "organisation_logo"
| "account_logo"
| "user_avatar"
| "ticket_template_asset"
| "rendered_pass"
| "rendered_receipt"
| "export"
| "other";
visibility?: "public" | "private";
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
};
};
Defined in: client.ts:4278
assets methods Use assets() to access nested resources: assets(id).assets
Parameters
| Parameter | Type |
|---|---|
assetId | string |
Returns
{
assets: {
delete: (id: string) => Promise<boolean>;
get: (id: string) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
list: (options?: {
accountId?: string;
ownerId?: string;
ownerType?: string;
purpose?: string;
q?: string;
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}[]>;
upload: (request: {
accountId?: string;
cdn?: any;
name?: string;
ownerId?: string;
ownerType?: string;
purpose?: | "event_image"
| "organisation_logo"
| "account_logo"
| "user_avatar"
| "ticket_template_asset"
| "rendered_pass"
| "rendered_receipt"
| "export"
| "other";
visibility?: "public" | "private";
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
};
}
assets
assets: {
delete: (id: string) => Promise<boolean>;
get: (id: string) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
list: (options?: {
accountId?: string;
ownerId?: string;
ownerType?: string;
purpose?: string;
q?: string;
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}[]>;
upload: (request: {
accountId?: string;
cdn?: any;
name?: string;
ownerId?: string;
ownerType?: string;
purpose?: | "event_image"
| "organisation_logo"
| "account_logo"
| "user_avatar"
| "ticket_template_asset"
| "rendered_pass"
| "rendered_receipt"
| "export"
| "other";
visibility?: "public" | "private";
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
};
assets.delete()
delete: (id: string) => Promise<boolean>;
Delete an asset Soft-delete a tracked asset (bytes are left in storage for later GC).
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Operation Id
deleteAsset
assets.get()
get: (id: string) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
Get an asset Get a tracked asset by id.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>
Operation Id
getAsset
assets.list()
list: (options?: {
accountId?: string;
ownerId?: string;
ownerType?: string;
purpose?: string;
q?: string;
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}[]>;
List assets List the organisation's tracked assets (uploads + renders). Filter by purpose/owner.
Parameters
| Parameter | Type |
|---|---|
options? | { accountId?: string; ownerId?: string; ownerType?: string; purpose?: string; q?: string; } |
options.accountId? | string |
options.ownerId? | string |
options.ownerType? | string |
options.purpose? | string |
options.q? | string |
Returns
Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}[]>
Operation Id
listAssets
assets.upload()
upload: (request: {
accountId?: string;
cdn?: any;
name?: string;
ownerId?: string;
ownerType?: string;
purpose?: | "event_image"
| "organisation_logo"
| "account_logo"
| "user_avatar"
| "ticket_template_asset"
| "rendered_pass"
| "rendered_receipt"
| "export"
| "other";
visibility?: "public" | "private";
}) => Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>;
Upload an asset Upload a file (multipart/form-data; field "file") to central storage and track it. Metadata fields (purpose, ownerType, ownerId, accountId, visibility, cdn) accompany the file.
Parameters
| Parameter | Type |
|---|---|
request | { accountId?: string; cdn?: any; name?: string; ownerId?: string; ownerType?: string; purpose?: | "event_image" | "organisation_logo" | "account_logo" | "user_avatar" | "ticket_template_asset" | "rendered_pass" | "rendered_receipt" | "export" | "other"; visibility?: "public" | "private"; } |
request.accountId? | string |
request.cdn? | any |
request.name? | string |
request.ownerId? | string |
request.ownerType? | string |
request.purpose? | | "event_image" | "organisation_logo" | "account_logo" | "user_avatar" | "ticket_template_asset" | "rendered_pass" | "rendered_receipt" | "export" | "other" |
request.visibility? | "public" | "private" |
Returns
Promise<{
accountId: string | null;
cdn: boolean;
cdnUrl: string | null;
contentType: string;
createdAt: string;
filename: string | null;
id: string;
metadata: {
[key: string]: unknown;
};
name: string | null;
organisationId: string;
ownerId: string | null;
ownerType: string | null;
purpose: string;
sizeBytes: number;
storageBucket: string | null;
storageDriver: string;
storageKey: string;
updatedAt: string;
uploadedBy: string | null;
url: string;
visibility: string;
}>
Operation Id
uploadAsset
authentication
authentication: {
federate: (request: {
token: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
login: (request: {
email: string;
password: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
redeem: (request: {
code: string;
password: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
refresh: (request: {
refreshToken: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
}>;
};
Defined in: client.ts:801
Authentication methods
federate()
federate: (request: {
token: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
Federate user to organisation Exchange a Stagedoor JWT token for API access and refresh tokens
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { token: string; } | - |
request.token | string | Description Stagedoor JWT token to federate Example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
Returns
Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>
Operation Id
federate
login()
login: (request: {
email: string;
password: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
User login Authenticate a user with email and password, returns access and refresh tokens
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { email: string; password: string; } | - |
request.email | string | Format: email Description User email address Example user@example.com |
request.password | string | Description User password Example password123 |
Returns
Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>
Operation Id
login
redeem()
redeem: (request: {
code: string;
password: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>;
Redeem invitation Redeem an invitation code and set up a new user account
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { code: string; password: string; } | - |
request.code | string | Description Invitation code received via email Example INV-1234567890 |
request.password | string | Description New password for the account (minimum 8 characters) Example securePassword123 |
Returns
Promise<{
accessToken: string;
refreshToken: string;
user: {
email: string;
firstName?: string;
id: string;
lastName?: string;
};
}>
Operation Id
redeem
refresh()
refresh: (request: {
refreshToken: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
}>;
Refresh access token Exchange a refresh token for a new access token and refresh token
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { refreshToken: string; } | - |
request.refreshToken | string | Description Refresh token from previous login Example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
Returns
Promise<{
accessToken: string;
refreshToken: string;
}>
Operation Id
refresh
billing
billing: {
cancelSubscription: (subscriptionId: string) => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>;
canSell: (organisationId: string) => Promise<{
canSell: boolean;
currentBalance: number;
reason: string | null;
}>;
createAiTopup: (request: {
aiPackageId: string;
billingAddress?: {
city: string;
country: string;
line1: string;
line2?: string;
name?: string;
postal_code: string;
state?: string;
};
currency?: string;
email?: string;
paymentMethodId: string;
}) => Promise<{
creditsAdded: number;
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
}>;
createPurchase: (request: {
billingAddress?: {
city: string;
country: string;
line1: string;
line2?: string;
name?: string;
postal_code: string;
state?: string;
};
currency?: string;
email?: string;
packageId: string;
paymentMethodId: string;
}) => Promise<{
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
success: boolean;
transaction: {
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
};
}>;
createSetupIntent: () => Promise<string>;
createSubscription: (request: {
currency?: string;
email?: string;
interval: "month" | "year";
packageId: string;
paymentMethodId: string;
}) => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>;
deletePaymentMethod: (paymentMethodId: string) => Promise<boolean>;
getAiBalance: () => Promise<{
balance: number;
isDepleted: boolean;
isLow: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
}>;
getAutoTopup: () => Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>;
getBalance: () => Promise<{
balance: number;
createdAt: string;
id: string;
isSuspended: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
organisationId: string;
status: "healthy" | "low" | "depleted" | "negative" | "suspended";
suspendedAt: string | null;
suspendedReason: string | null;
updatedAt: string;
}>;
getInvoice: (invoiceId: string) => Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}>;
listAiPackages: () => Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: number;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>;
listAiTransactions: (options?: {
limit?: string;
page?: string;
}) => Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>;
listInvoices: (options?: {
limit?: string;
page?: string;
status?: string;
}) => Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}[]>;
listPackages: () => Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: string;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>;
listPaymentMethods: () => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}[]>;
listPayments: (options?: {
limit?: string;
page?: string;
status?: string;
}) => Promise<{
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
}[]>;
listSubscriptions: () => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}[]>;
listTransactions: (options?: {
limit?: string;
page?: string;
type?: string;
}) => Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>;
savePaymentMethod: (request: {
paymentMethodId: string;
setAsDefault?: boolean;
}) => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>;
setDefaultPaymentMethod: (paymentMethodId: string) => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>;
updateAutoTopup: (request: {
enabled: boolean;
thresholdCredits: number;
topupPackageId: string;
}) => Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>;
};
Defined in: client.ts:1905
Billing methods
cancelSubscription()
cancelSubscription: (subscriptionId: string) => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>;
Cancel subscription Cancel an active subscription
Parameters
| Parameter | Type |
|---|---|
subscriptionId | string |
Returns
Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>
Operation Id
cancelSubscription
canSell()
canSell: (organisationId: string) => Promise<{
canSell: boolean;
currentBalance: number;
reason: string | null;
}>;
Check if organisation can sell Check if an organisation has sufficient credits to process sales
Parameters
| Parameter | Type |
|---|---|
organisationId | string |
Returns
Promise<{
canSell: boolean;
currentBalance: number;
reason: string | null;
}>
Operation Id
checkCanSell
createAiTopup()
createAiTopup: (request: {
aiPackageId: string;
billingAddress?: {
city: string;
country: string;
line1: string;
line2?: string;
name?: string;
postal_code: string;
state?: string;
};
currency?: string;
email?: string;
paymentMethodId: string;
}) => Promise<{
creditsAdded: number;
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
}>;
Top up AI credits Purchase AI credits directly (separate from the bundle included with ticket-credit purchases)
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { aiPackageId: string; billingAddress?: { city: string; country: string; line1: string; line2?: string; name?: string; postal_code: string; state?: string; }; currency?: string; email?: string; paymentMethodId: string; } | - |
request.aiPackageId | string | - |
request.billingAddress? | { city: string; country: string; line1: string; line2?: string; name?: string; postal_code: string; state?: string; } | - |
request.billingAddress.city | string | - |
request.billingAddress.country | string | - |
request.billingAddress.line1 | string | - |
request.billingAddress.line2? | string | - |
request.billingAddress.name? | string | - |
request.billingAddress.postal_code | string | - |
request.billingAddress.state? | string | - |
request.currency? | string | - |
request.email? | string | Format: email |
request.paymentMethodId | string | - |
Returns
Promise<{
creditsAdded: number;
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
}>
Operation Id
createAiTopup
createPurchase()
createPurchase: (request: {
billingAddress?: {
city: string;
country: string;
line1: string;
line2?: string;
name?: string;
postal_code: string;
state?: string;
};
currency?: string;
email?: string;
packageId: string;
paymentMethodId: string;
}) => Promise<{
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
success: boolean;
transaction: {
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
};
}>;
Purchase credits Purchase a credit package for an organisation
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { billingAddress?: { city: string; country: string; line1: string; line2?: string; name?: string; postal_code: string; state?: string; }; currency?: string; email?: string; packageId: string; paymentMethodId: string; } | - |
request.billingAddress? | { city: string; country: string; line1: string; line2?: string; name?: string; postal_code: string; state?: string; } | - |
request.billingAddress.city | string | - |
request.billingAddress.country | string | - |
request.billingAddress.line1 | string | - |
request.billingAddress.line2? | string | - |
request.billingAddress.name? | string | - |
request.billingAddress.postal_code | string | - |
request.billingAddress.state? | string | - |
request.currency? | string | - |
request.email? | string | Format: email |
request.packageId | string | - |
request.paymentMethodId | string | - |
Returns
Promise<{
invoice: {
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
};
newBalance: number;
payment: {
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
};
success: boolean;
transaction: {
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
};
}>
Operation Id
createCreditPurchase
createSetupIntent()
createSetupIntent: () => Promise<string>;
Create setup intent Create a Stripe setup intent for saving a new payment method
Returns
Promise<string>
Operation Id
createSetupIntent
createSubscription()
createSubscription: (request: {
currency?: string;
email?: string;
interval: "month" | "year";
packageId: string;
paymentMethodId: string;
}) => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>;
Create subscription Create a new credit subscription for an organisation
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { currency?: string; email?: string; interval: "month" | "year"; packageId: string; paymentMethodId: string; } | - |
request.currency? | string | - |
request.email? | string | Format: email |
request.interval | "month" | "year" | |
request.packageId | string | - |
request.paymentMethodId | string | - |
Returns
Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}>
Operation Id
createSubscription
deletePaymentMethod()
deletePaymentMethod: (paymentMethodId: string) => Promise<boolean>;
Delete payment method Delete a saved payment method
Parameters
| Parameter | Type |
|---|---|
paymentMethodId | string |
Returns
Promise<boolean>
Operation Id
deletePaymentMethod
getAiBalance()
getAiBalance: () => Promise<{
balance: number;
isDepleted: boolean;
isLow: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
}>;
Get AI credit balance Get the organisation's AI-credit (Cue) wallet balance
Returns
Promise<{
balance: number;
isDepleted: boolean;
isLow: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
}>
Operation Id
getAiBalance
getAutoTopup()
getAutoTopup: () => Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>;
Get auto top-up configuration Get the auto top-up configuration for an organisation
Returns
Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>
Operation Id
getAutoTopup
getBalance()
getBalance: () => Promise<{
balance: number;
createdAt: string;
id: string;
isSuspended: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
organisationId: string;
status: "healthy" | "low" | "depleted" | "negative" | "suspended";
suspendedAt: string | null;
suspendedReason: string | null;
updatedAt: string;
}>;
Get credit balance Get the current credit balance for an organisation
Returns
Promise<{
balance: number;
createdAt: string;
id: string;
isSuspended: boolean;
lifetimeCredits: number;
lifetimeUsed: number;
organisationId: string;
status: "healthy" | "low" | "depleted" | "negative" | "suspended";
suspendedAt: string | null;
suspendedReason: string | null;
updatedAt: string;
}>
Operation Id
getCreditBalance
getInvoice()
getInvoice: (invoiceId: string) => Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}>;
Get invoice Get a specific invoice by ID
Parameters
| Parameter | Type |
|---|---|
invoiceId | string |
Returns
Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}>
Operation Id
getInvoice
listAiPackages()
listAiPackages: () => Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: number;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>;
List AI credit packages List the AI-credit top-up packages available for purchase
Returns
Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: number;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>
Operation Id
listAiCreditPackages
listAiTransactions()
listAiTransactions: (options?: {
limit?: string;
page?: string;
}) => Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>;
List AI credit transactions List the AI-credit wallet transaction history
Parameters
| Parameter | Type |
|---|---|
options? | { limit?: string; page?: string; } |
options.limit? | string |
options.page? | string |
Returns
Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>
Operation Id
listAiCreditTransactions
listInvoices()
listInvoices: (options?: {
limit?: string;
page?: string;
status?: string;
}) => Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}[]>;
List invoices List all invoices for an organisation
Parameters
| Parameter | Type |
|---|---|
options? | { limit?: string; page?: string; status?: string; } |
options.limit? | string |
options.page? | string |
options.status? | string |
Returns
Promise<{
amountDue: number;
amountPaid: number;
createdAt: string;
currency: string;
dueDate: string | null;
id: string;
invoiceNumber: string;
issueDate: string;
organisationId: string;
paidAt: string | null;
pdfUrl: string | null;
status: "draft" | "open" | "paid" | "void" | "uncollectible";
subtotal: number;
tax: number;
total: number;
type: "purchase" | "subscription" | "payg";
updatedAt: string;
}[]>
Operation Id
listInvoices
listPackages()
listPackages: () => Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: string;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>;
List credit packages List all available credit packages for purchase
Returns
Promise<{
baseCurrency: string;
basePrice: number;
credits: number;
discountPercent: string;
displayOrder: number;
finalPrice: number;
id: string;
isActive: boolean;
name: string;
}[]>
Operation Id
listCreditPackages
listPaymentMethods()
listPaymentMethods: () => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}[]>;
List payment methods List all saved payment methods for the organisation
Returns
Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}[]>
Operation Id
listPaymentMethods
listPayments()
listPayments: (options?: {
limit?: string;
page?: string;
status?: string;
}) => Promise<{
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
}[]>;
List billing payments List all billing payments for an organisation
Parameters
| Parameter | Type |
|---|---|
options? | { limit?: string; page?: string; status?: string; } |
options.limit? | string |
options.page? | string |
options.status? | string |
Returns
Promise<{
amount: number;
createdAt: string;
currency: string;
failedAt: string | null;
failureCode: string | null;
failureMessage: string | null;
id: string;
invoiceId: string | null;
method: string | null;
organisationId: string;
paidAt: string | null;
status: "cancelled" | "pending" | "succeeded" | "failed" | "refunded";
updatedAt: string;
}[]>
Operation Id
listBillingPayments
listSubscriptions()
listSubscriptions: () => Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}[]>;
List subscriptions List all subscriptions for an organisation
Returns
Promise<{
cancelledAt: string | null;
createdAt: string;
credits: number;
currency: string;
currentPeriodEnd: string | null;
currentPeriodStart: string | null;
endedAt: string | null;
id: string;
interval: "month" | "year";
organisationId: string;
packageId: string;
price: number;
status: "active" | "cancelled" | "paused" | "past_due" | "ended";
updatedAt: string;
}[]>
Operation Id
listSubscriptions
listTransactions()
listTransactions: (options?: {
limit?: string;
page?: string;
type?: string;
}) => Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>;
List credit transactions List all credit transactions for an organisation
Parameters
| Parameter | Type |
|---|---|
options? | { limit?: string; page?: string; type?: string; } |
options.limit? | string |
options.page? | string |
options.type? | string |
Returns
Promise<{
amount: number;
balanceAfter: number;
balanceBefore: number;
createdAt: string;
description: string | null;
id: string;
invoiceId: string | null;
orderId: string | null;
organisationId: string;
subscriptionId: string | null;
type: | "initial"
| "purchase"
| "subscription"
| "ticket_sale"
| "adjustment"
| "refund";
}[]>
Operation Id
listCreditTransactions
savePaymentMethod()
savePaymentMethod: (request: {
paymentMethodId: string;
setAsDefault?: boolean;
}) => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>;
Save payment method Save a payment method after Stripe confirms the setup intent
Parameters
| Parameter | Type | Description |
|---|---|---|
request | { paymentMethodId: string; setAsDefault?: boolean; } | - |
request.paymentMethodId | string | Example pm_1234567890 |
request.setAsDefault? | boolean | Example true |
Returns
Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>
Operation Id
savePaymentMethod
setDefaultPaymentMethod()
setDefaultPaymentMethod: (paymentMethodId: string) => Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>;
Set default payment method Set a payment method as the default for the organisation
Parameters
| Parameter | Type |
|---|---|
paymentMethodId | string |
Returns
Promise<{
card: {
brand: string;
expMonth: number;
expYear: number;
last4: string;
};
createdAt: string;
id: string;
isDefault: boolean;
type: "card";
}>
Operation Id
setDefaultPaymentMethod
updateAutoTopup()
updateAutoTopup: (request: {
enabled: boolean;
thresholdCredits: number;
topupPackageId: string;
}) => Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>;
Update auto top-up configuration Update the auto top-up configuration for an organisation
Parameters
| Parameter | Type |
|---|---|
request | { enabled: boolean; thresholdCredits: number; topupPackageId: string; } |
request.enabled | boolean |
request.thresholdCredits | number |
request.topupPackageId | string |
Returns
Promise<
| {
attemptsToday: number;
createdAt: string;
enabled: boolean;
id: string;
lastAttemptAt: string | null;
maxAttemptsPerDay: number;
organisationId: string;
thresholdCredits: number;
topupPackageId: string;
updatedAt: string;
}
| null>
Operation Id
updateAutoTopup
customers
customers: {
block: (customerId: string, request: {
reason?: string;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
create: (request: {
accountId?: string;
email: string;
externalId?: string;
firstName?: string;
lastName?: string;
metadata?: Record<string, any>;
phone?: string;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
get: (customerId: string) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
list: (options?: {
accountId?: string;
cursor?: string;
email?: string;
isBlocked?: string;
limit?: string;
page?: string;
search?: string;
updatedSince?: string;
}) => Promise<{
customers: {
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}[];
pagination: {
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
unblock: (customerId: string) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
update: (customerId: string, request: {
email?: string;
externalId?: any;
firstName?: any;
lastName?: any;
metadata?: any;
phone?: any;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
};
Defined in: client.ts:2525
Customers methods
block()
block: (customerId: string, request: {
reason?: string;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
Block customer Block a customer from making purchases
Parameters
| Parameter | Type |
|---|---|
customerId | string |
request | { reason?: string; } |
request.reason? | string |
Returns
Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>
Operation Id
blockCustomer
create()
create: (request: {
accountId?: string;
email: string;
externalId?: string;
firstName?: string;
lastName?: string;
metadata?: Record<string, any>;
phone?: string;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
Create customer Create a new customer in the organisation
Parameters
| Parameter | Type |
|---|---|
request | { accountId?: string; email: string; externalId?: string; firstName?: string; lastName?: string; metadata?: Record<string, any>; phone?: string; } |
request.accountId? | string |
request.email | string |
request.externalId? | string |
request.firstName? | string |
request.lastName? | string |
request.metadata? | Record<string, any> |
request.phone? | string |
Returns
Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>
Operation Id
createCustomer
get()
get: (customerId: string) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
Get customer Get a specific customer by ID
Parameters
| Parameter | Type |
|---|---|
customerId | string |
Returns
Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>
Operation Id
getCustomer
list()
list: (options?: {
accountId?: string;
cursor?: string;
email?: string;
isBlocked?: string;
limit?: string;
page?: string;
search?: string;
updatedSince?: string;
}) => Promise<{
customers: {
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}[];
pagination: {
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
List customers List all customers with optional filtering and pagination
Parameters
| Parameter | Type |
|---|---|
options? | { accountId?: string; cursor?: string; email?: string; isBlocked?: string; limit?: string; page?: string; search?: string; updatedSince?: string; } |
options.accountId? | string |
options.cursor? | string |
options.email? | string |
options.isBlocked? | string |
options.limit? | string |
options.page? | string |
options.search? | string |
options.updatedSince? | string |
Returns
Promise<{
customers: {
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}[];
pagination: {
limit: number;
page: number;
total: number;
totalPages: number;
};
}>
Operation Id
listCustomers
unblock()
unblock: (customerId: string) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
Unblock customer Unblock a previously blocked customer
Parameters
| Parameter | Type |
|---|---|
customerId | string |
Returns
Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>
Operation Id
unblockCustomer
update()
update: (customerId: string, request: {
email?: string;
externalId?: any;
firstName?: any;
lastName?: any;
metadata?: any;
phone?: any;
}) => Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>;
Update customer Update an existing customer
Parameters
| Parameter | Type |
|---|---|
customerId | string |
request | { email?: string; externalId?: any; firstName?: any; lastName?: any; metadata?: any; phone?: any; } |
request.email? | string |
request.externalId? | any |
request.firstName? | any |
request.lastName? | any |
request.metadata? | any |
request.phone? | any |
Returns
Promise<{
accountId: string | null;
blockedAt: string | null;
blockedReason: string | null;
createdAt: string;
email: string;
externalId: string | null;
firstName: string | null;
id: string;
isBlocked: boolean;
lastName: string | null;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
phone: string | null;
updatedAt: string;
}>
Operation Id
updateCustomer
deviceAuth
deviceAuth: {
issueToken: (request: {
deviceId: string;
deviceSecret: string;
}) => Promise<any>;
jwks: () => Promise<any>;
};
Defined in: client.ts:4426
Device Auth methods
issueToken()
issueToken: (request: {
deviceId: string;
deviceSecret: string;
}) => Promise<any>;
Mint a device token Exchange (deviceId, deviceSecret) for a short-lived device JWT.
Parameters
| Parameter | Type |
|---|---|
request | { deviceId: string; deviceSecret: string; } |
request.deviceId | string |
request.deviceSecret | string |
Returns
Promise<any>
Operation Id
issueDeviceToken
jwks()
jwks: () => Promise<any>;
Device JWKS Public keys for offline Local Command Token verification by relays.
Returns
Promise<any>
Operation Id
getDeviceJwks
devicePairing
devicePairing: {
claim: (request: {
accountId: string;
accountRoles: {
accountId: string;
roleId: string;
}[];
locationId?: string;
name: string;
userCode: string;
}) => Promise<any>;
confirm: (pairingId: string, request: {
deviceCode: string;
}) => Promise<any>;
getStatus: (pairingId: string) => Promise<any>;
reject: (pairingId: string, request: {
deviceCode: string;
}) => Promise<any>;
start: (request: {
name?: string;
platform?: {
appVersion?: string;
arch?: string;
hostname?: string;
os?: string;
osVersion?: string;
};
type: "kiosk" | "relay" | "scanner" | "signage";
}) => Promise<any>;
};
Defined in: client.ts:4352
Device Pairing methods
claim()
claim: (request: {
accountId: string;
accountRoles: {
accountId: string;
roleId: string;
}[];
locationId?: string;
name: string;
userCode: string;
}) => Promise<any>;
Claim a device pairing Staff claim a pending pairing for their organisation, naming the device and granting roles.
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; accountRoles: { accountId: string; roleId: string; }[]; locationId?: string; name: string; userCode: string; } |
request.accountId | string |
request.accountRoles | { accountId: string; roleId: string; }[] |
request.locationId? | string |
request.name | string |
request.userCode | string |
Returns
Promise<any>
Operation Id
claimDevicePairing
confirm()
confirm: (pairingId: string, request: {
deviceCode: string;
}) => Promise<any>;
Confirm device adoption The device confirms adoption and receives its id + one-time secret (device-code auth).
Parameters
| Parameter | Type |
|---|---|
pairingId | string |
request | { deviceCode: string; } |
request.deviceCode | string |
Returns
Promise<any>
Operation Id
confirmDevicePairing
getStatus()
getStatus: (pairingId: string) => Promise<any>;
Poll device pairing status The device polls pairing status, authenticated by its device code (query or X-Device-Code header).
Parameters
| Parameter | Type |
|---|---|
pairingId | string |
Returns
Promise<any>
Operation Id
getDevicePairing
reject()
reject: (pairingId: string, request: {
deviceCode: string;
}) => Promise<any>;
Reject device adoption The device rejects adoption; the pairing is invalidated (device-code auth).
Parameters
| Parameter | Type |
|---|---|
pairingId | string |
request | { deviceCode: string; } |
request.deviceCode | string |
Returns
Promise<any>
Operation Id
rejectDevicePairing
start()
start: (request: {
name?: string;
platform?: {
appVersion?: string;
arch?: string;
hostname?: string;
os?: string;
osVersion?: string;
};
type: "kiosk" | "relay" | "scanner" | "signage";
}) => Promise<any>;
Start device pairing A device begins pairing and receives a user code + device code (unauthenticated).
Parameters
| Parameter | Type |
|---|---|
request | { name?: string; platform?: { appVersion?: string; arch?: string; hostname?: string; os?: string; osVersion?: string; }; type: "kiosk" | "relay" | "scanner" | "signage"; } |
request.name? | string |
request.platform? | { appVersion?: string; arch?: string; hostname?: string; os?: string; osVersion?: string; } |
request.platform.appVersion? | string |
request.platform.arch? | string |
request.platform.hostname? | string |
request.platform.os? | string |
request.platform.osVersion? | string |
request.type | "kiosk" | "relay" | "scanner" | "signage" |
Returns
Promise<any>
Operation Id
startDevicePairing
devices
devices: {
assignRoles: (deviceId: string, request: {
accountRoles: {
accountId: string;
roleId: string;
}[];
}) => Promise<any>;
delete: (deviceId: string) => Promise<any>;
dispatchCommand: (deviceId: string, request: {
idempotencyKey?: string;
payload?: Record<string, any>;
peripheralId?: string;
type: string;
}) => Promise<any>;
get: (deviceId: string) => Promise<any>;
getCommand: (commandId: string) => Promise<any>;
list: (options?: {
accountId?: string;
connectivity?: "unknown" | "online" | "offline";
locationId?: string;
status?: "active" | "revoked";
type?: string;
}) => Promise<any>;
listCommands: (deviceId: string) => Promise<any>;
listEvents: (deviceId: string) => Promise<any>;
mediaCatalog: () => Promise<any>;
mintLocalToken: (deviceId: string, request: {
accountIds?: string[];
allowedCommandTypes?: string[];
ttlSeconds?: number;
}) => Promise<any>;
printers: () => Promise<any>;
revoke: (deviceId: string) => Promise<any>;
rotateCredential: (deviceId: string, request: {
graceSeconds?: number;
}) => Promise<any>;
update: (deviceId: string, request: {
locationId?: any;
name?: string;
}) => Promise<any>;
};
Defined in: client.ts:4577
Devices methods
assignRoles()
assignRoles: (deviceId: string, request: {
accountRoles: {
accountId: string;
roleId: string;
}[];
}) => Promise<any>;
Assign device roles Replace a device’s account-role assignments.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
request | { accountRoles: { accountId: string; roleId: string; }[]; } |
request.accountRoles | { accountId: string; roleId: string; }[] |
Returns
Promise<any>
Operation Id
assignDeviceRoles
delete()
delete: (deviceId: string) => Promise<any>;
Delete device Soft-delete a revoked device.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<any>
Operation Id
deleteDevice
dispatchCommand()
dispatchCommand: (deviceId: string, request: {
idempotencyKey?: string;
payload?: Record<string, any>;
peripheralId?: string;
type: string;
}) => Promise<any>;
Dispatch a command Queue a command for a device or one of its peripherals. Idempotent on Idempotency-Key.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
request | { idempotencyKey?: string; payload?: Record<string, any>; peripheralId?: string; type: string; } |
request.idempotencyKey? | string |
request.payload? | Record<string, any> |
request.peripheralId? | string |
request.type | string |
Returns
Promise<any>
Operation Id
dispatchDeviceCommand
get()
get: (deviceId: string) => Promise<any>;
Get device Get a device with its peripherals and live status.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<any>
Operation Id
getDevice
getCommand()
getCommand: (commandId: string) => Promise<any>;
Get a command Get a single command’s status/result by id (poll for completion).
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
Promise<any>
Operation Id
getDeviceCommand
list()
list: (options?: {
accountId?: string;
connectivity?: "unknown" | "online" | "offline";
locationId?: string;
status?: "active" | "revoked";
type?: string;
}) => Promise<any>;
List devices List top-level devices (relays/scanners/kiosks) for the organisation.
Parameters
| Parameter | Type |
|---|---|
options? | { accountId?: string; connectivity?: "unknown" | "online" | "offline"; locationId?: string; status?: "active" | "revoked"; type?: string; } |
options.accountId? | string |
options.connectivity? | "unknown" | "online" | "offline" |
options.locationId? | string |
options.status? | "active" | "revoked" |
options.type? | string |
Returns
Promise<any>
Operation Id
listDevices
listCommands()
listCommands: (deviceId: string) => Promise<any>;
List device commands Command history for a device (most recent first).
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<any>
Operation Id
listDeviceCommands
listEvents()
listEvents: (deviceId: string) => Promise<any>;
List device events The device-operational event log (most recent first).
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<any>
Operation Id
listDeviceEvents
mediaCatalog()
mediaCatalog: () => Promise<any>;
Print capability & standard-media catalog The canonical print capabilities and standard media sizes designs are authored against.
Returns
Promise<any>
Operation Id
getDeviceMediaCatalog
mintLocalToken()
mintLocalToken: (deviceId: string, request: {
accountIds?: string[];
allowedCommandTypes?: string[];
ttlSeconds?: number;
}) => Promise<any>;
Mint a Local Command Token Mint a short-lived, capability-scoped token a browser POS presents to the device’s local control plane.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
request | { accountIds?: string[]; allowedCommandTypes?: string[]; ttlSeconds?: number; } |
request.accountIds? | string[] |
request.allowedCommandTypes? | string[] |
request.ttlSeconds? | number |
Returns
Promise<any>
Operation Id
mintLocalToken
printers()
printers: () => Promise<any>;
List printers Org-wide list of printer peripherals with status + capabilities, for the print-target picker.
Returns
Promise<any>
Operation Id
listPrinters
revoke()
revoke: (deviceId: string) => Promise<any>;
Revoke device Revoke a device and kill its credentials immediately.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<any>
Operation Id
revokeDevice
rotateCredential()
rotateCredential: (deviceId: string, request: {
graceSeconds?: number;
}) => Promise<any>;
Rotate device credential Issue a new device secret; existing credentials grace-expire.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
request | { graceSeconds?: number; } |
request.graceSeconds? | number |
Returns
Promise<any>
Operation Id
rotateDeviceCredential
update()
update: (deviceId: string, request: {
locationId?: any;
name?: string;
}) => Promise<any>;
Update device Rename or relocate a device.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
request | { locationId?: any; name?: string; } |
request.locationId? | any |
request.name? | string |
Returns
Promise<any>
Operation Id
updateDevice
deviceSelf
deviceSelf: {
declarePeripherals: (request: {
peripherals: {
address?: {
host: string;
port: number;
};
attachment?: "child" | "routed";
capabilities?: Record<string, any>;
clientKey: string;
kind: string;
model?: string;
name: string;
provider?: string;
vendor?: string;
}[];
}) => Promise<any>;
fetchCommands: (options?: {
wait?: number;
}) => Promise<any>;
getCertificate: () => Promise<any>;
getMe: () => Promise<any>;
heartbeat: (request: {
appVersion?: string;
lanAddresses?: {
interface: string;
ip: string;
}[];
localPort?: number;
peripheralStatuses?: {
clientKey: string;
status: Record<string, any>;
}[];
}) => Promise<any>;
ingestEvents: (request: {
events: {
id: string;
occurredAt: string;
payload?: Record<string, any>;
type: string;
}[];
}) => Promise<any>;
reportProgress: (commandId: string, request: {
progress: Record<string, any>;
}) => Promise<any>;
reportResult: (commandId: string, request: {
result?: Record<string, any>;
status: "completed" | "failed";
}) => Promise<any>;
};
Defined in: client.ts:4458
Device Self methods
declarePeripherals()
declarePeripherals: (request: {
peripherals: {
address?: {
host: string;
port: number;
};
attachment?: "child" | "routed";
capabilities?: Record<string, any>;
clientKey: string;
kind: string;
model?: string;
name: string;
provider?: string;
vendor?: string;
}[];
}) => Promise<any>;
Declare peripherals Full-replacement declaration of the relay’s peripherals; returns the stable device id per clientKey.
Parameters
| Parameter | Type |
|---|---|
request | { peripherals: { address?: { host: string; port: number; }; attachment?: "child" | "routed"; capabilities?: Record<string, any>; clientKey: string; kind: string; model?: string; name: string; provider?: string; vendor?: string; }[]; } |
request.peripherals | { address?: { host: string; port: number; }; attachment?: "child" | "routed"; capabilities?: Record<string, any>; clientKey: string; kind: string; model?: string; name: string; provider?: string; vendor?: string; }[] |
Returns
Promise<any>
Operation Id
declareDevicePeripherals
fetchCommands()
fetchCommands: (options?: {
wait?: number;
}) => Promise<any>;
Long-poll for commands
Holds up to wait seconds (max 25) and returns pending commands, marking them delivered.
Parameters
| Parameter | Type |
|---|---|
options? | { wait?: number; } |
options.wait? | number |
Returns
Promise<any>
Operation Id
fetchDeviceCommands
getCertificate()
getCertificate: () => Promise<any>;
Get local TLS certificate Fetch (or trigger issuance of) the device’s local-control-plane TLS cert + key.
Returns
Promise<any>
Operation Id
getDeviceCertificate
getMe()
getMe: () => Promise<any>;
Get own device record The device fetches its own record, granted roles and local config (device JWT).
Returns
Promise<any>
Operation Id
getDeviceMe
heartbeat()
heartbeat: (request: {
appVersion?: string;
lanAddresses?: {
interface: string;
ip: string;
}[];
localPort?: number;
peripheralStatuses?: {
clientKey: string;
status: Record<string, any>;
}[];
}) => Promise<any>;
Send a device heartbeat Reports presence + peripheral status; returns hints (commandsPending, cert renewal, JWKS version).
Parameters
| Parameter | Type |
|---|---|
request | { appVersion?: string; lanAddresses?: { interface: string; ip: string; }[]; localPort?: number; peripheralStatuses?: { clientKey: string; status: Record<string, any>; }[]; } |
request.appVersion? | string |
request.lanAddresses? | { interface: string; ip: string; }[] |
request.localPort? | number |
request.peripheralStatuses? | { clientKey: string; status: Record<string, any>; }[] |
Returns
Promise<any>
Operation Id
deviceHeartbeat
ingestEvents()
ingestEvents: (request: {
events: {
id: string;
occurredAt: string;
payload?: Record<string, any>;
type: string;
}[];
}) => Promise<any>;
Upload device events Batch (≤500) idempotent upload of device-operational events; per-item accepted|duplicate.
Parameters
| Parameter | Type |
|---|---|
request | { events: { id: string; occurredAt: string; payload?: Record<string, any>; type: string; }[]; } |
request.events | { id: string; occurredAt: string; payload?: Record<string, any>; type: string; }[] |
Returns
Promise<any>
Operation Id
ingestDeviceEvents
reportProgress()
reportProgress: (commandId: string, request: {
progress: Record<string, any>;
}) => Promise<any>;
Report command progress Optional in-flight progress update (e.g. payment terminal awaiting card).
Parameters
| Parameter | Type |
|---|---|
commandId | string |
request | { progress: Record<string, any>; } |
request.progress | Record<string, any> |
Returns
Promise<any>
Operation Id
reportCommandProgress
reportResult()
reportResult: (commandId: string, request: {
result?: Record<string, any>;
status: "completed" | "failed";
}) => Promise<any>;
Report command result Terminal result (completed|failed). Idempotent - the first terminal result wins.
Parameters
| Parameter | Type |
|---|---|
commandId | string |
request | { result?: Record<string, any>; status: "completed" | "failed"; } |
request.result? | Record<string, any> |
request.status | "completed" | "failed" |
Returns
Promise<any>
Operation Id
reportCommandResult
embed
embed: {
createSession: (request: {
[key: string]: unknown;
accountId: string;
scopes?: string[];
}) => Promise<EmbedSession>;
currentSession: () => Promise<EmbedSessionInfo>;
};
Defined in: client.ts:751
Embed session methods (partner-hosted Backstage widgets)
createSession()
createSession: (request: {
[key: string]: unknown;
accountId: string;
scopes?: string[];
}) => Promise<EmbedSession>;
Create embed session Mint a short-lived embed session for one account, using an organisation API key. The token is a bearer token limited to that account and the given scopes; hand it to the embed loader, never to the browser as a long-lived credential.
Parameters
| Parameter | Type |
|---|---|
request | { [key: string]: unknown; accountId: string; scopes?: string[]; } |
request.accountId | string |
request.scopes? | string[] |
Returns
Promise<EmbedSession>
Operation Id
createEmbedSession
currentSession()
currentSession: () => Promise<EmbedSessionInfo>;
Get current embed session Describe the embed session behind the bearer token: organisation, account, scopes and expiry.
Returns
Promise<EmbedSessionInfo>
Operation Id
getCurrentEmbedSession
events
events: (eventId: string) => {
occurrences: {
create: (request: {
categoryMapping?: {
enabled?: boolean;
ticketCategoryId: string;
venueLayoutCategoryId: string;
}[];
endDate: string;
endTime: string;
priceSchemeId?: string;
startDate: string;
startTime: string;
status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
ticketSchemeId?: string;
timezone?: string;
venueId?: string;
venueLayoutId?: string;
}) => Promise<{
accountId: string;
createdAt: string;
endDate: string;
endTime: string;
eventId: string;
id: string;
isDeleted: boolean;
organisationId: string;
startDate: string;
startTime: string;
status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
timezone: string;
updatedAt: string;
venueId?: string;
}>;
delete: (occurrenceId: string) => Promise<{
id: string;
success: boolean;
}>;
get: (occurrenceId: string) => Promise<{
accountId: string;
createdAt: string;
endDate: string;
endTime: string;
eventId: string;
id: string;
isDeleted: boolean;
organisationId: string;
startDate: string;
startTime: string;
status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
timezone: string;
updatedAt: string;
venueId?: string;
}>;
list: (options?: {
limit?: string;
page?: string;
startDateFrom?: string;
startDateTo?: string;
status?: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
venueId?: string;
}) => Promise<{
eventOccurrences: {
accountId: string;
createdAt: string;
endDate: string;
endTime: string;
eventId: string;
id: string;
isDeleted: boolean;
organisationId: string;
startDate: string;
startTime: string;
status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
timezone: string;
updatedAt: string;
venueId?: string;
}[];
pagination: {
hasNext: boolean;
hasPrev: boolean;
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
update: (occurrenceId: string, request: {
categoryMapping?: any;
endDate?: string;
endTime?: string;
priceSchemeId?: any;
startDate?: string;
startTime?: string;
status?: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
ticketSchemeId?: any;
timezone?: string;
venueId?: any;
venueLayoutId?: any;
}) => Promise<{
accountId: string;
createdAt: string;
endDate: string;
endTime: string;
eventId: string;
id: string;
isDeleted: boolean;
organisationId: string;
startDate: string;
startTime: string;
status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
timezone: string;
updatedAt: string;
venueId?: string;
}>;
};
priceschemes: {
create: (request: {
description?: string;
name: string;
parentPriceSchemeId?: string;
status?: "active" | "draft" | "archived";
ticketPrices?: {
categoryId: string;
currency?: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
price: number;
typeId: string;
}[];
}) => Promise<{
accountId: string;
createdAt: string;
description?: string;
eventId: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
parentPriceSchemeId?: string;
status: "active" | "draft" | "archived";
ticketPrices: {
categoryId: string;
currency: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
price: number;
typeId: string;
}[];
updatedAt: string;
}>;
delete: (priceSchemeId: string) => Promise<{
id: string;
success: boolean;
}>;
get: (priceSchemeId: string) => Promise<{
accountId: string;
createdAt: string;
description?: string;
eventId: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
parentPriceSchemeId?: string;
status: "active" | "draft" | "archived";
ticketPrices: {
categoryId: string;
currency: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
price: number;
typeId: string;
}[];
updatedAt: string;
}>;
list: () => Promise<{
accountId: string;
createdAt: string;
description?: string;
eventId: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
parentPriceSchemeId?: string;
status: "active" | "draft" | "archived";
ticketPrices: {
categoryId: string;
currency: ... | ... | ... | ... | ...;
price: number;
typeId: string;
}[];
updatedAt: string;
}[]>;
update: (priceSchemeId: string, request: {
description?: any;
name?: string;
status?: "active" | "draft" | "archived";
ticketPrices?: {
categoryId: string;
currency?: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
price: number;
typeId: string;
}[];
}) => Promise<{
accountId: string;
createdAt: string;
description?: string;
eventId: string;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
parentPriceSchemeId?: string;
status: "active" | "draft" | "archived";
ticketPrices: {
categoryId: string;
currency: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
price: number;
typeId: string;
}[];
updatedAt: string;
}>;
};
} & {
create: (request: {
accountId: string;
description?: string;
heroImageUrl?: any;
imageUrl?: any;
layout?: {
areas?: {
capacity: number;
categoryId?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
type: "unallocated" | "allocated";
}[];
categories?: {
color?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
}[];
venueLayoutTemplateId?: string;
};
name: string;
offSaleDate?: string;
onSaleDate?: string;
presentation?: any;
shortDescription?: any;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
subtitle?: any;
tags?: string[];
ticketTypes?: {
description?: string;
displayOrder: number;
id?: string;
name: string;
}[];
timezone?: string;
venueId?: any;
venueName?: any;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
delete: (id: string) => Promise<{
id: string;
success: boolean;
}>;
get: (id: string, options?: {
expand?: string;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
list: (options?: {
accountId?: string;
expand?: string;
limit?: string;
page?: string;
search?: string;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
venueId?: string;
}) => Promise<{
events: {
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}[];
pagination: {
hasNext: boolean;
hasPrev: boolean;
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
update: (id: string, request: {
description?: any;
heroImageUrl?: any;
imageUrl?: any;
layout?: {
areas?: {
capacity: number;
categoryId?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
type: "unallocated" | "allocated";
}[];
categories?: {
color?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
}[];
venueLayoutTemplateId?: string;
};
name?: string;
offSaleDate?: any;
onSaleDate?: any;
presentation?: any;
shortDescription?: any;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
subtitle?: any;
tags?: string[];
ticketTypes?: {
description?: string;
displayOrder: number;
id?: string;
name: string;
}[];
timezone?: string;
venueId?: any;
venueName?: any;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
};
Defined in: client.ts:1336
Events methods Use events() to access nested resources: events(id).occurrences, priceschemes
Type Declaration
create()
create: (request: {
accountId: string;
description?: string;
heroImageUrl?: any;
imageUrl?: any;
layout?: {
areas?: {
capacity: number;
categoryId?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
type: "unallocated" | "allocated";
}[];
categories?: {
color?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
}[];
venueLayoutTemplateId?: string;
};
name: string;
offSaleDate?: string;
onSaleDate?: string;
presentation?: any;
shortDescription?: any;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
subtitle?: any;
tags?: string[];
ticketTypes?: {
description?: string;
displayOrder: number;
id?: string;
name: string;
}[];
timezone?: string;
venueId?: any;
venueName?: any;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
Create event Create a new event in the organisation
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; description?: string; heroImageUrl?: any; imageUrl?: any; layout?: { areas?: { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[]; categories?: { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[]; venueLayoutTemplateId?: string; }; name: string; offSaleDate?: string; onSaleDate?: string; presentation?: any; shortDescription?: any; status?: | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled"; subtitle?: any; tags?: string[]; ticketTypes?: { description?: string; displayOrder: number; id?: string; name: string; }[]; timezone?: string; venueId?: any; venueName?: any; } |
request.accountId | string |
request.description? | string |
request.heroImageUrl? | any |
request.imageUrl? | any |
request.layout? | { areas?: { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[]; categories?: { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[]; venueLayoutTemplateId?: string; } |
request.layout.areas? | { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[] |
request.layout.categories? | { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[] |
request.layout.venueLayoutTemplateId? | string |
request.name | string |
request.offSaleDate? | string |
request.onSaleDate? | string |
request.presentation? | any |
request.shortDescription? | any |
request.status? | | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled" |
request.subtitle? | any |
request.tags? | string[] |
request.ticketTypes? | { description?: string; displayOrder: number; id?: string; name: string; }[] |
request.timezone? | string |
request.venueId? | any |
request.venueName? | any |
Returns
Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>
Operation Id
createEvent
delete()
delete: (id: string) => Promise<{
id: string;
success: boolean;
}>;
Delete event Delete an event (soft delete)
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
id: string;
success: boolean;
}>
Operation Id
deleteEvent
get()
get: (id: string, options?: {
expand?: string;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
Get event Get a specific event by ID. Use expand=venue to embed venue details.
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { expand?: string; } |
options.expand? | string |
Returns
Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>
Operation Id
getEvent
list()
list: (options?: {
accountId?: string;
expand?: string;
limit?: string;
page?: string;
search?: string;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
venueId?: string;
}) => Promise<{
events: {
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}[];
pagination: {
hasNext: boolean;
hasPrev: boolean;
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
List events List all events for the organisation with optional filtering and pagination. Use expand=venue to embed venue details.
Parameters
| Parameter | Type |
|---|---|
options? | { accountId?: string; expand?: string; limit?: string; page?: string; search?: string; status?: | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled"; venueId?: string; } |
options.accountId? | string |
options.expand? | string |
options.limit? | string |
options.page? | string |
options.search? | string |
options.status? | | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled" |
options.venueId? | string |
Returns
Promise<{
events: {
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}[];
pagination: {
hasNext: boolean;
hasPrev: boolean;
limit: number;
page: number;
total: number;
totalPages: number;
};
}>
Operation Id
listEvents
update()
update: (id: string, request: {
description?: any;
heroImageUrl?: any;
imageUrl?: any;
layout?: {
areas?: {
capacity: number;
categoryId?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
type: "unallocated" | "allocated";
}[];
categories?: {
color?: string;
description?: string;
displayOrder?: number;
id?: string;
name: string;
}[];
venueLayoutTemplateId?: string;
};
name?: string;
offSaleDate?: any;
onSaleDate?: any;
presentation?: any;
shortDescription?: any;
status?: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
subtitle?: any;
tags?: string[];
ticketTypes?: {
description?: string;
displayOrder: number;
id?: string;
name: string;
}[];
timezone?: string;
venueId?: any;
venueName?: any;
}) => Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>;
Update event Update an existing event
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { description?: any; heroImageUrl?: any; imageUrl?: any; layout?: { areas?: { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[]; categories?: { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[]; venueLayoutTemplateId?: string; }; name?: string; offSaleDate?: any; onSaleDate?: any; presentation?: any; shortDescription?: any; status?: | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled"; subtitle?: any; tags?: string[]; ticketTypes?: { description?: string; displayOrder: number; id?: string; name: string; }[]; timezone?: string; venueId?: any; venueName?: any; } |
request.description? | any |
request.heroImageUrl? | any |
request.imageUrl? | any |
request.layout? | { areas?: { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[]; categories?: { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[]; venueLayoutTemplateId?: string; } |
request.layout.areas? | { capacity: number; categoryId?: string; description?: string; displayOrder?: number; id?: string; name: string; type: "unallocated" | "allocated"; }[] |
request.layout.categories? | { color?: string; description?: string; displayOrder?: number; id?: string; name: string; }[] |
request.layout.venueLayoutTemplateId? | string |
request.name? | string |
request.offSaleDate? | any |
request.onSaleDate? | any |
request.presentation? | any |
request.shortDescription? | any |
request.status? | | "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled" |
request.subtitle? | any |
request.tags? | string[] |
request.ticketTypes? | { description?: string; displayOrder: number; id?: string; name: string; }[] |
request.timezone? | string |
request.venueId? | any |
request.venueName? | any |
Returns
Promise<{
accountId: string;
createdAt: string;
createdBy?: string;
description?: string;
id: string;
isDeleted: boolean;
name: string;
occurrenceCount: number;
offSaleDate?: string;
onSaleDate?: string;
organisationId: string;
productCount: number;
status: | "draft"
| "published"
| "on_sale"
| "sold_out"
| "completed"
| "cancelled";
tags: string[];
ticketCount: number;
timezone: string;
updatedAt: string;
venueId?: string;
}>
Operation Id
updateEvent
feeProfiles
feeProfiles: {
create: (request: {
name: string;
serviceFeeEnabled?: boolean;
serviceFeeFixed?: number;
serviceFeeLabel?: string;
serviceFeePercent?: number;
}) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
delete: (profileId: string) => Promise<boolean>;
get: (profileId: string) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
list: () => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}[]>;
update: (profileId: string, request: {
name?: string;
serviceFeeEnabled?: boolean;
serviceFeeFixed?: number;
serviceFeeLabel?: string;
serviceFeePercent?: number;
}) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
};
Defined in: client.ts:3493
Fee Profiles methods
create()
create: (request: {
name: string;
serviceFeeEnabled?: boolean;
serviceFeeFixed?: number;
serviceFeeLabel?: string;
serviceFeePercent?: number;
}) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
Create fee profile Create an org-level fee configuration that sales channels can reference
Parameters
| Parameter | Type |
|---|---|
request | { name: string; serviceFeeEnabled?: boolean; serviceFeeFixed?: number; serviceFeeLabel?: string; serviceFeePercent?: number; } |
request.name | string |
request.serviceFeeEnabled? | boolean |
request.serviceFeeFixed? | number |
request.serviceFeeLabel? | string |
request.serviceFeePercent? | number |
Returns
Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>
Operation Id
createFeeProfile
delete()
delete: (profileId: string) => Promise<boolean>;
Delete fee profile Soft-delete a fee profile
Parameters
| Parameter | Type |
|---|---|
profileId | string |
Returns
Promise<boolean>
Operation Id
deleteFeeProfile
get()
get: (profileId: string) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
Get fee profile Get a fee profile by ID
Parameters
| Parameter | Type |
|---|---|
profileId | string |
Returns
Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>
Operation Id
getFeeProfile
list()
list: () => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}[]>;
List fee profiles List the organisation's fee profiles
Returns
Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}[]>
Operation Id
listFeeProfiles
update()
update: (profileId: string, request: {
name?: string;
serviceFeeEnabled?: boolean;
serviceFeeFixed?: number;
serviceFeeLabel?: string;
serviceFeePercent?: number;
}) => Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>;
Update fee profile Update a fee profile
Parameters
| Parameter | Type |
|---|---|
profileId | string |
request | { name?: string; serviceFeeEnabled?: boolean; serviceFeeFixed?: number; serviceFeeLabel?: string; serviceFeePercent?: number; } |
request.name? | string |
request.serviceFeeEnabled? | boolean |
request.serviceFeeFixed? | number |
request.serviceFeeLabel? | string |
request.serviceFeePercent? | number |
Returns
Promise<{
createdAt: string;
deletedAt: string | null;
id: string;
isDeleted: boolean;
name: string;
organisationId: string;
serviceFeeEnabled: boolean;
serviceFeeFixed: number | null;
serviceFeeLabel: string | null;
serviceFeePercent: string | null;
updatedAt: string;
}>
Operation Id
updateFeeProfile
identityProviders
identityProviders: {
get: (id: string) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>;
list: (options?: {
organisationId?: string;
}) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}[]>;
update: (id: string, request: {
allowedClientIds?: string[];
cacheTtl?: number;
configuration?: {
[key: string]: unknown;
};
emailDomain?: string | null;
isDefault?: boolean;
isEnabled?: boolean;
scopes?: string[];
}) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>;
};
Defined in: client.ts:1051
Identity Providers methods
get()
get: (id: string) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>;
Get identity provider Get a specific identity provider by ID
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>
Operation Id
getIdentityProvider
list()
list: (options?: {
organisationId?: string;
}) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}[]>;
List identity providers List all identity providers for the organisation
Parameters
| Parameter | Type |
|---|---|
options? | { organisationId?: string; } |
options.organisationId? | string |
Returns
Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}[]>
Operation Id
listIdentityProviders
update()
update: (id: string, request: {
allowedClientIds?: string[];
cacheTtl?: number;
configuration?: {
[key: string]: unknown;
};
emailDomain?: string | null;
isDefault?: boolean;
isEnabled?: boolean;
scopes?: string[];
}) => Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>;
Update identity provider Update an identity provider configuration
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | - |
request | { allowedClientIds?: string[]; cacheTtl?: number; configuration?: { [key: string]: unknown; }; emailDomain?: string | null; isDefault?: boolean; isEnabled?: boolean; scopes?: string[]; } | - |
request.allowedClientIds? | string[] | Example [ "backstage-app" ] |
request.cacheTtl? | number | Example 600 |
request.configuration? | { [key: string]: unknown; } | Example {} |
request.emailDomain? | string | null | Example @example.com |
request.isDefault? | boolean | Example false |
request.isEnabled? | boolean | Example true |
request.scopes? | string[] | Example [ "openid", "profile", "email" ] |
Returns
Promise<{
allowedClientIds: string[];
authorizationEndpoint: string | null;
cacheTtl: number;
clientId: string | null;
configuration: | {
[key: string]: unknown;
}
| null;
createdAt: string;
emailDomain: string | null;
id: string;
isDefault: boolean;
isEnabled: boolean;
issuer: string;
jwksUri: string;
jwksUriInternal: string | null;
organisationId: string | null;
providerType: string;
scopes: string[];
supportsPkce: boolean;
tokenEndpoint: string | null;
tokenEndpointInternal: string | null;
updatedAt: string;
userinfoEndpoint: string | null;
userinfoEndpointInternal: string | null;
}>
Operation Id
updateIdentityProvider
integrations
integrations: {
get: (id: string) => Promise<any>;
list: () => Promise<any>;
listConnectedApps: () => Promise<any>;
revokeConnection: (id: string) => Promise<any>;
};
Defined in: client.ts:5283
Integrations methods
get()
get: (id: string) => Promise<any>;
Get an integration
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<any>
Operation Id
getIntegration
list()
list: () => Promise<any>;
List the integration marketplace The marketplace catalogue (connected apps + provider integrations) with this org’s status for each.
Returns
Promise<any>
Operation Id
listIntegrations
listConnectedApps()
listConnectedApps: () => Promise<any>;
List connected OAuth apps for the org
Returns
Promise<any>
Operation Id
listConnectedApps
revokeConnection()
revokeConnection: (id: string) => Promise<any>;
Revoke a connected app
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<any>
Operation Id
revokeIntegrationConnection
inventory
inventory: {
create: (request: {
accountId: string;
eventId?: string;
eventLayoutAreaId?: string;
eventOccurrenceId?: string;
isAllocated?: boolean;
metadata?: Record<string, any>;
productId?: string;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
delete: (id: string, options?: {
accountId: string;
}) => Promise<string>;
get: (id: string, options?: {
accountId: string;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
getAuditLog: (id: string, options?: {
accountId: string;
}) => Promise<{
action: string;
actorId: string | null;
actorType: string | null;
changes: {
[key: string]: unknown;
};
createdAt: string;
id: number;
inventoryId: string;
referenceId: string | null;
referenceType: string | null;
}[]>;
list: (options?: {
eventId?: string;
eventOccurrenceId?: string;
isAllocated?: "true" | "false";
productId?: string;
sourceType?: "event_occurrence_area" | "product";
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}[]>;
updateCapacity: (id: string, request: {
accountId: string;
totalCapacity: number;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
};
Defined in: client.ts:2228
Inventory methods
create()
create: (request: {
accountId: string;
eventId?: string;
eventLayoutAreaId?: string;
eventOccurrenceId?: string;
isAllocated?: boolean;
metadata?: Record<string, any>;
productId?: string;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
Create inventory Create a new inventory bucket for tracking capacity
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; eventId?: string; eventLayoutAreaId?: string; eventOccurrenceId?: string; isAllocated?: boolean; metadata?: Record<string, any>; productId?: string; sourceType: "event_occurrence_area" | "product"; totalCapacity: number; } |
request.accountId | string |
request.eventId? | string |
request.eventLayoutAreaId? | string |
request.eventOccurrenceId? | string |
request.isAllocated? | boolean |
request.metadata? | Record<string, any> |
request.productId? | string |
request.sourceType | "event_occurrence_area" | "product" |
request.totalCapacity | number |
Returns
Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>
Operation Id
createInventory
delete()
delete: (id: string, options?: {
accountId: string;
}) => Promise<string>;
Delete inventory Delete an inventory bucket (only if no confirmed reservations)
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { accountId: string; } |
options.accountId? | string |
Returns
Promise<string>
Operation Id
deleteInventory
get()
get: (id: string, options?: {
accountId: string;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
Get inventory Get a specific inventory bucket by ID
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { accountId: string; } |
options.accountId? | string |
Returns
Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>
Operation Id
getInventory
getAuditLog()
getAuditLog: (id: string, options?: {
accountId: string;
}) => Promise<{
action: string;
actorId: string | null;
actorType: string | null;
changes: {
[key: string]: unknown;
};
createdAt: string;
id: number;
inventoryId: string;
referenceId: string | null;
referenceType: string | null;
}[]>;
Get inventory audit log Get the audit log for an inventory bucket
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { accountId: string; } |
options.accountId? | string |
Returns
Promise<{
action: string;
actorId: string | null;
actorType: string | null;
changes: {
[key: string]: unknown;
};
createdAt: string;
id: number;
inventoryId: string;
referenceId: string | null;
referenceType: string | null;
}[]>
Operation Id
getInventoryAuditLog
list()
list: (options?: {
eventId?: string;
eventOccurrenceId?: string;
isAllocated?: "true" | "false";
productId?: string;
sourceType?: "event_occurrence_area" | "product";
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}[]>;
List inventory List all inventory buckets for the organisation with optional filtering
Parameters
| Parameter | Type |
|---|---|
options? | { eventId?: string; eventOccurrenceId?: string; isAllocated?: "true" | "false"; productId?: string; sourceType?: "event_occurrence_area" | "product"; } |
options.eventId? | string |
options.eventOccurrenceId? | string |
options.isAllocated? | "true" | "false" |
options.productId? | string |
options.sourceType? | "event_occurrence_area" | "product" |
Returns
Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}[]>
Operation Id
listInventory
updateCapacity()
updateCapacity: (id: string, request: {
accountId: string;
totalCapacity: number;
}) => Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>;
Update inventory capacity Update the total capacity of an inventory bucket
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { accountId: string; totalCapacity: number; } |
request.accountId | string |
request.totalCapacity | number |
Returns
Promise<{
accountId: string;
available: number;
confirmed: number;
createdAt: string;
eventId: string | null;
eventLayoutAreaId: string | null;
eventOccurrenceId: string | null;
held: number;
id: string;
isAllocated: boolean;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
productId: string | null;
reserved: number;
sourceType: "event_occurrence_area" | "product";
totalCapacity: number;
updatedAt: string;
version: number;
}>
Operation Id
updateInventoryCapacity
inventoryHolds
inventoryHolds: {
createHold: (request: {
accountId: string;
expiresAt?: string;
heldBy: string;
inventoryId: string;
quantity?: number;
reason: string;
seatIds?: string[];
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
releaseHold: (id: string, request: {
accountId: string;
}) => Promise<string>;
};
Defined in: client.ts:2492
Inventory Holds methods
createHold()
createHold: (request: {
accountId: string;
expiresAt?: string;
heldBy: string;
inventoryId: string;
quantity?: number;
reason: string;
seatIds?: string[];
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
Create hold Create a hold on inventory (for VIPs, promoters, etc.)
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; expiresAt?: string; heldBy: string; inventoryId: string; quantity?: number; reason: string; seatIds?: string[]; } |
request.accountId | string |
request.expiresAt? | string |
request.heldBy | string |
request.inventoryId | string |
request.quantity? | number |
request.reason | string |
request.seatIds? | string[] |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>
Operation Id
createHold
releaseHold()
releaseHold: (id: string, request: {
accountId: string;
}) => Promise<string>;
Release hold Release a hold and return inventory to available
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { accountId: string; } |
request.accountId | string |
Returns
Promise<string>
Operation Id
releaseHold
inventoryReservations
inventoryReservations: {
checkAvailability: (request: {
requests: {
inventoryId: string;
quantity?: number;
seatIds?: string[];
}[];
}) => Promise<{
available: boolean;
availableQuantity: number;
requestedQuantity: number;
}>;
confirmReservation: (id: string, request: {
accountId: string;
referenceId?: string;
referenceType?: "subscription" | "order" | "hold";
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
extendReservation: (id: string, request: {
expiresAt: string;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
getReservation: (id: string, options?: {
accountId: string;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
listReservations: (options?: {
accountId?: string;
inventoryId?: string;
referenceId?: string;
referenceType?: "subscription" | "order" | "hold";
type?: "confirmed" | "maintenance" | "hold" | "temporary";
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}[]>;
releaseReservation: (id: string, request: {
accountId: string;
}) => Promise<string>;
reserve: (request: {
accountId: string;
inventoryId: string;
quantity?: number;
referenceId: string;
referenceType: "subscription" | "order" | "hold";
seatIds?: string[];
ttlSeconds?: number;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
};
Defined in: client.ts:2377
Inventory Reservations methods
checkAvailability()
checkAvailability: (request: {
requests: {
inventoryId: string;
quantity?: number;
seatIds?: string[];
}[];
}) => Promise<{
available: boolean;
availableQuantity: number;
requestedQuantity: number;
}>;
Check availability Check if requested quantity is available in inventory
Parameters
| Parameter | Type |
|---|---|
request | { requests: { inventoryId: string; quantity?: number; seatIds?: string[]; }[]; } |
request.requests | { inventoryId: string; quantity?: number; seatIds?: string[]; }[] |
Returns
Promise<{
available: boolean;
availableQuantity: number;
requestedQuantity: number;
}>
Operation Id
checkAvailability
confirmReservation()
confirmReservation: (id: string, request: {
accountId: string;
referenceId?: string;
referenceType?: "subscription" | "order" | "hold";
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
Confirm reservation Confirm a temporary reservation (converts reserved to confirmed)
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { accountId: string; referenceId?: string; referenceType?: "subscription" | "order" | "hold"; } |
request.accountId | string |
request.referenceId? | string |
request.referenceType? | "subscription" | "order" | "hold" |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>
Operation Id
confirmReservation
extendReservation()
extendReservation: (id: string, request: {
expiresAt: string;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
Extend reservation Extend the expiry time of a temporary reservation
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { expiresAt: string; } |
request.expiresAt | string |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>
Operation Id
extendReservation
getReservation()
getReservation: (id: string, options?: {
accountId: string;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
Get reservation Get a specific reservation by ID
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { accountId: string; } |
options.accountId? | string |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>
Operation Id
getReservation
listReservations()
listReservations: (options?: {
accountId?: string;
inventoryId?: string;
referenceId?: string;
referenceType?: "subscription" | "order" | "hold";
type?: "confirmed" | "maintenance" | "hold" | "temporary";
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}[]>;
List reservations List all reservations with optional filtering
Parameters
| Parameter | Type |
|---|---|
options? | { accountId?: string; inventoryId?: string; referenceId?: string; referenceType?: "subscription" | "order" | "hold"; type?: "confirmed" | "maintenance" | "hold" | "temporary"; } |
options.accountId? | string |
options.inventoryId? | string |
options.referenceId? | string |
options.referenceType? | "subscription" | "order" | "hold" |
options.type? | "confirmed" | "maintenance" | "hold" | "temporary" |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}[]>
Operation Id
listReservations
releaseReservation()
releaseReservation: (id: string, request: {
accountId: string;
}) => Promise<string>;
Release reservation Release a reservation and return inventory to available
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { accountId: string; } |
request.accountId | string |
Returns
Promise<string>
Operation Id
releaseReservation
reserve()
reserve: (request: {
accountId: string;
inventoryId: string;
quantity?: number;
referenceId: string;
referenceType: "subscription" | "order" | "hold";
seatIds?: string[];
ttlSeconds?: number;
}) => Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>;
Reserve inventory Create a temporary reservation for GA or allocated seats
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; inventoryId: string; quantity?: number; referenceId: string; referenceType: "subscription" | "order" | "hold"; seatIds?: string[]; ttlSeconds?: number; } |
request.accountId | string |
request.inventoryId | string |
request.quantity? | number |
request.referenceId | string |
request.referenceType | "subscription" | "order" | "hold" |
request.seatIds? | string[] |
request.ttlSeconds? | number |
Returns
Promise<{
accountId: string;
createdAt: string;
expiresAt: string | null;
heldBy: string | null;
id: string;
inventoryId: string;
metadata: | {
[key: string]: unknown;
}
| null;
organisationId: string;
quantity: number;
reason: string | null;
referenceId: string | null;
referenceType: "subscription" | "order" | "hold" | null;
seatIds: string[] | null;
type: "confirmed" | "maintenance" | "hold" | "temporary";
updatedAt: string;
}>
Operation Id
reserveInventory
inventorySeats
inventorySeats: {
importSeats: (id: string, request: {
seats: {
attributes?: Record<string, any>;
eventLayoutSeatId?: string;
isAccessible?: boolean;
isCompanion?: boolean;
priceCategory?: string;
rowName: string;
seatNumber: string;
}[];
}) => Promise<{
count: number;
seats: {
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[];
}>;
listSeats: (id: string, options?: {
isAccessible?: "true" | "false";
priceCategory?: string;
rowName?: string;
status?: "available" | "held" | "reserved" | "confirmed" | "maintenance";
}) => Promise<{
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[]>;
};
Defined in: client.ts:2337
Inventory Seats methods
importSeats()
importSeats: (id: string, request: {
seats: {
attributes?: Record<string, any>;
eventLayoutSeatId?: string;
isAccessible?: boolean;
isCompanion?: boolean;
priceCategory?: string;
rowName: string;
seatNumber: string;
}[];
}) => Promise<{
count: number;
seats: {
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[];
}>;
Bulk import seats Import seats into an allocated inventory bucket
Parameters
| Parameter | Type |
|---|---|
id | string |
request | { seats: { attributes?: Record<string, any>; eventLayoutSeatId?: string; isAccessible?: boolean; isCompanion?: boolean; priceCategory?: string; rowName: string; seatNumber: string; }[]; } |
request.seats | { attributes?: Record<string, any>; eventLayoutSeatId?: string; isAccessible?: boolean; isCompanion?: boolean; priceCategory?: string; rowName: string; seatNumber: string; }[] |
Returns
Promise<{
count: number;
seats: {
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[];
}>
Operation Id
bulkImportSeats
listSeats()
listSeats: (id: string, options?: {
isAccessible?: "true" | "false";
priceCategory?: string;
rowName?: string;
status?: "available" | "held" | "reserved" | "confirmed" | "maintenance";
}) => Promise<{
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[]>;
List inventory seats List all seats for an allocated inventory bucket
Parameters
| Parameter | Type |
|---|---|
id | string |
options? | { isAccessible?: "true" | "false"; priceCategory?: string; rowName?: string; status?: "available" | "held" | "reserved" | "confirmed" | "maintenance"; } |
options.isAccessible? | "true" | "false" |
options.priceCategory? | string |
options.rowName? | string |
options.status? | "available" | "held" | "reserved" | "confirmed" | "maintenance" |
Returns
Promise<{
accountId: string;
attributes: | {
[key: string]: unknown;
}
| null;
createdAt: string;
eventLayoutSeatId: string | null;
id: string;
inventoryId: string;
isAccessible: boolean;
isCompanion: boolean;
organisationId: string;
priceCategory: string | null;
reservationId: string | null;
rowName: string;
seatNumber: string;
status: "available" | "held" | "reserved" | "confirmed" | "maintenance";
updatedAt: string;
version: number;
}[]>
Operation Id
listInventorySeats
locations
locations: {
create: (request: {
accountId: string;
description?: string;
name: string;
}) => Promise<any>;
delete: (locationId: string) => Promise<any>;
get: (locationId: string) => Promise<any>;
list: () => Promise<any>;
update: (locationId: string, request: {
description?: any;
name?: string;
}) => Promise<any>;
};
Defined in: client.ts:4778
Locations methods
create()
create: (request: {
accountId: string;
description?: string;
name: string;
}) => Promise<any>;
Create location
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; description?: string; name: string; } |
request.accountId | string |
request.description? | string |
request.name | string |
Returns
Promise<any>
Operation Id
createLocation
delete()
delete: (locationId: string) => Promise<any>;
Delete location
Parameters
| Parameter | Type |
|---|---|
locationId | string |
Returns
Promise<any>
Operation Id
deleteLocation
get()
get: (locationId: string) => Promise<any>;
Get location
Parameters
| Parameter | Type |
|---|---|
locationId | string |
Returns
Promise<any>
Operation Id
getLocation
list()
list: () => Promise<any>;
List locations
Returns
Promise<any>
Operation Id
listLocations
update()
update: (locationId: string, request: {
description?: any;
name?: string;
}) => Promise<any>;
Update location
Parameters
| Parameter | Type |
|---|---|
locationId | string |
request | { description?: any; name?: string; } |
request.description? | any |
request.name? | string |
Returns
Promise<any>
Operation Id
updateLocation
me
me: {
current: () => Promise<{
email: string;
externalUserId?: string;
firstName?: string;
id: string;
identityProvider?: string;
lastName?: string;
}>;
organisations: () => Promise<{
id: string;
logoUrl?: string;
name: string;
primaryColor?: string;
secondaryColor?: string;
slug: string;
userId: string;
}[]>;
permissions: (options?: {
action?: string;
resource?: string;
}) => Promise<{
filters: {
action: string | null;
resource: string | null;
};
isOrgAdmin: boolean;
permissions: {
accounts: string[];
isAllAccounts: boolean;
permission: string;
}[];
}>;
roles: () => Promise<{
isOrgAdmin: boolean;
roles: {
accountId: string;
description: string | null;
id: string;
isSystemRole: boolean;
name: string | null;
}[];
}>;
};
Defined in: client.ts:878
Me methods
current()
current: () => Promise<{
email: string;
externalUserId?: string;
firstName?: string;
id: string;
identityProvider?: string;
lastName?: string;
}>;
Get current user Get the currently authenticated user information
Returns
Promise<{
email: string;
externalUserId?: string;
firstName?: string;
id: string;
identityProvider?: string;
lastName?: string;
}>
Operation Id
getCurrentUser
organisations()
organisations: () => Promise<{
id: string;
logoUrl?: string;
name: string;
primaryColor?: string;
secondaryColor?: string;
slug: string;
userId: string;
}[]>;
Get my organisations Get all organisations the current user is a member of
Returns
Promise<{
id: string;
logoUrl?: string;
name: string;
primaryColor?: string;
secondaryColor?: string;
slug: string;
userId: string;
}[]>
Operation Id
getMyOrganisations
permissions()
permissions: (options?: {
action?: string;
resource?: string;
}) => Promise<{
filters: {
action: string | null;
resource: string | null;
};
isOrgAdmin: boolean;
permissions: {
accounts: string[];
isAllAccounts: boolean;
permission: string;
}[];
}>;
Get my permissions Get the current user's effective permissions based on their role assignments. Supports filtering by resource and/or action.
Parameters
| Parameter | Type |
|---|---|
options? | { action?: string; resource?: string; } |
options.action? | string |
options.resource? | string |
Returns
Promise<{
filters: {
action: string | null;
resource: string | null;
};
isOrgAdmin: boolean;
permissions: {
accounts: string[];
isAllAccounts: boolean;
permission: string;
}[];
}>
Operation Id
getMyPermissions
roles()
roles: () => Promise<{
isOrgAdmin: boolean;
roles: {
accountId: string;
description: string | null;
id: string;
isSystemRole: boolean;
name: string | null;
}[];
}>;
Get my roles Get the current user's role assignments with role info (name, description). Does not include permissions - use /me/permissions for that.
Returns
Promise<{
isOrgAdmin: boolean;
roles: {
accountId: string;
description: string | null;
id: string;
isSystemRole: boolean;
name: string | null;
}[];
}>
Operation Id
getMyRoles
meta
meta: {
versions: () => Promise<{
current: string;
resolved: string;
versions: {
breakingChanges: string[];
date: string;
deprecatedAt: string | null;
status: "current" | "supported" | "deprecated" | "sunset";
summary: string;
sunsetAt: string | null;
}[];
}>;
};
Defined in: client.ts:783
Meta methods
versions()
versions: () => Promise<{
current: string;
resolved: string;
versions: {
breakingChanges: string[];
date: string;
deprecatedAt: string | null;
status: "current" | "supported" | "deprecated" | "sunset";
summary: string;
sunsetAt: string | null;
}[];
}>;
List API versions Lists all dated API versions with their lifecycle status. Pin a version per-request with the TL-Version header; organisations are pinned to the version current at signup by default.
Returns
Promise<{
current: string;
resolved: string;
versions: {
breakingChanges: string[];
date: string;
deprecatedAt: string | null;
status: "current" | "supported" | "deprecated" | "sunset";
summary: string;
sunsetAt: string | null;
}[];
}>
Operation Id
listApiVersions
orders
orders: {
addItem: (orderId: string, request: {
description?: string;
feeDetails?: Record<string, any>;
metadata?: Record<string, any>;
name: string;
productDetails?: Record<string, any>;
quantity?: number;
ticketDetails?: Record<string, any>;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
}) => Promise<{
item: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
};
order: {
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
};
}>;
cancel: (orderId: string, request: {
reason: string;
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
create: (request: {
accountId: string;
channel?: string;
currency?: string;
customerId?: string;
customerNotes?: string;
expiresInMinutes?: number;
internalNotes?: string;
isGuestCheckout?: boolean;
items?: {
description?: string;
feeDetails?: Record<string, any>;
metadata?: Record<string, any>;
name: string;
productDetails?: Record<string, any>;
quantity?: number;
ticketDetails?: Record<string, any>;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
}[];
metadata?: Record<string, any>;
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
get: (orderId: string) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
getByNumber: (orderNumber: string) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
getPasses: (orderId: string) => Promise<{
entitlements: {
createdAt: string;
currency: string | null;
eventOccurrenceId: string | null;
id: string;
name: string;
orderLineItemId: string;
passId: string | null;
redemptionCount: number;
redemptionLimit: number | null;
seatLabel: string | null;
status: string;
ticketTypeId: string | null;
type: string;
unitPrice: number | null;
}[];
passes: {
barcode: string;
createdAt: string;
customerId: string | null;
holderEmail: string | null;
holderName: string | null;
id: string;
issuedAt: string;
status: string;
type: string;
}[];
redemptions: {
createdAt: string;
deviceId: string | null;
entitlementId: string;
id: string;
location: string | null;
passId: string;
redeemedBy: string | null;
rejectionReason: string | null;
reversalReason: string | null;
reversedAt: string | null;
status: string;
}[];
}>;
getPassPdf: (orderId: string, passId: string) => Promise<any>;
getPaymentStatus: (orderId: string) => Promise<{
amount: number | null;
currency: string | null;
failedAt: string | null;
failureReason: string | null;
paidAt: string | null;
paymentId: string | null;
status: | "cancelled"
| "pending"
| "succeeded"
| "failed"
| "processing"
| "requires_action"
| "none";
}>;
initiatePayment: (orderId: string, request: {
metadata?: Record<string, any>;
paymentMethod: | "bank_transfer"
| "online_card"
| "online_bank_transfer"
| "online_wallet"
| "in_person_card"
| "in_person_cash"
| "cheque";
returnUrl?: string;
}) => Promise<{
clientSecret: string | null;
expiresAt: string | null;
paymentId: string;
redirectUrl: string | null;
status: "pending" | "succeeded" | "failed" | "processing" | "requires_action";
}>;
list: (options?: {
channel?: string;
cursor?: string;
customerId?: string;
fromDate?: string;
limit?: string;
page?: string;
search?: string;
status?: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
toDate?: string;
updatedSince?: string;
}) => Promise<{
orders: {
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: ...]: ...;
}
| null;
id: string;
metadata: | {
[key: ...]: ...;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: ...]: ...;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: ...]: ...;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}[];
pagination: {
limit: number;
page: number;
total: number;
totalPages: number;
};
}>;
printPass: (orderId: string, passId: string, request: {
printerId: string;
type?: "print.ticket" | "print.label" | "print.receipt";
}) => Promise<any>;
removeItem: (orderId: string, itemId: string) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
resendConfirmation: (orderId: string) => Promise<{
attachments: number;
messageId?: string;
recipient: string | null;
sent: boolean;
skippedReason?: | "already_sent"
| "no_recipient"
| "not_configured"
| "order_not_confirmed";
}>;
transitionStatus: (orderId: string, request: {
status: | "completed"
| "cancelled"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
update: (orderId: string, request: {
addItems?: {
description?: string;
feeDetails?: Record<string, any>;
metadata?: Record<string, any>;
name: string;
productDetails?: Record<string, any>;
quantity?: number;
ticketDetails?: Record<string, any>;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
}[];
customerId?: string;
customerNotes?: string;
extendExpiry?: boolean;
internalNotes?: string;
metadata?: Record<string, any>;
removeItems?: string[];
updateItems?: {
itemId: string;
updates: {
metadata?: Record<string, any>;
quantity?: number;
unitPrice?: number;
};
}[];
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
updateItem: (orderId: string, itemId: string, request: {
metadata?: Record<string, any>;
quantity?: number;
unitPrice?: number;
}) => Promise<{
item: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
};
order: {
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
};
}>;
validate: (orderId: string, request: {
}) => Promise<{
errors: {
code: string;
itemId?: string;
message: string;
}[];
valid: boolean;
}>;
};
Defined in: client.ts:2623
Orders methods
addItem()
addItem: (orderId: string, request: {
description?: string;
feeDetails?: Record<string, any>;
metadata?: Record<string, any>;
name: string;
productDetails?: Record<string, any>;
quantity?: number;
ticketDetails?: Record<string, any>;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
}) => Promise<{
item: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
};
order: {
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
};
}>;
Add line item Add a line item to an order
Parameters
| Parameter | Type |
|---|---|
orderId | string |
request | { description?: string; feeDetails?: Record<string, any>; metadata?: Record<string, any>; name: string; productDetails?: Record<string, any>; quantity?: number; ticketDetails?: Record<string, any>; type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount"; unitPrice: number; } |
request.description? | string |
request.feeDetails? | Record<string, any> |
request.metadata? | Record<string, any> |
request.name | string |
request.productDetails? | Record<string, any> |
request.quantity? | number |
request.ticketDetails? | Record<string, any> |
request.type | "product" | "ticket" | "addon" | "fee" | "tax" | "discount" |
request.unitPrice | number |
Returns
Promise<{
item: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
};
order: {
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
};
}>
Operation Id
addOrderLineItem
cancel()
cancel: (orderId: string, request: {
reason: string;
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
Cancel order Cancel an order with a reason
Parameters
| Parameter | Type |
|---|---|
orderId | string |
request | { reason: string; } |
request.reason | string |
Returns
Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>
Operation Id
cancelOrder
create()
create: (request: {
accountId: string;
channel?: string;
currency?: string;
customerId?: string;
customerNotes?: string;
expiresInMinutes?: number;
internalNotes?: string;
isGuestCheckout?: boolean;
items?: {
description?: string;
feeDetails?: Record<string, any>;
metadata?: Record<string, any>;
name: string;
productDetails?: Record<string, any>;
quantity?: number;
ticketDetails?: Record<string, any>;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
}[];
metadata?: Record<string, any>;
}) => Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>;
Create order Create a new order with optional line items
Parameters
| Parameter | Type |
|---|---|
request | { accountId: string; channel?: string; currency?: string; customerId?: string; customerNotes?: string; expiresInMinutes?: number; internalNotes?: string; isGuestCheckout?: boolean; items?: { description?: string; feeDetails?: Record<string, any>; metadata?: Record<string, any>; name: string; productDetails?: Record<string, any>; quantity?: number; ticketDetails?: Record<string, any>; type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount"; unitPrice: number; }[]; metadata?: Record<string, any>; } |
request.accountId | string |
request.channel? | string |
request.currency? | string |
request.customerId? | string |
request.customerNotes? | string |
request.expiresInMinutes? | number |
request.internalNotes? | string |
request.isGuestCheckout? | boolean |
request.items? | { description?: string; feeDetails?: Record<string, any>; metadata?: Record<string, any>; name: string; productDetails?: Record<string, any>; quantity?: number; ticketDetails?: Record<string, any>; type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount"; unitPrice: number; }[] |
request.metadata? | Record<string, any> |
Returns
Promise<{
accountId: string;
cancellationReason: string | null;
cancelledAt: string | null;
channel: string | null;
completedAt: string | null;
confirmedAt: string | null;
createdAt: string;
currency: string;
customerId: string | null;
customerNotes: string | null;
expiresAt: string | null;
id: string;
internalNotes: string | null;
isGuestCheckout: boolean;
items?: {
createdAt: string;
description: string | null;
discountAmount: number;
feeDetails: | {
[key: string]: unknown;
}
| null;
id: string;
metadata: | {
[key: string]: unknown;
}
| null;
name: string;
orderId: string;
productDetails: | {
[key: string]: unknown;
}
| null;
quantity: number;
subtotal: number;
taxAmount: number;
ticketDetails: | {
[key: string]: unknown;
}
| null;
total: number;
type: "product" | "ticket" | "addon" | "fee" | "tax" | "discount";
unitPrice: number;
updatedAt: string;
}[];
metadata: | {
[key: string]: unknown;
}
| null;
orderNumber: string;
organisationId: string;
status: | "completed"
| "cancelled"
| "pending"
| "failed"
| "refunded"
| "confirmed"
| "processing"
| "expired";
subtotal: number;
total: number;
totalDiscounts: number;
totalFees: number;
totalPaid: number;
totalRefunded: number;
totalTax: number;
updatedAt: string;
}>