Skip to main content
PUT
/
extra
/
update
curl -X PUT https://api.example.com/extra/update \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "v_id_extra": 3,
    "v_name": "Mesa Redonda",
    "v_value_add": 8000,
    "v_quantity": 20
  }'
{
  "message": "Update Exitoso"
}
This endpoint allows you to update the information of an existing extra item (such as chairs, tables, tablecloths, etc.). The user must be authenticated with a valid JWT token stored in the access_token cookie.

Request Body

v_id_extra
number
required
ID of the extra item to update. Must be a positive integer.Example: 3
v_name
string
required
New name for the extra itemExample: "Mesa Redonda" (Round Table)
v_value_add
number
required
New additional cost for the extra item. Must be a positive number.Example: 8000
v_quantity
number
required
New available quantity. Must be a positive integer.Example: 20

Response

message
string
Success message confirming the extra was updatedExample: "Update Exitoso"

Status Codes

200
Success
Extra updated successfully
400
Bad Request
Validation error in the submitted data
401
Unauthorized
Token not sent or invalid (cookie missing or expired)
404
Not Found
No extra exists with the provided ID
500
Internal Server Error
Internal server error
curl -X PUT https://api.example.com/extra/update \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "v_id_extra": 3,
    "v_name": "Mesa Redonda",
    "v_value_add": 8000,
    "v_quantity": 20
  }'
{
  "message": "Update Exitoso"
}

Build docs developers (and LLMs) love