API Referenceapipatient-graphPOST /v1/patients/{patient_id}/providers

POST /v1/patients/\{patient_id\}/providers

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • patient_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "provider_id": {
      "type": "string",
      "format": "uuid"
    },
    "relationship": {
      "type": "string",
      "enum": [
        "primary",
        "specialist",
        "pharmacy",
        "lab"
      ],
      "default": "primary"
    }
  },
  "required": [
    "provider_id"
  ]
}

Responses

200 Provider linked

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "patient_id": {
      "type": "string"
    },
    "provider_id": {
      "type": "string"
    },
    "relationship": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "started_at": {
      "type": "string"
    },
    "ended_at": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "patient_id",
    "provider_id",
    "relationship",
    "status",
    "started_at",
    "ended_at"
  ]
}

404 Patient or provider not found

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

Example

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