PostgreSQL 17 · PostGIS · RLS · OpenAPI 3.1.0

Developer Platform, REST API & Database Architecture

Production backend infrastructure for global goods & services rentals: 48 PostgreSQL + PostGIS tables with Row-Level Security, role-aware accounts, HMAC-SHA256 webhooks, and OpenAPI 3.1.

48 Tables

PostgreSQL 17 + PostGIS + Row-Level Security

25 Endpoints

REST v1 + Webhooks + RFC 5545 iCal Feed

4 Account Roles

renter · goods_owner · service_provider · hybrid

HMAC-SHA256

Signed webhooks & SHA-256 digital contracts

Live API Explorer

Execute real GET requests against running backend routes and inspect JSON payloads.

Click a preset endpoint or "Run GET" to inspect live JSON payloads from this node.

SDK & Integration Recipes

Production-ready snippets for role auth, wishlist/addresses, payouts, webhooks, and IoT.

const res = await fetch("/api/v1/auth/signup", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    email: "[email protected]",
    password: "StrongPassword#2026",
    full_name: "Sari Handayani",
    account_role: "hybrid", // renter | goods_owner | service_provider | hybrid
    vendor_type: "company",
    store_name: "Sari Rumah & Jasa",
    city: "Bandung",
    country: "ID",
    locale: "id",
    currency: "IDR",
  }),
});
const { data } = await res.json();
// data.access_token => Bearer JWT, data.vendor_slug => /v/<slug>

REST API Endpoints Reference

All JSON routes follow { ok, data, error } envelope and accept Bearer JWT or authenticated session cookies.

25 routes
MethodEndpointAuthDescription
GET/api/healthPublicLiveness & PostgreSQL connectivity health probe.
GET/api/v1/openapi.jsonPublicFull OpenAPI 3.1.0 schema specification.
GET/api/v1/metaPublic18 clusters · 342 classifications, attribute schemas, FX rates & SaaS tiers.
POST/api/v1/auth/signupPublicRegister renter, goods_owner, service_provider, or hybrid account + auto-provision store.
POST/api/v1/auth/loginPublicEmail/password sign-in returning Bearer JWT & profile metadata.
POST/api/v1/auth/logoutBearer JWTInvalidate active session cookies / tokens.
GET/api/v1/listingsPublicSearch inventory by keyword, cluster, country, price, or PostGIS radius.
POST/api/v1/listingsBearer JWTUpsert goods or service listing + multi-duration rates + add-ons.
GET/api/v1/listings/{id}PublicListing detail, booked calendar windows, reviews & server quote.
GET/api/v1/vendors/{slug}PublicPublic storefront profile, verification badge & active catalog by slug.
GET/POST/api/v1/cartBearer JWTMulti-vendor rental cart & dynamic duration pricing engine.
GET/POST/api/v1/bookingsBearer JWTList or create itemized bookings & quote verification.
GET/POST/api/v1/contractsBearer JWTOrders list & checkout into immutable multi-party escrow contract.
GET/POST/api/v1/contracts/{id}Bearer JWTContract room detail, SHA-256 signature, sandbox escrow pay, cancel.
POST/api/v1/booking-items/{id}Bearer JWTAccept/decline, check-in, check-out, deposit release, inspect, dispute.
GET/POST/api/v1/favoritesBearer JWTFetch or toggle saved wishlist / favorite listings.
GET/POST/DEL/api/v1/addressesBearer JWTManage renter shipping & on-site service delivery address book.
GET/POST/DEL/api/v1/vendor/payout-methodsBearer JWTManage bank transfers, e-wallets, and SWIFT/IBAN payout accounts.
GET/POST/DEL/api/v1/developer/webhooksBearer JWTRegister outgoing HTTPS webhooks & HMAC-SHA256 signing secrets.
POST/api/v1/reviewsBearer JWTSubmit verified renter/vendor review and rating.
POST/api/v1/uploadsBearer JWTSigned/validated asset & inspection evidence upload endpoint.
POST/api/v1/channels/{id}/syncBearer JWTTrigger 2-way iCal OTA calendar import/export synchronization.
POST/api/v1/iot/telemetryx-api-key / JWTGPS/OBD/hour-meter ping with automatic PostGIS geofence breach checks.
GET/api/ical/{token}.icsTokenPublic RFC 5545 iCalendar feed for external OTA calendar sync.
POST/api/webhooks/{provider}SignedVerified Mayar, Stripe, Midtrans & Xendit inbound payment webhooks.

Database Schema & Domain Architecture (48 Tables)

Every domain table enforces PostgreSQL Row-Level Security (RLS) paired with typed SECURITY DEFINER RPCs.

RLS Enabled

Renter Identity, Wishlist & Addresses (5 tables)

Profile metadata (account_role: renter | goods_owner | service_provider | hybrid), saved wishlist items, and multi-address shipping / home-service coordinates.

usersfavoritesuser_addressesnotificationspush_tokens

Owner / Provider Storefront & Payouts (7 tables)

Goods owners & service providers (supply_focus: goods | services | both), public /v/[slug] storefronts, KYC verification, masked bank/e-wallet payout destinations, and SaaS tiers.

vendorsvendors_kycvendor_team_membersvendor_payout_methodsvendor_subscriptionssaas_planspromotions

Global Catalog & Micro-Economy Pricing (8 tables)

18 clusters & 342 classifications (household micro-rentals from Rp 5k to industrial machinery & on-demand services), multi-duration rates, and multi-currency FX conversion.

categories_taxonomylistingslisting_rateslisting_addonsbundle_rulesinventory_stock_calendarfx_ratesplatform_settings

Escrow Contracts, Ledger & Fulfillment (17 tables)

Multi-vendor cart checkout, immutable SHA-256 signed contracts, escrow deposit holds & auto-release, ledger settlement, inspections, disputes, and 2-party messaging.

cart_itemsbookings_contractsbooking_itemsbooking_item_addonscontract_signaturespaymentsescrow_transactionspayout_requestsplatform_revenue_ledgerinvoicesinsurance_policiesinspectionsdisputesreviewsmessage_threadsmessagestasks

IoT Telemetry, PostGIS Geofencing & OTA Sync (7 tables)

PostGIS polygon geofencing alerts, telemetry ping stream, smart lock time-bound PIN provisioning, and RFC 5545 2-way iCal OTA calendar sync.

smart_locks_iot_devicesaccess_codesdevice_telemetrygeofencesgeofence_statesgeofence_eventschannel_connections

Developer Platform, Webhooks & Audit (4 tables)

Scoped SHA-256 B2B API keys (gr_live_...), outbound webhook subscriptions with whsec_... HMAC signatures, delivery status history, and security audit trail.

api_keyswebhook_endpointswebhook_deliveriesaudit_log