Skip to content
StampEazy Create my card

API reference · version 1.4.0

Loyalty API

Connect your point of sale, online store or own system to StampEazy: register customers, issue cards, credit purchases and redeem rewards. The server always calculates stamps, points and balances with your program's rules.

Multi-business REST API v1: each key belongs to a single business and only sees that business's data (an ID from another business returns 404).

  • Authentication: Authorization: Bearer <key>. Create the key in Dashboard → Developers with the scopes you need; the plan must include the API feature.
  • Amounts in minor units (cents): L 125.50 = 12550. Stamp, point, visit and use balances are integers.
  • Idempotency: send Idempotency-Key on POST/PATCH/DELETE. Repeating the request returns the original response (Idempotent-Replayed: true); the same key with a different body → 409. Keys are kept for 24 h.
  • Immutable ledger: every balance change is a transaction with a unique reference; corrections are audited adjustments or reversals. The server always calculates stamps, points, discounts and balances.
  • Responses: {"data": …}; lists add meta (current_page, per_page, total, last_page; per_page max. 100).
  • Errors: business rules {"error": {"code", "message"}} (402, 403, 409, 422); validation {"message", "errors": {field: [messages]}} (422); missing resource or one from another business {"message"} (404).
  • Rate limit: 120 requests per minute per key (429).
  • Dates: from, to, expires_at and coupon dates (starts_at, ends_at) are sent as the business's local dates (YYYY-MM-DD); responses use ISO 8601 UTC.
  • MCP (AI assistants): POST /api/mcp (JSON-RPC 2.0, Streamable HTTP) with the same key and the mcp:use scope, or OAuth 2.1 with PKCE for connectors such as claude.ai and ChatGPT. Fixed read and non-destructive write tools on top of this API, with the same rules; none of them deletes, reverses or subtracts balance. Details in the MCP section of the documentation.

Scope. The API covers day-to-day operations: customers, cards, purchases, redemptions, messages, coupons, branches and team. Only the dashboard can create and delete programs (with their design), create and edit automations, and create agency sub-accounts; through the API you can read them with GET /programs/{program}, GET /automations and GET /subaccounts.

Base URL

https://stampeazy.co.nz/api/v1

Your first request

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/cards' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Authentication and scopes

Every request carries an API key in the Authorization: Bearer … header. Keys are created in Dashboard → Developers, are shown only once and we only store their fingerprint (hash). Each key belongs to a single business and only sees that business's data.

When you create the key you choose its scopes; a request outside them returns 403:

ScopeAllows
customers:readRead customers
customers:writeCreate and update customers
cards:readView cards, balances and rewards
cards:writeIssue cards, record purchases, credit and redeem
transactions:reverseReverse transactions
programs:readView programs, tiers, rewards and sign-up links
programs:writeEdit programs, tiers and rewards
segments:readView customer segments
pushes:writeSend messages to the Wallet pass and check their status
webhooks:manageCreate, list and delete webhooks
locations:readView branches
locations:writeCreate, edit and delete branches
managers:readView team users and roles
managers:writeCreate, edit and deactivate team users
statistics:readView statistics
coupons:readView coupons
coupons:writeCreate, edit and delete coupons
automations:readView automations
subaccounts:readView sub-accounts (agencies only)
mcp:useConnect AI assistants via MCP (only the tools the other scopes allow; never deletes)

The business's plan must include the API feature. Writes also require an active subscription.

Headers

Headers
Authorization: Bearer YOUR_API_KEY
Accept: application/json

Amounts, idempotency and pagination

Amounts in minor units

All amounts are integers in the minor unit of your business's currency (cents): 12550 equals 125.50. Never send balances: the server calculates them.

Idempotency-Key

On POST, PATCH and DELETE (except POST /webhooks, whose response includes the secret and is not stored) you can, and we recommend you do, send the Idempotency-Key header with a unique value per operation. If you repeat the request, you get the original response with Idempotent-Replayed: true; the same key with a different body returns 409. Keys are kept for 24 hours. For purchases, external_reference (invoice number) also prevents crediting the same receipt twice.

List pagination

Lists accept ?per_page= (maximum 100) and ?page=, and return data together with meta.current_page, meta.per_page and meta.total.

Safe retry

Idempotency
POST https://stampeazy.co.nz/api/v1/purchases
Idempotency-Key: 3f6c1b7e-9a2d-4c58-8e41-0b7d2f9a6c15

# First time → 201 Created
# Same key and same body → same response
#   + Idempotent-Replayed: true header
# Same key with a different body → 409 Conflict

Errors and limits

Errors respond with an error object that has a stable code (for your code) and a readable message. Validation errors use the standard format with message and errors per field, and a missing resource returns 404 with only {"message": "…"}. Always send Accept: application/json: without that header some errors may arrive as a redirect or as HTML.

401
Key missing, invalid, expired or revoked.
402
Write attempted while the business's subscription is inactive.
403
The key does not have the required scope or the plan does not include the API.
404
The resource does not exist in your business (data from other businesses is never visible).
409
Conflict: Idempotency-Key reused with a different body or external reference already used.
422
Validation or business rule (for example, insufficient balance).
429
You exceeded the requests-per-minute limit.

Rate limit

Each key can make up to 120 requests per minute. Beyond that you get 429; wait a few seconds and retry.

Error format

application/json
{
    "error": {
        "code": "forbidden",
        "message": "The key does not have the cards:write scope."
    }
}

Webhooks

Get notified on your server when something happens in your program. Set them up in Dashboard → Developers with an HTTPS URL and the events you care about; the signing secret is shown only once.

  • customer.created Customer created
  • card.issued Card issued
  • transaction.created Transaction recorded (earn, redemption, adjustment)
  • transaction.reversed Transaction reversed
  • reward.redeemed Reward redeemed
  • purchase.created Purchase recorded

Signature

Each delivery includes X-Webhook-Id, X-Webhook-Event and X-Webhook-Signature: t=<unix>,v1=<hex>, where v1 is the HMAC-SHA256 of "<t>.<body>" with your secret. Verify the signature with the raw body, reject timestamps older than 5 minutes and deduplicate by id.

Deliveries and retries

Respond with 2xx in under 10 seconds. Otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h. Every attempt is recorded in the dashboard's delivery log, where you can resend the failed ones.

Verify the signature

PHP 8+
<?php
// Webhook signature verification (PHP 8+).
$secret = getenv('WEBHOOK_SECRET');
$body = file_get_contents('php://input');            // raw body, not decoded
$header = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';

if (! preg_match('/^t=(\d+),v1=([a-f0-9]{64})$/', $header, $m)
    || abs(time() - (int) $m[1]) > 300) {             // 5-minute tolerance
    http_response_code(400);
    exit;
}

$expected = hash_hmac('sha256', $m[1].'.'.$body, $secret);
if (! hash_equals($expected, $m[2])) {
    http_response_code(401);
    exit;
}

$event = json_decode($body, true);
// Deduplicate by $event['id'] (same as X-Webhook-Id) before processing.
http_response_code(200);

Event body

application/json
{
    "id": "0b8e6f3a-5c2d-4b71-9f0e-7a1d2c3b4e5f",
    "type": "transaction.created",
    "created_at": "2026-01-31T15:04:05-06:00",
    "data": {
        "transaction": {
            "id": 981,
            "type": "earn",
            "amount": 1,
            "balance_after": 7,
            "reference": "FAC-000123"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "program_type": "stamps",
            "status": "active",
            "balance": 7
        }
    }
}

MCP for AI assistants

Connect an AI agent that supports the Model Context Protocol to look up customers, cards and sales, or record purchases, just by chatting. Server URL (no trailing slash): https://stampeazy.co.nz/api/mcp.

Compatibility

Works with any MCP client with Streamable HTTP transport: Claude Code, Codex, Cursor, VS Code (Copilot), Gemini CLI, Windsurf, Cline, the claude.ai and ChatGPT connectors, the official MCP SDKs (TypeScript, Python) and the agent SDKs built on them. Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26. Clients that only run local servers (stdio), such as Claude Desktop, connect through the mcp-remote bridge.

Authentication: API key or OAuth

With a key (CLI, IDE, SDK): the same API key, with the mcp:use scope in addition to each tool's scopes; the assistant only sees the tools the key allows. Create a key just for the assistant, with an expiration date and, if it will only look things up, only :read scopes.

With OAuth 2.1 (claude.ai and ChatGPT connectors and any client that supports it): add only the server URL, no key. The app takes you to StampEazy, you log in and choose what it will be able to do (read-only checked by default) and for how long. It uses dynamic client registration, mandatory PKCE S256, 1-hour access tokens and refresh with rotation; a reused refresh token revokes the connection. Only the owner and admins can approve, and the token works only for MCP.

Keys and OAuth connections appear in Dashboard → Developers; revoking them cuts off access instantly.

Security

The tools are fixed and each one is a call to the API on this page, with the same rules: scope, per-business isolation, validation, subscription, idempotency and ledger. The assistant cannot run SQL or delete anything: there are no tools to delete, reverse, subtract balance, send mass messages or manage the team, webhooks or keys. The texts it returns (names, notes) are your business's data, not instructions for the assistant.

Limits

60 messages per minute per key; each tool also counts toward the API's limit of 120 requests per minute. On writes send idempotency_key: a retry returns the original result without crediting twice.

ToolScopeDoes
list_programs cards:read Read. Active loyalty programs with their rewards.
get_program programs:read Read. Program details: rules, tiers and number of cards.
list_customers customers:read Read. Searches customers by phone or email (paginated).
get_customer customers:read Read. A customer profile with their cards.
list_cards cards:read Read. Lists cards filtered by program, customer or status.
get_card cards:read Read. Balance, status and tier of a card by its serial (the QR text).
list_card_rewards cards:read Read. Rewards of the card program and whether the balance is enough.
list_card_transactions cards:read Read. Ledger transactions of a card (newest first).
list_operations cards:read Read. Business ledger with filters. Local YYYY-MM-DD dates.
list_segments segments:read Read. Customers per RFM segment.
list_coupons coupons:read Read. Promo coupons.
list_locations locations:read Read. Branches.
get_revenue_statistics statistics:read Read. Sales and customer overview. Amounts in cents; local YYYY-MM-DD dates.
create_customer customers:write Write. Registers a customer (or returns the existing one with that phone or email).
issue_card cards:write Write. Issues a customer card in a program (or returns the one they already have).
record_purchase cards:write Write. Records a purchase and credits it according to the program rules. amount in cents.
add_to_card cards:write Write. Credits stamps, points, balance or visits without a purchase (depending on the program type).
redeem_reward cards:write Write. Redeems a reward. Use dry_run=true first to validate without redeeming.

Connect the assistant

OAuth 2.1 · no key
claude.ai → Settings → Connectors → Add custom connector
  URL: https://stampeazy.co.nz/api/mcp

ChatGPT → Settings → Connectors (developer mode) → Create
  URL: https://stampeazy.co.nz/api/mcp
  Authentication: OAuth

Then log in to StampEazy, choose the permissions and approve.
No API key: access is granted with OAuth 2.1.

MCP usage example

With the server connected you talk to the assistant in natural language and it picks the tools. In the sample conversation, it first looks things up: it finds the customer by phone, opens her profile with her cards and checks which rewards she can afford. Then, to record the purchase, it summarizes the operation, waits for your confirmation and calls record_purchase with the amount in cents (L 350 = 35000), the invoice number in external_reference and an idempotency_key: if the request is repeated, it is not credited twice.

