Skip to content

Partner endpoints.

Complete endpoint reference for partner-scoped agent operations.

Nov 15, 2026
On this page

All partner endpoints are prefixed with /api/agent/v1/partner and require a partner-scoped key (rl_agent_).

This page covers the core partner endpoints. Insights, campaigns, webhooks, approvals and the other partner endpoints are in Business tools and in the OpenAPI spec at /api/agent/docs.json.

Creating and updating clubs, loyalty cards, rewards, stamp cards, vouchers, prepaid passes, tiers and staff runs through the same forms and checks as the dashboard. The dashboard's choices, limits and plan rules apply. A request the form would refuse returns 422 with VALIDATION_FAILED or WRITE_REFUSED. Deletes marked destructive in the spec wait for the owner's approval over MCP and run directly over HTTP. Some writes can also answer 202 and wait for the owner over HTTP: update_club and update_voucher when the change reactivates a club or voucher that an automatic email depends on, update_tier when a change moves members while tier emails or tier vouchers would reach them, create_voucher and update_voucher when a tier voucher would be emailed at once, and update_achievement_program when it starts or resumes the program. The spec marks them with x-agent-confirm-when. See Idempotency and approvals.

Common patterns

All partner endpoints share these behaviors:

  • Multi-tenant isolation. A partner key can access resources created by that partner and no other
  • Canonical API contracts. The platform validates requests against the live agent schema, permission gates, and ownership checks
  • JSON request/response. Send and receive application/json
  • Pagination. List endpoints support ?page=1&per_page=25 query parameters

Health check

GET /api/agent/v1/health

Available to all key roles. Returns key identity, scopes, and owner information. Use this to verify your key works before making other requests.

No scope required.


Monthly summary

GET /api/agent/v1/partner/analytics/monthly-summary

Tool: get_merchant_monthly_summary. Scope: either read or read:analytics. Existing Agent API access requirements apply.

The optional month parameter accepts YYYY-MM from the last 24 completed calendar months, no earlier than the business account's creation month. Omitting it chooses the latest completed month. Invalid or incomplete months return 422.

The response's data contains status, report, next_available_month and the authenticated page url. status is available, or not_available_yet with a null report and the first available month. An available report includes current and previous periods, the time zone, calculated_at, definition_version, applicable metrics with current/previous values and absolute differences, up to 20 program rows, the full program count, coverage codes and counting definitions.

The tool shares the human report's calculation and short-lived cache. It returns aggregate nonmonetary activity without customer identifiers or domain writes. Active on 2+ days measures activity on different dates within one month; it does not establish retention, visits or sales uplift. See Monthly summary for the metric and correction rules.


Clubs

Clubs organize a partner's staff and operations. Most resources (cards, staff) belong to a club. Each club uses all of the business's locations or one of them.

List clubs

GET /api/agent/v1/partner/clubs

Scope: read or write:clubs

Club responses include business_location_id: the UUID of the one business location the club uses, or null for All locations. If a club that used the business address in an earlier version was set to the primary location when the installation was upgraded, it follows the primary unless it is protected: its business_location_id changes when another location becomes primary, until a club update sends business_location_id.

Get club

GET /api/agent/v1/partner/clubs/{id}

Scope: read or write:clubs

Create club

POST /api/agent/v1/partner/clubs

Scope: write:clubs

{
  "name": "Coffee Lovers Club",
  "is_active": true,
  "business_location_id": null
}

business_location_id sets where the club's programs apply. Omit it or send null for All locations. Send a location UUID to use that one location. A UUID from another business returns 404 NOT_FOUND and creates nothing.

Update club

PUT /api/agent/v1/partner/clubs/{id}

Scope: write:clubs

Send business_location_id to change the club's choice: a location UUID, or null for All locations. Omit it to keep the current choice. A UUID from another business returns 404 NOT_FOUND, and none of the update saves. Changing it on a protected club returns 422 RESOURCE_PROTECTED.

Delete club

DELETE /api/agent/v1/partner/clubs/{id}

Scope: write:clubs


Business locations

A business owns its locations. Each location has its own public name, phone, address, map link and weekly hours. A club uses all of the business's locations or one of them, through its business_location_id. Owners manage the same list in Business settings.

Method Path Tool Scope
GET /partner/business-locations list_business_locations read or write:business
GET /partner/business-locations/{location_id} get_business_location read or write:business
POST /partner/business-locations create_business_location write:business
PUT /partner/business-locations/{location_id} update_business_location write:business
DELETE /partner/business-locations/{location_id} delete_business_location write:business

The key must belong to the business owner. Other business roles get 403 AUTH_WRONG_ROLE. Reward Loyalty checks the role before it returns a stored retry answer or prepares an approval.

The business comes from the key, so a request never names a business. location_id is a UUID. An ID that belongs to another business returns 404 NOT_FOUND.

The usual Agent API checks apply. With the Agent API off for the installation, these paths return 404. A business without Agent API access gets 403 FEATURE_DISABLED, and a demo installation refuses changes with 403 DEMO_MODE. No other plan feature applies.

