Overview
The Core Projects API is a RESTful API built with Laravel that provides programmatic access to all construction management features. Use this API to manage projects, properties, sales, employees, and more.Base URL
/api. Replace your-domain.com with your actual application domain.
RESTful Conventions
The API follows standard REST principles:- GET - Retrieve resources
- POST - Create new resources
- PUT - Update existing resources (full update)
- PATCH - Partially update existing resources
- DELETE - Remove resources
Request Format
All requests should include the appropriate headers:Common Headers
Must be set to
application/json for all requests with a bodyMust be set to
application/json to receive JSON responsesBearer token obtained from authentication endpoint. Format:
Bearer {token}Response Format
All API responses are returned in JSON format with a consistent structure.Success Response
Indicates whether the request was successful
Contains the requested resource(s) or operation result
Optional message describing the operation result
Error Response
Always
false for error responsesObject containing field-specific validation errors
General error message
HTTP Status Codes
The API uses standard HTTP status codes:| Code | Description |
|---|---|
200 | OK - Request successful |
201 | Created - Resource created successfully |
204 | No Content - Request successful with no response body |
400 | Bad Request - Invalid request format |
401 | Unauthorized - Authentication required or failed |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
422 | Unprocessable Entity - Validation failed |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error occurred |
Error Handling
Validation Errors (422)
When validation fails, the API returns a422 status code with detailed field errors:
Authentication Errors (401)
Authorization Errors (403)
Resource Not Found (404)
Pagination
List endpoints support pagination for large datasets. Paginated responses include metadata:Pagination Parameters
Page number to retrieve
Number of items per page (max: 100)
Rate Limiting
The API implements rate limiting to ensure fair usage and system stability. Rate limits are applied per authenticated user.Rate limit details are included in response headers when applicable. Contact your administrator for specific rate limit configurations.
Rate Limit Headers
429 Too Many Requests response:
API Versioning
The current API version is included in the base URL path:/api
This API does not currently use explicit versioning in the URL. All endpoints are considered stable and backward-compatible changes will be made when possible.
Resource Relationships
Many resources include related data through Laravel’s eager loading. Related resources are nested within the response:Date and Time Format
All dates and timestamps use ISO 8601 format:- Date:
YYYY-MM-DD(e.g.,2024-03-15) - DateTime:
YYYY-MM-DD HH:mm:ss(e.g.,2024-03-15 14:30:00) - Timezone: All times are in UTC unless otherwise specified
Getting Started
- Authenticate to obtain an access token
- Include the token in the
Authorizationheader of all requests - Explore the available endpoints in the sidebar
- Review the response schemas and examples for each endpoint
Authentication
Learn how to authenticate and manage API tokens