API Referenceapipatient-graphPOST /v1/adherence/doses

POST /v1/adherence/doses

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "peptide_id": {
      "type": "string",
      "minLength": 1
    },
    "protocol_id": {
      "type": "string",
      "minLength": 1
    },
    "protocol_compound_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "taken",
        "skipped",
        "scheduled"
      ]
    },
    "skip_reason": {
      "type": "string",
      "enum": [
        "vacation",
        "sick",
        "forgot",
        "side_effect",
        "other"
      ]
    },
    "skip_reason_note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "scheduled_at": {
      "type": "string",
      "format": "date-time"
    },
    "logged_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "peptide_id",
    "protocol_id",
    "status",
    "scheduled_at"
  ]
}

Responses

201 Dose logged

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "patient_id": {
      "type": "string"
    },
    "peptide_id": {
      "type": "string"
    },
    "protocol_id": {
      "type": "string"
    },
    "protocol_compound_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "taken",
        "skipped",
        "scheduled"
      ]
    },
    "skip_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "scheduled_at": {
      "type": "string",
      "format": "date-time"
    },
    "logged_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "patient_id",
    "peptide_id",
    "protocol_id",
    "protocol_compound_id",
    "status",
    "skip_reason",
    "scheduled_at",
    "logged_at"
  ]
}

401 Unauthorized

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

404 Patient not found

{
  "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/adherence/doses \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'