Server integration

Application API

The four reads your backend can make: the application, a person, a business profile and a subscription.

Base URL: https://apps-api.versified.com.gh/appcenter/v3/app. Every route needs appcenter:service, and no route takes an application id — the client on the token decides which application is being served.

GET /me
ReturnsThe application this client is bound to, plus its client id
GET /users/:userUuid
ReturnsOne person, their business profile, and their subscriptions to your application
GET /users?email=|emails=|uuids=
ReturnsExactly one selector. email is a substring search; emails and uuids are exact batches of up to 100
GET /businesses/:accountUuid
ReturnsThe public business profile for an account owner
GET /businesses/:accountUuid/logo
ReturnsThe logo as a base64 data URL, for receipts and rendered reports
GET /subscriptions/:accountUuid
ReturnsPlan identity for your application only — code, tier, interval, dates, status

One envelope, both directions

A 2xx answer is { success: true, data }; a failure is { success: false, error: { code, message } }. Branch on error.code, never on message. The credential failures (401 UNAUTHENTICATED, 403 service_token_required, 403 app_not_bound) and 429 RATE_LIMITED are the same on every route and are documented once on Errors.

The application

Call this once at boot. It answers with the application the token's client is bound to, which turns a misconfigured client_secret or a forgotten assignment into one obvious log line.

GET/meappcenter:service

Self-description: which application this credential serves, and which client sent it.

Headers

Authorization
Bearer <access_token>
Accept
application/json
200 OK
{
  "success": true,
  "data": {
    "application": {
      "id": 3,
      "shortCode": "VPOS",
      "name": "Retill",
      "status": "published"
    },
    "clientId": "retill-backend"
  }
}

clientId is the client that minted the token — it always equals the client_id you sent.

A person

GET/users/:userUuidappcenter:service

One person, the business profile they own, and their subscriptions to your application only.

Parameters

userUuidstring · pathrequired
The App Center user uuid — the same value as the access token's sub.
200 OK
{
  "success": true,
  "data": {
    "user": {
      "useruuid": "0d5a…",
      "email": "ama@example.com",
      "firstname": "Ama",
      "lastname": "Mensah",
      "profileimage": "https://cdn.versified.com.gh/a/0d5a….jpg",
      "createddate": "2025-03-14T09:21:07.000Z"
    },
    "business": {
      "name": "Ama's Mart",
      "email": "hello@amasmart.gh",
      "phone": "+233 24 000 0000",
      "address": "12 Oxford Street, Osu, Accra",
      "profileImage": "https://cdn.versified.com.gh/b/7f31….png"
    },
    "subscriptions": [
      {
        "id": 412,
        "planCode": "pro-monthly",
        "planName": "Pro",
        "accessTier": "pro",
        "interval": "monthly",
        "legacyPlan": "PRO",
        "status": "active",
        "startDate": "2026-11-08T00:00:00.000Z",
        "endDate": "2026-12-08T00:00:00.000Z",
        "active": true,
        "daysRemaining": 30
      }
    ]
  }
}

business is a sibling of user, not nested inside it, and is null when the account owns no business.

404 Not found
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "User does not exist"
  }
}

Failures to handle

404NOT_FOUND
No user row carries that useruuid — a deleted account, or a uuid from another platform.
422VALIDATION_FAILED
useruuid is empty. The body lists the offending path.
  • subscriptions is filtered by appId at the query, so an application never sees another application's plan.
  • The six user fields are the platform's whole answer about a person: no id, no credential, no role.

One fixed shape

The user row is intentionally rigid. If you proxy it to your own clients, copy it through unchanged — do not re-map, rename or filter fields. Every application on the platform reads the same shape, and drift breaks the shared contract.

Searching and batching

GET/usersappcenter:service

Find people by email fragment, or resolve an exact batch by email or uuid. Exactly one selector per request.

Query parameters