Try these questions

  • “How much did we sell this week and how many new customers did we get?” → get_revenue_statistics
  • “What is the balance on card 32852595C80B7B165F61?” → get_card
  • “Show me the latest transactions on that card.” → list_card_transactions
  • “How many customers are in each segment?” → list_segments
  • “Redeem Carla’s Free coffee.” → redeem_reward, first with dry_run

Each response arrives in structuredContent (the same JSON as the API) and as text. If something fails, the tool responds with isError: true with the HTTP code and the error, and the assistant can explain it or fix the data. The points in the example are illustrative: the server calculates them with your program's rules.

A conversation

→ call · ← result
User: How many points does the customer with phone 9988-7766
have, and what can she redeem?

  → list_customers     {"phone": "9988-7766"}
  ← Carla Mejía (id 12)
  → get_customer       {"customer": 12}
  ← Card 32852595C80B7B165F61 · Points · balance 1250
  → list_card_rewards  {"serial": "32852595C80B7B165F61"}
  ← Free coffee (1000, available) · Dessert (1500)

Assistant: Carla has 1,250 points. She can redeem a Free
coffee; she needs 250 more points for the Dessert.

User: Record her L 350 purchase with invoice FAC-1045.

Assistant: I'll record an L 350.00 purchase on card
…5F61 with invoice FAC-1045. Do you confirm?

User: Yes.

  → record_purchase    {"card_serial": "32852595C80B7B165F61",
                        "amount": 35000,
                        "external_reference": "FAC-1045",
                        "idempotency_key": "purchase-FAC-1045"}
  ← +35 points · balance 1285

Assistant: Done. 35 points were credited and Carla now
has 1,285.

Skill for AI assistants

The stampeazy-mcp Skill teaches the assistant to use this server sensibly: it confirms before recording, converts amounts to cents, uses the invoice and the idempotency_key to avoid duplicates, validates redemptions with dry_run, does not make up data and treats your business's texts as data, not as orders. It follows the open Agent Skills format, so it works in Claude Code, Codex, claude.ai, Claude Desktop and other compatible agents.

The Skill does not grant access by itself: first connect the MCP server (above). It is built when you download it, with this server's address and the current list of tools: SKILL.md (instructions) and references/herramientas.md (each tool with its parameters).

Install it with one command

With the open skills CLI (Node.js 22.20 or later) it installs into the agents you have:

npx skills add https://stampeazy.co.nz

With -a claude-code or -a codex you choose the agent, and with -g you install it for your user instead of the project.

Or by hand

  • Claude Code: unzip the ZIP into ~/.claude/skills/ (for you) or into a project's .claude/skills/. You should end up with ~/.claude/skills/stampeazy-mcp/SKILL.md.
  • Codex: unzip it into ~/.agents/skills/ (or the repository's .agents/skills/). If it does not show up, restart Codex.
  • claude.ai and Claude Desktop: upload the ZIP as is in the Skills section of the settings and turn it on (plans with code execution). Also connect the server as a custom connector.

Using it

Just ask as usual: the assistant loads it when the question is about your business's customers, points, balances, rewards or sales. You can also call it by hand: /stampeazy-mcp in Claude Code or $stampeazy-mcp in Codex.

Install and use

Node.js 22.20+
# In the agents you have installed (Claude Code, Codex, Cursor…)
npx skills add https://stampeazy.co.nz

# Claude Code only, for your user and without prompts
npx skills add https://stampeazy.co.nz -g -a claude-code -y

# Codex only
npx skills add https://stampeazy.co.nz -g -a codex -y

cards

Customer cards: issue, look up, credit, subtract, redeem, expiration and memberships.

List cards

The business's cards, filterable by program, customer and status.

Required scope: cards:read.

Authorization: HTTP Bearer

Query parameters

  • program_id
    integer
    Program
  • customer_id
    integer
    Customer
  • status
    string
    Status
    Values: "active" "suspended" "revoked" "expired" "used"
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Cards

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /cards View full URL

https://stampeazy.co.nz/api/v1/cards

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/cards' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "stamps",
            "status": "active",
            "balance": 5,
            "unit": "stamps",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "5 stamps"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Issue a card to a customer

Issues the program's card for the customer. Never duplicates customer+program: if it already exists, it is returned with HTTP 200. Applies the program's welcome gift.

Required scope: cards:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • customer_id required
    integer
    Customer
  • program_id required
    integer
    Active program
  • initial_amount
    integer [ 0 .. 100000000 ]
    Gift cards only: starting balance in cents. Cannot exceed the program's maximum balance (config.max_balance; if it does → 422 max_balance)

Responses

  • 200 The card already existed

    Schema application/json · object

  • 201 Card issued Same schema as response 200.
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards View full URL

https://stampeazy.co.nz/api/v1/cards

Request samples

application/json
{
    "customer_id": 12,
    "program_id": 3
}

Response samples

application/json
{
    "data": {
        "serial": "32852595C80B7B165F61",
        "customer_id": 12,
        "program_id": 3,
        "program_type": "stamps",
        "status": "active",
        "balance": 5,
        "unit": "stamps",
        "tier_id": null,
        "expires_at": null,
        "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
        "wallet": {
            "apple": "issued",
            "google": "pending"
        },
        "balance_display": "5 stamps"
    }
}

Get card

Status, balance, tier, expiration and Wallet pass status.

Required scope: cards:read.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Responses

  • 200 Card

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /cards/{serial} View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/cards/{serial}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

Edit card

Suspends or reactivates the card and/or changes its expiration. Does not change the balance. A revoked card or a used coupon cannot be changed (card_final_state). An expired card can only be reactivated by also sending a future expires_at (card_expired). The change is audited.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • status
    string
    New status
    Values: "active" "suspended"
  • expires_at
    string <date> or null
    Expiration (local date; null = no expiration). Cannot be in the past.
  • reason
    string <= 200 characters
    Reason (audit log)

Responses

  • 200 Card updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /cards/{serial} View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}

Request samples

application/json
{
    "status": "suspended",
    "reason": "Review for suspicious use"
}

Response samples

application/json
{
    "data": {
        "serial": "32852595C80B7B165F61",
        "customer_id": 12,
        "program_id": 3,
        "program_type": "stamps",
        "status": "suspended",
        "balance": 5,
        "unit": "stamps",
        "tier_id": null,
        "expires_at": null,
        "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
        "wallet": {
            "apple": "issued",
            "google": "pending"
        },
        "balance_display": "5 stamps"
    }
}

Revoke card

Revokes the card (final status, no further operations allowed). Nothing is deleted: the ledger is kept. The change is audited and the Wallet pass is updated.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json

  • reason
    string <= 200 characters
    Reason

Responses

  • 200 Card revoked

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /cards/{serial} View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}

Request samples

application/json
{
    "reason": "Duplicate card"
}

Response samples

application/json
{
    "data": {
        "serial": "32852595C80B7B165F61",
        "customer_id": 12,
        "program_id": 3,
        "program_type": "stamps",
        "status": "revoked",
        "balance": 5,
        "unit": "stamps",
        "tier_id": null,
        "expires_at": null,
        "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
        "wallet": {
            "apple": "issued",
            "google": "pending"
        },
        "balance_display": "5 stamps"
    }
}

Add balance in cents

Credits balance in cents without a purchase. Available for cashback (earning) and gift cards (top-up: respects the maximum balance and reloads); other types return operation_not_supported. It is recorded in the ledger with its reference.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Balance amount in cents
  • description
    string <= 120 characters
    Description on the transaction
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Amount credited

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/amount View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/amount

Request samples

application/json
{
    "amount": 5000,
    "description": "Compensation for a delay"
}

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "earn",
            "amount": 1,
            "balance_after": 5,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Credit (API)",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "stamps",
            "status": "active",
            "balance": 5,
            "unit": "stamps",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "5 stamps"
        },
        "discount": 0,
        "redemption": null,
        "replayed": false,
        "message": "Credited: +1 stamp. Balance: 5 stamps."
    }
}

Subtract balance in cents

Subtracts balance in cents as an audited adjustment with a required reason (correction). The balance never goes negative (insufficient_balance). For regular usage use /debit or /redemptions.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Balance amount in cents
  • reason required
    string [ 5 .. 200 ] characters
    Reason (audit log)
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Amount subtracted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/amount/subtract View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/amount/subtract

Request samples

application/json
{
    "amount": 1,
    "reason": "Stamp recorded by mistake"
}

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "adjustment",
            "amount": -1,
            "balance_after": 4,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Adjustment: Stamp recorded by mistake",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "stamps",
            "status": "active",
            "balance": 4,
            "unit": "stamps",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "4 stamps"
        },
        "discount": 0,
        "redemption": null,
        "replayed": false,
        "message": "Deducted: 1 stamp. Balance: 4 stamps."
    }
}

Use the card's coupon

For coupon-type cards (single use): records the purchase, marks the card as used and returns the discount to apply. For promo codes see the coupons group.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • purchase_amount required
    integer >= 1
    Purchase total in cents
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Coupon used

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/coupon/redeem View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/coupon/redeem

Request samples

application/json
{
    "purchase_amount": 20000
}

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "redeem",
            "amount": -1,
            "balance_after": 0,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Coupon redeemed",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "coupon",
            "status": "used",
            "balance": 0,
            "unit": "uses",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "0 uses"
        },
        "discount": 4000,
        "redemption": null,
        "replayed": false,
        "message": "Deducted: 1 use. Discount to apply: L 40.00."
    }
}

Load gift balance or renew pack

Gift card: loads amount cents (respects the maximum balance and whether reloads are allowed). Visits or membership: new pack/period.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount
    integer >= 1
    Gift card only: cents
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Top-up recorded

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/credit View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/credit

Request samples

application/json
{
    "amount": 50000
}

Response samples

Use balance, visit or use

Uses gift balance, cashback (with purchase_amount to respect the per-purchase cap), a visit or a membership use.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer >= 1
    Units to use (cents for gift card/cashback)
  • purchase_amount
    integer
    Cashback: purchase total in cents
  • description
    string <= 120 characters
    Description
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Usage recorded

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/debit View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/debit

Request samples

application/json
{
    "amount": 1
}

Response samples

Set expiration date

Changes the card's expiration (end of the given day, local time). null = no expiration. An expired card with a future date becomes active again (the expired balance is not restored).

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • expires_at required
    string <date> or null
    Date (YYYY-MM-DD) or null

Responses

  • 200 Card updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/expiration View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/expiration

Request samples

application/json
{
    "expires_at": "2027-03-31"
}

Response samples

application/json
{
    "data": {
        "serial": "32852595C80B7B165F61",
        "customer_id": 12,
        "program_id": 3,
        "program_type": "stamps",
        "status": "active",
        "balance": 5,
        "unit": "stamps",
        "tier_id": null,
        "expires_at": "2027-04-01T05:59:59+00:00",
        "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
        "wallet": {
            "apple": "issued",
            "google": "pending"
        },
        "balance_display": "5 stamps"
    }
}

Renew membership period

Starts a new period from today: the remaining uses expire and the uses included in the tier are credited.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Responses

  • 201 Membership renewed

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/membership/renew View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/membership/renew

Request samples

