Skip to main content
POST
/
space
/
register
Create Space
curl --request POST \
  --url https://api.example.com/space/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "v_name": "<string>",
  "v_descrip": "<string>",
  "v_isPartner": true,
  "v_pax": 123,
  "v_value4": 123,
  "v_value8": 123,
  "v_value_extra": 123,
  "v_url_img": [
    {}
  ]
}
'
{
  "400": {},
  "401": {},
  "500": {},
  "message": "<string>"
}

Authentication

This endpoint requires authentication. The JWT token must be provided in the access_token cookie.

Request Body

v_name
string
required
Name of the spaceExample: "Salón Principal"
v_descrip
string
required
Description of the space including features and amenitiesExample: "Espacio amplio con sonido y sillas incluidas"
v_isPartner
boolean
required
Indicates if the space belongs to a partnerExample: true
v_pax
number
required
Maximum capacity (number of people)Example: 80
v_value4
number
required
Price for 4-hour rental periodExample: 250000
v_value8
number
required
Price for 8-hour rental periodExample: 400000
v_value_extra
number
required
Price for each additional hour beyond 8 hoursExample: 60000
v_url_img
array
required
Array of image URLs for the space (minimum 1 image required)Example: ["https://midominio.com/imagenes/salon1.jpg", "https://midominio.com/imagenes/salon2.jpg"]

Response

message
string
Success message confirming space registrationExample: "Registro Exitoso"

Example Request

curl -X POST https://api.demet.com/space/register \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "v_name": "Salón Principal",
    "v_descrip": "Espacio amplio con sonido y sillas incluidas",
    "v_isPartner": true,
    "v_pax": 80,
    "v_value4": 250000,
    "v_value8": 400000,
    "v_value_extra": 60000,
    "v_url_img": [
      "https://midominio.com/imagenes/salon1.jpg",
      "https://midominio.com/imagenes/salon2.jpg"
    ]
  }'

Example Response

{
  "message": "Registro Exitoso"
}

Error Responses

400
error
Validation error in the submitted data. Check that all required fields are provided and valid.
401
error
Authentication error. Token not sent, invalid, or expired.
500
error
Internal server error.

Build docs developers (and LLMs) love