Skip to Content
FluxStore is currently invite-only. Some sections of this documentation are still being written and expanded.
APIManagement APIOverview

Management API

Programmatically manage your store: create packages, manage coupons, query orders, and more.

The Store Management API is a Pro plan feature. API key creation and usage requires an active Pro subscription.

Base URL

https://api.fluxstore.net/api/v1/

The store is determined automatically from your API key, so no store ID is needed in the URL.

Authentication

All Store Management API endpoints require an API key passed in the X-Api-Key header:

curl -H "X-Api-Key: flx_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ https://api.fluxstore.net/api/v1/packages

Getting your API key

  1. Navigate to Dashboard > Configuration > API Keys
  2. Click Create API Key
  3. Enter a name, choose permissions, and optionally set an expiration date
  4. Copy the key immediately: it is shown once and cannot be recovered

Key format

flx_{storeId}_{secret}
  • The storeId is embedded in the key for efficient lookup
  • Only the secret portion is hashed and stored
  • The full key is displayed exactly once at creation time

Key management

Manage keys via the dashboard or the management API:

ActionDashboardAPI
Create keyConfiguration > API Keys > CreatePOST /api/stores/{storeId}/api-keys
List keysConfiguration > API KeysGET /api/stores/{storeId}/api-keys
Revoke keyClick Revoke on key rowDELETE /api/stores/{storeId}/api-keys/{id}
Regenerate keyClick Regenerate on key rowPOST /api/stores/{storeId}/api-keys/{id}/regenerate

Management API endpoints require JWT authentication and Stores:Edit permission.

Permissions

Each API key has scoped permissions. Set permissions when creating the key; they cannot be changed after creation. To change scopes, revoke the key and create a new one.

Permissions are defined as a dictionary of resource areas to permission types:

{ "Packages": ["View", "Edit", "Delete"], "Orders": ["View"], "Coupons": ["View", "Edit"] }

Permission areas

AreaViewEditDeleteDescription
PackagesPackage CRUD
CategoriesCategory CRUD
CouponsCoupon CRUD
SalesSale CRUD
GiftCardsGift card CRUD
OrdersOrder listing + manual creation
CustomersCustomer listing (read-only)
BansBan CRUD
SubscriptionsSubscription listing (read-only)

If a key lacks the required permission, the API returns 403 Forbidden.

Rate limiting

  • 30 requests per minute per API key (fixed window)
  • Rate limit headers are included on every response:
HeaderDescription
X-RateLimit-LimitMaximum requests per window (30)
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets

When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

Response format

All endpoints return a standard response wrapper:

{ "success": true, "data": { ... }, "message": null, "errors": [] }

Error responses:

{ "success": false, "data": null, "message": "Error description", "errors": ["Detail 1", "Detail 2"] }

Errors

HTTP StatusMeaning
200Success
400Bad request: validation error or malformed input
401Authentication failed: missing, invalid, or expired API key
403Forbidden: insufficient permissions or Pro subscription lapsed
404Resource not found
429Rate limit exceeded: wait and retry

Security

  • Key secrets are hashed. Secrets are never stored in plain text and cannot be recovered.
  • Pro gating. Creating and using API keys requires an active Pro subscription. If your subscription lapses, existing keys return 403 until renewed.
  • Rate limiting. 30 requests per minute per key.
  • Input validation. All request fields are validated server-side.
  • Data privacy. Gift card codes are never exposed. Customer emails are masked.
  • Permissions are immutable. To change scopes, revoke the key and create a new one.