Terminal
curl -X POST 'https://stampeazy.co.nz/api/v1/cards/{serial}/membership/renew' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: 3f6c1b7e-9a2d-4c58-8e41-0b7d2f9a6c15' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "credit",
            "amount": 8,
            "balance_after": 8,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Membership renewal",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "membership",
            "status": "active",
            "balance": 8,
            "unit": "uses",
            "tier_id": 4,
            "expires_at": "2026-12-18T15:04:05+00:00",
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "8 uses"
        },
        "discount": 0,
        "redemption": null,
        "replayed": false,
        "message": "Credited: +8 uses. Balance: 8 uses."
    }
}

Restore membership uses

Restores uses up to the number included in the tier without changing the validity period. If they are already complete it returns nothing_to_restore.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Responses

  • 201 Uses restored

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/membership/restore-uses View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/membership/restore-uses

Request samples

Terminal
curl -X POST 'https://stampeazy.co.nz/api/v1/cards/{serial}/membership/restore-uses' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: 3f6c1b7e-9a2d-4c58-8e41-0b7d2f9a6c15' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "credit",
            "amount": 3,
            "balance_after": 8,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Uses restoration",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "membership",
            "status": "active",
            "balance": 8,
            "unit": "uses",
            "tier_id": 4,
            "expires_at": "2026-12-18T15:04:05+00:00",
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "8 uses"
        },
        "discount": 0,
        "redemption": null,
        "replayed": false,
        "message": "Credited: +3 uses. Balance: 8 uses."
    }
}

Assign tier and period

Assigns a program tier (or null to remove it). For memberships, period_days restarts the period from today. If the program upgrades tiers automatically by spend, the next purchase may recalculate it.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • tier_id required
    integer or null
    Program tier or null
  • period_days
    integer [ 1 .. 3660 ]
    Memberships: period length from today

Responses

  • 200 Card updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/membership/tier View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/membership/tier

Request samples

application/json
{
    "tier_id": 4,
    "period_days": 60
}

Response samples

application/json
{
    "data": {
        "serial": "32852595C80B7B165F61",
        "customer_id": 12,
        "program_id": 3,
        "program_type": "membership",
        "status": "active",
        "balance": 8,
        "unit": "uses",
        "tier_id": 4,
        "expires_at": "2026-12-18T15:04:05+00:00",
        "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
        "wallet": {
            "apple": "issued",
            "google": "pending"
        },
        "balance_display": "8 uses"
    }
}

Add points

Credits points without a purchase. Available for points programs; other types return operation_not_supported. It is recorded in the ledger with its reference.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of points
  • description
    string <= 120 characters
    Description on the transaction
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Points credited

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/points View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/points

Request samples

application/json
{
    "amount": 150,
    "description": "Compensation for a delay"
}

Response samples

Subtract points

Subtracts points as an audited adjustment with a required reason (correction). The balance never goes negative (insufficient_balance). For regular usage use /debit or /redemptions.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of points
  • reason required
    string [ 5 .. 200 ] characters
    Reason (audit log)
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Points subtracted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/points/subtract View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/points/subtract

Request samples

Response samples

Validate or redeem reward

Redeems a reward (deducts its cost and returns a code for the cashier). With dry_run: true it only validates.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • reward_id required
    integer
    Program reward
  • dry_run
    boolean
    true = validate only, does not redeem
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 200 dry_run: validation result

    Schema application/json · object

    • data
      object
      Properties of data (4)
      • valid
        boolean
      • reason
        string or null
      • cost
        integer
      • balance
        integer
  • 201 Redemption recorded

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/redemptions View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/redemptions

Request samples

application/json
{
    "reward_id": 7
}

Response samples

application/json
{
    "data": {
        "valid": false,
        "reason": "insufficient_balance",
        "cost": 10,
        "balance": 5
    }
}

Card rewards

The program's active rewards and whether the current balance is enough.

Required scope: cards:read.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Responses

  • 200 Rewards

    Schema application/json · object

    • data
      array of object
      Properties of data (5)
      • id
        integer
      • name
        string
      • cost
        integer
      • stock
        integer or null
      • available
        boolean
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /cards/{serial}/rewards View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/rewards

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/cards/{serial}/rewards' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 7,
            "name": "Americano coffee",
            "cost": 10,
            "stock": null,
            "available": false
        }
    ]
}

Deliver reward

Equivalent to POST /cards/{serial}/redemptions: the customer receives the reward and its cost is deducted from the balance.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • reward_id required
    integer
    Program reward
  • dry_run
    boolean
    true = validate only, does not redeem
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 200 dry_run: validation result

    Schema application/json · object

    • data
      object
      Properties of data (4)
      • valid
        boolean
      • reason
        string or null
      • cost
        integer
      • balance
        integer
  • 201 Redemption recorded

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/rewards/receive View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/rewards/receive

Request samples

Response samples

Add stamps

Credits stamps without a purchase. Available for stamp cards (respects the program's maximum stamps per operation); other types return operation_not_supported. It is recorded in the ledger with its reference.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of stamps
  • description
    string <= 120 characters
    Description on the transaction
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Stamps credited

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/stamps View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/stamps

Request samples

application/json
{
    "amount": 1,
    "description": "Compensation for a delay"
}

Response samples

Subtract stamps

Subtracts stamps as an audited adjustment with a required reason (correction). The balance never goes negative (insufficient_balance). For regular usage use /debit or /redemptions.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of stamps
  • reason required
    string [ 5 .. 200 ] characters
    Reason (audit log)
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Stamps subtracted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/stamps/subtract View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/stamps/subtract

Request samples

Response samples

Card transactions

The card's ledger, newest first.

Required scope: cards:read.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Query parameters

  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Transactions

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /cards/{serial}/transactions View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/transactions

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/cards/{serial}/transactions' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 981,
            "type": "earn",
            "amount": 1,
            "balance_after": 5,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Credit (API)",
            "created_at": "2026-10-19T15:04:05+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Add visits

Credits visits without a purchase. Available for visit packs (top-up to the pack); other types return operation_not_supported. It is recorded in the ledger with its reference.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of visits
  • description
    string <= 120 characters
    Description on the transaction
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Visits credited

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/visits View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/visits

Request samples

Response samples

Subtract visits

Subtracts visits as an audited adjustment with a required reason (correction). The balance never goes negative (insufficient_balance). For regular usage use /debit or /redemptions.

Required scope: cards:write.

Authorization: HTTP Bearer

Path parameters

  • serial required
    string pattern: ^[0-9A-Fa-f]{20}$
    Card number (the same as the QR)

    Example: "32852595C80B7B165F61"

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • amount required
    integer [ 1 .. 100000000 ]
    Number of visits
  • reason required
    string [ 5 .. 200 ] characters
    Reason (audit log)
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 201 Visits subtracted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /cards/{serial}/visits/subtract View full URL

https://stampeazy.co.nz/api/v1/cards/{serial}/visits/subtract

Request samples

Response samples

Record purchase

Records a purchase and credits according to the program's rules (stamps per purchase or per amount, points, cashback, tiers, happy hours). Returns the discount to apply if the program is a discount or membership program. external_reference prevents duplicates: the same reference returns the original operation (replayed: true).

Required scope: cards:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • card_serial required
    string [ 20 .. 20 ] characters
    Card (QR)
  • amount required
    integer [ 1 .. 100000000 ]
    Purchase total in cents
  • external_reference
    string <= 100 characters
    POS invoice or receipt no.
  • items
    array of object <= 200 items
    Optional detail for reports
    Properties of items (5)
    • sku
      string
    • name required
      string
    • category
      string
    • quantity required
      integer >= 1
    • unit_price required
      integer >= 0
      Cents
  • branch_code
    string <= 20 characters
    Code of the branch where it happens (optional)

    Example: "CENTRO"

Responses

  • 200 Already recorded (same reference)

    Schema application/json · object

  • 201 Purchase recorded Same schema as response 200.
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /purchases View full URL

https://stampeazy.co.nz/api/v1/purchases

Request samples

application/json
{
    "card_serial": "32852595C80B7B165F61",
    "amount": 30000,
    "external_reference": "FAC-000123",
    "branch_code": "CENTRO"
}

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 981,
            "type": "earn",
            "amount": 1,
            "balance_after": 5,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Credit (API)",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "stamps",
            "status": "active",
            "balance": 5,
            "unit": "stamps",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "5 stamps"
        },
        "discount": 0,
        "redemption": null,
        "replayed": true,
        "message": "Credited: +1 stamp. Balance: 5 stamps."
    }
}

customers

Customers: sign-up deduplicated by phone or email, lookup, editing and erasure.

List or search customers

Paginated list of non-anonymized customers, sorted by ID. Filter by phone (normalized to E.164 with the business's country) or by email.

Required scope: customers:read.

Authorization: HTTP Bearer

Query parameters

  • phone
    string
    Exact phone (local or international)
  • email
    string
    Exact email
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Customers

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /customers View full URL

https://stampeazy.co.nz/api/v1/customers

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/customers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 12,
            "name": "Carla Mejía",
            "phone": "+50499887766",
            "email": "carla@ejemplo.com",
            "birthday": "1994-05-17",
            "tags": [
                "vip"
            ],
            "rfm_segment": "loyal",
            "consents": {
                "marketing_email": true,
                "marketing_whatsapp": false
            },
            "created_at": "2026-09-02T14:20:00+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Create or identify customer

Creates the customer or returns the existing one if the business already has one with the same phone or email (created: false, HTTP 200).

Required scope: customers:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name required
    string <= 120 characters
    Full name
  • phone
    string <= 20 characters
    Phone (required if there is no email)
  • email
    string <email> <= 150 characters
    Email (required if there is no phone)
  • birthday
    string <date>
    Date of birth
  • tags
    array of string
  • consents
    object
    Consents granted (recorded with date and IP)
    Properties of consents (3)
    • marketing_email
      boolean
    • marketing_whatsapp
      boolean
    • terms
      boolean

Responses

  • 200 Already existed

    Schema application/json · object

  • 201 Customer created Same schema as response 200.
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /customers View full URL

https://stampeazy.co.nz/api/v1/customers

Request samples

application/json
{
    "name": "Carla Mejía",
    "phone": "9988-7766",
    "email": "carla@ejemplo.com",
    "consents": {
        "marketing_email": true,
        "terms": true
    }
}

Response samples

application/json
{
    "data": {
        "id": 12,
        "name": "Carla Mejía",
        "phone": "+50499887766",
        "email": "carla@ejemplo.com",
        "birthday": "1994-05-17",
        "tags": [
            "vip"
        ],
        "rfm_segment": "loyal",
        "consents": {
            "marketing_email": true,
            "marketing_whatsapp": false
        },
        "created_at": "2026-09-02T14:20:00+00:00"
    },
    "created": false
}

Get customer

Customer with all their cards.

Required scope: customers:read.

Authorization: HTTP Bearer

Path parameters

  • customer required
    integer
    Customer ID

Responses

  • 200 Customer

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /customers/{customer} View full URL

https://stampeazy.co.nz/api/v1/customers/{customer}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/customers/{customer}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 12,
        "name": "Carla Mejía",
        "phone": "+50499887766",
        "email": "carla@ejemplo.com",
        "birthday": "1994-05-17",
        "tags": [
            "vip"
        ],
        "rfm_segment": "loyal",
        "consents": {
            "marketing_email": true,
            "marketing_whatsapp": false
        },
        "created_at": "2026-09-02T14:20:00+00:00",
        "cards": [
            {
                "serial": "32852595C80B7B165F61",
                "customer_id": 12,
                "program_id": 3,
                "program_type": "stamps",
                "status": "active",
                "balance": 5,
                "unit": "stamps",
                "tier_id": null,
                "expires_at": null,
                "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
                "wallet": {
                    "apple": "issued",
                    "google": "pending"
                },
                "balance_display": "5 stamps"
            }
        ]
    }
}