A protected business (is_uneditable) can read its locations, but create, update and delete return 422 RESOURCE_PROTECTED. A protected club does not block location edits. Its protection applies when you change that club's business_location_id.

Location fields

Field Accepts Rules
name string Required on create, up to 128 characters. You can change it but not clear it. A location carried over without a name can stay null.
address_line_1 string or null Up to 128 characters
address_line_2 string or null Up to 128 characters
city string or null Up to 64 characters
state string or null Up to 64 characters
postal_code string or null Up to 24 characters
phone string or null Up to 32 characters: digits, spaces and +()./-, with at least one digit
maps_url string or null An http or https URL, up to 500 characters
opening_hours object or null The location's week. See Weekly hours
time_zone string or null An IANA time zone, such as Europe/Amsterdam. Create uses the account time zone when you omit it
latitude number or null -90 to 90. Discovery only
longitude number or null -180 to 180. Discovery only
business_category string or null A configured listing category key, such as food_drink. Discovery only
show_on_business_page boolean true when you omit it on create
position integer Zero-based place in the list
is_primary boolean true makes this location the primary
expected_revision integer Optional state check. See Order, primary and visibility

Send the body as JSON. Reward Loyalty trims text and stores an empty string as null. A PUT changes only the fields you send: an omitted field keeps its value, and null clears an optional field. Query-string fields are ignored.

Booleans and integers must be JSON booleans and integers. "false" or 1 for a boolean, and "1" or 1.5 for an integer, return 422. Unknown fields also return 422, including id, partner_id, directions_url and anchor.

time_zone applies to this location's public hours. It never changes the account or club time zones that run scheduled rewards and reports.

latitude, longitude and business_category need the installation's discovery setting. With discovery off, sending any of them, even as null, returns 422, and stored values stay. A change to the map point must leave both coordinates set or both null.

Example create body:

{
  "name": "Central Station",
  "phone": "+1 503 555 0182",
  "address_line_1": "12 Station Square",
  "city": "Example City",
  "postal_code": "97201",
  "opening_hours": {
    "monday": { "open": "07:00", "close": "18:00" },
    "saturday": { "open": "08:00", "close": "14:00" },
    "sunday": { "closed": true }
  }
}

Only name is required. A location with a name and nothing else is valid.

Weekly hours

opening_hours holds up to seven days, monday to sunday. Each day is { "closed": true } or an object with open and close in 24-hour HH:MM form.

  • A supplied object replaces the whole week. Send null or {} to clear it.
  • A day you leave out has unknown hours. Members see no hours for that day, which does not mean closed.
  • open and close must differ. close accepts 24:00, which Reward Loyalty stores as 00:00.
  • A closing time earlier than the opening time runs past midnight into the next day.
  • Any other day name or day key returns 422, with the error under opening_hours.{day}.

The hours use the location's own time_zone. This example has late Friday hours, a Saturday that ends at midnight and a closed Sunday:

{
  "opening_hours": {
    "friday": { "open": "18:00", "close": "02:00" },
    "saturday": { "open": "10:00", "close": "24:00" },
    "sunday": { "closed": true }
  }
}

Friday runs from 18:00 until 02:00 on Saturday. Monday to Thursday stay unknown. The response adds "closed": false to open days:

"opening_hours": {
  "friday": { "open": "18:00", "close": "02:00", "closed": false },
  "saturday": { "open": "10:00", "close": "00:00", "closed": false },
  "sunday": { "closed": true }
}

A schedule saved through update_business_page keeps that tool's stored shape, such as closed as "0" or "1" and null times on a closed day. Read opening_hours as stored.

Order, primary and visibility

position is zero-based. A new location goes to the end of the list unless you send position. An update with position moves the location and shifts the others. A position past the end moves it to the end. Deleting a location closes the gap.

The primary is the business's main location. Business settings explains where members see it.

  • When the business has no primary, a new location becomes the primary. It must be shown on the business page, so creating it hidden returns 422.
  • "is_primary": true selects that location. The primary and the list order are independent.
  • "is_primary": false on the current primary returns 422. Select another primary instead.
  • show_on_business_page controls the business page only. A hidden location can still appear on program pages and in discovery.
  • The primary must stay shown. Hiding it, or selecting a hidden location as primary, returns 422. Send "show_on_business_page": true with "is_primary": true to do both in one request.

Every location resource carries business_locations_revision, and a list carries revision. Both hold the business's current location revision. It increases with every saved change to a location, the order, the primary or a club's location choice. An update that changes nothing leaves it the same.

Send the revision you read as expected_revision on a create, update or delete. If the business's locations changed in between, the request returns 409 CONFLICT and changes nothing. Read the list again before you retry.

Read locations

