Friendbuy Customers API

Create and retrieve customer records and manage customer data requests.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Customer Data Management BC-420.10

Operations 5

POST /postCustomer Create or update a customer #
GET /getCustomer Retrieve a customer #
GET /getMemberTierCustomer Retrieve a customer's loyalty member tier #
GET /getUserData Request a customer's stored data (GDPR/CCPA) #
DELETE /deleteUserData Delete a customer's stored data (GDPR/CCPA) #

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:friendbuy-customers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

friendbuy-customers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendbuy Merchant Customers 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: Customers
  description: Create and retrieve customer records and manage customer data requests.
paths:
  /postCustomer:
    post:
      operationId: postCustomer
      tags:
      - Customers
      summary: Create or update a customer
      description: Creates or updates a Friendbuy customer record, keyed by your customer id and email. Used to sync your customer base so referrals and loyalty can be attributed.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerInput'
      responses:
        '200':
          description: The created or updated customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /getCustomer:
    get:
      operationId: getCustomer
      tags:
      - Customers
      summary: Retrieve a customer
      description: Retrieves a customer record by customer id or email.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      - $ref: '#/components/parameters/Email'
      responses:
        '200':
          description: The requested customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /getMemberTierCustomer:
    get:
      operationId: getMemberTierCustomer
      tags:
      - Customers
      summary: Retrieve a customer's loyalty member tier
      description: Returns the loyalty program tier a customer currently belongs to.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      responses:
        '200':
          description: The customer's member tier.
          content:
            application/json:
              schema:
                type: object
                properties:
                  customerId:
                    type: string
                  tier:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /getUserData:
    get:
      operationId: getUserData
      tags:
      - Customers
      summary: Request a customer's stored data (GDPR/CCPA)
      description: Returns the personal data Friendbuy stores for a customer, in support of GDPR/CCPA data-access requests.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      - $ref: '#/components/parameters/Email'
      responses:
        '200':
          description: The stored user data.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /deleteUserData:
    delete:
      operationId: deleteUserData
      tags:
      - Customers
      summary: Delete a customer's stored data (GDPR/CCPA)
      description: Deletes the personal data Friendbuy stores for a customer, in support of GDPR/CCPA erasure requests.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      - $ref: '#/components/parameters/Email'
      responses:
        '200':
          description: Deletion confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CustomerId:
      name: customerId
      in: query
      required: false
      description: Your identifier for the customer.
      schema:
        type: string
    Email:
      name: email
      in: query
      required: false
      description: The customer's email address.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CustomerInput:
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: Your identifier for the customer.
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        isNewCustomer:
          type: boolean
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    Customer:
      allOf:
      - $ref: '#/components/schemas/CustomerInput'
      - type: object
        properties:
          createdOn:
            type: string
            format: date-time
  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>`.'