Edit customer

Updates only the fields sent.

Required scope: customers:write.

Authorization: HTTP Bearer

Path parameters

  • customer required
    integer
    Customer ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 120 characters
    Name
  • email
    string <email> or null
    Email unique within the business
  • birthday
    string <date> or null
    Date of birth
  • tags
    array of string or null

Responses

  • 200 Customer updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /customers/{customer} View full URL

https://stampeazy.co.nz/api/v1/customers/{customer}

Request samples

application/json
{
    "tags": [
        "vip",
        "wholesale"
    ]
}

Response samples

application/json
{
    "data": {
        "id": 12,
        "name": "Carla Mejía",
        "phone": "+50499887766",
        "email": "carla@ejemplo.com",
        "birthday": "1994-05-17",
        "tags": [
            "vip",
            "wholesale"
        ],
        "rfm_segment": "loyal",
        "consents": {
            "marketing_email": true,
            "marketing_whatsapp": false
        },
        "created_at": "2026-09-02T14:20:00+00:00"
    }
}

Delete customer (anonymize)

Right to erasure: deletes name, phone, email, birthday, tags and notes, and revokes their cards. The ledger is kept without personal data. Repeating it has no effect.

Required scope: customers:write.

Authorization: HTTP Bearer

Path parameters

  • customer required
    integer
    Customer ID

Responses

  • 200 Customer anonymized

    Schema application/json · object

    • data
      object
      Properties of data (3)
      • id
        integer
      • anonymized
        boolean
      • anonymized_at
        string <date-time>
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /customers/{customer} View full URL

https://stampeazy.co.nz/api/v1/customers/{customer}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/customers/{customer}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 12,
        "anonymized": true,
        "anonymized_at": "2026-10-19T15:04:05+00:00"
    }
}

programs

Programs (card templates): rules, status, tiers, rewards and sign-up links. Programs are created and deleted from the dashboard (with their design); through the API you can read and edit them.

Active programs

Active programs with their rewards catalog and sign-up link (what you need to issue cards from a POS).

Required scope: cards:read.

Authorization: HTTP Bearer

Responses

  • 200 Programs

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 429 More than 120 requests per minute with the same key
GET /programs View full URL

https://stampeazy.co.nz/api/v1/programs

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 3,
            "name": "Stamp card",
            "type": "stamps",
            "unit": "stamps",
            "config": {
                "stamps_target": 10,
                "reward_name": "Americano coffee",
                "stamps_per_purchase": 1
            },
            "rewards": [
                {
                    "id": 7,
                    "name": "Americano coffee",
                    "cost": 10,
                    "stock": null
                }
            ],
            "enrollment_url": "https://app.example.com/r/cafe-aroma/tarjeta-de-sellos"
        }
    ]
}

Get program

Program (card template) with rules, basic design, tiers and rewards.

Required scope: programs:read.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Responses

  • 200 Program

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /programs/{program} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs/{program}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 3,
        "name": "Stamp card",
        "slug": "tarjeta-de-sellos",
        "type": "stamps",
        "type_label": "Stamp card",
        "unit": "stamps",
        "status": "active",
        "description": "Collect 10 stamps and get a coffee.",
        "terms": "One stamp per purchase over L 50.",
        "config": {
            "stamps_target": 10,
            "reward_name": "Americano coffee",
            "stamps_per_purchase": 1
        },
        "welcome_bonus": 1,
        "birthday_bonus": 0,
        "enrollment_open": true,
        "enrollment_url": "https://app.example.com/r/cafe-aroma/tarjeta-de-sellos",
        "design": {
            "background_color": "#1E1B4B",
            "foreground_color": "#FFFFFF",
            "label_color": "#C7D2FE",
            "logo_text": "Café Aroma",
            "header_message": null
        },
        "cards_count": 248,
        "tiers": [],
        "rewards": [
            {
                "id": 7,
                "name": "Americano coffee",
                "description": "Medium size",
                "cost": 10,
                "min_tier_id": null,
                "stock": null,
                "max_per_customer": null,
                "estimated_cost": 3500,
                "is_active": true
            }
        ],
        "published_at": "2026-08-01T13:00:00+00:00",
        "created_at": "2026-07-30T18:45:00+00:00"
    }
}

Edit program

Changes the name, description, terms, open sign-up or status. Activating or pausing an archived program respects the plan's program limit, which counts active and paused programs (plan_limit). Issued passes are updated.

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 80 characters
    Name
  • description
    string or null <= 500 characters
    Description
  • terms
    string or null <= 3000 characters
    Terms and conditions
  • enrollment_open
    boolean
    Accepts new sign-ups
  • status
    string
    Status
    Values: "active" "paused" "archived"

Responses

  • 200 Program updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /programs/{program} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}

Request samples

application/json
{
    "status": "paused"
}

Response samples

application/json
{
    "data": {
        "id": 3,
        "name": "Stamp card",
        "slug": "tarjeta-de-sellos",
        "type": "stamps",
        "type_label": "Stamp card",
        "unit": "stamps",
        "status": "paused",
        "description": "Collect 10 stamps and get a coffee.",
        "terms": "One stamp per purchase over L 50.",
        "config": {
            "stamps_target": 10,
            "reward_name": "Americano coffee",
            "stamps_per_purchase": 1
        },
        "welcome_bonus": 1,
        "birthday_bonus": 0,
        "enrollment_open": true,
        "enrollment_url": "https://app.example.com/r/cafe-aroma/tarjeta-de-sellos",
        "design": {
            "background_color": "#1E1B4B",
            "foreground_color": "#FFFFFF",
            "label_color": "#C7D2FE",
            "logo_text": "Café Aroma",
            "header_message": null
        },
        "cards_count": 248,
        "tiers": [],
        "rewards": [
            {
                "id": 7,
                "name": "Americano coffee",
                "description": "Medium size",
                "cost": 10,
                "min_tier_id": null,
                "stock": null,
                "max_per_customer": null,
                "estimated_cost": 3500,
                "is_active": true
            }
        ],
        "published_at": "2026-08-01T13:00:00+00:00",
        "created_at": "2026-07-30T18:45:00+00:00"
    }
}

List rewards

All the program's rewards (active and inactive). Stamps and points only.

Required scope: programs:read.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Responses

  • 200 Rewards

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /programs/{program}/rewards View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/rewards

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs/{program}/rewards' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 7,
            "name": "Americano coffee",
            "description": "Medium size",
            "cost": 10,
            "min_tier_id": null,
            "stock": null,
            "max_per_customer": null,
            "estimated_cost": 3500,
            "is_active": true
        }
    ]
}

Create reward

Adds a redeemable reward (stamp and points programs).

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name required
    string <= 80 characters
    Name
  • description
    string or null <= 300 characters
    Description
  • cost required
    integer [ 1 .. 10000000 ]
    Cost in stamps or points
  • min_tier_id
    integer or null
    Minimum program tier
  • stock
    integer or null >= 0
    Stock (null = unlimited)
  • max_per_customer
    integer or null >= 1
    Maximum redemptions per customer
  • estimated_cost
    integer >= 0
    Cost to the business in cents
  • is_active
    boolean

Responses

  • 201 Reward created

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /programs/{program}/rewards View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/rewards

Request samples

application/json
{
    "name": "Americano coffee",
    "cost": 10,
    "estimated_cost": 3500
}

Response samples

application/json
{
    "data": {
        "id": 7,
        "name": "Americano coffee",
        "description": "Medium size",
        "cost": 10,
        "min_tier_id": null,
        "stock": null,
        "max_per_customer": null,
        "estimated_cost": 3500,
        "is_active": true
    }
}

Edit reward

Updates only the fields sent. To retire it use is_active: false.

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID
  • reward required
    integer
    Reward ID (must belong to the program)

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 80 characters
    Name
  • description
    string or null <= 300 characters
    Description
  • cost
    integer [ 1 .. 10000000 ]
    Cost in stamps or points
  • min_tier_id
    integer or null
    Minimum program tier
  • stock
    integer or null >= 0
    Stock (null = unlimited)
  • max_per_customer
    integer or null >= 1
    Maximum redemptions per customer
  • estimated_cost
    integer >= 0
    Cost to the business in cents
  • is_active
    boolean

Responses

  • 200 Reward updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /programs/{program}/rewards/{reward} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/rewards/{reward}

Request samples

application/json
{
    "cost": 12
}

Response samples

application/json
{
    "data": {
        "id": 7,
        "name": "Americano coffee",
        "description": "Medium size",
        "cost": 12,
        "min_tier_id": null,
        "stock": null,
        "max_per_customer": null,
        "estimated_cost": 3500,
        "is_active": true
    }
}

Delete reward

Only if it was never redeemed (reward_in_use, 409); otherwise, deactivate it.

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID
  • reward required
    integer
    Reward ID (must belong to the program)

Responses

  • 200 Reward deleted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /programs/{program}/rewards/{reward} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/rewards/{reward}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/programs/{program}/rewards/{reward}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

List tiers

The program's tiers (points, cashback, discount and membership).

Required scope: programs:read.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Responses

  • 200 Tiers

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /programs/{program}/tiers View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/tiers

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs/{program}/tiers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 4,
            "name": "Gold",
            "threshold": 500000,
            "discount_percent": 10,
            "points_multiplier": 1.5,
            "included_uses": 8,
            "benefits": "Complimentary drink on your birthday",
            "color": "#D4A017"
        }
    ]
}

Create tier

Customers move up a tier with their next purchase based on accumulated spend.

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name required
    string <= 60 characters
    Name
  • threshold required
    integer >= 0
    Accumulated spend to reach it, in cents (unique per program)
  • discount_percent
    number [ 0 .. 100 ]
    Discount (%)
  • points_multiplier
    number [ 1 .. 10 ]
    Points multiplier
  • included_uses
    integer or null [ 0 .. 1000 ]
    Memberships: uses per period
  • benefits
    string or null <= 500 characters
    Benefits (text)
  • color
    string or null pattern: ^#[0-9A-Fa-f]{6}$
    Color #RRGGBB

Responses

  • 201 Tier created

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /programs/{program}/tiers View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/tiers

Request samples

application/json
{
    "name": "Gold",
    "threshold": 500000,
    "discount_percent": 10,
    "included_uses": 8
}

Response samples

application/json
{
    "data": {
        "id": 4,
        "name": "Gold",
        "threshold": 500000,
        "discount_percent": 10,
        "points_multiplier": 1.5,
        "included_uses": 8,
        "benefits": "Complimentary drink on your birthday",
        "color": "#D4A017"
    }
}

Edit tier

Updates only the fields sent.

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID
  • tier required
    integer
    Tier ID (must belong to the program)

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 60 characters
    Name
  • threshold
    integer >= 0
    Accumulated spend to reach it, in cents (unique per program)
  • discount_percent
    number [ 0 .. 100 ]
    Discount (%)
  • points_multiplier
    number [ 1 .. 10 ]
    Points multiplier
  • included_uses
    integer or null [ 0 .. 1000 ]
    Memberships: uses per period
  • benefits
    string or null <= 500 characters
    Benefits (text)
  • color
    string or null pattern: ^#[0-9A-Fa-f]{6}$
    Color #RRGGBB

