API ReferenceapiclinicalGET /v1/user-stacks

GET /v1/user-stacks

Service: clinical · operationId: (none)

List the current user’s stacks

Required scopes

(no scope declared — review service config)

Responses

200 User stacks

{
  "type": "object",
  "properties": {
    "stacks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cycle_pattern": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "onWeeks": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "offWeeks": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "onWeeks",
              "offWeeks"
            ]
          },
          "duration_weeks": {
            "type": [
              "number",
              "null"
            ]
          },
          "source_stack_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "peptides": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "peptide_id": {
                  "type": "string"
                },
                "peptide_name": {
                  "type": "string"
                },
                "dosing": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "doseMcg": {
                      "type": "number"
                    },
                    "frequencyPerWeek": {
                      "type": "number"
                    },
                    "route": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "doseMcg",
                    "frequencyPerWeek",
                    "route"
                  ]
                },
                "sort_order": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "peptide_id",
                "peptide_name",
                "sort_order"
              ]
            }
          },
          "share_token": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "user_id",
          "name",
          "description",
          "goals",
          "duration_weeks",
          "source_stack_id",
          "status",
          "peptides",
          "share_token",
          "created_at",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "stacks"
  ]
}

500 Internal server error

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

Example

curl -X GET https://clinical.platform.loop.health/v1/user-stacks \
  -H "Authorization: Bearer $ACCESS_TOKEN"