Each location resource contains:

  • id and partner_id
  • every field in the field table except expected_revision, as stored. latitude and longitude are decimal strings.
  • show_on_business_page: whether the business page shows the location
  • business_locations_revision
  • directions_url: the location's maps_url when it holds a valid link. Otherwise a Google Maps directions link built from the address text, or from the map point. Links longer than 2,048 characters are skipped. With no usable source, the field is null.
  • anchor: the location's fragment on the business page, business-location-{id}. A location carried over from a club location override keeps its location-{club_id} fragment. Edits never change the anchor.
  • business_page_url: the business page URL with the anchor, when the page is publicly viewable and shows this location. Otherwise null.
  • created_at and updated_at, in ISO 8601

A list returns error: false, data, pagination and revision, sorted by position and then id. page defaults to 1. per_page defaults to 25 and stays within 1 to 100. pagination contains current_page, last_page, per_page and total.

total counts every location the business owns, including the primary and locations hidden from the business page. There is no separate primary object: the primary is the row with "is_primary": true. A page past the end returns an empty data array with the real total.

Limits and deletion

The technical limit is 20 locations per business. It is separate from plan limits. At or above the limit, create returns 422 VALIDATION_FAILED with the error under business_locations. A business that already holds more than 20 keeps them, and can read, edit, reorder and delete each one.

DELETE accepts an optional JSON body with expected_revision and no other field. Deletion returns 422 VALIDATION_FAILED when:

  • A club uses the location, including an inactive club. The error is under business_location_id. Move those clubs to All locations or another location first. A club on All locations never blocks deletion.
  • The location is the primary and other locations exist. The error is under is_primary. Select another primary first.

You can delete the only location when no club uses it. The business then has no locations. Its business name, branding, links and operational time zones stay. Deleting a location never removes clubs, programs, staff, members or balances.

Each create, update and delete that changes something appears in the business's activity log, with the connection that made it.

Errors, retries and approval

Errors use the Agent envelope: error: true, code, message and retry_strategy.

Status and code When
403 AUTH_WRONG_ROLE The key's business account does not have the owner role
403 AUTH_INSUFFICIENT_SCOPE The key lacks the scope in the table above
404 NOT_FOUND The location does not exist or belongs to another business
409 CONFLICT expected_revision no longer matches
422 VALIDATION_FAILED An invalid or unknown field, the location limit, a primary rule, or a club that uses the location. Field errors are in details.errors
422 RESOURCE_PROTECTED The business is protected

Direct Agent HTTP writes accept an optional Idempotency-Key header. Repeat a timed-out call with the same key and body to get the first answer back. The same key with a different body returns 409 IDEMPOTENCY_CONFLICT. Over MCP, create, update and delete require the idempotency_key argument, with the same rules. See Idempotency and approvals.

Over direct HTTP, delete runs at once and returns 200 with error: false and message. Over MCP, delete_business_location only prepares the deletion. It returns 202 AgentApprovalPrepared with the review URL, approval ID, nonce and a preview that names the location. The owner approves or rejects it in Reward Loyalty.

After the owner approves, the client calls execute_approval. Reward Loyalty reads the location again first. If the business's locations changed since the review, execute_approval returns 409 APPROVAL_STALE and deletes nothing. That covers this location's hours or visibility, the order, the primary, a club's location choice and a deleted location. Prepare the deletion again.

A change that lands while the approved deletion runs returns 409 CONFLICT and deletes nothing. The next execute_approval then returns 409 APPROVAL_STALE. A business that became protected returns 422 RESOURCE_PROTECTED.

The platform owner's key can call both reads through partner read-through, with read:partner-data. Send X-Agent-Partner over direct HTTP, or use admin_describe_partner_reads and admin_partner_read over MCP. Read-through never changes locations: a write returns 403 READ_THROUGH_READ_ONLY.

Business page tools

get_business_page and update_business_page keep their request and response fields. Their phone, address, map link, hours and discovery listing belong to the primary location.

  • get_business_page returns the primary location's values. opening_hours.time_zone and open_now use that location's own time zone.
  • update_business_page saves business_phone, the address, the map link, listing values and hours to the primary location. When the business has no primary, sending any of those values creates one, named after the business. The business email, website and social links stay business-wide.
  • In update_business_page, a business_name change also renames a primary that came from the business profile, until you edit that location's name through these operations or Business settings.

listing.public_locations counts active clubs that have a club location override. It does not count business locations. Use pagination.total from list_business_locations for that.


Loyalty cards

Loyalty cards define point-earning rules and associated rewards. issue_date and expiration_date with an offset (2027-01-20T12:00+02:00) are stored as that moment in UTC; dates without one are read as UTC.

List cards

GET /api/agent/v1/partner/cards

Scope: read or write:cards

Get card

GET /api/agent/v1/partner/cards/{id}

Scope: read or write:cards

Create card

POST /api/agent/v1/partner/cards

Scope: write:cards

Update card

PUT /api/agent/v1/partner/cards/{id}

Scope: write:cards

Delete card

DELETE /api/agent/v1/partner/cards/{id}

Scope: write:cards