Responses

  • 200 Tier updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /programs/{program}/tiers/{tier} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/tiers/{tier}

Request samples

application/json
{
    "name": "Gold Plus"
}

Response samples

application/json
{
    "data": {
        "id": 4,
        "name": "Gold Plus",
        "threshold": 500000,
        "discount_percent": 10,
        "points_multiplier": 1.5,
        "included_uses": 8,
        "benefits": "Complimentary drink on your birthday",
        "color": "#D4A017"
    }
}

Delete tier

Only if no card has it assigned (tier_in_use, 409).

Required scope: programs:write.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID
  • tier required
    integer
    Tier ID (must belong to the program)

Responses

  • 200 Tier deleted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /programs/{program}/tiers/{tier} View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/tiers/{tier}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/programs/{program}/tiers/{tier}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

segments

RFM customer segments for targeting messages.

List customer segments

RFM segments (recency, frequency, monetary) with the number of customers from the latest calculation. Use them as the audience in POST /pushes.

Required scope: segments:read.

Authorization: HTTP Bearer

Responses

  • 200 Segments

    Schema application/json · object

    • data
      array of object (Segment) Schema Segment
    • meta
      object
      Properties of meta (2)
      • calculated_at
        string <date-time> or null
      • not_calculated
        integer
        Customers without a segment yet
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 429 More than 120 requests per minute with the same key
GET /segments View full URL

https://stampeazy.co.nz/api/v1/segments

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/segments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "key": "champions",
            "label": "Champions",
            "customers": 18
        },
        {
            "key": "loyal",
            "label": "Loyal",
            "customers": 64
        },
        {
            "key": "at_risk",
            "label": "At risk",
            "customers": 23
        }
    ],
    "meta": {
        "calculated_at": "2026-10-19T08:00:00+00:00",
        "not_calculated": 4
    }
}

pushes

Messages to the Wallet pass of one card, a segment or all customers.

List sent messages

Wallet channel campaigns (created through the API or from the dashboard) with their counts. Filters by program, card and status.

Required scope: pushes:write.

Authorization: HTTP Bearer

Query parameters

  • program_id
    integer
    Sends targeted at this program's customers
  • card_serial
    string
    Sends to this card
  • status
    string
    Send status
    Values: "draft" "scheduled" "sending" "sent" "canceled"
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Sends

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /pushes View full URL

https://stampeazy.co.nz/api/v1/pushes

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/pushes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 31,
            "name": "API: Double stamps today until 6 p.m.",
            "title": "Today only",
            "message": "Double stamps today until 6 p.m.",
            "status": "sent",
            "audience": {
                "segments": [
                    "at_risk"
                ]
            },
            "counts": {
                "recipients": 42,
                "sent": 39,
                "skipped": 3,
                "failed": 0,
                "pending": 0
            },
            "created_at": "2026-10-19T15:04:05+00:00",
            "scheduled_at": null,
            "sent_at": "2026-10-19T15:04:06+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Send a message to the Wallet pass

Shows a message on the pass of one card, a segment or all customers with an installed pass (optionally only for one program). Creates a Wallet channel campaign visible in the dashboard. Requires the plan's Campaigns feature.

Real limits: Apple shows it as a notification when the pass updates; Google allows up to 3 notifications per pass every 24 h; the weekly cap of marketing messages per customer is respected (skipped ones count as skipped). Variables: {name}, {business}, {program}, {balance}, {link}.

With scheduled_at (only segment or all) the send stays in scheduled status and goes out at that time; without it, it is sent immediately.

Required scope: pushes:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • target required
    string
    Target
    Values: "card" "segment" "all"
  • card_serial
    string
    Required if target=card
  • segment
    string
    Required if target=segment
    Values: "champions" "loyal" "potential" "new" "at_risk" "lost" "no_purchases"
  • program_id
    integer
    Only customers with an active card in this program
  • title
    string <= 60 characters
    Header
  • message required
    string <= 190 characters
    Notification text
  • name
    string <= 120 characters
    Internal campaign name
  • scheduled_at
    string <date-time> or null
    Schedule the send (the business's local date and time, or ISO 8601 with time zone). Must be in the future. Not allowed with target=card.

Responses

  • 201 Send created: started (sent/sending) or scheduled (scheduled)

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /pushes View full URL

https://stampeazy.co.nz/api/v1/pushes

Request samples

application/json
{
    "target": "segment",
    "segment": "at_risk",
    "title": "Today only",
    "message": "Double stamps today until 6 p.m."
}

Response samples

application/json
{
    "data": {
        "id": 31,
        "name": "API: Double stamps today until 6 p.m.",
        "title": "Today only",
        "message": "Double stamps today until 6 p.m.",
        "status": "sent",
        "audience": {
            "segments": [
                "at_risk"
            ]
        },
        "counts": {
            "recipients": 42,
            "sent": 39,
            "skipped": 3,
            "failed": 0,
            "pending": 0
        },
        "created_at": "2026-10-19T15:04:05+00:00",
        "scheduled_at": null,
        "sent_at": "2026-10-19T15:04:06+00:00"
    }
}

Get send

Send status and recipient count (sent, skipped, failed, pending).

Required scope: pushes:write.

Authorization: HTTP Bearer

Path parameters

  • push required
    integer
    Send ID

Responses

  • 200 Send

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /pushes/{push} View full URL

https://stampeazy.co.nz/api/v1/pushes/{push}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/pushes/{push}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

webhooks

Subscriptions to receive signed events on your server.

List webhooks

Active and inactive subscriptions (without the secret) and event catalog in meta.events.

Required scope: webhooks:manage.

Authorization: HTTP Bearer

Responses

  • 200 Webhooks

    Schema application/json · object

    • data
      array of object (Webhook) Schema Webhook
    • meta
      object
      Properties of meta (1)
      • events
        object
        Event → description
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 429 More than 120 requests per minute with the same key
GET /webhooks View full URL

https://stampeazy.co.nz/api/v1/webhooks

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/webhooks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 3,
            "url": "https://pos.ejemplo.com/webhooks/fidelizacion",
            "events": [
                "purchase.created",
                "reward.redeemed"
            ],
            "is_active": true,
            "created_at": "2026-10-19T15:04:05+00:00"
        }
    ],
    "meta": {
        "events": {
            "purchase.created": "Purchase recorded"
        }
    }
}

Subscribe a URL to events

Registers an HTTPS URL. The signing secret (secret) is returned only in this response: store it. That is why this route does not store responses for Idempotency-Key; the same URL cannot be registered twice (409 webhook_exists).

Each delivery carries X-Webhook-Signature: t=<unix>,v1=<hex> with v1 = HMAC-SHA256(secret, t + "." + body).

Required scope: webhooks:manage.

Authorization: HTTP Bearer

Request body application/json required

  • url required
    string <uri> <= 500 characters
    HTTPS URL
  • events required
    array of string >= 1 items

Responses

  • 201 Webhook created

    Schema application/json · object

    • data
      object
      Properties of data (6)
      • id
        integer
      • url
        string
      • events
        array of string
      • is_active
        boolean
      • created_at
        string <date-time>
      • secret
        string
        Signing secret (shown once)
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /webhooks View full URL

https://stampeazy.co.nz/api/v1/webhooks

Request samples

application/json
{
    "url": "https://pos.ejemplo.com/webhooks/fidelizacion",
    "events": [
        "purchase.created",
        "reward.redeemed"
    ]
}

Response samples

application/json
{
    "data": {
        "id": 3,
        "url": "https://pos.ejemplo.com/webhooks/fidelizacion",
        "events": [
            "purchase.created",
            "reward.redeemed"
        ],
        "is_active": true,
        "created_at": "2026-10-19T15:04:05+00:00",
        "secret": "whsec_9fK2mQ7xL4pR8tV1nB6cD3eG5hJ0kW2yZ4aS7uX9"
    }
}

Delete webhook

Deletes the subscription and its delivery log.

Required scope: webhooks:manage.

Authorization: HTTP Bearer

Path parameters

  • webhook required
    integer
    Webhook ID

Responses

  • 200 Webhook deleted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /webhooks/{webhook} View full URL

https://stampeazy.co.nz/api/v1/webhooks/{webhook}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/webhooks/{webhook}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

locations

The business's branches.

List branches

The business's branches sorted by name.

Required scope: locations:read.

Authorization: HTTP Bearer

Query parameters

  • is_active
    integer
    1 = active, 0 = inactive
    Values: 0 1
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Branches

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /locations View full URL

https://stampeazy.co.nz/api/v1/locations

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/locations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 2,
            "name": "Downtown Branch",
            "code": "CENTRO",
            "address": "Av. Cervantes 123",
            "city": "Tegucigalpa",
            "phone": "+50422223333",
            "latitude": 14.0723,
            "longitude": -87.192099999999996,
            "is_active": true,
            "created_at": "2026-08-01T13:00:00+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Create branch

Respects the plan's branch limit (plan_limit, 403).

Required scope: locations:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name required
    string <= 120 characters
    Name
  • code required
    string <= 20 characters
    Unique short code (stored in uppercase, without symbols)
  • address
    string or null <= 255 characters
    Address
  • city
    string or null <= 100 characters
    City
  • phone
    string or null <= 30 characters
    Phone
  • latitude
    number or null [ -90 .. 90 ]
    Latitude (always together with longitude): Wallet pass location
  • longitude
    number or null [ -180 .. 180 ]
    Longitude (always together with latitude)
  • is_active
    boolean

Responses

  • 201 Branch created

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /locations View full URL

https://stampeazy.co.nz/api/v1/locations

Request samples

application/json
{
    "name": "Downtown Branch",
    "code": "CENTRO",
    "address": "Av. Cervantes 123",
    "city": "Tegucigalpa",
    "latitude": 14.0723,
    "longitude": -87.192099999999996
}

Response samples

application/json
{
    "data": {
        "id": 2,
        "name": "Downtown Branch",
        "code": "CENTRO",
        "address": "Av. Cervantes 123",
        "city": "Tegucigalpa",
        "phone": "+50422223333",
        "latitude": 14.0723,
        "longitude": -87.192099999999996,
        "is_active": true,
        "created_at": "2026-08-01T13:00:00+00:00"
    }
}

Get branch

Branch data.

Required scope: locations:read.

Authorization: HTTP Bearer

Path parameters

  • location required
    integer
    Branch ID

Responses

  • 200 Branch

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /locations/{location} View full URL

https://stampeazy.co.nz/api/v1/locations/{location}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/locations/{location}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

Edit branch

Updates only the fields sent. To close it use is_active: false.

Required scope: locations:write.

Authorization: HTTP Bearer

Path parameters

  • location required
    integer
    Branch ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 120 characters
    Name
  • code
    string <= 20 characters
    Unique short code (stored in uppercase, without symbols)
  • address
    string or null <= 255 characters
    Address
  • city
    string or null <= 100 characters
    City
  • phone
    string or null <= 30 characters
    Phone
  • latitude
    number or null [ -90 .. 90 ]
    Latitude (always together with longitude): Wallet pass location
  • longitude
    number or null [ -180 .. 180 ]
    Longitude (always together with latitude)
  • is_active
    boolean

