POST /v1/patients

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "first_name": {
      "type": "string",
      "minLength": 1
    },
    "last_name": {
      "type": "string",
      "minLength": 1
    },
    "date_of_birth": {
      "type": "string",
      "format": "date"
    },
    "gender": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "phone": {
      "type": "string"
    },
    "external_ids": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "default": {}
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "default": {}
    }
  },
  "required": [
    "brand_id",
    "first_name",
    "last_name"
  ]
}

Responses

201 Patient created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "first_name": {
      "type": "string"
    },
    "last_name": {
      "type": "string"
    },
    "date_of_birth": {
      "type": [
        "string",
        "null"
      ]
    },
    "gender": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "external_ids": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "status": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {}
    },
    "age_verified_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "ruo_pathway_acknowledged_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "researcher_acknowledgement_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "prescription_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "prescription_consult_completed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "brand_id",
    "first_name",
    "last_name",
    "date_of_birth",
    "gender",
    "email",
    "phone",
    "external_ids",
    "status",
    "metadata",
    "created_at",
    "updated_at"
  ]
}

409 Duplicate patient

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Internal error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://patient-graph.platform.loop.health/v1/patients \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'