Skip to main content
PUT
/
date_variables
/
{date_variable_id}
cURL
curl --request PUT \
  --url https://backend.claros.health/date_variables/{date_variable_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "id": 123,
  "name": "<string>",
  "description": "<string>",
  "patient_values_count": 123
}
This endpoint requires authentication. Include your API key in the request headers as X-API-Key.

Description

Updates an existing date variable’s properties. You can modify the name and description of a date variable.

Path Parameters

date_variable_id
integer
required
The ID of the date variable to update

Request Body

name
string
The new name of the date variable. If not provided, the existing name will be kept.
description
string
The new description of what the date variable represents. If not provided, the existing description will be kept.
All fields in the request body are optional. Only the fields you want to update need to be included. Any fields not included in the request will retain their existing values.

Example Request

{
  "name": "Last Visit (Updated)",
  "description": "Updated description for last visit date"
}

Example Response

{
  "id": 1,
  "name": "Last Visit (Updated)",
  "description": "Updated description for last visit date",
  "patient_values_count": 150
}

Error Responses

400
object
Invalid request data. The response will include an error message explaining what went wrong.
401
object
Authentication required. Make sure you’ve included a valid API key in the request headers.
404
object
Date variable not found. The specified date variable ID does not exist.

Authorizations

X-API-Key
string
header
required

Path Parameters

date_variable_id
integer
required

ID of the date variable to update

Body

application/json
name
string

Name of the date variable

description
string

Description of the date variable

Response

Date variable updated successfully

id
integer

The unique identifier of the date variable

name
string

The name of the date variable

description
string

A description of what the date variable represents

patient_values_count
integer

The number of patients that have values for this date variable