News, honours and trophies
The content group is what a club publishes about itself: news, the honours board, life members and trophies. It is
read-only, needs only your key, and every operation takes an optional member token from the
login. Without a token you get what any visitor to the club's lovebowls site sees. With one, a member of the club
also gets its members-only news.
| Operation | Path | SDK |
|---|---|---|
| List news | GET /v1/clubs/{clubId}/news?limit=&cursor= | lb.listNews(clubId, { limit?, cursor? }), lb.iterateNews(clubId, { limit? }) |
| One article | GET /v1/clubs/{clubId}/news/{articleId} | lb.getNewsArticle(clubId, articleId) |
| Honours board | GET /v1/clubs/{clubId}/honours | lb.listHonours(clubId) |
| Life members | GET /v1/clubs/{clubId}/life-members | lb.listLifeMembers(clubId) |
| Trophies | GET /v1/clubs/{clubId}/trophies | lb.listTrophies(clubId) |
| One trophy and its winners | GET /v1/clubs/{clubId}/trophies/{trophyId} | lb.getTrophy(clubId, trophyId) |
Who sees what
- A visitor (no token) gets every article inside its show window except the members-only ones.
- A member of the club (a token of someone who is a member of this club) also gets the members-only articles, each with
membersOnly: true. - A signed-in person who is not a member of this club (a member of another club, or someone whose membership is pending or
invited) gets exactly the visitor's answer. It is never a
403, so a page can send the token whenever it holds one and not worry who the person is. - A token that Wix refuses is
401 member_token_invalid, not a silent fall-back to the public answer. The SDK renews an expired token once and, if that fails, reads as a visitor. - The honours board, life members and trophies are the same for everyone. (On a draft club the token still matters: only a member of an unpublished club can read it, see Authentication.)
Caching
A call without a token is answered Cache-Control: public, max-age=60. A call with a token is private, no-store. Every answer of
these operations carries Vary: Origin, Authorization, so a browser or proxy never hands the public answer to a signed-in member, or a
member's answer to a visitor. Honours, life members and trophies change rarely, but a club can edit them at any time: a minute is the
longest an answer can be stale.
News
GET /v1/clubs/{clubId}/news answers one page, newest first (by the article's showFrom, then by id):
{
"items": [
{
"id": "9f2c...",
"title": "The green is open",
"summary": "The north green opens on Saturday.",
"categories": ["Club"],
"imageUrl": "https://static.wixstatic.com/media/....jpg",
"imageCaption": null,
"membersOnly": false,
"publishedAt": "2027-04-01T09:12:00.000Z",
"showFrom": "2027-04-01T00:00:00.000Z",
"showUntil": "2027-05-01T23:59:59.000Z"
}
],
"nextCursor": null
}
- Show window. An article is listed from
showFromuntilshowUntil. Before or after that it is not in the list, and asking for it by id is404 news_not_found. summaryis the club's own lead text. If the club wrote none, it is the first 300 characters or so of the body as plain text, cut at a word, with no ellipsis (add your own). It isnullonly when the article has neither.imageUrlis the article's picture as an absolutehttpsURL, ornull. Texts that the club left empty arenull, never"".- Paging is as in Paging:
limit1 to 100 (default 50), andnextCursoruntil it isnull. The cursor is bound to the club and to whether you sent a token, because a member's list holds articles a visitor's does not. A cursor made without a token is400 invalid_cursorwith one, and the reverse: keep the sign-in state the same while you page (iterateNewsdoes). As with fixtures, an article that appears or expires between two requests can shift a row.
One article
GET /v1/clubs/{clubId}/news/{articleId} is the summary fields plus:
| Field | |
|---|---|
bodyHtml | The body as sanitised HTML. See below. |
attachments | Up to five files, [{ "name": "Minutes.pdf", "url": "https://..." }], as absolute https links. |
An article that is not there for this caller is 404 news_not_found: unknown, outside its show window, another club's, or
members-only without a member of this club. The API does not say which.
Attachments are links to the files themselves. A file's address is not access-controlled by Wix, so anyone who has the link can open it; the API only lists an article's attachments to a caller who may read the article (a members-only article's links reach members only). Do not treat a link as a secret.
The sanitised body
The club's editor stores HTML, and the API cleans it before it leaves, so it is safe to put in a page. What survives:
| Kept | How |
|---|---|
p br strong b em i u s ul ol li h2 h3 h4 h5 h6 blockquote table thead tbody tr th td | h1 becomes h2: an article inside your page must not add a second page heading. td and th keep colspan and rowspan. |
span | Only these styles: font-weight (bold, normal, 400-900), font-style (italic, normal), text-decoration (underline, line-through, none). That is how the editor writes bold, italic and underline. Nothing else is styled; there is no class, id or colour. |
a | Only href, and only an absolute http, https or mailto address. rel="noopener noreferrer" is added and target removed. A relative or other link (javascript:, data:, #top) loses its href and keeps its text. |
img | Only src (absolute https; a Wix image is converted) and alt. An image with no usable address is removed. |
Everything else is gone: scripts and their text, style and link elements, frames, objects, forms, svg, math, event attributes
such as onclick, and any tag the list does not name (an unknown tag loses the tag and keeps its text). Attributes are always
double-quoted.
Insert it with innerHTML and nothing else - and still serve your page with a sensible
Content-Security-Policy, as you would for any content you did not write yourself:
const article = await lb.getNewsArticle("CLUB_ID", id);
// bodyHtml is already sanitised by the API: this is the one place it is inserted as HTML
container.innerHTML = article.bodyHtml;
// everything else is text
title.textContent = article.title;
Your own styles apply to what is inserted (the club's colours and sizes are not carried over), so the article looks like your page.
If your Content-Security-Policy forbids inline styles (a style-src without 'unsafe-inline', and no style-src-attr), the
browser will not apply the style on a span, and bold, italic and underline disappear. Either allow style-src-attr 'unsafe-inline', or
turn the spans into elements before you insert them, which is what the live example does under its strict policy: parse
bodyHtml in a <template>, and replace each span by strong (font-weight bold), em (font-style italic), u or s
(text-decoration) around its children. Pictures in the body are https://static.wixstatic.com/... addresses, so they load only if
your img-src allows that host.
Honours board
GET /v1/clubs/{clubId}/honours answers { "items": [...] }, newest year first (then by title), not paged:
{ "id": "a1...", "title": "Club Singles", "year": 2026,
"winners": [ { "kind": "member", "name": "J. Smith" }, { "kind": "nonMember", "name": "A. Guest" }, { "kind": "formerMember", "name": null } ] }
A winner has a kind and a name:
kind | Meaning | name |
|---|---|---|
member | A current member of the club. | Shown as the club's public Honours page shows them: an initial and surname, J. Smith. It can be null for a member who has no name set. |
nonMember | A name the club typed in (a guest, a visitor from another club). | As typed. |
formerMember | Someone who won as a member and has since left the club. | Always null. The place is kept; the person is not named. |
Winners come in the club's own order, members and former members first, then the typed-in names. A year can have no winners recorded (winners: []).
The API never carries a member id, so the winners cannot be tied back to a member record. Within one year, entries are ordered by title.
Life members
GET /v1/clubs/{clubId}/life-members answers { "items": [...] } in the club's own order, not paged:
{ "id": "b2...", "name": "A. Person", "pictureUrl": null, "founder": true }
pictureUrl is an absolute https URL or null; founder marks the club's founders.
Trophies
GET /v1/clubs/{clubId}/trophies lists the club's trophies, in the club's own order, without their winners:
{ "id": "c3...", "name": "Mixed Fours Cup", "knownAs": "The Fours", "imageUrl": null,
"firstYear": 1990, "winnersPerYear": 4, "singles": false, "notes": null }
knownAs, notes, firstYear and winnersPerYear are null when the club has not set them. A trophy's accompanying document link
is members-only on the lovebowls site and is not part of the API.
GET /v1/clubs/{clubId}/trophies/{trophyId} is the same trophy plus years, every year on record, newest first:
{ "id": "c3...", "name": "Mixed Fours Cup", "...": "...",
"years": [
{ "year": 2026, "awarded": true, "winners": [ { "kind": "member", "name": "Jo Smith" } ], "imageUrl": null },
{ "year": 2025, "awarded": false, "winners": [], "imageUrl": null }
] }
awarded: falsemeans the club recorded that the trophy was not awarded that year;winnersis then empty.- Winners are the same
member,nonMemberandformerMemberas on the honours board, except that a trophy shows a member's full name, as the lovebowls trophy page does. - A trophy that is not in this club, or does not exist, is
404 trophy_not_found. A trophy id that cannot be an id is the same404, without any lookup.
Errors
| Status | code | When |
|---|---|---|
| 404 | news_not_found | No such article for this caller: unknown, outside its show window, another club's, or members-only and the caller is not a member of this club. |
| 404 | trophy_not_found | No such trophy in this club. |
| 400 | invalid_cursor | The news cursor is unknown, tampered with, or was made with the other sign-in state. |
| 401 | member_token_invalid | The token you sent is not one Wix accepts. |
| 404 | club_not_found | The key's club is gone, or it is a draft club and the token (if any) is not a member's. |
See Errors for the shape of every error.
try {
const article = await lb.getNewsArticle("CLUB_ID", id);
} catch (error) {
if (error.code === "news_not_found") return null; // gone, expired, or members-only
throw error;
}