Responses

  • 200 Branch updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /locations/{location} View full URL

https://stampeazy.co.nz/api/v1/locations/{location}

Request samples

application/json
{
    "phone": "+50422224444"
}

Response samples

application/json
{
    "data": {
        "id": 2,
        "name": "Downtown Branch",
        "code": "CENTRO",
        "address": "Av. Cervantes 123",
        "city": "Tegucigalpa",
        "phone": "+50422224444",
        "latitude": 14.0723,
        "longitude": -87.192099999999996,
        "is_active": true,
        "created_at": "2026-08-01T13:00:00+00:00"
    }
}

Delete branch

Only if it has no purchases or transactions (location_in_use, 409) and is not the business's last branch (last_location, 422). If it has history, deactivate it.

Required scope: locations:write.

Authorization: HTTP Bearer

Path parameters

  • location required
    integer
    Branch ID

Responses

  • 200 Branch deleted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /locations/{location} View full URL

https://stampeazy.co.nz/api/v1/locations/{location}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/locations/{location}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

managers

Team users and their permissions. The API manages branch managers and cashiers; owners and admins, only the dashboard.

List team users

The business's users with their role and branches.

Required scope: managers:read.

Authorization: HTTP Bearer

Query parameters

  • role
    string
    Role
  • is_active
    integer
    1 = active, 0 = inactive
    Values: 0 1
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Users

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /managers View full URL

https://stampeazy.co.nz/api/v1/managers

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/managers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 21,
            "name": "Luis Rivera",
            "email": "luis@ejemplo.com",
            "role": "cashier",
            "role_label": "Cashier",
            "is_active": true,
            "branch_ids": [
                2
            ],
            "last_login_at": null,
            "created_at": "2026-10-19T15:04:05+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Create team user

Creates a user with the manager or cashier role and sends them an email to set their password (the API never receives passwords). Respects the plan's user limit.

Required scope: managers:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name required
    string <= 120 characters
    Name
  • email required
    string <email> <= 255 characters
    Email (unique)
  • role required
    string
    Role assignable through the API: manager or cashier. Owners and admins are managed only from the dashboard.
    Values: "manager" "cashier"
  • branch_ids
    array of integer or null
    Assigned branches
  • is_active
    boolean

Responses

  • 201 User created

    Schema application/json · object

    • data
      object
      Properties of data (10)
      • id
        integer
      • name
        string
      • email
        string
      • role
        string
        owner, admin, manager or cashier (the API only assigns manager or cashier)
      • role_label
        string
      • is_active
        boolean
      • branch_ids
        array of integer
        Assigned branches (roles that cover every branch ignore them)
      • last_login_at
        string <date-time> or null
      • created_at
        string <date-time>
      • invitation_sent
        boolean
        The email to set the password was sent
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /managers View full URL

https://stampeazy.co.nz/api/v1/managers

Request samples

application/json
{
    "name": "Luis Rivera",
    "email": "luis@ejemplo.com",
    "role": "cashier",
    "branch_ids": [
        2
    ]
}

Response samples

application/json
{
    "data": {
        "id": 21,
        "name": "Luis Rivera",
        "email": "luis@ejemplo.com",
        "role": "cashier",
        "role_label": "Cashier",
        "is_active": true,
        "branch_ids": [
            2
        ],
        "last_login_at": null,
        "created_at": "2026-10-19T15:04:05+00:00",
        "invitation_sent": true
    }
}

Roles and permissions

Available roles with the permissions each one grants.

assignable_by_api lists the roles an API key can assign (branch manager and cashier). Owner and admin are assigned only from the dashboard: an admin can create API keys.

Required scope: managers:read.

Authorization: HTTP Bearer

Responses

  • 200 Roles

    Schema application/json · object

    • data
      array of object
      Properties of data (5)
      • role
        string
      • label
        string
      • all_branches
        boolean
        Works at every branch
      • abilities
        array of object
        Properties of abilities (2)
        • key
          string
        • label
          string
      • assignable_by_api
        boolean
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 429 More than 120 requests per minute with the same key
GET /managers/permissions View full URL

https://stampeazy.co.nz/api/v1/managers/permissions

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/managers/permissions' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "role": "cashier",
            "label": "Cashier",
            "all_branches": false,
            "abilities": [
                {
                    "key": "cards.operate",
                    "label": "Scan, earn and redeem"
                }
            ],
            "assignable_by_api": true
        }
    ]
}

Get user

User data.

Required scope: managers:read.

Authorization: HTTP Bearer

Path parameters

  • manager required
    integer
    User ID

Responses

  • 200 User

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /managers/{manager} View full URL

https://stampeazy.co.nz/api/v1/managers/{manager}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/managers/{manager}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 21,
        "name": "Luis Rivera",
        "email": "luis@ejemplo.com",
        "role": "cashier",
        "role_label": "Cashier",
        "is_active": true,
        "branch_ids": [
            2
        ],
        "last_login_at": null,
        "created_at": "2026-10-19T15:04:05+00:00"
    }
}

Edit user

Updates the name, email, role, branches or status of a branch manager or cashier. Owners (owner_protected) and admins (role_protected) cannot be changed through the API (403). Reactivating respects the plan's user limit.

Required scope: managers:write.

Authorization: HTTP Bearer

Path parameters

  • manager required
    integer
    User ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • name
    string <= 120 characters
    Name
  • email
    string <email> <= 255 characters
    Email (unique)
  • role
    string
    Role assignable through the API: manager or cashier. Owners and admins are managed only from the dashboard.
    Values: "manager" "cashier"
  • branch_ids
    array of integer or null
    Assigned branches
  • is_active
    boolean
    Reactivating respects the plan's user limit (plan_limit, 403)

Responses

  • 200 User updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /managers/{manager} View full URL

https://stampeazy.co.nz/api/v1/managers/{manager}

Request samples

application/json
{
    "role": "manager",
    "branch_ids": [
        2,
        3
    ]
}

Response samples

application/json
{
    "data": {
        "id": 21,
        "name": "Luis Rivera",
        "email": "luis@ejemplo.com",
        "role": "manager",
        "role_label": "Branch manager",
        "is_active": true,
        "branch_ids": [
            2,
            3
        ],
        "last_login_at": null,
        "created_at": "2026-10-19T15:04:05+00:00"
    }
}

Deactivate user

Deactivates a branch manager or cashier (they can no longer log in or operate). The user is not deleted, to keep the operations history. Owners and admins cannot be changed through the API (403).

Required scope: managers:write.

Authorization: HTTP Bearer

Path parameters

  • manager required
    integer
    User ID

Responses

  • 200 User deactivated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /managers/{manager} View full URL

https://stampeazy.co.nz/api/v1/managers/{manager}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/managers/{manager}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 21,
        "name": "Luis Rivera",
        "email": "luis@ejemplo.com",
        "role": "cashier",
        "role_label": "Cashier",
        "is_active": false,
        "branch_ids": [
            2
        ],
        "last_login_at": null,
        "created_at": "2026-10-19T15:04:05+00:00"
    }
}

coupons

Promo codes.

List coupons

Promo coupons, newest first.

Required scope: coupons:read.

Authorization: HTTP Bearer

Query parameters

  • code
    string
    Exact code
  • is_active
    integer
    1 = active, 0 = inactive
    Values: 0 1
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Coupons

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /coupons View full URL

https://stampeazy.co.nz/api/v1/coupons

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/coupons' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 5,
            "code": "VERANO15",
            "name": "Summer 15%",
            "discount_type": "percent",
            "value": 1500,
            "value_display": "15%",
            "min_purchase": 20000,
            "max_uses": 500,
            "max_uses_per_customer": 1,
            "uses_count": 37,
            "customer_id": null,
            "starts_at": "2026-11-01T06:00:00+00:00",
            "ends_at": "2026-12-01T05:59:59+00:00",
            "is_active": true,
            "created_at": "2026-10-19T15:04:05+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Create coupon

Creates a promo code that the cashier redeems in the scanner.

Required scope: coupons:write.

Authorization: HTTP Bearer

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • code required
    string <= 40 characters
    Code (letters, numbers, - and _; stored in uppercase; unique)
  • name required
    string <= 120 characters
    Name
  • discount_type required
    string
    Type
    Values: "percent" "fixed" "product"
  • value
    integer >= 0
    percent: percentage ×100 (max. 10000 = 100%); fixed: cents; product: ignored
  • min_purchase
    integer >= 0
    Minimum purchase in cents
  • max_uses
    integer or null >= 1
    Total uses (null = unlimited)
  • max_uses_per_customer
    integer [ 1 .. 1000 ]
    Uses per customer
  • customer_id
    integer or null
    Personal coupon for this customer
  • starts_at
    string or null
    Start: the business's local date (YYYY-MM-DD, from 00:00) or ISO 8601 date and time

    Example: "2026-11-01"

  • ends_at
    string or null
    End: the business's local date (YYYY-MM-DD, until 23:59:59) or ISO 8601 date and time. Same as or after the start

    Example: "2026-11-30"

  • is_active
    boolean

Responses

  • 201 Coupon created

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /coupons View full URL

https://stampeazy.co.nz/api/v1/coupons

Request samples

application/json
{
    "code": "VERANO15",
    "name": "Summer 15%",
    "discount_type": "percent",
    "value": 1500,
    "min_purchase": 20000,
    "max_uses": 500,
    "starts_at": "2026-11-01",
    "ends_at": "2026-11-30"
}

Response samples

application/json
{
    "data": {
        "id": 5,
        "code": "VERANO15",
        "name": "Summer 15%",
        "discount_type": "percent",
        "value": 1500,
        "value_display": "15%",
        "min_purchase": 20000,
        "max_uses": 500,
        "max_uses_per_customer": 1,
        "uses_count": 37,
        "customer_id": null,
        "starts_at": "2026-11-01T06:00:00+00:00",
        "ends_at": "2026-12-01T05:59:59+00:00",
        "is_active": true,
        "created_at": "2026-10-19T15:04:05+00:00"
    }
}

Get coupon

Coupon data and uses.

Required scope: coupons:read.

Authorization: HTTP Bearer

Path parameters

  • coupon required
    integer
    Coupon ID

Responses

  • 200 Coupon

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 429 More than 120 requests per minute with the same key
GET /coupons/{coupon} View full URL

https://stampeazy.co.nz/api/v1/coupons/{coupon}

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/coupons/{coupon}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

Edit coupon

Updates only the fields sent. Rules are validated against the resulting value: changing to percent requires a value ≤ 10000 and ends_at cannot end up before starts_at (sent or stored).

Required scope: coupons:write.

Authorization: HTTP Bearer

Path parameters

  • coupon required
    integer
    Coupon ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • code
    string <= 40 characters
    Code (letters, numbers, - and _; stored in uppercase; unique)
  • name
    string <= 120 characters
    Name
  • discount_type
    string
    Type
    Values: "percent" "fixed" "product"
  • value
    integer >= 0
    percent: percentage ×100 (max. 10000 = 100%); fixed: cents; product: ignored
  • min_purchase
    integer >= 0
    Minimum purchase in cents
  • max_uses
    integer or null >= 1
    Total uses (null = unlimited)
  • max_uses_per_customer
    integer [ 1 .. 1000 ]
    Uses per customer
  • customer_id
    integer or null
    Personal coupon for this customer
  • starts_at
    string or null
    Start: the business's local date (YYYY-MM-DD, from 00:00) or ISO 8601 date and time

    Example: "2026-11-01"

  • ends_at
    string or null
    End: the business's local date (YYYY-MM-DD, until 23:59:59) or ISO 8601 date and time. Same as or after the start

    Example: "2026-11-30"

  • is_active
    boolean

