Skip to main content

Authentication

FlexPortal uses Bearer token authentication. Include your API key in the Authorization header of every request:
API keys are created in the Dashboard under Settings → API Keys. Each key is scoped to your organization with configurable permissions.

Required Headers

Every API request must include these headers:

Base URLs

FlexPortal is deployed across multiple regions. Use the base URL closest to your customers:
Data is region-specific. Orders created in the EU region are not visible from US endpoints. Choose your region during onboarding and use it consistently.

Rate Limits

*Fair use policy with abuse protection. Sustained high-volume usage may trigger temporary throttling. When rate limited, you’ll receive a 429 Too Many Requests response with a Retry-After header indicating when to retry.

Pagination

List endpoints use cursor-based pagination for reliable, consistent results even when data changes between requests.

Request Parameters

Response Structure

Iterating Through Pages

Use nextCursor value as startAfter for the next request. When hasMore is false or nextCursor is null, you’ve reached the end.

Request Format

All request bodies must be valid JSON:

Response Format

Success Responses

All successful responses include relevant data and metadata:
For list endpoints:

Error Responses

Errors follow a consistent structure with machine-readable codes and human-friendly messages:

HTTP Status Codes

Error Codes Reference

Common error codes you may encounter:

Core Resources

FlexPortal’s API is organized around these key resources:

Products

Create and manage your product catalog with variants and pricing

Orders

Process subscription orders and track fulfillment

Subscriptions

Manage active subscriptions, extensions, upgrades, and buyouts

Payments

Track and manage scheduled billing payments

Filtering

Most list endpoints support filtering by key fields. Pass filter values as query parameters:

Custom Field Filtering (Orders)

If you’ve configured custom fields, filter by them using the customField_ prefix:

Idempotency

For operations that create resources, FlexPortal uses natural idempotency keys:
  • Orders: Customer email + items combination within a short window
  • Assets: Serial number (unique per tenant)
  • Payments: Billing period + subscription ID
If you need to retry a failed request, it’s safe to do so. Duplicate create requests will return the existing resource rather than creating duplicates.

Webhooks

FlexPortal can send real-time notifications for key events. Configure webhook endpoints in the Dashboard under Settings → Webhooks.

Available Events

Webhook Payload

SDKs & Libraries

Official SDKs are coming soon. In the meantime, you can use any HTTP client to interact with the API. See our Quickstart Guide for examples in various languages.

Need Help?