MCP Server
The Lifepeaks MCP server exposes part of the v2 API as tools, a resource, and prompts for any MCP-compatible AI agent. Tools reuse the existing application services. Commerce tools follow REST validation; actor-bound staff, event, finance and access-management tools also enforce the signed-in user's backend rights.
It covers headless commerce and order creation, the company's commerce settings, its brand and storefront, experience products, issued gift cards, branded gift-card PDF templates, and the Lifepeaks-hosted order page.
It also covers the money actions in a gift card's life — redeeming, reversing a redemption, refunding a payment, issuing on invoice, activating a campaign code, and resending — each behind the safeguards for money actions. Payment confirmation, capture, and negotiated settlement are not exposed as tools; those remain with your own server against the REST API.
Connecting
Use this URL in your remote MCP client:
https://mcp.lifepeaks.dk/mcp
The server uses Streamable HTTP and supports OAuth login or API-key authentication.
Sign in with Lifepeaks
Add the endpoint to a client that supports remote MCP OAuth and choose Connect or Sign in. Sign in with your Lifepeaks account and approve the permissions available to your current role. There is no company to choose: the connection works on the companies your account manages. Select all selects every available MCP permission.
Live is the default. Test, under Advanced options, works only on demo: production refuses a Test connection. Both modes use the connected environment's data, so selecting Live on demo still acts on demo.
Access tokens expire after one hour and clients can refresh them automatically. The connection expires after 90 days and requires a new login. Disconnecting in a client may remove only its local credentials. To revoke server access immediately, use Connected applications in Lifepeaks.
Available tools depend on the granted permissions. Read-only credentials expose read tools.
One connection reaches every company you manage when it holds the companies:read permission, which is selected by default. Your own company is the default; if your account cannot manage it, the first company you can manage is. A system administrator can act for every active company; a root or super administrator for their own company and the companies assigned to it. Access is checked again on every call, so a removed role or assignment takes effect immediately. See Working with several companies.
Install
Codex
For browser login:
codex mcp add lifepeaks --url https://mcp.lifepeaks.dk/mcp
codex mcp login lifepeaks
For an API key, make LIFEPEAKS_API_KEY available in Codex's environment and configure:
[mcp_servers.lifepeaks]
url = "https://mcp.lifepeaks.dk/mcp"
bearer_token_env_var = "LIFEPEAKS_API_KEY"
Use one authentication method per client entry, and keep the key out of committed configuration files.
Claude Code
For OAuth, add the server and follow the authentication prompt in /mcp:
claude mcp add --transport http lifepeaks https://mcp.lifepeaks.dk/mcp
For an API key:
claude mcp add --transport http lifepeaks https://mcp.lifepeaks.dk/mcp \
--header "Authorization: Bearer $LIFEPEAKS_API_KEY"
Desktop applications, Cursor, and VS Code
Add https://mcp.lifepeaks.dk/mcp as a remote HTTP MCP server and use the client's OAuth sign-in flow. Clients supporting custom headers can instead send:
Authorization: Bearer <your-Lifepeaks-API-key>
OAuth setup is automatic; no client ID or client secret is required. Remote connector support depends on the application's version and account settings.
Development and demo
Use https://mcp-dev.lifepeaks.dk/mcp for development and https://mcp-demo.lifepeaks.dk/mcp for demo. Sign in to the environment you are connecting to. Credentials are specific to that environment.
Working with several companies
Every tool accepts an optional company argument. Leave it out to act for the connection's default company, which is your own. To act for another company, call companies_list, then pass that company's id as company on each call:
{ "name": "company_get_settings", "arguments": { "company": "acme-cafe" } }
The server keeps no selected company between calls, so name the company on every call that should act for it. A company the connection cannot reach answers Company not found, the same answer as a company that does not exist.
A sign-in connection acts for another company only with the companies:read permission. Without it, it acts only for its default company; connections made before multi-company support must sign in again to gain it. The permissions granted at sign-in apply to every company. An API key follows the REST company selector exactly: its own company and the companies assigned to it. Listing them with companies_list needs companies:read, as GET /v2/companies does.
| Tool | Scope required | Description |
|---|---|---|
companies_list | companies:read | List the companies this connection can act for, marking the one this call acted for. Optional search narrows by name or id; at most 50 are returned |
Role restrictions
OAuth consent shows only permissions available to the signed-in account's current role. The server intersects previously granted permissions with current roles on every request, checks the account IP allow-list, and rechecks company access before each tool handler. Removing a role, disabling an account or removing an assignment stops the affected access immediately. Ordinary API keys remain bounded by their scopes and company assignments; their creator is never an interactive user.
| Account role | Additional MCP capabilities |
|---|---|
| Employee | Staff order capabilities, quote and creation under the shop's individual payment/product restrictions; event registration/moves only where Claim access permits |
| Claimer | Event registration/moves where Claim access permits |
| Bookkeeper | Own-company issued settlements, settlement PDFs and accounting reads; no agency-child inheritance or administrator writes |
| PDF designer | Own native PDF layout and existing template operations; no company/user administration |
| Company administrator | Existing company commerce tools and role-checked partner operations; staff management covers subordinate users only |
| System administrator | Role-checked system operations with the account IP allow-list; API keys cannot substitute for this sign-in |
Individual services apply their backend company and capability rules in addition to consent. A company appearing in discovery does not confer every capability there. Financial reports and native PDF editing require the actor's own company. Staff creation uses Create Manually assignments; attendee operations use Claim assignments. Subordinate user access cannot alter the caller, administrators, platform roles, credentials or company assignments.
Staff orders, events, finance and native PDF layouts
| Tool | Scope | Contract |
|---|---|---|
staff_orders_capabilities, staff_orders_quote, staff_orders_create | orders:staff | OAuth staff actor required. The request is the staff Orders API body, including staff.payment (counter, on_the_house, invoice, payment_link), items, sender and delivery. Saved/custom vouchers, Stays fields and individual restrictions follow the shop. Creation requires confirmation and a durable idempotency key; revoked restrictions are checked before replay |
events_get_participant | events:register | Resolve a printed attendee code to real tkti_, tkt_, evt_ identifiers without exposing a full participant list. Virtual attendees are unavailable |
events_register_participant, events_move_participants | events:register | Actual Claim company access, confirmation and idempotency required. Moves apply to a wholly unredeemed ticket order within one company. Partly redeemed orders and selected-seat moves are unavailable; notification failure is separate from the committed move |
events_email_participants | events:write | Event administrator access, confirmation and idempotency required. At most 500 distinct eligible ticket orders. Reports processed recipients rather than delivered messages. This sends an ad hoc email without changing scheduled-event notification state. SMS is unavailable. An uncertain send is fenced against automatic retry |
events_export | events:write | Private embedded XLSX, sales or attendee (pax) workbook; maximum 5,000 ticket rows and 8 MiB |
finance_list_settlements, finance_get_settlement, finance_report | finance:read | Own-company issued snapshots and paginated accounting JSON with per-currency totals in major units. No invoice numbering, generation or payouts. active-turnover is ordinary outstanding balance; liability-turnover is the Stays expired-item definition |
finance_download_document | finance:read | Private embedded invoice or statement PDF for an issued paid own-company settlement. Pass settlement_id from the settlement tools and optional kind: invoice or statement (default invoice). No public download link, accounting changes or payouts |
company_users_list, company_user_roles_list | users:read | Visible subordinate staff/access profiles in an authorized company; no credential fields |
company_users_update | users:write | Confirmed targeted active/profile/restriction changes for another subordinate user; no administrator or platform role assignment |
pdf_layout_get, pdf_layout_update | pdf_templates:read, pdf_templates:write respectively | Own original native PDF positions/fonts (x, y, w, font_family, font_size); update requires confirmation. Shared/developer controls and immutable uploaded versions are unavailable. An active uploaded version continues to take precedence |
Additional commerce tools
| Tool | Scope | Contract |
|---|---|---|
orders_cancellable_items, orders_cancel | orders:cancel | Buyer withdrawal eligibility and selected cancellation through the existing payment cancellation owner. Cancellation requires confirmation and idempotency; unknown monetary outcomes remain fenced against retries |
recipients_import | orders:create or orders:staff | Base64 CSV/TXT/XLS/XLSX/ODS bytes, maximum 2.5 MB. Returns recipients and file row errors; accepts no local path or remote URL |
checkout_return_origins_list | companies:read | Approved checkout return origins |
checkout_return_origins_add, checkout_return_origins_remove | companies:write | Existing validated origin management with confirmation and idempotency |
commerce_preview_product, greeting_preview | products:read | Private embedded watermarked PDF examples through the existing rendering owners. Product examples cover value cards, experiences, event tickets, and special-offer vouchers, including configured extra pages; placeholders stand in for the redeemable code and QR image. Ticket/offer designs without enabled native fields are unavailable |
company_get_settings also reads gtm and analytics_brand. Updating these through company_update_settings requires system-administrator OAuth with the account IP allow-list; explicit null clears/restores their defaults.
Capabilities not exposed
Settlement PDFs use the selected settlement's invoice identity and period, with current bookkeeping detail data and company information. They are reconstructed documents, not archived historical originals. The download path excludes child-company data and does not update accounting or payment intervals. The old Google Analytics Universal Analytics v3 consent flow is unavailable through MCP. Refunds by arbitrary legacy payment IDs are not exposed. Existing item actions and partner-order refunds remain supported through their shared services, including confirmed gateway outcomes and reconciliation of uncertain refunds. New ticket-coupon sales are retired, while existing coupons remain redeemable. Credential issuance, platform payouts/provisioning and developer PDF controls remain outside this MCP surface.
Available tools
Headless commerce
| Tool | Scope required | Description |
|---|---|---|
commerce_list_products | products:read | List the products the company sells — its variable-value gift card, its experiences, its events and its special offers — with the limits, prices and fees of each. How a card can be delivered, what a buyer may add to it, and the terms come once, in company. Optional type, slug (an event's exact direct-link slug — the only way a private event is listed), limit (default 25) and cursor |
commerce_list_pickup_points | pickup_points:read | Find the courier's collection points near one postcode, for a postal order |
commerce_create_quote | quotes:create | Calculate an authoritative quote for up to twenty lines: gift cards and special offers together, or event tickets on their own |
commerce_get_order | orders:read | Read canonical order, payment, and fulfillment state |
commerce_list_orders | orders:read | List orders, newest first. Optional filters: status, payment_status, email, client_reference; page with limit and cursor |
orders_get_receipt | orders:read | Get the link to a paid order's payment receipt PDF; fetch the link with the same credential |
commerce_create_order | orders:create | Create an unpaid order — this never confirms payment |
commerce_create_checkout | checkout:create | Create a Lifepeaks-hosted QuickPay checkout for an unpaid order |
Amounts in these tools are whole numbers of the smallest unit of the currency, exactly as in the REST API: 50000 is DKK 500.00. Whole numbers of the smallest unit avoid rounding errors.
Commerce tools support all four product families. commerce_list_products returns the REST catalog, including gcv_ experiences, evt_ events, and so_ special offers. Quote and order tools accept up to twenty lines: gift cards (value and experience lines) and special offers may share one order and one payment, and each of those lines may carry its own recipient, greeting and delivery (carrier deliveries to the same postal address share postage; special offers are e-mailed only); event tickets are ordered on their own. Option-priced lines require product_option_id and reject amount. Experience and special-offer options may repeat, sharing their stock and quantity limits; event options may appear once. An order supports up to 1000 items. Include delivery in postal quotes to calculate shipping. Obtain a quote and buyer approval before creating an order. See Quote and order lines.
Card grouping. Quote and order line inputs accept cards: "separate" (default) or cards: "collective". Collective is available only for experience quantities greater than one, excluding SDH companies. One collective line issues one code with all its vouchers and needs one recipient in per-card recipient mode.
Fees follow fee_basis. Gift cards, experiences, and special offers charge per_line; events charge per_ticket. Display totals from the quote.
An event line carries what the organiser asked for. commerce_create_quote and commerce_create_order accept an optional ticket object on an event line: comment, code, collection_point_id and address. Each field is conditional on a value the product publishes — the event's comment.available and the option's requires.code, requires.address and requires.collection_point — so read the product and send only the fields it requires. A collection point is an epp_<n> from the event's own event.collection_points, not a value returned by commerce_list_pickup_points; those are courier collection points for posting a gift card. address and collection_point_id are alternatives, and one event accepts one comment however many lines name it.
A special offer publishes what the voucher is worth. redemption_value on an offer option is what the issued voucher can be spent on, and it is not always what the buyer pays: an offer configured to redeem at the regular price sells at amount and redeems at regular_amount. Report redemption_value when describing what the user is getting.
Business buyers use sender.company. Provide name and vat_number. The address fields street, postcode, city, and country must be provided together or omitted together. Business-only products require the full company address and return sender_company_required when it is missing. Read company_required or event.requires.company from the product. Postal recipient company names belong in delivery.address.company_name. Use buyer-supplied company details.
One recipient per card goes in recipients. commerce_create_order accepts recipients instead of recipient: one {name, email} per card, in line order, on gift-card orders with recipient_email delivery. The count must match the cards exactly. See One recipient per card.
A discount code is a plain string, and Lifepeaks does the arithmetic. commerce_create_quote and commerce_create_order accept discount_code, and Lifepeaks calculates the discount. The answer comes back as amounts.discount, a positive figure that is subtracted, and a top-level discount object naming the code and its percentage. total is subtotal − discount + fees + shipping. A code never reduces fees, never applies to an event ticket or a special offer, and a shipping code comes off amounts.shipping while leaving amounts.discount at 0.
A gift card pays through gift_cards. commerce_create_quote and commerce_create_order accept gift_cards: [{"code": "..."}] — one card, for tickets to one event, a card of the acting company that has not expired, and only when the event product says accepts_gift_cards: true. Otherwise the call is refused with gift_card_payment_not_enabled, and an expired card with gift_card_expired. The quote reports what the card pays as amounts.gift_card, and total is what is left. commerce_create_order still requires confirm=true: the order spends the card when it is created, and gives the value back if it is never paid. A card that covers the whole order pays it, so the order comes back paid and needs no checkout. Use only a code the user gave you. See Paying with a gift card.
Quotes do not reserve stock. Order creation rechecks quantity limits, stock, and capacity. Handle availability changes and obtain a revised quote when necessary.
Neither an event ticket nor a special offer can be posted. delivery.method of postal on such an order is refused, and their shipping is always 0.
Read delivery and greeting details from the answer rather than guessing them. These are the same for every product, so commerce_list_products sends them once, in its company object (GET /v2/products repeats them on each product). It carries delivery_methods — which of sender_email, recipient_email and postal the company offers, what each costs, and which can be scheduled — and personalization, which states the maximum greeting length and the pictures the company offers for the greeting page. An empty designs list means there is nothing to choose. commerce_create_order then carries the user's answers as greeting and delivery on the order body. See How the card is delivered.
commerce_list_pickup_points retrieves current courier collection points. Request them after the user provides a postcode. The tool is rate-limited and requires a two-letter ISO 3166-1 country code.
Postal priorities are product-specific. When the postal method includes priorities, send the selected spri_<n> ID as delivery.shipping_priority. Otherwise, omit it. Omitting a priority uses the default, cheapest rate published in destinations.
Marketing consent is recorded, never assumed. commerce_create_order accepts the same marketing_consent object as the HTTP body, so an agent can carry a user's answer onto the order. Send it only when the user was shown a consent sentence and acted on it, and record that sentence in consent_text verbatim: it is the evidence and must not be composed or paraphrased. Omit the object when nobody was asked. See Marketing consent.
Upload files yourself over HTTP. See Files and pictures. For a greeting picture, use the HTTP greeting-image upload-intent flow, then pass the finalized upload_id in greeting.image. A company design uses design_id; with neither, use source: "none".
Company commerce settings
| Tool | Scope required | Description |
|---|---|---|
company_get_settings | companies:read | Read card validity, amount range, notifications, partner delivery, own-post shipping prices, allowed delivery methods, website, languages, order-form URL, and Lifepeaks' commercial terms for tickets (ticket_fee, ticket_commission_percent, both including VAT at fee_vat_percent) |
company_update_settings | companies:write | Change commerce settings; omitted fields keep their value. Requires confirm=true; shipping and delivery-method changes also require idempotency_key. ticket_fee and ticket_commission_percent change only for a Lifepeaks system administrator signed in with their own account |
These are the same settings as GET and PATCH /v2/companies/{slug}/settings and follow the same rules, so a refused value names the field in the error. Amounts are decimals in the company's currency. See Company commerce settings.
Code batches and delivery prices
| Tool | Scope | Result |
|---|---|---|
code_batches_list | code_batches:read | Paged batches and code-state counts |
code_batches_get | code_batches:read | One code_batch_id |
code_batches_list_codes | code_batches:read | Codes and states for code_batch_id; optional limit and cursor |
code_batches_create | code_batches:write | Create a batch from a code_batch object |
code_batches_deactivate | code_batches:write | Deactivate unused codes; activated cards stay unchanged |
Code batch writes require OAuth sign-in by an active system administrator, confirm=true, and idempotency_key. An API-key connection cannot write code batches, even if its creator is a system administrator. Role and tenant access are checked again on every request. The optional company argument selects the target as for other tools. Read Preprinted code batches for all fields, units, validation, paging and export handling. The write scope is never a default grant.
campaign_name is buyer-visible: activation copies it into sender_name and receiver_name. It stores one name in the company's intended buyer language. Read languages.default first; this field does not accept translations or per-language fields. The administrator's IP restrictions apply to batch writes and changes to allowed_delivery_methods.
company_get_settings and company_update_settings also expose ownpost_shipping, use_company_postmail_amounts, postmail_a_amount, postmail_b_amount, and allowed_delivery_methods. Changes to these fields require idempotency_key as well as confirm=true. Prices are decimals in company currency. Delivery-method restrictions require system-admin OAuth; their list accepts recipient_email and postal, with sender email always available. Company-specific postal priorities take precedence over A/B fees. Read a fresh quote after a price change. Platform-wide postal prices cannot be changed through these tools.
code_batches_list_codes returns paged JSON. For a full CSV export, use authenticated GET /v2/code-batches/{code_batch_id}/codes with Accept: text/csv or ?format=csv. Include the company query parameter when acting for another company. There is no separate export tool or download URL.
Experience, event and special-offer products
| Tool | Scope required | Description |
|---|---|---|
commerce_create_product | products:write | Create one experience (type gift_card_variant, the default), one event (type event_ticket), or one special offer (type special_offer) with its options and per-language texts. Requires confirm=true |
commerce_update_product | products:write | Change an experience, event or special offer; options, when sent, is the whole new set. Requires confirm=true |
commerce_deactivate_product | products:write | Take an experience, event or special offer off sale. Nothing is deleted. Requires confirm=true |
These follow the rules of POST, PATCH, and DELETE /v2/products. An experience change is saved as a new version with a new product id, so read the catalog again after a change; events and special offers keep their product and retained option ids. Option prices are decimals in the company currency. An event answer carries links.order_form and links.shop, its direct links: report both to the user, because a private event can be reached no other way. See Managing experiences and events.
Files and pictures
| Tool | Scope required | Description |
|---|---|---|
upload_link_create | the write scope of the target | A confirmed, idempotent single-use link, valid for 30 minutes, for the agent to upload an experience image (experience_image), a greeting design (greeting_design), an event picture (event_image), a brand image (brand_asset) or a gift-card PDF template (pdf_template) |
upload_link_status | the write scope of the target | Whether the file arrived, and what it became |
If a picture is already online, pass its https URL as image_url on a write that accepts it. If you have the file, call upload_link_create (or POST /v2/upload-links). Upload the file yourself: PUT it to upload_url. Do not open a browser and do not ask the user to upload.
curl -X PUT --data-binary @file -H 'Content-Type: <type>' '<upload_url>'
Use a MIME type from accepted_types, keep the body within max_bytes, and upload before expires_at. The PUT answer contains status: "used" and the stored result; no poll is needed. Only if you cannot make HTTP requests, give the user the link url and poll upload_link_status.
The token in the URL is the only credential. Do not send an API key or session cookie to the upload URL. Each file is checked by its target's own rules; a refused file leaves the link usable. At most 20 links per company per hour.
Set up an event with Claude
A Lifepeaks system administrator connected with Sign in with Lifepeaks can set up a partner's event from a conversation. Example: Nordlys Bistro in Copenhagen wants a private dinner, "Winter Tasting Menu", on Thursday 10 December 2026 from 19:30 to 21:30 at Nordlysvej 12, 40 seats at DKK 450, on sale from 1 November until 10 December at 12:00, with a wide picture, a 2.0% + VAT commission and an 8 DKK + VAT ticket fee paid by the buyer.
- Pick the company.
companies_listwithsearch: "Nordlys"returns its id; name it ascompanyon every following call. - Check the commercial terms.
company_get_settingsanswersticket_fee,ticket_commission_percent,ticket_fee_paid_by,ticket_commission_paid_by_buyer_percentandfee_vat_percent. Both terms are stored including VAT, so at 25% "8 DKK + VAT" is aticket_feeof10and "2.0% + VAT" aticket_commission_percentof2.5. If they differ,company_update_settingssets them (system administrators only). The ticket fee is paid by the buyer whenticket_fee_paid_byisbuyer; the commission is paid by the buyer when the event says"commission_paid_by": "buyer"(step 3) or the company'sticket_commission_paid_by_buyer_percentis100. - Create the event, after the user confirms the details:
{
"company": "nordlys-bistro",
"confirm": true,
"idempotency_key": "nordlys-winter-menu-2026-12-10",
"product": {
"type": "event_ticket",
"name": { "da-DK": "Winter Tasting Menu", "en-GB": "Winter Tasting Menu" },
"description": { "da-DK": "…the full text with the menu…", "en-GB": "…the full text with the menu…" },
"venue": { "name": "Nordlys Bistro", "address": "Nordlysvej 12", "postcode": "1058 København K" },
"starts_at": "2026-12-10T19:30",
"ends_at": "2026-12-10T21:30",
"publish_from": "2026-11-01",
"publish_until": "2026-12-10T12:00",
"private": true,
"commission_paid_by": "buyer",
"options": [{ "name": { "da-DK": "Billet", "en-GB": "Ticket" }, "amount": "450", "stock": 40 }]
}
}
A plain-text description keeps its paragraphs and line breaks, so a menu can be pasted as it is. It may hold at most 2500 bytes of text once markup is stripped (æ, ø and å count as two); a longer one is refused with its size. The answer is the event (evt_<id>) with publication ("reasons": ["private"]), links, commission ("paid_by": "buyer") and, on each ticket type, buyer_price_per_ticket: here 45000 + 1000 + 1125 = 47125 øre, DKK 471,25 per ticket — the price, the 8 DKK + VAT fee and the 2.0% + VAT commission. Tell the user that figure.
4. Add the picture. For an online picture, send image_url in commerce_update_product. For a local file, call upload_link_create with target: "event_image" and the event's product_id, then PUT the bytes yourself to upload_url as described above. The answer contains the stored image_url.
5. Hand over the links. Give the organiser links.shop (and links.order_form). The event appears in no list, but both links show it and sell it for as long as the sale window is open. The slug at the end of the links never changes on a rename; url_slug sets it explicitly.
Campaigns and discount codes
| Tool | Scope required | Description |
|---|---|---|
promotions_list | promotions:read | Every gift-card campaign of every type, with live and a secret campaign's link code |
promotions_get | promotions:read | One campaign by id |
promotions_create | promotions:write | Create a discount or added-value campaign. Requires confirm=true |
promotions_update | promotions:write | Change a campaign; type and kind are fixed. Requires confirm=true |
promotions_deactivate | promotions:write | Switch a campaign off. Nothing is deleted. Requires confirm=true |
discount_codes_list | discount_codes:read | The company's discount codes, newest first, with live |
discount_codes_get | discount_codes:read | One code by id (dc_<n>) |
discount_codes_create | discount_codes:write | Create a percentage discount code. Requires confirm=true |
discount_codes_update | discount_codes:write | Change a code; applies_to, when sent, is the full list. Requires confirm=true |
discount_codes_deactivate | discount_codes:write | Switch a code off so quotes and orders refuse it. Requires confirm=true |
These follow the rules of /v2/promotions and /v2/discount-codes. Both change what a buyer pays: percent is a whole-number percentage, and a campaign's minimum_amount / maximum_amount are whole numbers in the smallest currency unit. Numbers and booleans sent as strings ("20", "true") are accepted. A discount code is paid by the company unless a signed-in Lifepeaks system administrator sets paid_by_company to false. Secret campaign codes and discount codes are confidential; an agent should not repeat them outside the conversation that asked for them. None of the four scopes is granted by default at sign-in. See Manage campaigns and discount codes.
Brand and storefront
| Tool | Scope required | Description |
|---|---|---|
brand_get | brand:read | Read the brand profile (display name, tagline, fonts, PDF footer line), its uploaded logos, and shop: the shop's current colours and texts |
shop_update | brand:write | Change shop colours, translated texts, hero_backdrop, and shared brand fields through profile. Requires confirm=true |
brand_delete_asset | brand:write | Delete logo, logo_on_light, or pdf_background through asset and refresh the default PDF. Requires confirm=true |
storefront_get_manifest | orderpage:read | Read what the company's shop at shop.lifepeaks.dk renders, in its default language or the one named by locale |
shop names each colour by what it paints on the shop:
| Colour | Paints |
|---|---|
page | Behind everything |
card | The boxes the content sits in |
text | All body copy |
button | Buy, Next and every other thing a buyer clicks |
button_text | The label on a button |
accent | The option a buyer has picked, and small highlights |
shop_update.profile accepts display_name, tagline, font_primary, font_secondary, and pdf_copyright_line as strings or null, using the REST brand validation. font_primary is the headline font and font_secondary the body font: a Google Fonts family name exactly as fonts.google.com writes it, such as Playfair Display. The shop serves the font from its own address. null returns to the classic order form's fonts. These fields are shared across languages. Localized shop copy belongs in texts; read the company languages first and update every available language.
Highlight, border and muted text are worked out from these and returned under shop.derived. The values are what the shop shows right now, whichever source they come from. shop_update changes only the colours it is sent; the others stay exactly as the shop showed them, including on a company's first save. A button_text or text that could not be read on its background is replaced with black or white, stored that way, and reported under adjusted. The default gift-card PDF uses button and button_text.
Shop texts are per language, under the tags in shop.languages.available: hero_title and hero_body (the headline and its paragraph), value_title and value_body (the gift card section), info_title and info_body (the "Information" box), and experiences_title. null or an empty string puts the generated sentence back; shop.default_texts shows it for each language. The shop is served in every language in shop.languages.available — shop.languages.default at the plain address, the others at their own (shop.lifepeaks.dk/<company>/en) — and each shows its own texts, so change a text in every language. Changes appear on the shop within about a minute. The classic order form reads none of this. hero_backdrop says whether the company's uploaded background photo is drawn behind the headline; false, or no photo uploaded, puts the gift-card picture beside it instead. The same changes can be made with the shop object of PATCH /v2/companies/{company_id}/brand, or on the "Shop & Brand" page of a company in the Lifepeaks admin, which previews unsaved changes on the real shop.
Issued gift cards
| Tool | Scope required | Description |
|---|---|---|
items_search | items:read | Search issued items by order_id, group_code, or search (5 characters or more), with optional status, type, and date filters |
items_get | items:read | Read one item by code: balance, validity, status, and what can be done with it |
items_cancel | items:write | Cancel, or discard, an item the company sold. Cancellation can refund the original payment within the cancellation period and before settlement; later discard returns no money. Requires confirm=true |
These are the same operations as /v2/items. Follow the 14-day cancellation policy and manual repayment process. After month closure/settlement, discard closes the card without returning money; the partner must repay the buyer directly. The actions that move a card's value are listed under Money actions.
Money actions
| Tool | Scope required | Same as | Description |
|---|---|---|---|
items_redeem | items:write | POST /v2/items/{code}/claim | Redeem all of an item (type all), an amount (type amount), or a number of pieces (type piece). A dormant campaign code is activated and redeemed; a GoDream code is redeemed at the partner. A scanned redeem link is accepted as the code |
items_reverse_redemption | items:write | POST /v2/items/{code}/refund | Put redeemed value back on an item the company sold. Moves no money to the buyer |
orders_redeem | items:write | POST /v2/orders/{order_id}/claim | Redeem every item of an order, or those of one group_code |
items_activate | items:write | POST /v2/items/{code}/activate | Activate a campaign code into a gift card |
items_resend | items:write | POST /v2/items/{code}/resend | E-mail the item's document again, to its own buyer or recipient address |
items_issue | orders:create and orders:settle | POST /v2/items | Issue gift cards settled on the company's negotiated invoice contract |
orders_refund | orders:refund | POST /v2/orders/{order_id}/refund | Close an order's remaining cards and return their whole unspent purchase value, or discard for a direct bank refund. A pending gateway outcome returns an rf_ ID and status: pending. Read GET /v2/refunds/{id} or wait for a refund webhook |
Every money action has these safeguards:
confirm=true, sent only after the user has approved that exact action.- A required
idempotency_key, reserved before the work starts and held for 30 days. A retry with the same key and arguments does not repeat the action; order refunds return the same refund ID with its current status; a retry while the first call is still running is refused with "An identical request is still in progress"; the same key with different arguments is refused as a conflict. Once the value has moved, the key is never released: if the answer could not be recorded, retries keep being refused as in progress until the key expires, rather than repeating the action. Only a call that stopped before moving anything can be retried with the same key. - Hints
destructiveHint: trueandidempotentHint: false, so a client asks the user before each call. - Test credentials never reach production: a Test connection or an
lp_test_key is refused there before any tool runs. - An audit record of every attempt and its outcome (executed, replayed, pending, refused, or declined): the company, the tool, its arguments including the amount, and who acted — the signed-in user, or the API key.
Units differ by tool, exactly as on the matching REST endpoint. items_redeem, items_reverse_redemption, items_activate, and items_issue take amount as a decimal in the major currency unit (125.50 is DKK 125.50). orders_refund takes a whole number of the smallest unit (12500 is DKK 125.00) and returns the whole unspent purchase value when amount is omitted. An explicit amount must equal that entire value; arbitrary partial balances are not supported.
Three rules are stricter than, or new to, the REST endpoints:
- Resending goes only to the item's own buyer or recipient e-mail, as
items_getreports them. Any other address is refused unless the connection is a Lifepeaks system administrator signed in with "Sign in with Lifepeaks".POST /v2/items/{code}/resendkeeps accepting any address, because partners use it for a buyer's new address. - Activating an open-value campaign code needs an
amountabove zero and inside the company's card range (card_amount_mintocard_amount_maxfromcompany_get_settings). A code activates once, even when two calls race.POST /v2/items/{code}/activatealso refuses an amount of zero or less and activates a code once, but does not apply the card range. - Refunding needs the
orders:refundpermission and issuing needsorders:settle. Neither is granted by default: choose them at sign-in, or on the API key.
Branded gift-card PDF templates
| Tool | Scope required | Description |
|---|---|---|
pdf_templates_get_current | pdf_templates:read | Read the template in force for a locale (defaults to da-DK); optional locale |
pdf_templates_list | pdf_templates:read | List stored template versions; optional locale narrows to one locale |
pdf_templates_get | pdf_templates:read | Read one template version |
pdf_templates_preview | pdf_templates:read | Get a controlled preview URL, with no storage details |
pdf_templates_create_upload_intent | pdf_templates:write | Create a short-lived upload target bound to a checksum and a size. The type is always application/pdf and is not an argument |
pdf_templates_finalize | pdf_templates:write | Validate an uploaded file into one immutable version |
pdf_templates_publish | pdf_templates:write | Select a validated version for future orders; optional layout configures separate card and greeting pages |
pdf_templates_revert_to_default | pdf_templates:write | Restore company-branded defaults across all locales |
Upload blank gift-card and greeting artwork as separate PDF versions, then pass the greeting version's template_id in pdf_templates_publish.layout.greeting. The card page draws only dynamic value, validity and code; receiver, giver and personal greeting do not belong in its background. Greeting fields use the existing Designer rules: place greetings_text and greetings_image, or one combined greetings_image_text / greetings_text_image field. Positions are Designer canvas pixels (x, y, w, optional h, font_size, font_color). Arbitrary HTML/CSS is rejected. Layout is fixed on first publication; a change requires a new card version. Re-publication without layout keeps the existing layout.
Example publication arguments (after the user approves publication):
{
"template_id": "pt_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"layout": {
"gift_card": { "value": { "x": 90, "y": 450, "w": 620 } },
"greeting": {
"template_id": "pt_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"fields": {
"greetings_image": { "x": 90, "y": 80, "w": 620, "h": 300 },
"greetings_text": { "x": 90, "y": 420, "w": 620, "h": 500 }
}
}
},
"idempotency_key": "publish-card-and-greeting-0001",
"confirm": true
}
Hosted order page
| Tool | Scope required | Description |
|---|---|---|
orderpage_get_current | orderpage:read | Read the live settings of one language (the company's default when locale is left out), with the company's languages and order_form_url |
orderpage_list_fields | orderpage:read | List every writable field with its type, constraints, and shows: one line saying where it appears |
orderpage_list_revisions | orderpage:read | List draft, published, and archived revisions; optional locale narrows to one locale |
orderpage_get_revision | orderpage:read | Read one revision, including its fields and ETag |
orderpage_preview_draft | orderpage:read | Preview a draft without touching the live page |
orderpage_create_draft | orderpage:write | Start a draft — the live page is unchanged |
orderpage_restore_revision | orderpage:write | Copy an earlier revision into a new draft, to undo a change |
orderpage_update_draft | orderpage:write | Edit a draft using its exact ETag |
orderpage_publish_draft | orderpage:write | Publish a reviewed draft to the live page. The answer carries order_form_url |
Resource
| Resource URI | Scope required | Description |
|---|---|---|
orderpage://schema | orderpage:read | The writable field catalog as a structured resource |
Built-in prompts
| Prompt | Appears when the key can | Purpose |
|---|---|---|
build_headless_checkout | Reach any commerce tool | The safe catalog-to-checkout workflow for a partner storefront |
customize_order_page | Read the order page | The draft-review-publish workflow for the hosted page |
Participants, reports, and subscribers
| Tool | Required scope | Purpose |
|---|---|---|
events_list_participants | reports:read | Read an event's participants by slug, optionally filtered by search |
reports_analytics | reports:read | Sales analytics with search, status, date_from, date_to, and order |
reports_claimed_items | reports:read | Redemption history with date_from, date_to, and order |
subscribers_list | reports:read | Confirmed paid subscribers and marketing consents, optionally filtered by date interval |
Participant and subscriber lists accept limit (default 20, maximum 100) and starting_after. Pass the returned next_cursor to continue while has_more is true. Subscriber ids are opaque; root-company results include direct children, matching REST. Subscriber date filtering applies only when both bounds parse as YYYY-MM-DD.
Reports preserve REST filters and row fields. They accept offset and limit (default 10, maximum 50). A truncated answer includes has_more, next_offset, and a continuation hint. Pass next_offset as offset with the same filters. Dates use YYYY-MM-DD; claimed items require a date interval. Amounts retain the REST report units.
Webhooks
| Tool | Required scope | Purpose |
|---|---|---|
webhooks_list | webhooks:read | List the acting company's endpoints |
webhooks_get | webhooks:read | Read an endpoint by id, without its signing secret |
webhooks_create | webhooks:write | Create an endpoint containing url and events |
webhooks_update | webhooks:write | Change an active endpoint's url and/or events through endpoint |
webhooks_delete | webhooks:write | Disable an endpoint and cancel pending deliveries |
webhooks_rotate_secret | webhooks:write | Rotate an endpoint's signing secret |
webhooks_ping | webhooks:write | Queue a signed test event for an endpoint |
webhooks_list_deliveries | webhooks:read | List deliveries, newest first |
webhooks_replay_delivery | webhooks:write | Requeue a delivered or exhausted delivery by its delivery id |
Every webhook write requires confirm=true and an idempotency_key. All except create take id; replay takes a delivery id, and the other writes take an endpoint id. Endpoint URLs must pass the same HTTPS and public-address rules as REST. Updates do not reactivate disabled endpoints.
Only the first successful create or rotation returns secret. Save it securely; reads and idempotent retries omit it. Rotation preserves the REST overlap behavior. Ping and replay queue work for the normal delivery worker; their success does not mean the receiver has accepted the event.
Both lists accept limit (default 20, maximum 100) and starting_after. Continue using next_cursor while has_more is true. All webhook tools use the acting company selected for the call. Endpoint get and update are available through MCP; the REST webhook routes in this version cover list, create, delete, rotation, ping, and deliveries.
Excluded capabilities
API-key issuance and management remain REST-only. MCP does not mint credentials or turn an API key creator into a signed-in administrator.
Writes are gated and idempotent
Code-batch, webhook, order, checkout, product, PDF-template, order-page, and money-action writes take an idempotency_key — a stable string of 16 to 255 characters, generated once per logical action and reused on retry, exactly like the Idempotency-Key header in REST.
Shipping and delivery-method changes through company_update_settings also require an idempotency_key; its other settings do not.
Most write tools additionally take confirm, which must be true. Send it only after the user has explicitly approved that specific side effect; an unconfirmed call returns an error instead of acting. The gated tools are code_batches_create, code_batches_deactivate, commerce_create_order, commerce_create_checkout, commerce_create_product, commerce_update_product, commerce_deactivate_product, company_update_settings, items_cancel, promotions_create, promotions_update, promotions_deactivate, discount_codes_create, discount_codes_update, discount_codes_deactivate, every money action, pdf_templates_publish, pdf_templates_revert_to_default, orderpage_update_draft, orderpage_publish_draft, shop_update, brand_delete_asset, webhooks_create, webhooks_update, webhooks_delete, webhooks_rotate_secret, webhooks_ping, and webhooks_replay_delivery.
Order-page workflow
Changing the hosted page goes through a draft, so nothing reaches buyers until it is published:
orderpage_list_fields— discover which fields exist, their types, maximum lengths, and whether they support per-locale values.orderpage_get_current— read what is live today.orderpage_create_draft— start a draft with anidempotency_key, optionally naming alocale, aname, and afrom_revision_idto branch from a published revision rather than from the live page. Keep the returnedidandetag.orderpage_update_draft— sendrevision_id, afieldsobject, the exactetagfrom the last read, anidempotency_key, andconfirm: true. Each edit returns a new ETag; use it for the next one.orderpage_preview_draft— review the exact payload the page would render.orderpage_publish_draft— publish with the newestetag, a freshidempotency_key, andconfirm: true.
orderpage_update_draft input shape
{
"revision_id": "opr_7c1e93a4b60d48f2a5e7c081b3d92f64",
"fields": {
"value_text": "Vælg et beløb, og gør det personligt",
"signup_text": "Tilmeld dig eksklusive fordele"
},
"etag": "\"opr_7c1e93a4b60d48f2a5e7c081b3d92f64:v1\"",
"idempotency_key": "orderpage_draft_edit_018f4f37b949",
"confirm": true
}
Send only the fields you intend to change. Unknown fields, wrong types, and over-length values are rejected and nothing is written.
Fields marked i18n: true hold one value per language. A draft covers one language, the company's default unless you name another. Changing a text therefore means one draft per language in languages.available, each with its own translation; a colour, link or switch is shared by every language and needs one draft. Use the tags languages lists (da-DK, en-GB, sv, de, no, nl). A short form such as da is stored as da-DK, the tag the order form reads.
Languages
Every company sells in one or more languages. company_get_settings and orderpage_get_current answer with:
{ "languages": { "default": "da-DK", "available": ["da-DK", "en-GB"] }, "order_form_url": "https://order.lifepeaks.dk/acme-cafe" }
default is the language buyers see first. When changing any text — an order-page field or an experience's name and description — change it in every language in available, not only the one you are writing in. Text tools repeat this rule in their descriptions. The batch campaign_name field stores one buyer-visible name instead; use the company's intended buyer language for that field.
Tool hints
Each tool carries a title and the standard MCP hints: readOnlyHint for tools that change nothing, destructiveHint for tools that change what buyers see or cannot be undone (publishing, cancelling a gift card, changing settings, every money action), idempotentHint, and openWorldHint for the two tools that reach an outside service (pickup points, checkout). Clients use them to decide which calls need the user's approval.
Error handling
A failed tool call returns an error result the agent can read and act on. An argument of the wrong type names the argument (Invalid value for order_id: expected string, got int.); an unexpected server failure returns a general message and is logged, without internal details. A rejected write returns a message carrying a JSON payload. The common causes are:
- A field name that is not in the catalog from
orderpage_list_fields. - A value of the wrong type — a string where
boolis expected, for example. - A value longer than the field's
max. - A stale
etag, meaning someone else edited the draft. Re-read the revision, reconcile, and retry with its new ETag. - A missing or
falseconfirmon a gated write.
Relationship to the REST API
The tools and the REST endpoints act on the same data, so the two can be mixed freely. Four differences are worth knowing:
- The MCP server does not manage API keys. Use
POST /v2/api-keysfor that. - The company is an argument, not a query parameter. The REST
companyselector becomes thecompanyargument on each tool. - Payment confirmation, capture, and settlement are REST-only. There is no MCP tool for them.
- Money actions need an idempotency key and
confirm=true, anditems_resendis limited to the item's own addresses. See Money actions.
Skill file
The full skill definition for AI agents is published on this site:
/skills/lifepeaks-order-page/SKILL.md— worked examples, type rules, direct file uploads, and the read-then-update workflow in agent-friendly format./skills/lifepeaks-order-page/references/fields.md— the field catalog the skill references.
Managing special offers
Create type: special_offer through POST /v2/products or commerce_create_product. Update and deactivate its so_ id through the same product routes and tools. MCP writes require confirm: true and a unique idempotency_key; all writes require products:write. Benefit deals are excluded.
Send per-language name and description, validity, and options. A new option needs name, decimal currency amount, and integer stock (remaining vouchers). Optional regular_amount records the regular price; use_regular_price_as_balance: true makes that the redemption value. visible_remaining_number controls whether buyers see the count. Fees follow the existing option, offer, company and application cascade.
Updates keep ids. Match options by sov_ id; omitted unsold options are removed and omitted issued options are permanently retired from buyer choices, even if their vouchers are later cancelled. Responses include publication and links.order_form / links.shop.
Experience stock and artwork
Experience options accept stock (remaining units, or null for unlimited) and visible_remaining_number. On update, send the existing gcvo_ option id alongside its full name/amount to carry remaining stock, translations and artwork into the new version. Omit options to preserve the whole set. An update returns new product and option ids. Product artwork accepts image_url or an upload link with target: experience_image and the current product_id. Superseded ids cannot receive uploads.
Categories
GET /v2/categories, POST /v2/categories, PATCH /v2/categories/{category_id}, and DELETE /v2/categories/{category_id} list, create, update and deactivate company-owned categories. The MCP equivalents are categories_list, categories_create, categories_update, and categories_deactivate. Use per-language name, boolean active, and create-only type: experience (default) or type: greeting. Assign an experience with categories: ["cat_123"] on its product write. Only active categories of the same company and family are accepted. Category labels are published as category_details beside the product's category ids.
Greeting designs
GET /v2/greeting-designs, POST /v2/greeting-designs, PATCH /v2/greeting-designs/{design_id}, and DELETE /v2/greeting-designs/{design_id} manage company-owned greeting presets. MCP exposes greeting_designs_list, greeting_designs_create, greeting_designs_update, and greeting_designs_deactivate. Send per-language name and text, optional greeting category_id, and boolean active. The management id is gd_123. Attach a picture with upload_link_create, target: greeting_design, and that design_id. After upload, design_id in the resulting resource is the gid_ picture buyers select.
Active pictures appear in personalization.designs; greeting text presets appear in personalization.texts and the classic order form. Deactivation removes the text and picture from buyer choices while retaining the artwork for issued cards. Existing platform-wide greeting presets remain shared and cannot be modified with a company credential.
Category and greeting reads use products:read; writes use products:write. Each new MCP write requires confirm: true and an idempotency_key; replaying the same key and payload returns the original result.
All upload-link creation tools require confirm: true and a unique idempotency_key. The bearer URL is returned only on the first call. Retrying with the same key returns the same upload-link id and metadata without its URL; use a new key to create a replacement link if the first response was lost. Greeting text presets are limited to the published greeting maximum of 2,000 characters.
Private product links
commerce_list_products accepts an optional exact slug filter, matching
GET /v2/products?slug=<slug>. It returns zero or one sellable event, experience or
special offer. Private products are absent without their exact direct-link slug.
Pass that slug on each quote or order line alongside its product and option ids.
Experience links survive version updates and resolve to the current version.
Product write answers include links.shop for opening private products directly.
Product writers keep direct-link slugs unique across events, experiences and special offers within a company. A conflicting slug receives a numeric suffix; use the returned slug and links.