Friendbuy Rewards & Loyalty API

Manage loyalty ledger balances, adjustments, redemptions, and coupons.

Business capability
Loyalty & Retention Management BC-420.40

Operations 8

GET /analytics/loyalty/ledger-heads List all customer loyalty balances #
GET /ledger-balance Get a customer's loyalty balance #
GET /ledger-balance-custom Get a customer's loyalty balance by custom identifier #
POST /postLedgerAdjustment Adjust a customer's loyalty ledger #
POST /postLedgerAdjustmentCustom Adjust a customer's loyalty ledger by custom identifier #
GET /reward/redemption-options List reward redemption options #
POST /reward/redeem Redeem a reward #
GET /reward/coupons List a customer's coupons #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/friendbuy-rewards-loyalty-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

friendbuy-rewards-loyalty-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendbuy Merchant Rewards & Loyalty API
  description: The Friendbuy Merchant API is the server-to-server REST interface for Friendbuy's referral and loyalty marketing platform.
  version: '1.0'
  contact:
    name: Friendbuy
    url: https://friendbuy.com
  license:
    name: Proprietary
    url: https://friendbuy.com/terms
servers:
- url: https://mapi.fbot.me/v1
  description: Friendbuy Merchant API
security:
- bearerAuth: []
tags:
- name: Rewards & Loyalty
  description: Manage loyalty ledger balances, adjustments, redemptions, and coupons.
paths:
  /analytics/loyalty/ledger-heads:
    get:
      operationId: getLedgerHeads
      tags:
      - Rewards & Loyalty
      summary: List all customer loyalty balances
      description: Returns the current loyalty ledger balance for all customers.
      parameters:
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          $ref: '#/components/responses/AnalyticsPage'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /ledger-balance:
    get:
      operationId: getLedgerBalance
      tags:
      - Rewards & Loyalty
      summary: Get a customer's loyalty balance
      description: Returns the loyalty ledger balance for a single customer by customer id.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      responses:
        '200':
          description: The customer's ledger balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerBalance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /ledger-balance-custom:
    get:
      operationId: getLedgerBalanceCustom
      tags:
      - Rewards & Loyalty
      summary: Get a customer's loyalty balance by custom identifier
      description: Returns the loyalty ledger balance for a customer keyed by a custom identifier.
      parameters:
      - name: customIdentifier
        in: query
        required: true
        description: A merchant-defined custom identifier for the customer.
        schema:
          type: string
      responses:
        '200':
          description: The customer's ledger balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerBalance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /postLedgerAdjustment:
    post:
      operationId: postLedgerAdjustment
      tags:
      - Rewards & Loyalty
      summary: Adjust a customer's loyalty ledger
      description: Credits or debits a customer's loyalty point/credit balance by customer id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerAdjustment'
      responses:
        '200':
          description: The resulting ledger balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerBalance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /postLedgerAdjustmentCustom:
    post:
      operationId: postLedgerAdjustmentCustom
      tags:
      - Rewards & Loyalty
      summary: Adjust a customer's loyalty ledger by custom identifier
      description: Credits or debits a customer's loyalty balance keyed by a custom identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/LedgerAdjustment'
              - type: object
                properties:
                  customIdentifier:
                    type: string
      responses:
        '200':
          description: The resulting ledger balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerBalance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /reward/redemption-options:
    get:
      operationId: getRedemptionOptions
      tags:
      - Rewards & Loyalty
      summary: List reward redemption options
      description: Returns the available reward redemption options for the loyalty program.
      responses:
        '200':
          description: Available redemption options.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
  /reward/redeem:
    post:
      operationId: redeemReward
      tags:
      - Rewards & Loyalty
      summary: Redeem a reward
      description: Exchanges a customer's loyalty points/credit for a reward, returning the issued reward or coupon.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedeemRequest'
      responses:
        '200':
          description: The redeemed reward.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /reward/coupons:
    get:
      operationId: getCoupons
      tags:
      - Rewards & Loyalty
      summary: List a customer's coupons
      description: Returns the coupon codes issued to a customer.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      responses:
        '200':
          description: The customer's coupons.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    CustomerId:
      name: customerId
      in: query
      required: false
      description: Your identifier for the customer.
      schema:
        type: string
    PageToken:
      name: pageToken
      in: query
      required: false
      description: Opaque token for the next page of results.
      schema:
        type: string
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AnalyticsPage:
      description: A page of analytics rows with an optional next-page token.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  type: object
                  additionalProperties: true
              nextPageToken:
                type: string
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    LedgerAdjustment:
      type: object
      required:
      - customerId
      - amount
      properties:
        customerId:
          type: string
        amount:
          type: number
          description: Positive to credit, negative to debit.
        reason:
          type: string
    RedeemRequest:
      type: object
      required:
      - customerId
      - redemptionOptionId
      properties:
        customerId:
          type: string
        redemptionOptionId:
          type: string
    LedgerBalance:
      type: object
      properties:
        customerId:
          type: string
        balance:
          type: number
        currency:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer JWT obtained from POST /authorization by exchanging your account key and secret. Passed as `Authorization: Bearer <token>`.'