Getting Started
Welcome to the Marc's Inventory API!
- Base URL:
https://api.marcsinventory.com - Format: All requests and responses use JSON with UTF-8 encoding
- Authentication: Bearer token in Authorization header (see Authentication section)
- Rate Limit: 100 requests per minute per token
- Response Format:
{success: bool, data: object, error: string} - Timestamps: All timestamps are in ISO 8601 format (UTC)
Tip: Use Bearer tokens to authenticate all requests. Include the header: Authorization: Bearer YOUR_TOKEN
Authentication
/auth/login
Authenticate with email and password to receive access token
Request Body
{
"email": "user@example.com",
"password": "securepassword123"
}Response
{
"success": true,
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"expires_in": 3600,
"user": {
"id": "user_123",
"email": "user@example.com",
"account_id": "acc_123"
}
}
}/auth/refresh
Refresh an expired access token
Request Body
{
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGc..."
}Response
{
"success": true,
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"expires_in": 3600
}
}/auth/register
Register a new user account with email and password
No Auth Required/auth/logout
Invalidate the current session and refresh token
Bearer Token Required/auth/me
Get the current authenticated user's info
Bearer Token Required/auth/accounts
List all accounts the current user belongs to
Bearer Token Required/auth/switch-account
Switch the active account context for multi-tenant users
Bearer Token Required/auth/invitation-info
Get details about a team invitation by token
No Auth Required/auth/accept-invite
Accept a team invitation and join the account
No Auth RequiredAPI Keys
Create and manage per-account API keys for programmatic access.
/admin/api-keysList all API keys for the current account
Response
{
"success": true,
"data": [
{ "id": "key_001", "name": "Production", "prefix": "mi_live_abc1", "created_at": "2026-03-20T10:00:00Z", "last_used_at": "2026-03-22T08:15:00Z" }
]
}/admin/api-keysCreate a new API key
Request Body
{ "name": "Warehouse Integration" }Response
{
"success": true,
"data": { "id": "key_002", "name": "Warehouse Integration", "key": "mi_live_xyz789...", "created_at": "2026-03-22T12:00:00Z" }
}Health Check API
Monitor API availability and service health.
/healthQuick health check — returns OK if API is running
No Auth RequiredTenant Signup API
Register new tenant accounts (stores) on the platform.
/signupRegister a new tenant (store) with owner account
No Auth Required/signup/check-availabilityCheck if a store name or subdomain is available
No Auth Required/signup/plansList available signup plans and pricing tiers
No Auth Required