BackstageClient.knowledge
BackstageClient.knowledge in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / knowledge
knowledge: {
archiveArticle: (articleId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;
createArticle: (request: {
body?: string;
category?: string | null;
hidden?: boolean;
language?: string;
scopeId?: string;
scopeType: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
slug?: string;
status?: "draft" | "published" | "archived";
tags?: string[];
tier?: "public" | "internal";
title?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;
createFact: (request: {
hidden?: boolean;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
scopeId?: string;
scopeType: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
value?: unknown;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;
deleteFact: (factId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;
getArticle: (articleId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;
getFact: (factId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;
listArticles: (options?: {
category?: string;
includeArchived?: "true" | "false";
language?: string;
scopeId?: string;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
status?: "draft" | "published" | "archived";
tier?: "public" | "internal";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}[]>;
listFactKeys: (requestOptions?: RequestOptions) => Promise<{
description: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
storable: boolean;
system: "only" | "wins" | "fills" | null;
valueSchema: {
[key: string]: unknown;
};
}[]>;
listFacts: (options?: {
key?: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
scopeId?: string;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}[]>;
listGaps: (options?: {
channelId?: string;
eventId?: string;
limit?: number;
since?: string;
}, requestOptions?: RequestOptions) => Promise<{
channelId: string;
count: number;
eventId: string | null;
firstAskedAt: string;
lastAskedAt: string;
normalised: string;
question: string;
scopeId: string;
scopeType: "event" | "sales_channel";
}[]>;
previewArticle: (articleId: string, options?: {
accountId?: string;
channelId?: string;
eventId?: string;
occurrenceId?: string;
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
applies: boolean;
article: {
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
};
rendered: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}>;
refundPolicyText: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
}, requestOptions?: RequestOptions) => Promise<{
customerMessage: string | null;
exchanges: string;
refunds: string;
source: "account" | "organisation" | "default" | "event";
text: string;
}>;
resolve: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
language?: string;
occurrenceId?: string;
tier?: "public" | "all";
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
articles: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
}[];
facts: {
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
source: {
factId?: string;
id?: string;
kind: "system" | "stored";
scopeId?: string | null;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
type?: "venue" | "event" | "occurrence";
};
text: string;
value?: unknown;
}[];
hidden: {
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
key: string;
}[];
levels: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
}[];
overridden: {
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
}[];
restricted: boolean;
}>;
search: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
limit?: number;
occurrenceId?: string;
q: string;
tier?: "public" | "all";
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
rank: number;
snippet: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}[]>;
updateArticle: (articleId: string, request: {
body?: string;
category?: string | null;
hidden?: boolean;
language?: string;
slug?: string;
status?: "draft" | "published" | "archived";
tags?: string[];
tier?: "public" | "internal";
title?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;
updateFact: (factId: string, request: {
hidden?: boolean;
value?: unknown;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;
};Defined in: client.ts:8498
Knowledge methods
archiveArticle()#
archiveArticle: (articleId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;Archive a knowledge base article Archive the article: it is shown nowhere and its slug is free. Nothing is deleted. Idempotent.
Parameters#
| Parameter | Type |
|---|---|
articleId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>
Operation Id#
archiveKnowledgeArticle
createArticle()#
createArticle: (request: {
body?: string;
category?: string | null;
hidden?: boolean;
language?: string;
scopeId?: string;
scopeType: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
slug?: string;
status?: "draft" | "published" | "archived";
tags?: string[];
tier?: "public" | "internal";
title?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;Write a knowledge base article
An article at one scope: the organisation, an account, a venue, a sales channel, an event or an occurrence. The most specific article with a slug wins wherever it applies; hidden: true with a slug hides the wider one instead. Needs knowledge.write on the scope's account (over every account for an organisation article, 403 KNOWLEDGE_NEEDS_ORGANISATION_ACCESS otherwise), and the plan's knowledge base (403 PLAN_ENTITLEMENT_REQUIRED naming support.knowledgeBase). Platform defaults are read-only (403 KNOWLEDGE_PLATFORM_READ_ONLY). A slug in use at the scope is 409 KNOWLEDGE_ARTICLE_SLUG_TAKEN.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { body?: string; category?: string | null; hidden?: boolean; language?: string; scopeId?: string; scopeType: | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel"; slug?: string; status?: "draft" | "published" | "archived"; tags?: string[]; tier?: "public" | "internal"; title?: string; } | - |
request.body? | string | Description Markdown. {{event.doorsOpen}}-style placeholders are rendered from the resolved facts when read. Required unless the article only hides one Example Doors open at {{event.doorsOpen}}. |
request.category? | string | null | Example Arrival |
request.hidden? | boolean | Description true makes this a hide marker: the article with this slug from a wider scope is not shown here. Needs a slug; takes no content Example false |
request.language? | string | Description A BCP 47 tag. Defaults to en Example en |
request.scopeId? | string | Description What the scope names: an account, venue, sales channel, event or occurrence id. Leave out for the organisation Example evt_abc123 |
request.scopeType? | | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel" | - |
request.slug? | string | Description The key a more specific article overrides or hides. Unique per scope and language among articles that are not archived. Derived from the title when left out Example when-do-doors-open |
request.status? | "draft" | "published" | "archived" | - |
request.tags? | string[] | Example [ "arrival", "doors" ] |
request.tier? | "public" | "internal" | - |
request.title? | string | Description Required unless the article only hides one Example When do doors open? |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>
Operation Id#
createKnowledgeArticle
createFact()#
createFact: (request: {
hidden?: boolean;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
scopeId?: string;
scopeType: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
value?: unknown;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;Store a fact
A typed fact at one scope, its value checked against the key's schema (400 KNOWLEDGE_FACT_VALUE_INVALID), or hidden: true to hide the inherited value. A key the system alone holds is 400 KNOWLEDGE_FACT_SYSTEM_DERIVED; a key already stored at the scope is 409 KNOWLEDGE_FACT_EXISTS. Reach and plan as for articles.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { hidden?: boolean; key: | "doors_open" | "start_time" | "running_time" | "interval" | "age_guidance" | "event_name" | "venue_name" | "address" | "access_features" | "parking" | "bag_policy" | "public_transport" | "food_and_drink" | "cloakroom"; scopeId?: string; scopeType: | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel"; value?: unknown; } | - |
request.hidden? | boolean | Description true makes this a hide marker: the inherited value of this key is not shown here. Takes no value Example false |
request.key? | | "doors_open" | "start_time" | "running_time" | "interval" | "age_guidance" | "event_name" | "venue_name" | "address" | "access_features" | "parking" | "bag_policy" | "public_transport" | "food_and_drink" | "cloakroom" | - |
request.scopeId? | string | Description What the scope names. Leave out for the organisation Example ven_abc123 |
request.scopeType? | | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel" | - |
request.value? | unknown | Description The value, in the key's own shape (GET /knowledge/fact-keys). Required unless the fact only hides one Example { * "time": "19:00" * } |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>
Operation Id#
createKnowledgeFact
deleteFact()#
deleteFact: (factId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;Delete a stored fact Remove the fact: the wider scope's value (or the system's) applies again.
Parameters#
| Parameter | Type |
|---|---|
factId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>
Operation Id#
deleteKnowledgeFact
getArticle()#
getArticle: (articleId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;Get a knowledge base article The article as written, placeholders included, with any placeholder that names no fact listed in unknownPlaceholders.
Parameters#
| Parameter | Type |
|---|---|
articleId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>
Operation Id#
getKnowledgeArticle
getFact()#
getFact: (factId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;Get a stored fact
Parameters#
| Parameter | Type |
|---|---|
factId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>
Operation Id#
getKnowledgeFact
listArticles()#
listArticles: (options?: {
category?: string;
includeArchived?: "true" | "false";
language?: string;
scopeId?: string;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
status?: "draft" | "published" | "archived";
tier?: "public" | "internal";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}[]>;List knowledge base articles The organisation's articles on accounts the caller can read, its organisation articles and the platform defaults, newest edit first. Archived ones are left out unless status=archived or includeArchived=true.
Parameters#
| Parameter | Type |
|---|---|
options? | { category?: string; includeArchived?: "true" | "false"; language?: string; scopeId?: string; scopeType?: | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel"; status?: "draft" | "published" | "archived"; tier?: "public" | "internal"; } |
options.category? | string |
options.includeArchived? | "true" | "false" |
options.language? | string |
options.scopeId? | string |
options.scopeType? | | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel" |
options.status? | "draft" | "published" | "archived" |
options.tier? | "public" | "internal" |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}[]>
Operation Id#
listKnowledgeArticles
listFactKeys()#
listFactKeys: (requestOptions?: RequestOptions) => Promise<{
description: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
storable: boolean;
system: "only" | "wins" | "fills" | null;
valueSchema: {
[key: string]: unknown;
};
}[]>;List the fact keys
The fact catalogue: every key, its placeholder, the JSON Schema of its value, and how the system's own field relates to it (only: from the system, cannot be stored; wins; fills).
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
description: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
storable: boolean;
system: "only" | "wins" | "fills" | null;
valueSchema: {
[key: string]: unknown;
};
}[]>
Operation Id#
listKnowledgeFactKeys
listFacts()#
listFacts: (options?: {
key?: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
scopeId?: string;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}[]>;List stored facts Stored facts and hide markers on accounts the caller can read, the organisation's and the platform's. Values the system holds are not rows: GET /knowledge/resolved shows them.
Parameters#
| Parameter | Type |
|---|---|
options? | { key?: | "doors_open" | "start_time" | "running_time" | "interval" | "age_guidance" | "event_name" | "venue_name" | "address" | "access_features" | "parking" | "bag_policy" | "public_transport" | "food_and_drink" | "cloakroom"; scopeId?: string; scopeType?: | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel"; } |
options.key? | | "doors_open" | "start_time" | "running_time" | "interval" | "age_guidance" | "event_name" | "venue_name" | "address" | "access_features" | "parking" | "bag_policy" | "public_transport" | "food_and_drink" | "cloakroom" |
options.scopeId? | string |
options.scopeType? | | "venue" | "account" | "platform" | "organisation" | "event" | "occurrence" | "sales_channel" |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}[]>
Operation Id#
listKnowledgeFacts
listGaps()#
listGaps: (options?: {
channelId?: string;
eventId?: string;
limit?: number;
since?: string;
}, requestOptions?: RequestOptions) => Promise<{
channelId: string;
count: number;
eventId: string | null;
firstAskedAt: string;
lastAskedAt: string;
normalised: string;
question: string;
scopeId: string;
scopeType: "event" | "sales_channel";
}[]>;Questions the Concierge AI could not answer
The knowledge gaps: questions buyers asked the Concierge AI that nothing in the knowledge base answered, grouped by their normalised text within a scope (the sales channel, or the event the buyer was looking at), with how many conversations asked each and when it was first and last asked, most asked first. The questions are stored with email addresses, long numbers and links removed. Covers the sales channels of the accounts the caller can read; the last 90 days unless since says otherwise.
Parameters#
| Parameter | Type |
|---|---|
options? | { channelId?: string; eventId?: string; limit?: number; since?: string; } |
options.channelId? | string |
options.eventId? | string |
options.limit? | number |
options.since? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
channelId: string;
count: number;
eventId: string | null;
firstAskedAt: string;
lastAskedAt: string;
normalised: string;
question: string;
scopeId: string;
scopeType: "event" | "sales_channel";
}[]>
Operation Id#
listKnowledgeGaps
previewArticle()#
previewArticle: (articleId: string, options?: {
accountId?: string;
channelId?: string;
eventId?: string;
occurrenceId?: string;
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
applies: boolean;
article: {
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
};
rendered: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}>;Preview a knowledge base article in a context
The body with placeholders rendered from the facts of a context (a channel, event, occurrence, venue or account; the article's own scope when none is given), whether a reader there would see it, and every placeholder that rendered as nothing and why: unknown (no fact by that name) or no_value (the fact has no value there). Drafts preview too.
Parameters#
| Parameter | Type |
|---|---|
articleId | string |
options? | { accountId?: string; channelId?: string; eventId?: string; occurrenceId?: string; venueId?: string; } |
options.accountId? | string |
options.channelId? | string |
options.eventId? | string |
options.occurrenceId? | string |
options.venueId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
applies: boolean;
article: {
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
};
rendered: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}>
Operation Id#
previewKnowledgeArticle
refundPolicyText()#
refundPolicyText: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
}, requestOptions?: RequestOptions) => Promise<{
customerMessage: string | null;
exchanges: string;
refunds: string;
source: "account" | "organisation" | "default" | "event";
text: string;
}>;Generated refund and exchange policy text The words a customer reads about refunds and exchanges, generated from the policy that is enforced (the event's override, then the selling account's default, then the organisation's) and the organisation's customerMessage. Never written by hand. With a channel, the account is the channel's, as it is for an order placed there.
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; channelId?: string; eventId?: string; } |
options.accountId? | string |
options.channelId? | string |
options.eventId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
customerMessage: string | null;
exchanges: string;
refunds: string;
source: "account" | "organisation" | "default" | "event";
text: string;
}>
Operation Id#
getKnowledgeRefundPolicyText
resolve()#
resolve: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
language?: string;
occurrenceId?: string;
tier?: "public" | "all";
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
articles: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
}[];
facts: {
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
source: {
factId?: string;
id?: string;
kind: "system" | "stored";
scopeId?: string | null;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
type?: "venue" | "event" | "occurrence";
};
text: string;
value?: unknown;
}[];
hidden: {
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
key: string;
}[];
levels: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
}[];
overridden: {
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
}[];
restricted: boolean;
}>;Resolve the knowledge base for a context What applies to a question asked on a channel about an event, occurrence, venue or account: the scope chain (most specific first), the resolved facts with where each came from (a stored row or the system's own field), the articles that apply, and what was hidden or overridden. tier=public shows it as a buyer reads it.
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; channelId?: string; eventId?: string; language?: string; occurrenceId?: string; tier?: "public" | "all"; venueId?: string; } |
options.accountId? | string |
options.channelId? | string |
options.eventId? | string |
options.language? | string |
options.occurrenceId? | string |
options.tier? | "public" | "all" |
options.venueId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
articles: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
}[];
facts: {
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
label: string;
placeholder: string;
source: {
factId?: string;
id?: string;
kind: "system" | "stored";
scopeId?: string | null;
scopeType?: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
type?: "venue" | "event" | "occurrence";
};
text: string;
value?: unknown;
}[];
hidden: {
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
key: string;
}[];
levels: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
}[];
overridden: {
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
by: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
}[];
restricted: boolean;
}>
Operation Id#
getResolvedKnowledge
search()#
search: (options?: {
accountId?: string;
channelId?: string;
eventId?: string;
limit?: number;
occurrenceId?: string;
q: string;
tier?: "public" | "all";
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
rank: number;
snippet: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}[]>;Search the knowledge base in a context Full-text search over the articles that apply in a context, ranked: there is no search across contexts. Internal articles are included unless tier=public.
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; channelId?: string; eventId?: string; limit?: number; occurrenceId?: string; q: string; tier?: "public" | "all"; venueId?: string; } |
options.accountId? | string |
options.channelId? | string |
options.eventId? | string |
options.limit? | number |
options.occurrenceId? | string |
options.q? | string |
options.tier? | "public" | "all" |
options.venueId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
article: {
id: string;
language: string;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
tier: "public" | "internal";
title: string;
};
rank: number;
snippet: string;
unresolvedPlaceholders: {
placeholder: string;
reason: "unknown" | "no_value";
}[];
}[]>
Operation Id#
searchKnowledgeArticles
updateArticle()#
updateArticle: (articleId: string, request: {
body?: string;
category?: string | null;
hidden?: boolean;
language?: string;
slug?: string;
status?: "draft" | "published" | "archived";
tags?: string[];
tier?: "public" | "internal";
title?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>;Edit a knowledge base article Change the content, slug, language, status (publish, unpublish to draft, archive), tier or hide flag. The scope is fixed. Editing needs no plan entitlement: a plan never takes away what was written.
Parameters#
| Parameter | Type | Description |
|---|---|---|
articleId | string | - |
request | { body?: string; category?: string | null; hidden?: boolean; language?: string; slug?: string; status?: "draft" | "published" | "archived"; tags?: string[]; tier?: "public" | "internal"; title?: string; } | - |
request.body? | string | - |
request.category? | string | null | Example Arrival |
request.hidden? | boolean | - |
request.language? | string | Description A BCP 47 tag. Defaults to en Example en |
request.slug? | string | Description The key a more specific article overrides or hides. Unique per scope and language among articles that are not archived. Derived from the title when left out Example when-do-doors-open |
request.status? | "draft" | "published" | "archived" | - |
request.tags? | string[] | Example [ "arrival", "doors" ] |
request.tier? | "public" | "internal" | - |
request.title? | string | - |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
body: string;
category: string | null;
createdAt: string;
hidden: boolean;
id: string;
language: string;
platformDefault: boolean;
publishedAt: string | null;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
slug: string;
status: "draft" | "published" | "archived";
tags: string[];
tier: "public" | "internal";
title: string;
unknownPlaceholders: string[];
updatedAt: string;
}>
Operation Id#
updateKnowledgeArticle
updateFact()#
updateFact: (factId: string, request: {
hidden?: boolean;
value?: unknown;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>;Change a stored fact
A new value (which also clears a hide), or hidden: true to turn it into a hide marker. The key and scope are fixed.
Parameters#
| Parameter | Type |
|---|---|
factId | string |
request | { hidden?: boolean; value?: unknown; } |
request.hidden? | boolean |
request.value? | unknown |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
createdAt: string;
hidden: boolean;
id: string;
key: | "doors_open"
| "start_time"
| "running_time"
| "interval"
| "age_guidance"
| "event_name"
| "venue_name"
| "address"
| "access_features"
| "parking"
| "bag_policy"
| "public_transport"
| "food_and_drink"
| "cloakroom";
platformDefault: boolean;
scope: {
id: string | null;
type: | "venue"
| "account"
| "platform"
| "organisation"
| "event"
| "occurrence"
| "sales_channel";
};
text: string | null;
updatedAt: string;
value?: unknown;
}>
Operation Id#
updateKnowledgeFact