Skip to main content

Overview

The PharmaNet API is a hybrid REST and Real-time interface designed to power the verified B2B pharmaceutical network. It utilizes standard HTTP methods for data management and Socket.io for real-time negotiation and status updates.

Base URL

All API requests should be made to our verified environment URL: https://api.pharmanet.com/v1

Authentication

PharmaNet uses Supabase Auth for identifying network members. Most API endpoints require authentication using a JSON Web Token (JWT). Include the token in your secure request headers: Authorization: Bearer <your_jwt_token>

Core Data Formats

  • Standard UUIDs: All identifiers (e.g., productId, sellerId, orderId) are 128-bit UUID strings.
  • ISO 8601 Timestamps: All date-time fields follow the YYYY-MM-DDTHH:MM:SSZ format.
  • JSON Payload: Standard bidirectional JSON communication.

Common Response Codes

CodeDescription
200 OKThe request was successful.
201 CreatedA new resource was successfully created.
401 UnauthorizedAuthentication failed or the token is invalid.
403 ForbiddenYou do not have permission (e.g. unverified business).
404 Not FoundThe requested resource could not be found.

Real-time Communication

For chat and live inventory listeners, we utilize Socket.io and Supabase Realtime. Ensure your client is configured to maintain a persistent connection for these mission-critical features.