Getting started

The DEXPIRY HTTP API is the integration surface for the merchant portal, customer apps, and admin dashboard. Interactive reference is generated from the OpenAPI spec; this guide is the short path to a first successful call.

Base URLs

Environment URL
Local http://localhost:3001
Production https://api.dexpiry.com

When the API is running locally, Swagger UI is also served at http://localhost:3001/docs. The same spec is published on this portal as OpenAPI JSON and as the API Reference.

Actors

Actor How they authenticate Typical work
Merchant Email/password JWT (POST /v1/auth/login) Products, issue warranties, sender addresses
Customer Claim link or magic-link JWT Warranties, receipts, inbox address
Admin Email/password JWT with admin role Merchants, global products, platform stats
Public None Health, global product search, OpenAPI spec

All authenticated routes expect:

Authorization: Bearer <jwt>

See Authentication.

First calls

Health (no auth):

curl https://api.dexpiry.com/health

Merchant login:

curl -X POST https://api.dexpiry.com/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "merchant@example.com", "password": "yourPassword"}'

The response includes token and user (id, role, merchantId when applicable). Send that token on subsequent merchant routes.

Issue a warranty (merchant JWT):

curl -X POST https://api.dexpiry.com/v1/merchant/warranties/issue \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "serialNumber": "SN-12345",
    "merchantProductId": "<uuid>",
    "customerEmail": "buyer@example.com"
  }'

The issue call is accepted asynchronously (202) while the NFT mint runs in the background. Customers then open a claim or magic link to attach the warranty to their wallet.

OpenAPI

Download the spec and feed it to any generator or AI agent:

curl https://api.dexpiry.com/openapi.json -o openapi.json

On this portal: OpenAPI Spec ยท API Reference.

Related product docs

The Markdown chapters under Documentation describe the product (customer app, merchant platform, trust layer, lifecycle services). They are the same v2.0 documentation in English and Croatian โ€” edit those files directly; do not treat the Word originals as the live source.