Skip to main content
POST
/
rate
/
register
curl -X POST https://api.demet.com/rate/register \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "v_name": "Tarifa Fines de Semana",
    "v_pax": 80,
    "v_value4": 250000,
    "v_value8": 400000,
    "v_value_extra": 60000,
    "v_isPartner": false,
    "v_idSpace": 2
  }'
{
  "message": "Registro Exitoso"
}
This endpoint allows you to register a new rate associated with a specific space. Authentication is required via JWT token in the access_token cookie.

Request Body

v_name
string
required
Name of the rate (e.g., “Weekend Rate”, “Weekday Rate”)
v_pax
number
required
Maximum capacity (number of people). Must be a positive integer.
v_value4
number
required
Price for 4-hour rental period. Must be a positive number.
v_value8
number
required
Price for 8-hour rental period. Must be a positive number.
v_value_extra
number
required
Price per additional hour beyond the standard periods. Must be a positive number.
v_isPartner
boolean
required
Whether this rate is for partner accounts
v_idSpace
number
required
ID of the space this rate belongs to. Must be a positive integer.

Response

message
string
Success message confirming the rate was registered
curl -X POST https://api.demet.com/rate/register \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "v_name": "Tarifa Fines de Semana",
    "v_pax": 80,
    "v_value4": 250000,
    "v_value8": 400000,
    "v_value_extra": 60000,
    "v_isPartner": false,
    "v_idSpace": 2
  }'
{
  "message": "Registro Exitoso"
}

Error Codes

Status CodeDescription
200Rate successfully registered
400Validation error in rate data
401Token not sent or invalid (missing or expired cookie)
404Associated space not found
500Internal server error

Build docs developers (and LLMs) love