Overview
- Category
- Travel & Auto
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/per-diem-calculator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/per-diem-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
travel_days· number · required- Enter travel days.
lodging_rate· number · required- Enter nightly lodging rate.
meals_rate· number · required- Enter daily meals and incidentals.
first_last_day_rate· number · required- Enter first and last day meal share.
lodging_nights· number · required- Enter lodging nights.
{
"type": "object",
"properties": {
"travel_days": {
"type": "number",
"description": "Enter travel days."
},
"lodging_rate": {
"type": "number",
"description": "Enter nightly lodging rate."
},
"meals_rate": {
"type": "number",
"description": "Enter daily meals and incidentals."
},
"first_last_day_rate": {
"type": "number",
"description": "Enter first and last day meal share."
},
"lodging_nights": {
"type": "number",
"description": "Enter lodging nights."
}
},
"required": [
"travel_days",
"lodging_rate",
"meals_rate",
"first_last_day_rate",
"lodging_nights"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
total_per_diem· number- Total per diem produced by the tool.
lodging_total· number- Lodging total produced by the tool.
meals_total· number- Meals and incidentals produced by the tool.
daily_breakdown· array- Daily breakdown produced by the tool.
{
"type": "object",
"properties": {
"total_per_diem": {
"type": "number",
"description": "Total per diem produced by the tool."
},
"lodging_total": {
"type": "number",
"description": "Lodging total produced by the tool."
},
"meals_total": {
"type": "number",
"description": "Meals and incidentals produced by the tool."
},
"daily_breakdown": {
"type": "array",
"description": "Daily breakdown produced by the tool."
}
},
"additionalProperties": false
}
Per Diem Calculator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/per-diem-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"travel_days": 5,
"lodging_rate": 180,
"meals_rate": 74,
"first_last_day_rate": 75,
"lodging_nights": 4
}'
{
"ok": true,
"data": {
"slug": "per-diem-calculator",
"result": {
"values": {
"total_per_diem": 1053,
"lodging_total": 720,
"meals_total": 333,
"daily_breakdown": [
{
"day": 1,
"lodging": 180,
"meals": 55.5
},
{
"day": 2,
"lodging": 180,
"meals": 74
},
{
"day": 3,
"lodging": 180,
"meals": 74
},
{
"day": 4,
"lodging": 180,
"meals": 74
},
{
"day": 5,
"lodging": 0,
"meals": 55.5
}
]
},
"display": {
"display": "1053"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.