Rewards

Rewards are what members save up for. Rewards can be linked to one or more loyalty cards.

List rewards

GET /api/agent/v1/partner/rewards

Scope: read or write:rewards

Get reward

GET /api/agent/v1/partner/rewards/{id}

Scope: read or write:rewards

Create reward

POST /api/agent/v1/partner/rewards

Scope: write:rewards

Send card_ids with the loyalty cards that offer the reward. A card offers a reward only while the two are linked and before the reward's expiration_date. Without active_from, the reward opens now. Without expiration_date, it closes one year after it opens, or one year from now when its start is already past. Dates with an offset (2027-01-20T12:00+02:00) are stored as that moment in UTC; dates without one are read as UTC.

Update reward

PUT /api/agent/v1/partner/rewards/{id}

Scope: write:rewards

card_ids replaces the linked cards, and an empty list unlinks them all. Leave it out to keep the current links.

Delete reward

DELETE /api/agent/v1/partner/rewards/{id}

Scope: write:rewards


Transactions

Transactions handle the core earn-and-burn flow. POS integrations spend most of their calls here.

List transactions

GET /api/agent/v1/partner/transactions

Scope: read or write:transactions

Lists transactions for your partner account, newest first. Supports the following query parameters:

Parameter Type Description
member_identifier string Filter by member (UUID, email, or unique_identifier)
card_id UUID Filter by a specific loyalty card
event string Filter by event type (e.g., staff_credited_points_for_purchase)
from date Start date (Y-m-d)
to date End date (Y-m-d)
per_page int Results per page (default 25, max 100)

Each transaction carries voided_at: a date-time on a credit that a later undo or refund reversed, otherwise null.

Record a purchase (award points)

POST /api/agent/v1/partner/transactions/purchase

Scope: write:transactions

{
  "card_id": "uuid-of-loyalty-card",
  "member_identifier": "[email protected]",
  "purchase_amount": 24.50,
  "staff_id": "uuid-of-staff-member",
  "note": "Coffee and pastry"
}

Member identification. The member_identifier field accepts multiple formats:

  • Member UUID
  • Email address
  • Member number
  • Unique identifier

You can pass any of these formats and the API will resolve the member. This flexibility matters for POS systems that may have nothing but a customer email or loyalty number.

You can also pass a points field (integer) to override the automatic point calculation. This is useful for custom promotions or manual adjustments. The card's max_points_per_purchase still caps the override after tier multipliers, so you can never exceed the configured maximum.

On a retry-safe purchase, points also has an absolute ceiling of 2147483647, the largest value a single award can be recorded as. A larger override is refused with 422, and so is a sale whose calculated award would land past it once tier and bonus-window multipliers are applied: the check runs before the sale is recorded, so it is a request to correct, never a retry to repeat. A card whose welcome bonus is configured beyond that ceiling is refused the same way, since the bonus is a second award the first sale would have to record.

The staff_id is optional. It attributes the transaction to a specific staff member for reporting. Without it, the platform attributes the transaction to "System". A staff member you name must belong to your partner account and have access to the card's club. Naming one who does not is refused either way, but the answer differs: a retry-safe purchase returns 404 before anything is recorded, while a purchase without source_reference returns 422 TRANSACTION_FAILED.

A purchase without source_reference answers 503 TRANSACTION_FAILED with retry_strategy: backoff when a referral campaign or the card currency changes during the sale and one automatic retry does not help. Nothing is recorded. Retry the identical request. A retry-safe purchase answers PURCHASE_RETRYABLE_FAILURE instead, in the table below.

Retry-safe purchases

Add source_reference and the sale is recorded once, however many times the request arrives:

{
  "card_id": "uuid-of-loyalty-card",
  "member_identifier": "[email protected]",
  "purchase_amount": "24.50",
  "currency": "EUR",
  "source_completed_at": "2026-08-26T09:41:07+02:00",
  "source_reference": "pos:store-1:till-3:98441",
  "note": "Coffee and pastry"
}
Field Rules
source_reference Optional. Turns on retry-safe recording. Up to 128 characters, case-sensitive, starting with a letter or digit, then letters, digits, ., _, :, or -. Include platform, store, cash register, and sale id. Never an email address, phone number, customer name, or credential.
currency Required with source_reference. Three uppercase letters, and it must match the card's currency exactly. Amounts are never converted.
source_completed_at Required with source_reference. An ISO 8601 instant with whole seconds, written either with a numeric offset (2026-08-26T09:41:07+02:00) or with the UTC Z designator (2026-08-26T07:41:07Z). The two are equivalent, including on a retry, so a queue may re-serialize one as the other. Fractional seconds (2026-08-26T07:41:07.000Z) are rejected; trim them if your POS system emits them. So is any offset beyond ±14:00, which no real time zone uses. For a new sale the time may be at most 7 days old and 5 minutes in the future. It also sets the transaction time, so a delayed sale earns by the bonus window that was in force when it happened, and its points expire from that moment.
purchase_amount Send it as a string with a retry-safe purchase ("24.50") so the exact amount survives, and omit it only when you send points instead.

