Skip to main content
POST
/
request
/
price
curl -X POST https://api.example.com/request/price \
  -H "Content-Type: application/json" \
  -d '{
    "v_init_date": "2025-01-10T10:00:00.000Z",
    "v_end_date": "2025-01-10T18:00:00.000Z",
    "v_fk_rate": 2
  }'
{
  "result": 450000
}
Calculates the estimated value of a reservation based on the duration (hours between start and end date) and the selected rate. Internally calls the SQL function calculate_value which determines the price according to time slots, base values, and extra hours.

Request Body

v_init_date
string
required
Event start date and time (ISO 8601 format)Example: "2025-01-10T10:00:00.000Z"
v_end_date
string
required
Event end date and time (ISO 8601 format). Must be after v_init_date.Example: "2025-01-10T18:00:00.000Z"
v_fk_rate
integer
required
Rate ID used to calculate the value (minimum 1)Example: 2

Response

result
number
Calculated value based on duration and rateExample: 450000
curl -X POST https://api.example.com/request/price \
  -H "Content-Type: application/json" \
  -d '{
    "v_init_date": "2025-01-10T10:00:00.000Z",
    "v_end_date": "2025-01-10T18:00:00.000Z",
    "v_fk_rate": 2
  }'
{
  "result": 450000
}

Notes

  • The endpoint does not require authentication
  • The end date must be after the start date, otherwise validation will fail
  • The price calculation is based on the rate configuration and duration in hours
  • Useful for providing clients with instant price quotes before submitting a request

Build docs developers (and LLMs) love