Laravel
Global API (Laravel)
Global API (Laravel)
All responses use:
{
"status": "success",
"message": "Human readable message",
"data": { "..." : "payload" }
}
Scenario (example flow)
- Call Info to show status on your dashboard.
- Use Countries to populate a checkout form.
- Use Projects to show public projects.
1) Info
Endpoint: GET /api/info
Auth: none
Expected response (shortened)
{
"status": "success",
"message": "The kingdom of XWMS stands tall ...",
"data": {
"application": {
"name": "XWMS",
"version": "v.2",
"time": "2026-01-12T12:00:00Z"
},
"api": {
"documentation": "https://docs.xwms.nl/"
}
}
}
Helper
$info = XwmsApiHelper::info();
2) Countries
Endpoint: POST /api/global/countries
Auth: client credentials
Expected response (shortened)
{
"status": "success",
"message": "Countries retrieved successfully.",
"data": {
"countries": [
{
"id": 1,
"short_name": "NL",
"name": "Netherlands",
"phonecode": "+31",
"is_eu_member": true,
"capital": "Amsterdam",
"iso_alpha3": "NLD",
"region": "Europe",
"timezone": "Europe/Amsterdam",
"currency_code": "EUR"
}
]
}
}
Helper
$countries = XwmsApiHelper::getCountries();
3) Projects
Endpoint: GET /api/global/projects
Auth: none
Expected response (shortened)
{
"status": "success",
"message": "Projects retrieved successfully.",
"data": {
"projects": [
{
"id": 10,
"title": "Project Name",
"description": "Short description",
"image": "https://...",
"link": "https://...",
"is_new": true,
"direct_redirect": false,
"published_at": "2026-01-01T12:00:00Z",
"categories": [
{ "id": 2, "name": "Automation" }
]
}
]
}
}
Helper
$projects = XwmsApiHelper::getProjects();
