Skip to main content

Base URL

All API requests should be made to:
https://api.shoppex.io/dev/v1

Authentication

The Shoppex API uses Bearer token authentication with API keys. Include your API key in the Authorization header:
Authorization: Bearer shx_your_api_key_here
Keep your API keys secure. Never expose them in client-side code or public repositories.

Getting Your API Key

  1. Log in to dashboard.shoppex.io
  2. Go to SettingsAPI Keys
  3. Click Generate New Key
  4. Copy and store your key securely (it starts with shx_)
API keys are shown only once when created. Store them in a secure location like a password manager or environment variables.

Request Format

All requests should:
  • Use Content-Type: application/json
  • Send JSON-encoded request bodies
  • Include the Authorization header
curl https://api.shoppex.io/dev/v1/invoices \
  -H "Authorization: Bearer shx_your_api_key" \
  -H "Content-Type: application/json"

Response Format

All responses return JSON with a consistent structure:

Success Response

{
  "data": {
    "id": "abc123",
    "status": "COMPLETED"
  }
}

List Response

{
  "data": [
    { "id": "abc123" },
    { "id": "def456" }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6MTIzfQ",
    "has_more": true
  }
}

Error Response

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid email address",
    "details": [
      { "field": "email", "message": "must be a valid email" }
    ],
    "doc_url": "https://docs.shoppex.io/api/errors#VALIDATION_ERROR"
  }
}

HTTP Status Codes

CodeDescription
200Success
201Resource created
400Bad request (validation error)
401Unauthorized (invalid or missing API key)
403Forbidden (shop suspended)
404Resource not found
429Rate limit exceeded
500Internal server error

Rate Limiting

API requests are limited to protect the service. When you exceed the limit, you’ll receive a 429 Too Many Requests response. If rate limited, wait a few seconds before retrying your request.

Pagination

List endpoints use cursor-based pagination for efficient data retrieval:
ParameterTypeDescription
cursorstringPagination cursor from previous response
limitnumberItems per page (1-100, default: 50)
# First request
GET /invoices?limit=25

# Next page
GET /invoices?limit=25&cursor=eyJpZCI6MTIzfQ
Response includes pagination info:
{
  "data": [...],
  "pagination": {
    "next_cursor": "eyJpZCI6OTh9",
    "has_more": true
  }
}
Continue fetching until has_more is false.

Filtering

Many list endpoints support filtering via query parameters:
# Filter invoices by status
GET /invoices?status=COMPLETED

# Filter by customer email
GET /[email protected]
See individual endpoint documentation for available filters.