Crear paciente
curl --request POST \
--url https://api.linahealthcareplatform.com/api/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"dateOfBirth": "2023-12-25",
"tags": [
"<string>"
],
"metadata": {}
}
'import requests
url = "https://api.linahealthcareplatform.com/api/v1/patients"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"dateOfBirth": "2023-12-25",
"tags": ["<string>"],
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
dateOfBirth: '2023-12-25',
tags: ['<string>'],
metadata: {}
})
};
fetch('https://api.linahealthcareplatform.com/api/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linahealthcareplatform.com/api/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'dateOfBirth' => '2023-12-25',
'tags' => [
'<string>'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linahealthcareplatform.com/api/v1/patients"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linahealthcareplatform.com/api/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "pat_xyz789",
"firstName": "María",
"lastName": "García",
"email": "maria.garcia@email.com",
"phone": "+34612345678",
"dateOfBirth": "1985-03-15",
"status": "active",
"tags": ["traumatología", "post-operatorio"],
"metadata": { "insuranceId": "INS-12345" },
"createdAt": "2026-05-14T10:00:00Z",
"updatedAt": "2026-05-14T10:00:00Z"
}
Pacientes
Crear paciente
Registra un nuevo paciente en la plataforma.
POST
/
patients
Crear paciente
curl --request POST \
--url https://api.linahealthcareplatform.com/api/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"dateOfBirth": "2023-12-25",
"tags": [
"<string>"
],
"metadata": {}
}
'import requests
url = "https://api.linahealthcareplatform.com/api/v1/patients"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"dateOfBirth": "2023-12-25",
"tags": ["<string>"],
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
dateOfBirth: '2023-12-25',
tags: ['<string>'],
metadata: {}
})
};
fetch('https://api.linahealthcareplatform.com/api/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linahealthcareplatform.com/api/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'dateOfBirth' => '2023-12-25',
'tags' => [
'<string>'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linahealthcareplatform.com/api/v1/patients"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linahealthcareplatform.com/api/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"dateOfBirth\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "pat_xyz789",
"firstName": "María",
"lastName": "García",
"email": "maria.garcia@email.com",
"phone": "+34612345678",
"dateOfBirth": "1985-03-15",
"status": "active",
"tags": ["traumatología", "post-operatorio"],
"metadata": { "insuranceId": "INS-12345" },
"createdAt": "2026-05-14T10:00:00Z",
"updatedAt": "2026-05-14T10:00:00Z"
}
Body
Nombre del paciente.
Apellido(s) del paciente.
Dirección de correo electrónico. Debe ser única.
Número de teléfono en formato internacional (ej.
+34612345678).Fecha de nacimiento en formato
YYYY-MM-DD.Etiquetas para categorizar al paciente (ej.
["traumatología", "post-operatorio"]).Objeto de clave-valor para almacenar datos personalizados (ej. ID de seguro, número de historia clínica).
{
"id": "pat_xyz789",
"firstName": "María",
"lastName": "García",
"email": "maria.garcia@email.com",
"phone": "+34612345678",
"dateOfBirth": "1985-03-15",
"status": "active",
"tags": ["traumatología", "post-operatorio"],
"metadata": { "insuranceId": "INS-12345" },
"createdAt": "2026-05-14T10:00:00Z",
"updatedAt": "2026-05-14T10:00:00Z"
}
Identificador único del paciente con prefijo
pat_.Estado del paciente. Los nuevos pacientes se crean como
active.Fecha de creación en formato ISO 8601.
Authorizations
Token JWT obtenido via POST /auth/token
Body
application/json
⌘I

