API ReferenceapiclinicalPATCH /v1/vials/{id}/discard

PATCH /v1/vials/\{id\}/discard

Service: clinical · operationId: (none)

Discard an active vial

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Responses

200 Discarded vial record

{
  "type": "object",
  "properties": {
    "vial_id": {
      "type": "string",
      "format": "uuid"
    },
    "user_id": {
      "type": "string"
    },
    "peptide_id": {
      "type": "string"
    },
    "reconstituted_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "discarded_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "current_volume_ml": {
      "type": "number",
      "minimum": 0
    }
  },
  "required": [
    "vial_id",
    "user_id",
    "peptide_id",
    "reconstituted_at",
    "expires_at",
    "discarded_at",
    "current_volume_ml"
  ]
}

403 Forbidden

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

404 Not found

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

500 Internal server error

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

Example

curl -X PATCH https://clinical.platform.loop.health/v1/vials/{id}/discard \
  -H "Authorization: Bearer $ACCESS_TOKEN"