Identity is your business plus the reference, so two businesses may use the same reference and two cash registers inside one business must not. Replacing, revoking, or deleting an Integration API key does not reset a recorded sale.

What is kept after a correction or an erasure. When a recorded sale is corrected away, or a member removes their relationship with your business or erases their account, the sale's own facts go with it: the points, the balance, the amount, the currency, the link to the transaction, and the protected copy of the request. What remains is your business, a one-way digest of the sale reference, and the fact that the reference was settled.

That digest is kept for the lifetime of the business, for one reason: a POS system that retries an erased sale has to be told the sale is settled (410), or erasure would become a way to make one purchase pay out twice. It is not used for anything else. No profiling, no marketing, no analytics. It is pseudonymous rather than anonymous: it is derived from a reference you chose, so anyone holding that reference can recompute it. Deleting the business removes it along with everything else.

Presentation is ignored when the app compares a retry with the original: 24.5 and 24.50, +00:00 and Z for the same instant, a different time zone for the same instant, a different key order, and a different note all still count as the same sale. The sale's own facts are not: member_identifier, staff_id, and points are all part of what identifies the sale, so a retry must repeat them exactly. Sending a different member_identifier returns 409 even when it resolves to the same member, and so does a retry that drops the staff_id the first call carried. Worth checking if a queue replays your requests without the cashier context.

Responses:

Situation HTTP Body
Recorded 201 The purchase facts, plus currency, source_completed_at, source_reference, replayed: false, transaction_status: active
Identical request, already recorded 200 The original frozen facts, replayed: true, and the current transaction_status (active or voided)
Same reference, different sale facts 409 PURCHASE_REFERENCE_CONFLICT, retry_strategy: no_retry
Same reference, still being processed 409 PURCHASE_REFERENCE_IN_FLIGHT, retry_strategy: backoff, Retry-After: 2
Temporary failure while recording 503 PURCHASE_RETRYABLE_FAILURE, retry_strategy: backoff. Retry the identical request.
Sale record's app key is missing 503 PURCHASE_CLAIM_KEY_UNAVAILABLE, retry_strategy: contact_support. Nothing is awarded or changed; the operator restores the key from backup.
Original purchase corrected or erased 410 PURCHASE_REFERENCE_CONSUMED, retry_strategy: no_retry. The sale stays settled and no member facts are returned.
Currency differs from the card 422 PURCHASE_CURRENCY_MISMATCH, and no sale is recorded
Source time outside the window 422 SOURCE_COMPLETED_AT_OUT_OF_RANGE, and no sale is recorded. An identical retry of an already recorded sale is unaffected.

A replay answers from the stored record, so it survives edits to the card, a deactivated member, a deleted staff member, and a replaced Integration API key. Without source_reference the endpoint keeps its original behavior: every call awards points again.

Redeem a reward (deduct points)

POST /api/agent/v1/partner/transactions/redeem

Scope: write:rewards

{
  "card_id": "uuid-of-loyalty-card",
  "reward_id": "uuid-of-reward",
  "member_identifier": "[email protected]",
  "staff_id": "uuid-of-staff-member"
}

The staff_id is optional. Without it, the platform attributes the redemption to "System". This enables headless integrations (Shopify, WooCommerce) that do not have staff accounts.

The card must offer the reward right now, with or without staff_id. A reward that hasn't started, has ended, or is switched off answers 422 with REWARD_NOT_AVAILABLE, and no points move.

Successful redemption responses include transaction_id, points_deducted, member_balance, new_balance, reward_id, reward, card_id, and member_id.

Deduct points (custom deduction)

POST /api/agent/v1/partner/transactions/deduct

Scope: write:transactions

{
  "card_id": "uuid-of-loyalty-card",
  "member_identifier": "[email protected]",
  "points": 500,
  "note": "Gift card redemption - $50 Amazon card",
  "reference": "giftcard:order:12345",
  "staff_id": "uuid-of-staff-member"
}

Deducts a custom number of points from a member's card balance. The deduction consumes points in FIFO order (oldest first). Deductions require a note for the audit trail.

Use this for off-platform rewards like gift cards or external services, without needing a reward object.

The reference field is optional. It links the deduction to an external system for reconciliation.

The staff_id is optional. If you omit it, the platform records the transaction as "Partner".

A deduction fails with INSUFFICIENT_POINTS if the member does not have enough points. The tier system ignores deductions.

Successful deduction responses include transaction_id, points_deducted, member_balance, new_balance, card_id, and member_id.


Members

Member endpoints are read for partner keys, no writes. The agent API cannot create or modify members. They self-register through the platform. A partner key reads a member's profile but never changes it: the member shares one profile with every business they joined.

List and detail return only members who have interacted with your business: earned points, collected a stamp, redeemed a voucher, or used a pass. A member who joined a card but has no interaction yet answers not-found, indistinguishable from an unknown id. The transaction endpoints accept that member's identifier regardless. See First-time customers.

