Utilities and Helpers
Access helper endpoints for version checks, reference data, string formatting, quick search, and system configuration.
Auth required: None for most helper endpoints. See per-endpoint notes.
This document covers system utilities, helper endpoints, configuration readers, and miscellaneous API endpoints.
Version and Health
GET /version
Get API version and status information.
Auth required: No
Response 200:
{
"version": "1.0",
"status": "ok",
"vendor": "blue_rock_tel",
"url": "https://bluerocktel.com"
}
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/version" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/version"
)
version = response.json()
$response = Http::get('https://your-instance.bluerocktel.net/api/version');
$version = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/version",
{
headers: { "Accept": "application/json" }
}
);
const version = await response.json();
GET /services
Get external services configuration (BlueRockTEL, Hetzner, OVH Cloud, etc.).
Auth required: No
Response 200: JSON object with services grouped by provider.
POST /base_url
Get the API base URL for a given client origin. Used by frontend apps to resolve the correct API URL.
Auth required: No
Body: (implicit, uses HTTP_ORIGIN header)
Response 200: Object mapping origin to API base URL. Response 404: Origin not in config.
GET /health-report
Get an application health report.
Auth required: No
Response 200: Health status data.
Date / Timezone Helper
POST /v1/datetime
Test date/timezone conversion.
Auth required: No
Body: Date/timezone parameters.
Response 200: Converted datetime result.
String Helpers
GET/POST /v1/helpers/strings/amount
Format a number as a currency/amount string.
Auth required: No
Query/Body parameters:
| Parameter | Type | Description |
|---|---|---|
value |
numeric | Number to format |
| ... | Additional formatting options |
Response 200: Formatted amount string.
Examples:
curl -s -X POST "https://your-instance.bluerocktel.net/api/v1/helpers/strings/amount" \
-H "Content-Type: application/json" \
-d '{"value": 1234.56}'
import requests
response = requests.post(
"https://your-instance.bluerocktel.net/api/v1/helpers/strings/amount",
json={"value": 1234.56}
)
formatted = response.json()
$response = Http::post('https://your-instance.bluerocktel.net/api/v1/helpers/strings/amount', [
'value' => 1234.56,
]);
$formatted = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/helpers/strings/amount",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ value: 1234.56 })
}
);
const formatted = await response.json();
GET/POST /v1/helpers/strings/code
Generate or format a code string.
Auth required: No
Response 200: Generated/formatted code.
GET/POST /v1/helpers/strings/password
Generate a secure random password.
Auth required: No
Response 200: Generated password string.
Getter Endpoints (Reference Data)
These endpoints return read-only reference data for form selectors.
Auth required: Yes (auth:api)
| Endpoint | Description |
|---|---|
GET /v1/getters/civilities |
List available civility options (Mr, Mrs, etc.) |
GET /v1/getters/languages |
List available language codes |
GET /v1/getters/marital-statuses |
List marital status options |
GET /v1/getters/support-contracts-types |
List support contract type options |
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/getters/civilities" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/getters/civilities",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
civilities = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/getters/civilities');
$civilities = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/getters/civilities",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const civilities = await response.json();
Colors
GET /v1/colors
List available color options (for UI labeling).
Auth required: Yes (auth:api)
Response 200: Array of color objects.
Payment Methods
GET /v1/payment-methods
List all payment methods (seeded/read-only).
Auth required: Yes (auth:api)
Response 200: Array of payment method objects.
GET /v1/payment-methods/{id}
Get a single payment method by ID.
Auth required: Yes (auth:api)
Response 200: Payment method object. Response 404: Not found.
Modules
GET /v1/modules
List all installed/enabled application modules.
Auth required: No
Response 200: Array of module objects.
Languages
Base URL: /api/v1/languages
Auth required: Yes (auth:api)
Standard CRUD (resource routes, except delete)
| Method | Route | Description |
|---|---|---|
| GET | /v1/languages |
List all languages |
| POST | /v1/languages |
Create a new language |
| GET | /v1/languages/{id} |
Get a single language |
| PUT | /v1/languages/{id} |
Update a language |
Note: delete is excluded from the language resource.
Batches
Base URL: /api/v1/batches
Auth required: Yes (auth:api)
Billing batches group invoices together for processing.
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/batches |
List all batches |
| POST | /v1/batches |
Create a new batch |
| GET | /v1/batches/{id} |
Get a single batch |
| PUT | /v1/batches/{id} |
Update a batch |
| DELETE | /v1/batches/{id} |
Delete a batch |
Sheets
Base URL: /api/v1/sheets
Auth required: Yes (auth:api)
Sheets are technical data sheets attached to entities (customers, hosts, infrastructures).
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/sheets |
List all sheets |
| POST | /v1/sheets |
Create a sheet (sheetable_type must be App\Customer, App\Host, or App\Infrastructure) |
| GET | /v1/sheets/{id} |
Get a single sheet |
| PUT | /v1/sheets/{id} |
Update a sheet |
| DELETE | /v1/sheets/{id} |
Delete a sheet |
Click-to-Call
GET /v1/click-to-call/to
Get the target number for a click-to-call request.
Auth required: Yes (auth:api)
Response 200: Target call number.
GET /v1/click-to-call/enabled
Check if click-to-call is enabled for the authenticated user.
Auth required: Yes (auth:api)
Response 200: Enabled status.
Text Transformer
POST /v1/transformers/correct-text-spelling
Correct spelling in a text string (AI-powered).
Auth required: Yes (auth:api)
Body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Text to correct |
Response 200: Corrected text.
OVH Cloud
Auth required: Yes (auth:api)
GET /v1/ovh-cloud-projects
List all OVH Cloud projects.
Response 200: Array of OVH Cloud project objects.
GET /v1/ovh-cloud-projects/{project}
Get a single OVH Cloud project.
Response 200: Project object.
GET /v1/ovh-cloud-projects/{project}/instances
List instances (servers) in an OVH Cloud project.
Response 200: Array of instance objects.
GET /v1/ovh-cloud-projects/{project}/storages
List object storage containers in an OVH Cloud project.
Response 200: Array of storage objects.
GET /v1/ovh-cloud-projects/{project}/entity
Get the BlueRockTEL entity (customer/host) linked to an OVH Cloud project.
Response 200: Entity object.
Quick Search
GET /v1/get_quick
Perform a quick global search across customers, contacts, etc.
Auth required: Yes (auth:api)
Query parameters:
| Parameter | Type | Description |
|---|---|---|
term |
string | Search term |
Response 200: Grouped search results.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/get_quick?term=acme" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/get_quick",
params={"term": "acme"},
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
results = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/get_quick', [
'term' => 'acme',
]);
$results = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/get_quick?term=acme",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const results = await response.json();
Autocomplete (Customer)
GET /customer
Get the current customer context for the authenticated session (used in web integrations).
Auth required: Yes (auth:api)
Response 200: Customer data.
Customer Support Survey
POST /store_customer_support_survey_record
Store a customer support survey response.
Auth required: Yes (auth:api)
Body (JSON): Survey response fields.
Response 200/201: Created survey record.
Admin: Invoice Units
POST /v1/invoice-units
Admin utility to look up invoice unit data. Primarily for the BlueRockTEL internal team.
Auth required: Yes (auth:api)
Response 200: Invoice unit data.
SFTP Accounts
Auth required: Yes (auth:api)
GET /v1/sftp_accounts
List all SFTP accounts.
Response 200: Array of SFTP account objects.
GET /v1/sftp_accounts/available
List available (unassigned) SFTP accounts.
Response 200: Array of available SFTP account objects.
PUT /v1/sftp_accounts/{sftp_account}
Update an SFTP account.
Response 201: Updated SFTP account.
Mail Filters
Base URL: /api/v1/mail_filters
Auth required: Yes (auth:api)
Incoming email filter rules.
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/mail_filters |
List all mail filters |
| POST | /v1/mail_filters |
Create a mail filter |
| GET | /v1/mail_filters/{id} |
Get a single mail filter |
| PUT | /v1/mail_filters/{id} |
Update a mail filter |
| DELETE | /v1/mail_filters/{id} |
Delete a mail filter |
Mail Filter Conditions
Base URL: /api/v1/mail_filter_conditions
Auth required: Yes (auth:api)
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/mail_filter_conditions |
List all conditions |
| POST | /v1/mail_filter_conditions |
Create a condition |
| GET | /v1/mail_filter_conditions/{id} |
Get a single condition |
| PUT | /v1/mail_filter_conditions/{id} |
Update a condition |
| DELETE | /v1/mail_filter_conditions/{id} |
Delete a condition |
Customer Concerns
GET /v1/customer_concerns/search
Search customer concerns.
Auth required: Yes (auth:api)
Query parameters:
| Parameter | Type | Description |
|---|---|---|
term |
string | Search term |
Response 200: Array of matching concern objects.
POST /v1/customer_concerns
Create a new customer concern.
Auth required: Yes (auth:api)
Body (JSON): Concern fields.
Response 201: Created concern.
TinyDrive (TinyMCE)
POST /tiny-drive
Get a TinyMCE TinyDrive authentication token for the rich text editor.
Auth required: No (but typically called from authenticated context)
Response 200: Token object.
Pictures
POST /v1/pictures
Upload a picture/image.
Auth required: Yes (auth:api)
Body (multipart/form-data): Image file.
Response 201: Stored picture URL/object.
Bill Count
GET /count
Get a count of bills (internal use, likely for billing service health checks).
Auth required: No
Response 200: Count value.
On this page