Skip to main content

Health Check

GET /health
Check the health status of the API

Response

status
string
Current health status of the API (“healthy” or “unhealthy”)
timestamp
string
ISO timestamp of the health check
uptime
number
Server uptime in seconds
{
  "status": "healthy",
  "timestamp": "2024-03-14T12:00:00Z",
  "uptime": 3600
}

User Profile

GET /profile
Get the user’s profile information

Parameters

userId
string
required
The ID of the user

Response

id
string
User’s unique identifier
integrations
object
Integration details including TikTok credentials and account information
{
  "id": "user123",
  "integrations": {
    "tiktok": {
      "connected": true,
      "shopId": "shop123",
      "accessTokenExpiry": "2024-04-14T12:00:00Z"
    },
    "email": {
      "connected": true,
      "accounts": ["account1", "account2"]
    }
  }
}

Integration Status

GET /integrations/status
Get the status of all user integrations

Parameters

userId
string
required
The ID of the user

Response

tiktok
object
Status of TikTok integration
email
object
Status of email integration
{
  "tiktok": {
    "connected": true,
    "lastSync": "2024-03-14T12:00:00Z",
    "status": "active"
  },
  "email": {
    "connected": true,
    "accounts": [
      {
        "id": "account1",
        "status": "active",
        "lastSync": "2024-03-14T12:00:00Z"
      }
    ]
  }
}