Skip to main content
REST API v1

API documentation

REST API + webhooks. Everything you need to wire your systems into MiEspacio in a day.

Getting Started

Base URL

All API requests are made to the following base URL:

/api//v1

Public endpoints can be accessed without authentication. Authenticated endpoints require a Bearer token obtained through the login endpoint.

Endpoints

Public Endpoints

These endpoints are available without authentication.

MethodURLDescriptionAuth
GET/companiesList companiesNo
GET/companies/{slug}Company detailsNo
GET/companies/{slug}/servicesCompany servicesNo
GET/companies/{slug}/reviewsCompany reviewsNo
GET/companies/{uuid}/booking/availabilityBooking availabilityNo
POST/companies/{uuid}/bookingsCreate bookingNo
GET/restaurantsList restaurantsNo
GET/eventsList eventsNo
GET/vacanciesList jobsNo
GET/blog/postsBlog postsNo
GET/business-typesBusiness typesNo
GET/platform-statsPlatform statisticsNo

Authentication Endpoints

Used for obtaining and managing access tokens.

MethodURLDescriptionAuth
POST/auth/loginLoginNo
POST/auth/registerRegisterNo
POST/auth/refreshRefresh tokenYes
GET/auth/meCurrent userYes

Authentication

MiEspacio uses Bearer token authentication powered by Laravel Sanctum. To access authenticated endpoints:

  1. Send a POST request to /auth/login with your credentials.
  2. Include the returned token in the Authorization header of subsequent requests.
  3. Refresh the token before it expires using the refresh endpoint.

Example header:

Authorization: Bearer your-token-here

Rate Limits

API requests are rate-limited per IP address to ensure fair usage.

ScopeLimit
Public endpoints2,000 req/min
Booking endpoints300 req/min
Auth endpoints25 req/min

When the limit is exceeded, you will receive a 429 Too Many Requests response. The Retry-After header indicates how many seconds to wait.

Response Format

All responses are returned in JSON format. Successful responses typically follow this structure:

{
  "data": [
    {
      "id": 1,
      "name": "La Maison Barcelona",
      "slug": "la-maison-barcelona"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 4,
    "per_page": 20,
    "total": 78
  }
}

Paginated responses include standard Laravel pagination metadata (current_page, last_page, per_page, total).

Error Codes

The API uses standard HTTP status codes to indicate the outcome of a request.

CodeMeaning
200OK — Request succeeded
201Created — Resource created successfully
400Bad Request — Invalid request parameters
401Unauthorized — Missing or invalid authentication
403Forbidden — Insufficient permissions
404Not Found — Resource does not exist
422Unprocessable Entity — Validation errors
429Too Many Requests — Rate limit exceeded
500Internal Server Error — Something went wrong on our end

Error responses include a message and, where applicable, a structured error code:

{
  "message": "The selected time slot is no longer available.",
  "errors": {
    "slot": [
      "Please choose another available time."
    ]
  }
}

Need an API key?

Contact our team to request API access for your application.

Contact Us