List members

GET /api/agent/v1/partner/members

Scope: read

Get member

GET /api/agent/v1/partner/members/{id}

Scope: read

Get member balance

GET /api/agent/v1/partner/members/{id}/balance/{cardId}

Scope: read

Returns the member's point balance for a specific loyalty card.

Member list/detail responses expose the hardened public payload, nothing more: id, unique_identifier, name, email, locale, currency, time_zone, last_login_at, created_at, updated_at, avatar, is_anonymous, is_active, plus the profile fields and email choices below.

Field Value
birthday YYYY-MM-DD, or null when not set
gender male, female, prefer_not_to_say, or null when not set
phone E.164 number such as +5215512345678, or null
phone_country Two-letter country of the phone number, such as MX. null when there is no phone
consents The member's email choices: loyalty_emails and marketing_emails, each with state (subscribed or not_subscribed), updated_at, and source
"consents": {
  "loyalty_emails": { "state": "subscribed", "updated_at": "2026-07-10T17:45:00+00:00", "source": "account_settings" },
  "marketing_emails": { "state": "not_subscribed", "updated_at": null, "source": null }
}

state is the value the mailer follows. updated_at and source come from the latest consent record; both are null for a choice made before Reward Loyalty kept consent records. See Member endpoints for the known source values.

The get_member_overview operation (see Business tools) returns a member object with the same fields, plus url. Each item in its passes and vouchers lists carries dismissed_at: when the member removed it from their wallet. It stays null while the item shows in the wallet, and for a voucher that was never in their wallet.


Achievements

A read-only view of the partner's achievements program. Program settings change in the partner dashboard, not through the API. Both endpoints require the achievements feature (achievements_permission, from the plan or the per-partner override); without it they answer 403.

Get the program

GET /api/agent/v1/partner/achievements

Scope: read

