Introduction

Welcome to the FacePOS API reference. This documentation provides a detailed explanation of all resources accessible through the FacePOS API. Our API is designed around REST, uses predictable resource-oriented URLs, and standard HTTP verbs and status codes.

Base API URL
https://api3.facepos.ie

All API endpoints are relative to this base URL. Use HTTPS only.

Authentication

FacePOS uses JWT (JSON Web Tokens) for API authentication via AWS Cognito. Obtain an access token through the sign-in endpoint, then include it in subsequent requests using the Authorization header.

HTTP Header
Authorization: Bearer {access_token}
Note: Access tokens expire after a limited time. Use the refresh token endpoint to obtain a new access token without re-authenticating.

Status Codes

CodeDescription
200Success — request completed
201Created — resource successfully created
400Bad Request — invalid parameters or missing fields
401Unauthorized — invalid or missing access token
403Forbidden — insufficient permissions
404Not Found — resource does not exist
429Too Many Requests — rate limit exceeded
500Internal Server Error

Rate Limiting

To ensure service stability, the FacePOS API enforces rate limits on a per-IP basis. If you exceed the limit, you will receive an HTTP 429 Too Many Requests response.

Endpoint TypeLimit
Authentication10 requests / minute
Standard API100 requests / 15 minutes
Public endpoints200 requests / 15 minutes

Authentication

Phone-based authentication powered by AWS Cognito. All passwords must be encrypted before sending. Supports both password and OTP-based sign-in flows.

POST /api/v1/auth/signup

Register a new user with phone number and encrypted password. An OTP will be sent to verify the phone number.

No authentication required

Request Body

ParameterTypeRequiredDescription
phone_numberstringRequiredPhone with country code, e.g. +353871234567
passwordstringRequiredEncrypted password
marketstringOptionalMarket code (default: IE)
Request Example
curl -X POST https://api3.facepos.ie/api/v1/auth/signup \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "password": "(encrypted)",
    "market": "IE"
  }'
Response — 200 OK
{
  "success": true,
  "data": {
    "message": "User registered successfully",
    "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "timestamp": "2025-10-30T12:00:00.000Z"
}
POST /api/v1/auth/verify-signup

Verify phone number with the OTP code sent during signup.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredPhone number used during signup
codestringRequired6-digit OTP verification code
Request Example
curl -X POST https://api3.facepos.ie/api/v1/auth/verify-signup \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+353871234567", "code": "123456"}'
Response — 200 OK
{
  "success": true,
  "message": "Phone number verified successfully"
}
POST /api/v1/auth/signin

Sign in with phone number and encrypted password. Returns JWT access and refresh tokens.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredRegistered phone number with country code
passwordstringRequiredEncrypted password
Request Example
curl -X POST https://api3.facepos.ie/api/v1/auth/signin \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+353871234567", "password": "(encrypted)"}'
Response — 200 OK
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIs...",
    "refreshToken": "eyJhbGciOiJIUzI1NiIs...",
    "expiresIn": 3600,
    "user": {
      "uid": 1,
      "phoneno": "+353871234567",
      "name": "John Doe"
    }
  }
}
POST /api/v1/auth/signin-otp

Initiate passwordless OTP sign-in. Sends a one-time code to the phone number.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredRegistered phone number
Request Example
curl -X POST https://api3.facepos.ie/api/v1/auth/signin-otp \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+353871234567"}'
Response — 200 OK
{
  "success": true,
  "data": {
    "session": "AYABeD...",
    "message": "OTP sent successfully"
  }
}
POST /api/v1/auth/signin-otp/verify

Complete OTP sign-in by verifying the code. Returns JWT tokens on success.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredPhone number from OTP request
otpstringRequired6-digit OTP code
sessionstringRequiredSession string from signin-otp response
Response — 200 OK
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...",
    "refreshToken": "eyJhbGciOi...",
    "expiresIn": 3600
  }
}
POST /api/v1/auth/resend-otp

Resend OTP code for signup verification or password reset.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredPhone number to resend OTP to
typestringOptionalOTP type: "signup" or "forgot_password"
POST /api/v1/auth/forgot-password

Request a password reset. Sends an OTP to the registered phone number.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredRegistered phone number
POST /api/v1/auth/confirm-forgot-password

Reset password using the OTP received from forgot-password.

No authentication required
ParameterTypeRequiredDescription
phone_numberstringRequiredRegistered phone number
codestringRequiredOTP verification code
new_passwordstringRequiredNew encrypted password
POST /api/v1/auth/change-password-with-old

Change password by providing the current and new passwords. Requires authentication.