Responses

  • 200 Coupon updated

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
PATCH /coupons/{coupon} View full URL

https://stampeazy.co.nz/api/v1/coupons/{coupon}

Request samples

application/json
{
    "is_active": false
}

Response samples

application/json
{
    "data": {
        "id": 5,
        "code": "VERANO15",
        "name": "Summer 15%",
        "discount_type": "percent",
        "value": 1500,
        "value_display": "15%",
        "min_purchase": 20000,
        "max_uses": 500,
        "max_uses_per_customer": 1,
        "uses_count": 37,
        "customer_id": null,
        "starts_at": "2026-11-01T06:00:00+00:00",
        "ends_at": "2026-12-01T05:59:59+00:00",
        "is_active": false,
        "created_at": "2026-10-19T15:04:05+00:00"
    }
}

Delete coupon

Only if it has no redemptions (coupon_in_use, 409); otherwise, deactivate it.

Required scope: coupons:write.

Authorization: HTTP Bearer

Path parameters

  • coupon required
    integer
    Coupon ID

Responses

  • 200 Coupon deleted

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
DELETE /coupons/{coupon} View full URL

https://stampeazy.co.nz/api/v1/coupons/{coupon}

Request samples

Terminal
curl -X DELETE 'https://stampeazy.co.nz/api/v1/coupons/{coupon}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "id": 7,
        "deleted": true
    }
}

operations

Transaction ledger and reversals.

List operations

Ledger of the whole business (newest first): earnings, redemptions, top-ups, usages, adjustments, reversals and expirations.

Required scope: cards:read.

Authorization: HTTP Bearer

Query parameters

  • type
    string
    Transaction type
    Values: "earn" "bonus" "redeem" "credit" "debit" "reversal" "expiration" "adjustment"
  • program_id
    integer
    Program
  • customer_id
    integer
    Customer (transactions from all their cards)
  • card_serial
    string
    Card
  • from
    string <date>
    From (the business's local date, YYYY-MM-DD)
  • to
    string <date>
    To, inclusive (the business's local date)
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Operations

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /operations View full URL

https://stampeazy.co.nz/api/v1/operations

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/operations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 981,
            "type": "earn",
            "amount": 1,
            "balance_after": 5,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": null,
            "branch_id": 1,
            "description": "Credit (API)",
            "created_at": "2026-10-19T15:04:05+00:00",
            "card_serial": "32852595C80B7B165F61",
            "program_id": 3,
            "customer_id": 12
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Reverse operation

Audited compensating reversal: never deletes the original transaction. Also reverses the associated purchase or redemption. Fails if the resulting balance would be negative.

Required scope: transactions:reverse.

Authorization: HTTP Bearer

Path parameters

  • transaction required
    integer
    Transaction ID

Headers

  • Idempotency-Key
    string <= 100 characters
    Unique key per operation (e.g. a UUID). Repeating the request returns the original response with Idempotent-Replayed: true; another request with the same key → 409. Kept for 24 h.

Request body application/json required

  • reason required
    string [ 5 .. 200 ] characters
    Reason

Responses

  • 201 Reversal recorded

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 402 The business's subscription is not active (writes only) Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 409 Conflict: Idempotency-Key reused with a different request, duplicate reference or resource in use Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
POST /transactions/{transaction}/reverse View full URL

https://stampeazy.co.nz/api/v1/transactions/{transaction}/reverse

Request samples

application/json
{
    "reason": "Refund of invoice FAC-000123"
}

Response samples

application/json
{
    "data": {
        "transaction": {
            "id": 982,
            "type": "reversal",
            "amount": -1,
            "balance_after": 4,
            "reference": "api:2f6b1c0d9e8a7f6b5c4d3e2f1a0b9c8d7e6f5a4b",
            "purchase_id": null,
            "reverses_transaction_id": 981,
            "branch_id": 1,
            "description": "Reversal: Refund of invoice FAC-000123",
            "created_at": "2026-10-19T15:04:05+00:00"
        },
        "card": {
            "serial": "32852595C80B7B165F61",
            "customer_id": 12,
            "program_id": 3,
            "program_type": "stamps",
            "status": "active",
            "balance": 4,
            "unit": "stamps",
            "tier_id": null,
            "expires_at": null,
            "public_url": "https://app.example.com/t/Xk3f9QnV2pLr8sTb",
            "wallet": {
                "apple": "issued",
                "google": "pending"
            },
            "balance_display": "4 stamps"
        },
        "discount": 0,
        "redemption": null,
        "replayed": false,
        "message": "Deducted: 1 stamp. Balance: 4 stamps."
    }
}

statistics

Metrics calculated from real data (no estimates).

Statistics by reward

Redemptions and reversals per reward in the period (no dates: all time), total estimated cost and active cards that can reach each reward today.

Required scope: statistics:read.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Query parameters

  • from
    string <date>
    From (the business's local date, YYYY-MM-DD)
  • to
    string <date>
    To, inclusive (the business's local date)

Responses

  • 200 Statistics

    Schema application/json · object

    • data
      array of object
      Properties of data (8)
      • reward_id
        integer
      • name
        string
      • cost
        integer
      • is_active
        boolean
      • redeemed
        integer
      • reversed
        integer
      • estimated_cost_total
        integer
        Cents
      • eligible_cards
        integer
        Active cards with enough balance today
    • meta
      object
      Properties of meta (2)
      • from
        string or null
      • to
        string or null
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /programs/{program}/statistics/rewards View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/statistics/rewards

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs/{program}/statistics/rewards' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "reward_id": 7,
            "name": "Americano coffee",
            "cost": 10,
            "is_active": true,
            "redeemed": 120,
            "reversed": 2,
            "estimated_cost_total": 420000,
            "eligible_cards": 35
        }
    ],
    "meta": {
        "from": null,
        "to": null
    }
}

Statistics by source

Issued cards grouped by customer source (source: public_form, api, staff, import; source_detail: the src of the sign-up link) and sign-up branch.

Required scope: statistics:read.

Authorization: HTTP Bearer

Path parameters

  • program required
    integer
    Program ID

Query parameters

  • from
    string <date>
    From (the business's local date, YYYY-MM-DD)
  • to
    string <date>
    To, inclusive (the business's local date)

Responses

  • 200 Sources

    Schema application/json · object

    • data
      array of object
      Properties of data (4)
      • source
        string
      • source_detail
        string or null
      • branch_id
        integer or null
      • cards
        integer
    • meta
      object
      Properties of meta (3)
      • total
        integer
      • from
        string or null
      • to
        string or null
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 404 Does not exist or belongs to another business

    Schema application/json · object

    • message
      string
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /programs/{program}/statistics/sources View full URL

https://stampeazy.co.nz/api/v1/programs/{program}/statistics/sources

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/programs/{program}/statistics/sources' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "source": "public_form",
            "source_detail": "instagram",
            "branch_id": 2,
            "cards": 64
        },
        {
            "source": "staff",
            "source_detail": null,
            "branch_id": null,
            "cards": 12
        }
    ],
    "meta": {
        "total": 76,
        "from": null,
        "to": null
    }
}

Sales and loyalty statistics

Same overview as the dashboard for a period (by default, the last 30 days), optionally by branch or program. Amounts in cents. Each metric's definition is in meta.definitions.

Required scope: statistics:read.

Authorization: HTTP Bearer

Query parameters

  • from
    string <date>
    From (the business's local date, YYYY-MM-DD)
  • to
    string <date>
    To, inclusive (the business's local date)
  • branch_id
    integer
    Branch
  • program_id
    integer
    Program

Responses

  • 200 Overview

    Schema application/json · object

    • data
      object
      Metrics (see meta.definitions)
    • meta
      object
      Properties of meta (4)
      • from
        string <date>
      • to
        string <date>
      • currency
        string
      • definitions
        object
  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /statistics/revenue View full URL

https://stampeazy.co.nz/api/v1/statistics/revenue

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/statistics/revenue' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": {
        "customers_total": 1240,
        "new_customers": 86,
        "cards_issued": 91,
        "active_cards": 412,
        "wallet_passes": {
            "apple": 310,
            "google": 205
        },
        "purchases": 1630,
        "revenue": 48900000,
        "avg_ticket": 30000,
        "buyers": 702,
        "returning": 388,
        "frequency": 2.3199999999999998,
        "rewards_redeemed": 120,
        "reward_cost": 420000,
        "at_risk": 57,
        "by_branch": [
            {
                "name": "Downtown Branch",
                "purchases": 1010,
                "revenue": 30100000
            }
        ],
        "units_by_program": [
            {
                "id": 3,
                "name": "Stamp card",
                "type": "stamps",
                "issued": 1650,
                "redeemed": 1200,
                "rate": 72.700000000000003
            }
        ]
    },
    "meta": {
        "from": "2026-09-20",
        "to": "2026-10-19",
        "currency": "HNL",
        "definitions": {
            "revenue": "Sum of those purchases' amounts (before discounts)."
        }
    }
}

automations

Automations (messages and bonuses by trigger), read-only. They are created and edited in the dashboard.

List automations

The business's automations, newest first, with their trigger and status. Read-only: they are created, edited and turned on from the dashboard.

Required scope: automations:read.

Authorization: HTTP Bearer

Query parameters

  • trigger
    string
    Filter by trigger
    Values: "enrolled" "earned" "reward_available" "birthday" "inactive" "points_expiring" "tier_upgraded" "referral_rewarded"
  • is_active
    integer
    1 = active, 0 = paused
    Values: 0 1
  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Automations

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 The key does not have the required scope, the plan does not include the feature or a plan limit was reached (forbidden, plan_feature_missing, plan_limit) Schema Error
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /automations View full URL

https://stampeazy.co.nz/api/v1/automations

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/automations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 7,
            "name": "We miss you (30 days)",
            "trigger": "inactive",
            "trigger_label": "No purchases in N days",
            "trigger_config": {
                "days": 30
            },
            "action": "send_message",
            "action_label": "Send message",
            "channel": "whatsapp",
            "is_active": true,
            "created_at": "2026-09-02T16:20:00+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

subaccounts

An agency's sub-accounts, read-only. They are created and managed from the agency dashboard.

List sub-accounts

Businesses managed by the agency that owns the key, sorted by name, with their plan and subscription status. Read-only: sub-accounts are created from the agency dashboard. A key from a business that is not an agency gets 403 (not_agency); another agency's sub-accounts are never visible.

Required scope: subaccounts:read.

Authorization: HTTP Bearer

Query parameters

  • page
    integer >= 1
    Page (starting at 1)
  • per_page
    integer [ 1 .. 100 ]
    Items per page

    Default: 25

Responses

  • 200 Sub-accounts

    Schema application/json · object

  • 401 Key missing, invalid, expired or revoked Schema Error
  • 403 Without the subaccounts:read scope (forbidden) or the business is not an agency (not_agency)

    Schema application/json · object (Error) · Schema Error

    • error required
      object
      Properties of error (2)
      • code required
        string
        Stable code to program against

        Example: "insufficient_balance"

      • message required
        string
        Human-readable message to display
  • 422 Validation (errors per field) or business rule (error.code: insufficient_balance, card_inactive, operation_not_supported…) Schema ValidationError Schema Error
  • 429 More than 120 requests per minute with the same key