Returns the program (status of active, paused, or inactive, whether a history import is running, activated_at, week_starts_on, and the catalog version), the configured rules (per achievement: key, name, group, threshold, enabled, and the reward's public envelope of type, cap, and window, never the linked product), and aggregate insights while the program is active: members with an achievement, awards in the last 30 days, weekly-run and near-milestone counts, and reward usage. Insights are aggregates only, never member listings.

Get a member's achievements

GET /api/agent/v1/partner/members/{id}/achievements

Scope: read

Returns one member's progress at this business (loyalty days, current and best weekly run, the last qualifying week, distinct loyalty options used, first and last activity) and their paginated earned achievements, each with key, name, group, origin (live, or backfill for an achievement recognized by the history import), earned date, and a safe reward state (none, pending, delivered, or failed). Only members with a relationship at this business resolve; anyone else answers not-found. Voided achievements never appear.


Stamp cards

Stamp cards work like digital punch cards. Members collect stamps and earn a reward when the card is complete.

List stamp cards

GET /api/agent/v1/partner/stamp-cards

Scope: read or write:stamps

Get stamp card

GET /api/agent/v1/partner/stamp-cards/{id}

Scope: read or write:stamps

Create stamp card

POST /api/agent/v1/partner/stamp-cards

Scope: write:stamps

Update stamp card

PUT /api/agent/v1/partner/stamp-cards/{id}

Scope: write:stamps

Delete stamp card

DELETE /api/agent/v1/partner/stamp-cards/{id}

Scope: write:stamps

Add stamps

POST /api/agent/v1/partner/stamp-cards/{id}/stamps

Scope: write:stamps

Award stamps to a member on a specific stamp card.

A single call adds up to one full card (stamps_required) when the card has no per-transaction cap, or up to the configured cap otherwise. The absolute ceiling is 100.

Redeem stamp reward

POST /api/agent/v1/partner/stamp-cards/{id}/redeem

Scope: write:stamps

Redeem the stamp card reward when a member has collected all required stamps.

Use canonical create/update fields: stamps_expire_days and requires_physical_claim.


Vouchers

Vouchers provide instant-value discounts through promotional codes.

List vouchers

GET /api/agent/v1/partner/vouchers

Scope: read or write:vouchers

Get voucher

GET /api/agent/v1/partner/vouchers/{id}

Scope: read or write:vouchers

Create voucher

POST /api/agent/v1/partner/vouchers

Scope: write:vouchers

Update voucher

PUT /api/agent/v1/partner/vouchers/{id}

Scope: write:vouchers

Delete voucher

DELETE /api/agent/v1/partner/vouchers/{id}

Scope: write:vouchers

Validate voucher code

POST /api/agent/v1/partner/vouchers/validate

Scope: write:vouchers

Check if a voucher code is valid and redeemable without redeeming it.

Use canonical voucher fields: type, value, valid_from, valid_until, max_uses_total, and max_uses_per_member. value is the percent off for a percentage voucher (20 = 20% off, up to 100, decimals allowed) and cents for fixed_amount (500 = 5.00). Responses use the same units. code is optional on create. The platform generates one when you omit it.

Validate request body:

  • code
  • member_identifier
  • club_id
  • order_amount (optional, minor units). Leave it out or empty for no order amount: the minimum purchase is not checked. A value of 0 is an order of 0: a voucher with a minimum purchase refuses it.

Validate response fields:

  • valid
  • voucher_id
  • code
  • name
  • type
  • value
  • currency
  • discount_amount
  • capped
  • original_amount
  • final_amount
  • times_used
  • remaining_uses
  • valid_until

Redeem voucher

POST /api/agent/v1/partner/vouchers/{id}/redeem

Scope: write:vouchers

Redeem request body:

  • member_identifier
  • order_amount (optional, minor units). Leave it out or empty for no order amount: the minimum purchase is not checked, and the stored redemption has no original or final amount. A value of 0 is an order of 0: the minimum purchase applies, and the stored redemption has a final amount of 0.
  • order_reference (optional)

Redeem response fields:

  • voucher_id
  • code
  • type
  • member_id
  • discount_amount
  • points_awarded
  • remaining_uses
  • redemption_id

When a referral or voucher bonus changes during the redemption and one automatic retry does not help, the call answers 503 TRANSACTION_FAILED with retry_strategy: backoff and records nothing. Retry the identical request.


Prepaid passes

Prepaid products can hold counted visits, time-limited unlimited visits, or money for the issuing business. Templates are prepaid-passes; sold instances are member-passes. The calls below default to visit format 1. For money, use format 2.

List pass templates

GET /api/agent/v1/partner/prepaid-passes

Scope: read or write:passes

Get pass template

GET /api/agent/v1/partner/prepaid-passes/{id}

Scope: read or write:passes

Create pass template

POST /api/agent/v1/partner/prepaid-passes

Scope: write:passes

Set uses_total for a counted pass, or omit it and set validity_days (1 to 366) for an unlimited pass.

Update pass template

PUT /api/agent/v1/partner/prepaid-passes/{id}

Scope: write:passes

Delete pass template

DELETE /api/agent/v1/partner/prepaid-passes/{id}

Scope: write:passes

Soft-deletes the template so future sales stop. Passes already sold keep working.

Sell a pass

POST /api/agent/v1/partner/prepaid-passes/{id}/sell

Scope: write:passes

Issues a sold instance to a member. Body: member_identifier (required), optional price_paid (cents; defaults to the template price), optional staff_id (a staff member in the pass's club). With no staff attached, the ledger entry records source: agent_api plus the Integration API key id.

List a member's passes

GET /api/agent/v1/partner/members/{id}/passes

Scope: read or write:passes

Returns the member's sold passes in your clubs. Use it to find a member-pass id before scanning or undoing.

Get a sold pass

GET /api/agent/v1/partner/member-passes/{memberPassId}

Scope: read or write:passes

Returns the sold pass with its ledger history.

Scan a visit

POST /api/agent/v1/partner/member-passes/{memberPassId}/scan

Scope: write:passes

Deducts one or more visits. Body: optional quantity (default 1), optional staff_id. Counted passes lose quantity visits; unlimited passes record the visit only.

Undo the last visit

POST /api/agent/v1/partner/member-passes/{memberPassId}/undo

Scope: write:passes

Writes an offsetting ledger entry and restores the balance. Fails when there is no visit to undo.


Monetary passes

Add ?pass_format=2 to pass lists and detail calls to receive typed records. Without it, lists contain only visit passes and an owned monetary detail returns 409 MONETARY_PASS_FORMAT_REQUIRED. For an issued pass, format 2 includes balance_type, is_unlimited, and a money object with integer initial_minor, remaining_minor, reserved_refund_minor, and available_minor amounts plus currency. A null visit count never identifies an unlimited monetary pass. Invalid or empty formats return 422.

Monetary product writes and actions require both literal scopes, write:passes and write:pass-money. The admin scope alone does not suffice. Review the issuing Business details and fixed translated terms in the business dashboard, then enable monetary sales. Terms and retention periods are not editable. A monetary template uses balance_type: "money", an integer face_value_minor, and an equal price in the same currency. Follow the generated request schema; visit counts and validity must be null.

Record an external sale through the same /prepaid-passes/{id}/sell?pass_format=2 route. Supply the member identifier, payment_received: true, amount_minor, currency, terms_version, external_reference, and external_source. Record the payment at the counter or in the external payment system first. Reward Loyalty does not charge the member.

A successful sale returns HTTP 201 with error: false and a data object. For a monetary sale, data contains account_id, member_pass_id, sale_id, transaction_id, amount_minor, currency, balance_remaining_minor, reserved_refund_minor, sequence and terms_version. A visit sale returns the sold MemberPass fields plus transaction_id.

To spend €37.50 from a EUR pass:

POST /api/agent/v1/partner/member-passes/{memberPassId}/spend?pass_format=2
X-Agent-Key: rl_agent_...
Idempotency-Key: 6db65634-d279-4904-91e3-3fe56d0a825a
Content-Type: application/json

{
  "amount_minor": 3750,
  "currency": "EUR",
  "external_reference": "COUNTER-2026-0042",
  "external_source": "pos_receipt"
}

Amounts must be JSON integers in the currency's minor unit. A numeric string or a decimal is invalid. Keep the exact body and operation key after a timeout. A retry returns the recorded result after checking the current key and authority again. Reusing that key with a different body returns 409 IDEMPOTENCY_CONFLICT. A scoped 410 RECORD_REMOVED means an earlier consumed result is no longer available; never replace its key to repeat the financial action. Privacy removal can scrub a consumed result while preserving its financial history. The application does not age out monetary records or make their operation keys reusable after a retention period.

Reverse a complete spend with POST /partner/member-passes/{memberPassId}/transactions/{transactionId}/reverse?pass_format=2, a fresh Idempotency-Key, and reason_code set to entry_error or purchase_cancelled. The original spend can be reversed once. Visit /scan and /undo actions cannot change money balances.

Refund preparation, confirmation, cancellation, financial-record corrections, holds and setup changes remain partner/admin web actions. There are no payment-confirming Agent tools. See staff use and business oversight.

Stored-money oversight reads

These routes require an explicit read:money grant. Neither read nor admin includes it. They return integer minor-unit amounts with the currency.

Method Endpoint Operation
GET /partner/money/overview get_money_overview
GET /partner/money/setup get_money_pass_setup
GET /partner/money/records/{kind}/{id} get_money_record
GET /partner/analytics/money-passes get_money_pass_analytics

The overview lists accounts or sales from the business's active clubs. Use kind=accounts (default) for issued balances or kind=sales for recorded payments, including unclaimed sales. It accepts:

Query Values
currency Three-letter currency code
state Accounts: pending or restricted. Sales: unclaimed, issued, pending, refunded or voided
event, source, actor_type History filters; see the current enums in tool discovery
from, to YYYY-MM-DD, in the business's time zone
page, per_page Page number and size; 25 rows by default, at most 100

The response includes kind, data, pagination, a dashboard url, and basis explanations for computed amounts. Existing records remain readable after prepaid sales stop.

For a record, set {kind} to accounts or sales, and use an ID from the overview. The response contains data, newest-first history, and pagination. It accepts the same history and pagination filters. A record outside the business's access returns 404.

The setup response includes issuer details, terms, and configured, enabled, complete and can_enable flags. A saved setup remains readable after a downgrade. Without a saved setup or permission to enable sales, this call returns 403 FEATURE_DISABLED. Setup changes stay in the web dashboard.

Money analytics still requires the Prepaid passes feature. It accepts id for one monetary product, currency, anchor (YYYY-MM-DD), page, and range: all, day, week, month or year. The default range is month with an id, and all without one. Its response includes currency totals, comparisons, reconciliation figures, a time series and up to 50 products per page. These amounts describe credit the business owes members. They are not revenue. A visit product returns 409 VISIT_PASS_USE_PASS_ANALYTICS; use visit analytics for it.

Tiers

Membership tiers define VIP levels with multipliers and benefits.

List tiers

GET /api/agent/v1/partner/tiers

Scope: read or write:tiers

Get tier

GET /api/agent/v1/partner/tiers/{id}

Scope: read or write:tiers

Create tier

POST /api/agent/v1/partner/tiers

Scope: write:tiers

Use the canonical tier threshold field: points_threshold.

Update tier

PUT /api/agent/v1/partner/tiers/{id}

Scope: write:tiers

Delete tier

DELETE /api/agent/v1/partner/tiers/{id}

Scope: write:tiers


Staff

Manage staff members who process transactions for the partner's clubs.

List staff

GET /api/agent/v1/partner/staff

Scope: read or write:staff

Get staff member

GET /api/agent/v1/partner/staff/{id}

Scope: read or write:staff

Create staff member

POST /api/agent/v1/partner/staff

Scope: write:staff

Use the canonical staff assignment field: club_id.

Staff list/detail responses expose: id, club_id, club_name, name, email, locale, time_zone, number_of_times_logged_in, last_login_at, created_at, updated_at, avatar.

Update staff member

PUT /api/agent/v1/partner/staff/{id}

Scope: write:staff

Delete staff member

DELETE /api/agent/v1/partner/staff/{id}

Scope: write:staff


Apple Wallet settings

Method Endpoint Scope
GET /partner/apple-wallet/{type}/{id} read or write:wallet
PUT /partner/apple-wallet/{type}/{id} write:wallet

Use loyalty, stamp, offer, or prepaid for {type} and an owned item UUID for {id}. PUT accepts enabled and optional appearance settings; repeated identical requests return meta.result: "unchanged". These endpoints do not return signed member passes or signing credentials. See the Apple Wallet API for the fields, availability checks, and errors.