JWT Token Required
ParameterTypeRequiredDescription
old_passwordstringRequiredCurrent encrypted password
new_passwordstringRequiredNew encrypted password
access_tokenstringRequiredValid Cognito access token
POST /api/v1/auth/verify-token

Verify if a JWT access token is still valid and not expired.

JWT Token Required
ParameterTypeRequiredDescription
tokenstringRequiredJWT access token to verify
POST /api/v1/auth/refresh-token

Obtain a new access token using a valid refresh token.

No authentication required
ParameterTypeRequiredDescription
refresh_tokenstringRequiredRefresh token from sign-in response
DELETE /api/v1/auth/delete-account

Permanently delete a user account from Cognito and the database.

JWT Token Required
ParameterTypeRequiredDescription
access_tokenstringRequiredValid Cognito access token
Warning: This action is irreversible. The user account and all associated data will be permanently deleted.

Users & Profiles

Manage user profile information. All endpoints require JWT authentication.

GET /api/v1/profile

Retrieve the authenticated user's profile information.

JWT Token Required
Request Example
curl -X GET https://api3.facepos.ie/api/v1/profile \
  -H "Authorization: Bearer {access_token}"
Response — 200 OK
{
  "success": true,
  "data": {
    "uid": 1,
    "phoneno": "+353871234567",
    "name": "John Doe",
    "email": "john@example.com",
    "profileImage": "https://...",
    "market": "IE"
  }
}
PUT /api/v1/profile/update

Update the authenticated user's profile. Supports partial updates — only send fields you want to change.

JWT Token Required
ParameterTypeRequiredDescription
namestringOptionalDisplay name
emailstringOptionalEmail address
addressstringOptionalStreet address
citystringOptionalCity
postcodestringOptionalPostal code
countrystringOptionalCountry code

Merchants

Manage merchant accounts and business profiles. All endpoints require JWT authentication.

GET /api/v1/merchant

Retrieve merchants associated with the authenticated user.

JWT Token Required
Response — 200 OK
{
  "success": true,
  "data": [{
    "uid": 1,
    "businessname": "Coffee Shop",
    "businesstypeid": 3,
    "phoneno": "+353871234567",
    "email": "shop@example.com",
    "status": "active"
  }]
}
POST /api/v1/merchant

Create a new merchant business profile.

JWT Token Required
ParameterTypeRequiredDescription
businessnamestringRequiredBusiness name
businesstypeidintegerRequiredBusiness type ID
emailstringOptionalBusiness email
addressstringOptionalBusiness address
PUT /api/v1/merchant/{id}

Update an existing merchant profile by ID.

JWT Token Required
DELETE /api/v1/merchant/{id}

Delete a merchant profile by ID.

JWT Token Required
Warning: Deleting a merchant will remove all associated data including bank accounts and transaction history.

Transactions

Query and manage payment transactions. Supports filtering, pagination, and multiple data formats.

GET /api/v1/trans

Get transactions for the authenticated user with enriched data including merchant and customer details.

JWT Token Required

Query Parameters

ParameterTypeRequiredDescription
statusstringOptionalFilter by status (e.g. "completed", "pending")
from_datestringOptionalStart date (YYYY-MM-DD)
to_datestringOptionalEnd date (YYYY-MM-DD)
pageintegerOptionalPage number (default: 1)
limitintegerOptionalResults per page (default: 10)
Response — 200 OK
{
  "success": true,
  "data": [{
    "uid": 123,
    "amount": "25.50",
    "currency": "EUR",
    "status": "completed",
    "merchantname": "Coffee Shop",
    "sendername": "John Doe",
    "created_at": "2025-10-30T12:00:00.000Z"
  }],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 56
  }
}
GET /api/v1/merchanttrans

Get transactions for a specific merchant. Supports filtering by transaction type.

JWT Token Required
ParameterTypeRequiredDescription
typestringOptionalFilter: "qr", "link", "all"
statusstringOptionalFilter by transaction status
GET /api/v1/transhistory

Get historical transaction data for the authenticated user.

JWT Token Required
GET /api/v1/transaction-count

Get transaction count statistics. No authentication required.

No authentication required
Response — 200 OK
{
  "success": true,
  "data": {
    "total": 1250,
    "completed": 1100,
    "pending": 100,
    "failed": 50
  }
}
GET /api/v1/public/trans

Get public transaction data with enriched details. No authentication required.

No authentication required
GET /api/v1/public/trans-raw

Get raw transaction data directly from the database. No authentication required.

No authentication required

Payments & Refunds

Manage payment details and process refunds for completed transactions.