emailstring
Case-sensitive LIKE %…% search for operator-facing pickers. Never use it to resolve a person from a claim.
emailsstring · comma list ≤ 100
Exact, case-insensitive batch. Duplicates are removed before the query.
uuidsstring · comma list ≤ 100
Exact batch by useruuid. The reconciliation path after a missed webhook.
limitinteger 1–50 · default 20
Applies to email only. Batches return at most the 100 ids you sent.
200 OK — ?email=ama
{
  "success": true,
  "data": {
    "users": [
      {
        "useruuid": "0d5a…",
        "email": "ama@example.com",
        "firstname": "Ama",
        "lastname": "Mensah",
        "profileimage": "https://cdn.versified.com.gh/a/0d5a….jpg",
        "createddate": "2025-03-14T09:21:07.000Z"
      }
    ]
  }
}

No match is 200 with an empty array — never a 404.

422 VALIDATION_FAILED
{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Validation failed",
    "fields": [
      {
        "path": "email",
        "message": "Provide exactly one of email, emails or uuids"
      }
    ]
  }
}

Failures to handle

422VALIDATION_FAILED
Zero or two selectors were sent, a batch exceeded 100 values, or an address is not an email.
  • Chunk anything larger than 100 values; there is no paging cursor on this route.
  • Send the comma list URL-encoded: ?uuids=a%2Cb.

A business

GET/businesses/:accountUuidappcenter:service

The public face of an account — name, contact details and imagery — for receipts and rendered reports.

Parameters

accountUuidstring · pathrequired
The account owner's user uuid, not a business id of your own.
200 OK
{
  "success": true,
  "data": {
    "business": {
      "name": "Ama's Mart",
      "email": "hello@amasmart.gh",
      "phone": "+233 24 000 0000",
      "address": "12 Oxford Street, Osu, Accra",
      "profileImage": "https://cdn.versified.com.gh/b/7f31….png"
    }
  }
}

business is null — still 200 — when the account owns no business yet.

Failures to handle

404NOT_FOUND
Account not found — no user carries that uuid.
GET/businesses/:accountUuid/logoappcenter:service

The same logo, inlined as a base64 data URL so a PDF or a thermal receipt needs no second fetch.

200 OK
{
  "success": true,
  "data": {
    "businessLogoDataUrl": "data:image/png;base64,iVBORw0KGgo…"
  }
}

null when the business has no logo, or when the image could not be fetched.

Failures to handle

404NOT_FOUND
Account not found — no user carries that uuid.
  • The fetch happens on App Center's side, so a large logo still answers once. Cache the result; it only changes on business.updated.

A subscription

GET/subscriptions/:accountUuidappcenter:service

Plan identity for your application only. An empty list is a valid answer, not an error.

Parameters

accountUuidstring · pathrequired
The account owner's user uuid.
200 OK
{
  "success": true,
  "data": {
    "subscriptions": [
      {
        "id": 412,
        "planCode": "pro-monthly",
        "planName": "Pro",
        "accessTier": "pro",
        "interval": "monthly",
        "legacyPlan": "PRO",
        "status": "active",
        "startDate": "2026-11-08T00:00:00.000Z",
        "endDate": "2026-12-08T00:00:00.000Z",
        "active": true,
        "daysRemaining": 30
      }
    ]
  }
}

Ordered by endDate descending, so subscriptions[0] is the most recent.

200 OK — nothing bought
{
  "success": true,
  "data": {
    "subscriptions": []
  }
}

Also what an unknown accountUuid returns: this route never 404s.

  • accessTier is lowercase — basic, pro, premium, enterprise — and is null on a pre-catalogue subscription.
  • status is computed at read time: pending before startDate, expired after endDate. Use active when you want one boolean.
  • legacyPlan carries the pre-catalogue tier label unchanged; planCode and planName are null on those rows.
  • daysRemaining is 0 once the subscription is inactive. It counts whole days to endDate, rounded up.
  • No field here is a limit. Ceilings live in your product — see Owning your plan limits.

Subscriptions are identity, not policy

GET /subscriptions/:accountUuid tells you which plan and whether it is active. It never tells you how many shops, users or seats that allows. Those numbers are yours.

Something here out of date or unclear?

The platform team answers integration questions directly.

support@versified.com.gh
32 pages in this documentation