Overview
The Services API allows you to create, update, and delete services for a tenant. Services represent offerings displayed on tenant websites, supporting both icon-based and image-based representations. Base Path:/tenant/{tenantId}/services
Authentication: Required (Laravel session auth)
Create Service
Path Parameters
The ID of the tenant
Request Body
Service name (max 100 characters)
Service description (max 500 characters)
Tabler icon name for the service (max 50 characters)Example:
tabler--code, tabler--device-mobile, tabler--paletteNote: When icon_name is set, it takes precedence over image_filenameWhether the service is active and visible
Validation Rules
- The tenant must have
activestatus - Blueprint-aware limits apply based on tenant plan
- Default limit: 3 services (may vary by plan)
- Position is automatically assigned (next available position)
Response
Indicates if the operation was successful
Success or error message
The created service object
Alias for the service object (legacy compatibility)
Update Service
Path Parameters
The ID of the tenant
The ID of the service to update
Request Body
All fields are the same as the Create Service endpoint. All fields are required when updating.Service name (max 100 characters)
Service description (max 500 characters)
Tabler icon name (max 50 characters)
Active status
Behavior
- When
icon_nameis provided, any existingimage_filenameis cleared (icon mode overrides image mode) - Service must belong to the specified tenant
- Tenant must have
activestatus
Response
Indicates if the operation was successful
Success or error message
The updated service object (same structure as Create response)
Alias for the service object (legacy compatibility)
Delete Service
Path Parameters
The ID of the tenant
The ID of the service to delete
Behavior
- Deletes the service image file (if exists)
- Removes the service record from the database
Response
Indicates if the operation was successful
Success or error message
Service Model
Database Schema
Services are stored in theservices table with the following attributes:
| Field | Type | Description |
|---|---|---|
id | integer | Primary key |
tenant_id | integer | Foreign key to tenants table |
name | string(100) | Service name |
description | string(500) | Service description (nullable) |
icon_name | string(50) | Tabler icon identifier (nullable) |
image_filename | string | Service image filename (nullable) |
overlay_text | string | Text overlay for images (nullable) |
cta_text | string | Call-to-action text (nullable) |
cta_link | string | Call-to-action URL (nullable) |
position | integer | Display order |
is_active | boolean | Visibility status |
created_at | timestamp | Creation date |
updated_at | timestamp | Last modification date |
Relationships
- Tenant: Each service belongs to one tenant (
tenant_idforeign key)
Plan Limits
Service limits are determined by the tenant’s subscription plan and blueprint configuration:- Default Limit: 3 services
- Blueprint-specific limits may override the default
- Limits are enforced at creation time
Icon vs Image Mode
Services support two visual representation modes:-
Icon Mode: Uses Tabler icons (
icon_namefield)- Lightweight and consistent
- Recommended for most use cases
- Example:
tabler--code,tabler--palette
-
Image Mode: Uses custom uploaded images (
image_filenamefield)- Supports custom visuals
- Can include overlay text and CTA buttons
- Icon mode takes precedence when both are set
icon_name, any existing image_filename is automatically cleared to prevent conflicts.
Image Management
Service images are managed through a separate upload endpoint:- Upload Image:
POST /tenant/{tenantId}/upload/service/{serviceId}
/storage/tenants/{tenantId}/ directory.
Common Icon Names
Here are some commonly used Tabler icon names for services:| Service Type | Icon Name |
|---|---|
| Development | tabler--code |
| Design | tabler--palette |
| Mobile Apps | tabler--device-mobile |
| Marketing | tabler--speakerphone |
| SEO | tabler--search |
| Analytics | tabler--chart-line |
| Support | tabler--headset |
| Security | tabler--shield-lock |
| Cloud | tabler--cloud |
| Database | tabler--database |
Error Codes
| HTTP Status | Description |
|---|---|
| 200 | Success |
| 422 | Validation error or business logic error |
| 401 | Unauthorized (not authenticated) |
| 403 | Forbidden (tenant inactive) |
| 404 | Service or tenant not found |
| 500 | Server error |