GET /api/v1/customer-payment-details

Get customer payment details with optional filters for merchant, status, and date range.

JWT Token Required
ParameterTypeRequiredDescription
merchant_idintegerOptionalFilter by merchant
statusstringOptionalFilter by payment status
DELETE /api/v1/customer-payment-details

Delete a customer payment detail record.

JWT Token Required
POST /api/v1/refund

Create a new refund request for a completed transaction.

JWT Token Required
ParameterTypeRequiredDescription
transaction_idintegerRequiredOriginal transaction ID
amountnumberRequiredRefund amount
reasonstringOptionalRefund reason
GET /api/v1/refund

List all refunds for the authenticated user or merchant.

JWT Token Required
GET /api/v1/refund/{id}

Get details of a specific refund by ID.

JWT Token Required
PUT /api/v1/refund/{id}

Update a refund status or details.

JWT Token Required

Banking

Manage payees and merchant bank accounts for payment processing.

GET /api/v1/payee

Get the list of payees for the authenticated user.

JWT Token Required
POST /api/v1/payee

Add a new payee. Supports both FacePOS users (by phone) and external payees (by IBAN).

JWT Token Required
ParameterTypeRequiredDescription
phonenostringRequired*FacePOS user phone (for FacePOS payee)
namestringRequiredPayee display name
ibanstringRequired*IBAN (for external payee)
bicstringOptionalBIC/SWIFT code
Note: Provide phoneno for FacePOS payees or iban for external payees. Not both.
GET /api/v1/merchant-payee

Get payees associated with a specific merchant.

JWT Token Required
GET /api/v1/merchant-bank-account

List bank accounts linked to the authenticated merchant.

JWT Token Required
POST /api/v1/merchant-bank-account

Add a new bank account to a merchant profile.

JWT Token Required
ParameterTypeRequiredDescription
account_namestringRequiredAccount holder name
ibanstringRequiredIBAN
bicstringRequiredBIC/SWIFT code
bank_namestringOptionalName of the bank
currencystringOptionalAccount currency (default: EUR)
PUT /api/v1/merchant-bank-account

Update an existing merchant bank account.

JWT Token Required
DELETE /api/v1/merchant-bank-account

Remove a bank account from a merchant profile.

JWT Token Required

App Management

Manage mobile app versions and generate receipt identifiers.

GET /api/v1/app_versions

List app versions with optional filters for platform and version number.

API Key Required
ParameterTypeRequiredDescription
platformstringOptionalFilter: "ios", "android"
latestbooleanOptionalGet only latest version
POST /api/v1/app_versions

Register a new app version for update tracking.

API Key Required
ParameterTypeRequiredDescription
versionstringRequiredSemantic version (e.g. "2.1.0")
platformstringRequired"ios" or "android"
force_updatebooleanOptionalWhether update is mandatory
release_notesstringOptionalChange log
POST /api/v1/receipt-generator

Generate unique receipt identifiers for transactions.

API Key Required

Calendar

Manage Google Calendar appointments for scheduling and booking.

GET /api/v1/googlecalendar

List all appointments with optional date and status filters.

JWT Token Required
POST /api/v1/googlecalendar

Create a new appointment in Google Calendar.

JWT Token Required
ParameterTypeRequiredDescription
titlestringRequiredEvent title
start_timestringRequiredStart time (ISO 8601)
end_timestringRequiredEnd time (ISO 8601)
descriptionstringOptionalEvent description
attendeesarrayOptionalList of attendee emails
GET /api/v1/googlecalendar/{id}

Get a specific appointment by ID.

JWT Token Required
PUT /api/v1/googlecalendar/{id}

Update an existing appointment.

JWT Token Required
DELETE /api/v1/googlecalendar/{id}

Delete an appointment.

JWT Token Required

System

System health monitoring and administrative data queries.

GET /api/v1/system/health

Check API server health, database connectivity, and service status.

No authentication required
Response — 200 OK
{
  "success": true,
  "data": {
    "timestamp": "2025-10-30T12:00:00.000Z",
    "version": "1.0.0",
    "environment": "production",
    "uptime": 86400,
    "database": {
      "status": "healthy",
      "responseTime": "15ms"
    }
  }
}
GET /api/v1/getalllist

Query any database table with pagination and filters. Administrative endpoint.

API Key Required
ParameterTypeRequiredDescription
tablestringRequiredTable name to query
pageintegerOptionalPage number
limitintegerOptionalResults per page
filterobjectOptionalKey-value filter conditions

FacePOS API Reference · Version 1.0 · © 2025 FacePOS

Base URL: https://api3.facepos.ie