Skip to main content

REST API

The Mage Loyalty API is organized around REST. It has predictable, resource-oriented URLs, uses standard HTTP methods, and returns JSON:API-formatted responses.
https://api.mageloyalty.com/v1

Response format

All responses follow the JSON:API specification. Single resource:
{
  "data": {
    "type": "customer",
    "id": "6789012345",
    "attributes": {
      "email": "jane@example.com",
      "current_points": 450
    }
  }
}
Collection:
{
  "data": [
    {
      "type": "customer",
      "id": "6789012345",
      "attributes": { ... }
    }
  ],
  "meta": {
    "total": 100,
    "page": 1,
    "per_page": 20,
    "total_pages": 5
  }
}
Error:
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Customer 'xyz' not found"
    }
  ]
}

Available resources