> ## Documentation Index
> Fetch the complete documentation index at: https://docs.byblend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get compounding reasons

> Retrieve all compounding reasons.



## OpenAPI

````yaml /openapi-public.yml get /api/v1/reasons
openapi: 3.0.3
info:
  title: Blend API
  version: 1.0.0
  description: API for Blend
servers:
  - url: https://api.byblend.com
    description: Blend production server
security:
  - bearerAuth: []
tags:
  - name: Orders
    description: Order management endpoints
  - name: Patients
    description: Patient management endpoints
  - name: Reports
    description: Reporting endpoints
  - name: Products and Materials
    description: Product catalog and inventory endpoints
  - name: Electronic Prescriptions
    description: Electronic prescription management endpoints
  - name: Prescriptions
    description: Prescription management endpoints
  - name: Authentication
    description: Authentication endpoints
  - name: Notifications
    description: User management endpoints
  - name: Prescribers
paths:
  /api/v1/reasons:
    get:
      tags:
        - Orders
      summary: Get compounding reasons
      description: Retrieve all compounding reasons.
      parameters:
        - name: type
          in: query
          required: false
          description: >-
            Optional filter to only return global ("global") or
            customer-specific ("customer") reasons
          schema:
            type: string
            example: customer
      responses:
        '200':
          description: Successful response with all compounding reasons.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReasonParent'
components:
  schemas:
    ReasonParent:
      allOf:
        - $ref: '#/components/schemas/Reason'
        - type: object
          properties:
            subcategories:
              type: array
              items:
                $ref: '#/components/schemas/ReasonChild'
    Reason:
      allOf:
        - $ref: '#/components/schemas/ID'
        - $ref: '#/components/schemas/Timestamps'
        - type: object
          properties:
            name:
              type: string
              example: Adherence or Compliance
            description:
              type: string
              example: Issues related to patient adherence and medication compliance.
            is_global:
              type: boolean
              example: true
              description: >-
                Whether the reason is a global reason (provided by Blend) or a
                customer-specific reason.
            parent_id:
              type: string
              example: null
              description: >-
                UUID of the parent reason, or null if this is a top-level
                reason.
    ReasonChild:
      allOf:
        - $ref: '#/components/schemas/ID'
        - $ref: '#/components/schemas/Timestamps'
        - type: object
          properties:
            name:
              type: string
              example: Behavioral Issues
            description:
              type: string
              example: >-
                Patient refuses the commercial medication (e.g., children, pets,
                individuals with cognitive impairment).
            parent_id:
              type: string
              example: 00000000-0000-0000-0000-000000000101
              description: UUID of the parent reason.
            is_global:
              type: boolean
              example: false
              description: >-
                Whether the reason is a global reason (e.g. 'Adherence or
                Compliance') or a customer-specific reason.
    ID:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
    Timestamps:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: Date and time of creation
          example: '2025-03-15T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Date and time of last update
          example: '2025-03-15T12:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````