GET /subaccounts View full URL

https://stampeazy.co.nz/api/v1/subaccounts

Request samples

Terminal
curl -X GET 'https://stampeazy.co.nz/api/v1/subaccounts' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

Response samples

application/json
{
    "data": [
        {
            "id": 41,
            "name": "Panadería La Espiga",
            "slug": "panaderia-la-espiga",
            "email": "hola@laespiga.example",
            "phone": "+50422334455",
            "country": "HN",
            "currency": "HNL",
            "timezone": "America/Tegucigalpa",
            "plan": "Business",
            "subscription_status": "active",
            "created_at": "2026-09-15T14:30:00+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    }
}

Schemas

Data models used by the operations. Fields that refer to another schema link to its definition.

Error

object (Error)

  • error required
    object
    Properties of error (2)
    • code required
      string
      Stable code to program against

      Example: "insufficient_balance"

    • message required
      string
      Human-readable message to display

ValidationError

object (ValidationError)

  • message
    string
    Overview
  • errors
    object
    Field → list of messages
    Properties of errors (1)
    • {key}
      array of string

PageMeta

object (PageMeta)

  • current_page
    integer
    Current page
  • per_page
    integer
    Items per page (max. 100)
  • total
    integer
    Total items
  • last_page
    integer
    Last page

Deleted

object (Deleted)

  • id
    integer
    Identifier
  • deleted
    boolean
    Always true

Customer

object (Customer)

  • id
    integer
    Customer identifier
  • name
    string
    Full name
  • phone
    string or null
    Phone in E.164 format

    Example: "+50499887766"

  • email
    string or null
    Email
  • birthday
    string <date> or null
    Date of birth
  • tags
    array of string
    Free-form tags
  • rfm_segment
    string or null
    RFM segment from the latest calculation
    Values: "champions" "loyal" "potential" "new" "at_risk" "lost" "no_purchases"
  • consents
    object
    Properties of consents (2)
    • marketing_email
      boolean
    • marketing_whatsapp
      boolean
  • created_at
    string <date-time>
    Signed up
  • cards
    array of object (Card) Schema Card
    Only in GET /customers/{customer}

Card

object (Card)

  • serial
    string
    Card number (the same as the QR): 20 hexadecimal characters

    Example: "32852595C80B7B165F61"

  • customer_id
    integer
    Owner customer
  • program_id
    integer
    The card's program (template)
  • program_type
    string
    Program type
    Values: "stamps" "points" "cashback" "discount" "coupon" "gift_card" "membership" "visits"
  • status
    string
    Status: active, suspended, revoked (final), expired, used (used coupon, final)
    Values: "active" "suspended" "revoked" "expired" "used"
  • balance
    integer
    Balance in the program's unit: stamps, points, uses, visits or cents
  • unit
    string
    Balance unit
    Values: "stamps" "points" "money" "uses" "visits" "none"
  • tier_id
    integer or null
    Current tier
  • expires_at
    string <date-time> or null
    Expiration
  • public_url
    string
    The card's secret link for the customer (from there they add it to Wallet)
  • wallet
    object or null
    Pass status by platform
    Properties of wallet (1)
    • {key}
      string
  • balance_display
    string
    Formatted balance

    Example: "120 pts"

Transaction

object (Transaction)

  • id
    integer
    Transaction identifier
  • type
    string
    earn=earning, bonus=bonus, redeem=redemption, credit=top-up, debit=usage, reversal=reversal, expiration=expiration, adjustment=adjustment
    Values: "earn" "bonus" "redeem" "credit" "debit" "reversal" "expiration" "adjustment"
  • amount
    integer
    Balance change (negative when subtracting)
  • balance_after
    integer
    Resulting balance
  • reference
    string
    Unique reference (ledger idempotency)
  • purchase_id
    integer or null
    Associated purchase
  • reverses_transaction_id
    integer or null
    Reversed transaction
  • branch_id
    integer or null
    Branch
  • description
    string or null
    Description
  • created_at
    string <date-time>
    Date

Operation

object (Operation)

  • id
    integer
    Transaction identifier
  • type
    string
    earn=earning, bonus=bonus, redeem=redemption, credit=top-up, debit=usage, reversal=reversal, expiration=expiration, adjustment=adjustment
    Values: "earn" "bonus" "redeem" "credit" "debit" "reversal" "expiration" "adjustment"
  • amount
    integer
    Balance change (negative when subtracting)
  • balance_after
    integer
    Resulting balance
  • reference
    string
    Unique reference (ledger idempotency)
  • purchase_id
    integer or null
    Associated purchase
  • reverses_transaction_id
    integer or null
    Reversed transaction
  • branch_id
    integer or null
    Branch
  • description
    string or null
    Description
  • created_at
    string <date-time>
    Date
  • card_serial
    string
    Card
  • program_id
    integer
    Program
  • customer_id
    integer
    Customer

OperationResult

object (OperationResult)

  • transaction
    object (Transaction) or null Schema Transaction
  • card
    object (Card) Schema Card
  • discount
    integer
    Discount to apply at checkout (cents)
  • redemption
    object or null
    Properties of redemption (3)
    • id
      integer
    • code
      string
      Redemption code for the cashier
    • reward_id
      integer
  • replayed
    boolean
    true if the operation already existed (same reference): it was not applied again
  • message
    string
    Summary to show the cashier

ProgramSummary

object (ProgramSummary)

  • id
    integer
  • name
    string
  • type
    string
    Type
    Values: "stamps" "points" "cashback" "discount" "coupon" "gift_card" "membership" "visits"
  • unit
    string
  • config
    object
    Program type rules
  • rewards
    array of object
    Properties of rewards (4)
    • id
      integer
    • name
      string
    • cost
      integer
    • stock
      integer or null
  • enrollment_url
    string
    Public sign-up link

Program

object (Program)

  • id
    integer
  • name
    string
  • slug
    string
  • type
    string
    Program type
    Values: "stamps" "points" "cashback" "discount" "coupon" "gift_card" "membership" "visits"
  • type_label
    string
  • unit
    string
  • status
    string
    Status
    Values: "draft" "active" "paused" "archived"
  • description
    string or null
  • terms
    string or null
  • config
    object
    Type-specific rules (stamps for a reward, points per lempira, etc.)
  • welcome_bonus
    integer
    Gift units on sign-up
  • birthday_bonus
    integer
    Birthday gift units
  • enrollment_open
    boolean
  • enrollment_url
    string
  • design
    object
    Properties of design (5)
    • background_color
      string
    • foreground_color
      string
    • label_color
      string
    • logo_text
      string or null
    • header_message
      string or null
  • cards_count
    integer or null
    Cards issued
  • tiers
    array of object (Tier) Schema Tier
  • rewards
    array of object (Reward) Schema Reward
  • published_at
    string <date-time> or null
  • created_at
    string <date-time>

Tier

object (Tier)

  • id
    integer
  • name
    string
  • threshold
    integer
    Accumulated spend to reach it (cents)
  • discount_percent
    number
    Tier discount (%)
  • points_multiplier
    number
    Points multiplier
  • included_uses
    integer or null
    Memberships: uses included per period
  • benefits
    string or null
  • color
    string or null

Reward

object (Reward)

  • id
    integer
  • name
    string
  • description
    string or null
  • cost
    integer
    Cost in the program's unit (stamps or points)
  • min_tier_id
    integer or null
    Minimum tier
  • stock
    integer or null
    Stock (null = unlimited)
  • max_per_customer
    integer or null
  • estimated_cost
    integer
    Cost to the business (cents), for reports
  • is_active
    boolean

Location

object (Location)

  • id
    integer
  • name
    string
  • code
    string
    Short code (alphanumeric, uppercase)
  • address
    string or null
  • city
    string or null
  • phone
    string or null
  • latitude
    number or null
  • longitude
    number or null
  • is_active
    boolean
  • created_at
    string <date-time>

Manager

object (Manager)

  • id
    integer
  • name
    string
  • email
    string
  • role
    string
    owner, admin, manager or cashier (the API only assigns manager or cashier)
  • role_label
    string
  • is_active
    boolean
  • branch_ids
    array of integer
    Assigned branches (roles that cover every branch ignore them)
  • last_login_at
    string <date-time> or null
  • created_at
    string <date-time>

Coupon

object (Coupon)

  • id
    integer
  • code
    string
  • name
    string
  • discount_type
    string
    percent, fixed (fixed amount) or product (free product)
    Values: "percent" "fixed" "product"
  • value
    integer
    percent: percentage ×100 (1500 = 15%); fixed: cents; product: 0
  • value_display
    string
  • min_purchase
    integer
    Minimum purchase (cents)
  • max_uses
    integer or null
    Total uses (null = unlimited)
  • max_uses_per_customer
    integer
  • uses_count
    integer
  • customer_id
    integer or null
    Personal coupon
  • starts_at
    string <date-time> or null
    Valid from (UTC)
  • ends_at
    string <date-time> or null
    Valid until (UTC); a YYYY-MM-DD date is valid until 23:59:59 local time
  • is_active
    boolean
  • created_at
    string <date-time>

Push

object (Push)

  • id
    integer
  • name
    string
  • title
    string or null
  • message
    string
  • status
    string
    draft, scheduled, sending, sent or canceled
    Values: "draft" "scheduled" "sending" "sent" "canceled"
  • audience
    object
    Filters used: segments, loyalty_program_id, card_serial
  • counts
    object
    Properties of counts (5)
    • recipients
      integer
    • sent
      integer
    • skipped
      integer
      Skipped (no installed pass, weekly message cap…)
    • failed
      integer
    • pending
      integer
  • created_at
    string <date-time>
  • scheduled_at
    string <date-time> or null
    Scheduled time (UTC) if it was scheduled
  • sent_at
    string <date-time> or null

Webhook

object (Webhook)

  • id
    integer
  • url
    string
  • events
    array of string
  • is_active
    boolean
  • created_at
    string <date-time>

Segment

object (Segment)

  • key
    string
    Segment key
    Values: "champions" "loyal" "potential" "new" "at_risk" "lost" "no_purchases"
  • label
    string
  • customers
    integer

Automation

object (Automation)

  • id
    integer
  • name
    string
  • trigger
    string
    Trigger
    Values: "enrolled" "earned" "reward_available" "birthday" "inactive" "points_expiring" "tier_upgraded" "referral_rewarded"
  • trigger_label
    string
  • trigger_config
    object or null
    Trigger parameters, e.g. {"days": 30} for inactive and points_expiring
  • action
    string
    Values: "send_message" "grant_bonus"
  • action_label
    string
  • channel
    string or null
    Message channel (wallet, email or whatsapp); null if the action is a bonus
  • is_active
    boolean
  • created_at
    string <date-time>

Subaccount

object (Subaccount)

  • id
    integer
  • name
    string
  • slug
    string
  • email
    string or null
  • phone
    string or null
  • country
    string
    2-letter ISO code
  • currency
    string
  • timezone
    string
  • plan
    string or null
    Sub-account plan name
  • subscription_status
    string or null
    Values: "trial" "active" "suspended" "canceled"
  • created_at
    string <date-time>