Skip to content

Environments

Playbooks show full URLs you can paste. Paths without a host are the same resource.

Dev (default in these docs)

LayerBase URLExplorer
Corehttps://backend-dev.bookdirect.live/public/api/v1/nellalinkCore docs
Middlewarehttps://middleware-dev.bookdirect.live/api/v1Middleware docs

Core is served from Laravel public/, so the browser path includes /public. Middleware does not use /public.

Examples:

POST https://backend-dev.bookdirect.live/public/api/v1/nellalink/user/login
POST https://backend-dev.bookdirect.live/public/api/v1/nellalink/smart-meta-manager/entity/property
POST https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/initialize
POST https://middleware-dev.bookdirect.live/api/v1/nellalink/file-manager/aws/upload-url

Headers every Core call needs

HeaderRequiredValue
x-api-keyYesPublic browse key in the Vue app for listing active properties. Write key (JWT required) for creates/updates — do not put the write key in the browser if you can send writes through Middleware. See Security and IDOR.
AuthorizationWrites and private readsBearer {access_token} from login
Content-TypePOST / PUTapplication/json

The browse key is assumed public. IDOR is Core path settings + Middleware, not frontend.

Headers every Middleware call needs

HeaderRequiredValue
AuthorizationYes (except PSP webhooks)Same Core JWT (iss must be nellalink)
x-api-keyWhen the route declares itSame site key unless the Middleware folder uses its own
Content-TypePOST / PUTapplication/json

Webhooks (Paystack, Squad, Tsara) use the provider signature header, not a user JWT.

Staging and live

Replace the host only. Paths stay the same.

EnvCore hostMiddleware host
Devhttps://backend-dev.bookdirect.livehttps://middleware-dev.bookdirect.live
Stagingset when promotedset when promoted
Liveset when promotedset when promoted

Document new hosts on /next first, then promote.

Standard response envelope (Core and Middleware)

json
{
  "status": true,
  "status_code": 200,
  "message": "Login successful.",
  "data": {},
  "meta": { "pagination": {} }
}

Errors:

json
{
  "status": false,
  "status_code": 422,
  "message": "Validation error",
  "error": {
    "error_code": "optional-code",
    "recommendation": ["What to fix"]
  }
}

JWT

  • Issuer: nellalink
  • Typical access-token life: 30 minutes. Use POST .../user/refresh with a refresh token, or re-login.
  • Store data.uuid (user) and data.access_token. Send that uuid as owned_by on creates. Core must reject a mismatch with the JWT.

API-first. Middleware wins over Core when both exist.