The Prueba Soporte API is a server-side HTTP API built with Laravel 11. It is consumed internally by the Vue.js frontend via Axios and is not intended as a public API. All endpoints share the same origin as the web application.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/estebansalas94/Prueba-Soporte/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All endpoints are relative to the application root. There is no/api prefix.
Authentication
Every endpoint is protected by Laravel’sauth middleware. Requests must originate from an authenticated session.
For AJAX requests made by the Vue.js frontend, CSRF protection is enforced. Include the CSRF token on every mutating request (POST, PUT, DELETE) using one of the following methods:
- Header:
X-XSRF-TOKEN: <token>(Axios reads and sends this automatically from theXSRF-TOKENcookie) - Form field:
_token=<token>
Axios, as configured by Laravel’s default scaffold, automatically attaches the
X-XSRF-TOKEN header by reading the XSRF-TOKEN cookie. No manual configuration is required in the frontend.302 response.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /tasks/index | List all incomplete tasks |
POST | /tasks | Create a new task |
PUT | /tasks/{id}/complete | Mark a task as completed |
DELETE | /tasks/{id} | Permanently delete a task |
JSON response format
Endpoints that return data respond withContent-Type: application/json. The structure varies per endpoint:
- List: A bare JSON array of task objects.
- Complete: A JSON object with a
messagestring and ataskobject. - Delete: A JSON object with a
messagestring. - Create: A redirect response (
302), not JSON. The frontend handles this by callingfetchTasksafter submission.
Error responses
404 Not found
Returned when a task with the givenid does not exist.
422 Validation error
Returned when request input fails Laravel’s validation rules. The response body follows Laravel’s standard validation error shape:Frontend integration
The Vue.js frontend uses a Vuex store (resources/js/store.js) to manage task state. Each store action maps directly to one API endpoint and uses Axios for the HTTP call. The store is the single source of truth for task data in the UI.