Skip to main content
Create patient
curl --request POST \
  --url https://{tenantId}.api.nestmed.com/api/v1/patients \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agencyId": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "dateOfBirth": "2023-12-25",
  "medicalRecordNumber": "<string>",
  "gender": "<string>",
  "address": {
    "street": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zipCode": "<string>",
    "apartment": "<string>"
  },
  "phoneNumbers": {
    "primary": "<string>",
    "secondary": "<string>"
  },
  "emergencyContact": {
    "name": "<string>",
    "relationship": "<string>",
    "phone": "<string>"
  }
}
'
{
  "patientId": "<string>",
  "agencyId": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "dateOfBirth": "2023-12-25",
  "gender": "male",
  "medicalRecordNumber": "<string>",
  "status": "active",
  "address": {
    "street": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zipCode": "<string>",
    "apartment": "<string>"
  },
  "phoneNumbers": {
    "primary": "<string>",
    "secondary": "<string>"
  },
  "emergencyContact": {
    "name": "<string>",
    "relationship": "<string>",
    "phone": "<string>"
  },
  "insuranceInfo": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string<uuid>

A unique key (e.g., UUID) to ensure a POST request is processed only once. If a request with the same key is received again within 24 hours, the original response will be returned without creating a new resource.

Body

application/json
agencyId
string
required
firstName
string
required
lastName
string
required
dateOfBirth
string<date>
required
medicalRecordNumber
string
required
gender
string
address
object
phoneNumbers
object
emergencyContact
object

Response

Patient created successfully.

patientId
string
agencyId
string
firstName
string
lastName
string
dateOfBirth
string<date>
gender
enum<string>
Available options:
male,
female,
other,
unknown
medicalRecordNumber
string
status
enum<string>
Available options:
active,
inactive,
deceased
address
object
phoneNumbers
object
emergencyContact
object
insuranceInfo
object
createdAt
string<date-time>
updatedAt
string<date-time>