Skip to main content

Platform APIs

Authentication, user management, webhooks, and rate limiting for the Huntrecht Platform.

Authentication Methods

MethodUse CaseFlow
Client CredentialsServer-to-server API callsOAuth2
User LoginWeb/mobile app usersEmail/Password, OAuth
Google OAuthConsumer authenticationOAuth2
Shopify OAuthExisting Shopify merchantsOAuth2

User Roles

Super Admin
└── Admin
├── Manager
│ ├── Buyer
│ ├── Accountant
│ └── Viewer
└── API Client

Token Flow

sequenceDiagram
participant App
participant Auth
participant API

App->>Auth: POST /auth/token (credentials)
Auth-->>App: Access + Refresh Token

loop Every 30 minutes
App->>Auth: POST /auth/token (refresh)
Auth-->>App: New Access Token
end

App->>API: API Request (Bearer token)
API-->>App: Response

Rate Limits by Plan

PlanRequests/DayConcurrent
Starter1005
Basic1,00010
Standard10,00025
Pro50,000100
EnterpriseUnlimitedUnlimited

Webhook Events

Authentication Events

  • user.registered - New user created
  • user.login - User logged in
  • user.logout - User logged out
  • user.invited - Team invitation sent

Core Events

  • order.created - New order
  • order.updated - Order status changed
  • payment.completed - Payment successful
  • subscription.created - New subscription
  • credit.updated - Credit score updated

API Reference