For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
HomeAPI Reference
HomeAPI Reference
  • Get started
    • Welcome
    • Quick Start
  • API basics
    • Authentication
    • Conventions
    • Errors
    • Webhooks
  • Products
    • Digital Identity
    • OCR & Computer Vision
    • E-Contracting
    • OAuth Registration
    • Iframe Integration
  • SDKs
    • Flutter SDK
  • Resources
    • Support
  • Changelog
    • Changelog
Dashboard
LogoLogo
On this page
  • Base URL
  • Headers
  • Response envelope
  • Paginated responses
  • Pagination
  • IDs
  • Dates and times
  • Phone numbers
  • Geolocation
  • Multi-tenancy
API basics

API Conventions

Common patterns used across every Vlens endpoint
||View as Markdown|
Was this page helpful?
Edit this page
Previous

Authentication

Next

Errors

Built with

This page documents conventions that apply to every Vlens endpoint — request format, response envelope, pagination, dates, and IDs.


Base URL

https://api.vlenseg.com

All endpoints are relative to this URL. Tenants are isolated, so a non-production tenant can serve as a development environment.


Headers

Every request requires:

HeaderRequiredDescription
ApiKeyAlwaysTenant API key
AuthorizationMost endpointsBearer <token> — admin or user JWT
Content-TypePOST / PUTAlways application/json
TenancyName/api/credentials/Login onlyYour tenant name

Response envelope

Every response — success or error — uses the same shape:

1{
2 "data": { ... },
3 "error_code": null,
4 "error_message": null,
5 "error_descriptions": null
6}
  • On success, data contains the result and error_code is null
  • On error, data is null and error_code / error_message describe the failure

Errors are signalled in the envelope, not the HTTP status. Always inspect error_code before treating a response as successful — it may be set even when the HTTP status is 200.

Paginated responses

List endpoints add totalCount and returnedCount:

1{
2 "data": [ ... ],
3 "totalCount": 247,
4 "returnedCount": 20,
5 "error_code": null
6}

Pagination

List endpoints accept these query parameters:

ParameterTypeDescription
skipCountintegerNumber of records to skip (offset)
MaxResultCountintegerMaximum records to return

Example — fetch page 3 of 20:

$curl "https://api.vlenseg.com/api/BusinessRequest/CurrentList?skipCount=40&MaxResultCount=20" \
> -H "ApiKey: YOUR_API_KEY" \
> -H "Authorization: Bearer USER_TOKEN"

Use totalCount from the response to compute total pages: Math.ceil(totalCount / MaxResultCount).


IDs

ResourceFormat
User ID64-bit integer
Transaction IDUUID
Business request IDUUID
OTP request IDUUID
Refresh tokenJWT

UUIDs are lowercase with hyphens: 81f404b3-d7dc-4f08-b4fe-934853c86282.


Dates and times

Dates use ISO 8601 in UTC:

2025-01-15T10:30:00Z

userDeviceUtcTime fields should reflect the user’s device clock in UTC — not local time. This value is used together with geoLocation for the contract-activation location check.


Phone numbers

E.164 format with country code:

+201234567890

Egyptian numbers begin with +20.


Geolocation

geoLocation fields use decimal latitude/longitude:

1{
2 "latitude": 30.0444,
3 "longitude": 31.2357
4}

Required for contract creation and signing — Vlens uses the value to detect cross-region account movement (≥80 km triggers a liveness re-validation requirement).


Multi-tenancy

The Vlens platform is multi-tenant. Your ApiKey and admin credentials are scoped to a single tenant — they cannot access data from another tenant.

When using /api/credentials/Login, pass your tenant name in both the request body (tenancyName) and as the TenancyName header.