Whoami

Resolve the calling company identity

Returns the company identity and key status resolved from the x-api-key. Intended as a login gate for internal tooling: pass a company private API key (sk_...) and confirm which company, currency, and key it maps to. Read-only. The key must be a company key — an organization key (x-org-api-key) is rejected.

get/v1/whoami

Request

  • Base URL: https://api.finalpos.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.finalpos.com/v1/whoami
  • Auth: API key in header x-api-key

Response

The company identity and key status for the authenticated API key.

companyIdstring required

The company the API key belongs to (MongoDB ObjectId).

companyNamestring required

Display name of the company.

currencystring required

The company’s configured ISO 4217 currency code. Always present on a 200 response.

countrystring

The company’s country (ISO 3166-1 alpha-2) from its address, when set.

Example response

{
  "companyId": "507f1f77bcf86cd799439011",
  "companyName": "Acme Corp",
  "currency": "USD",
  "country": "CA",
  "key": {
    "permissions": {
      "create": true,
      "read": true,
      "update": true
    },
    "granularPermissions": {
      "product": {
        "read": true
      },
      "order": {
        "create": true
      }
    },
    "name": "Production Key",
    "expiresAt": "never_expires"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.