Skip to main content

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

curl -X POST https://app.synticorex.test/tenant/123/services \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Web Development",
    "description": "Custom web development solutions tailored to your needs",
    "icon_name": "tabler--code",
    "is_active": true
  }'
Creates a new service for the specified tenant.

Path Parameters

tenantId
integer
required
The ID of the tenant

Request Body

name
string
required
Service name (max 100 characters)
description
string
Service description (max 500 characters)
icon_name
string
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_filename
is_active
boolean
default:true
Whether the service is active and visible

Validation Rules

  • The tenant must have active status
  • Blueprint-aware limits apply based on tenant plan
  • Default limit: 3 services (may vary by plan)
  • Position is automatically assigned (next available position)

Response

success
boolean
Indicates if the operation was successful
message
string
Success or error message
service
object
The created service object
data
object
Alias for the service object (legacy compatibility)
{
  "success": true,
  "message": "Servicio creado",
  "service": {
    "id": 789,
    "tenant_id": 123,
    "name": "Web Development",
    "description": "Custom web development solutions tailored to your needs",
    "icon_name": "tabler--code",
    "image_filename": null,
    "overlay_text": null,
    "cta_text": null,
    "cta_link": null,
    "position": 2,
    "is_active": true,
    "created_at": "2026-03-08T10:30:00.000000Z",
    "updated_at": "2026-03-08T10:30:00.000000Z"
  },
  "data": {
    "id": 789,
    "tenant_id": 123,
    "name": "Web Development",
    "description": "Custom web development solutions tailored to your needs",
    "icon_name": "tabler--code",
    "image_filename": null,
    "overlay_text": null,
    "cta_text": null,
    "cta_link": null,
    "position": 2,
    "is_active": true,
    "created_at": "2026-03-08T10:30:00.000000Z",
    "updated_at": "2026-03-08T10:30:00.000000Z"
  }
}

Update Service

curl -X PUT https://app.synticorex.test/tenant/123/services/789 \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Full-Stack Web Development",
    "description": "End-to-end web solutions with modern technologies",
    "icon_name": "tabler--code-plus",
    "is_active": true
  }'
Updates an existing service.

Path Parameters

tenantId
integer
required
The ID of the tenant
serviceId
integer
required
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.
name
string
required
Service name (max 100 characters)
description
string
Service description (max 500 characters)
icon_name
string
Tabler icon name (max 50 characters)
is_active
boolean
Active status

Behavior

  • When icon_name is provided, any existing image_filename is cleared (icon mode overrides image mode)
  • Service must belong to the specified tenant
  • Tenant must have active status

Response

success
boolean
Indicates if the operation was successful
message
string
Success or error message
service
object
The updated service object (same structure as Create response)
data
object
Alias for the service object (legacy compatibility)
{
  "success": true,
  "message": "Servicio actualizado",
  "service": {
    "id": 789,
    "tenant_id": 123,
    "name": "Full-Stack Web Development",
    "description": "End-to-end web solutions with modern technologies",
    "icon_name": "tabler--code-plus",
    "image_filename": null,
    "overlay_text": null,
    "cta_text": null,
    "cta_link": null,
    "position": 2,
    "is_active": true,
    "created_at": "2026-03-08T10:30:00.000000Z",
    "updated_at": "2026-03-08T11:45:00.000000Z"
  },
  "data": {
    "id": 789,
    "tenant_id": 123,
    "name": "Full-Stack Web Development",
    "description": "End-to-end web solutions with modern technologies",
    "icon_name": "tabler--code-plus",
    "image_filename": null,
    "overlay_text": null,
    "cta_text": null,
    "cta_link": null,
    "position": 2,
    "is_active": true,
    "created_at": "2026-03-08T10:30:00.000000Z",
    "updated_at": "2026-03-08T11:45:00.000000Z"
  }
}

Delete Service

curl -X DELETE https://app.synticorex.test/tenant/123/services/789
Deletes a service and its associated image.

Path Parameters

tenantId
integer
required
The ID of the tenant
serviceId
integer
required
The ID of the service to delete

Behavior

  • Deletes the service image file (if exists)
  • Removes the service record from the database

Response

success
boolean
Indicates if the operation was successful
message
string
Success or error message
{
  "success": true,
  "message": "Servicio eliminado"
}

Service Model

Database Schema

Services are stored in the services table with the following attributes:
FieldTypeDescription
idintegerPrimary key
tenant_idintegerForeign key to tenants table
namestring(100)Service name
descriptionstring(500)Service description (nullable)
icon_namestring(50)Tabler icon identifier (nullable)
image_filenamestringService image filename (nullable)
overlay_textstringText overlay for images (nullable)
cta_textstringCall-to-action text (nullable)
cta_linkstringCall-to-action URL (nullable)
positionintegerDisplay order
is_activebooleanVisibility status
created_attimestampCreation date
updated_attimestampLast modification date

Relationships

  • Tenant: Each service belongs to one tenant (tenant_id foreign 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:
  1. Icon Mode: Uses Tabler icons (icon_name field)
    • Lightweight and consistent
    • Recommended for most use cases
    • Example: tabler--code, tabler--palette
  2. Image Mode: Uses custom uploaded images (image_filename field)
    • Supports custom visuals
    • Can include overlay text and CTA buttons
    • Icon mode takes precedence when both are set
When updating a service with 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}
Images are stored in /storage/tenants/{tenantId}/ directory.

Common Icon Names

Here are some commonly used Tabler icon names for services:
Service TypeIcon Name
Developmenttabler--code
Designtabler--palette
Mobile Appstabler--device-mobile
Marketingtabler--speakerphone
SEOtabler--search
Analyticstabler--chart-line
Supporttabler--headset
Securitytabler--shield-lock
Cloudtabler--cloud
Databasetabler--database
For a complete list, refer to Tabler Icons.

Error Codes

HTTP StatusDescription
200Success
422Validation error or business logic error
401Unauthorized (not authenticated)
403Forbidden (tenant inactive)
404Service or tenant not found
500Server error

Build docs developers (and LLMs) love