This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Creates or updates a date variable value for a specific patient. This endpoint can be used to both create new patient date variable values and update existing ones.
Path Parameters
The ID of the date variable to update
Request Body
The date value in ISO 8601 format (YYYY-MM-DD)
An optional note about the date value. If not provided, any existing note will be kept.
The page number in the patient’s PDF where this date was found. If not provided, any existing page number will be kept.
The coordinates of the highlight in the PDF. If provided, all coordinate fields (x1, y1, x2, y2) should be included. If not provided, any existing highlight coordinates will be kept. The x-coordinate of the top-left corner of the highlight
The y-coordinate of the top-left corner of the highlight
The x-coordinate of the bottom-right corner of the highlight
The y-coordinate of the bottom-right corner of the highlight
Only the value field is required. All other fields are optional and will retain their existing values if not provided. When updating highlight coordinates, you must provide all four coordinates (x1, y1, x2, y2) as a complete object.
Example Request
{
"value" : "2024-03-15" ,
"note" : "Scheduled during morning checkup" ,
"pdf_page" : 2 ,
"highlight" : {
"x1" : 100 ,
"y1" : 200 ,
"x2" : 300 ,
"y2" : 250
}
}
Example Response
{
"id" : 1 ,
"name" : "Next Appointment" ,
"value" : "2024-03-15" ,
"note" : "Scheduled during morning checkup" ,
"pdf_page" : 2 ,
"highlight" : {
"x1" : 100 ,
"y1" : 200 ,
"x2" : 300 ,
"y2" : 250
}
}
Error Responses
Invalid request data. The response will include an error message explaining what went wrong.
Authentication required. Make sure you’ve included a valid API key in the request headers.
Patient or date variable not found. The specified patient ID or date variable ID does not exist.
Date value in ISO 8601 format (YYYY-MM-DD)
Optional note about the date value
Page number in the patient's PDF where this date was found
X-coordinate of the top-left corner
Y-coordinate of the top-left corner
X-coordinate of the bottom-right corner
Y-coordinate of the bottom-right corner
Patient date variable updated successfully
The unique identifier of the patient date variable
The ID of the date variable
The name of the date variable
The date value in ISO 8601 format (YYYY-MM-DD)
Any additional notes about the date value
The page number in the patient's PDF where this date was found
X-coordinate of the top-left corner
Y-coordinate of the top-left corner
X-coordinate of the bottom-right corner
Y-coordinate of the bottom-right corner