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

# Get Stream Quotas

Returns a Stream's quotas — the individual target cells, their qualification logic, and how many completes remain.

##### Path Parameters

| Parameter      | Description                                                      | Required | Example |
| -------------- | ---------------------------------------------------------------- | -------- | ------- |
| `StreamNumber` | The `StreamNumber` (integer) or `StreamUd` (UUID) of the stream. | Yes      | `850`   |

##### Key Response Fields

| Field             | Description                                                                                                                                                              |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `QuotasCount`     | Number of individual quotas within the Stream.                                                                                                                           |
| `CalculationType` | Whether quota targets are counted per `Completes` or `Survey Starts`.                                                                                                    |
| `Quota`           | Desired Completes or Survey Starts for the cell. An empty string (`""`) means there is no maximum — the quota is open.                                                   |
| `Questions`       | The qualification logic (`StandardGlobalQuestionID`, `Condition`, `PreCodes`) that defines the cell.                                                                     |
| `QuotaAchieved`   | Completes or Survey Starts achieved in the cell.                                                                                                                         |
| `QuotaRemaining`  | Completes or Survey Starts still needed. **Use this as the main indicator of whether more respondents are needed. When `QuotaRemaining` = 0, pause sample to the cell.** |

> Nested quotas are supported. Examples can be found on staging Streams `3012`, `3015`, `3016`, and `3018`. A change to `QuotasLastChangedTimestamp` on the [Surveys](https://docs.repdata.com/supply/endpoints/get-v2-surveys) endpoint signals that you should refresh this Stream's quotas.


## OpenAPI

````yaml GET /v2/surveys/streams/{StreamNumber}/quotas
openapi: 3.0.3
info:
  title: Research Desk Supply API
  version: 1.0.0
  description: >-
    Rep Data's sample platform, Research Desk, lets sample suppliers integrate
    via API for programmatic sample order placement and fulfillment.


    The Supply API is a RESTful service that returns JSON. Suppliers retrieve
    available survey opportunities (Surveys and Streams), read the
    qualifications and quotas attached to each Stream, generate respondent entry
    links, and reconcile completed sessions.


    ## Authentication


    Authentication is done via an obfuscated GUID (API key) associated with each
    supplier and passed in the `Authorization` header of every request. To
    obtain credentials, contact Rep Data's Supply team at supply@repdata.com.


    ## Environments


    Production URL: `https://api.researchdesk.com`  

    Staging URL: `https://stage-api.researchdesk.com`


    We recommend completing full end-to-end testing in staging before going
    live. Staging test surveys 2634 (short, 1 question) and 2635 (longer, ~10
    minutes) are available for integration testing.


    ## Responses


    Successful responses are wrapped in a standard envelope:


    ``` json

    {
        "Status": 0,
        "Message": "Success",
        "Data": { }
    }
     ```

    A `Status` of `0` indicates success. `Data` contains the endpoint-specific
    payload.
servers:
  - url: https://api.researchdesk.com
    description: Production
  - url: https://stage-api.researchdesk.com
    description: Staging
security: []
paths:
  /v2/surveys/streams/{StreamNumber}/quotas:
    get:
      summary: Get Stream Quotas
      operationId: Surveys_StreamQuotas
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Your obfuscated Supply API key (GUID), provided by Rep Data.
          schema:
            type: string
          example: '{{api_key}}'
        - name: StreamNumber
          in: path
          required: true
          description: StreamNumber (integer) or StreamUd (UUID).
          schema:
            type: string
          example: '850'
      responses:
        '200':
          description: Quotas for the stream.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: integer
                    description: 0 indicates success.
                  Message:
                    type: string
                  Data:
                    type: array
                    items:
                      type: object
                      properties:
                        StreamNumber:
                          type: integer
                        StreamUd:
                          type: string
                          format: uuid
                        StreamStatus:
                          type: string
                        QuotasCount:
                          type: integer
                        CalculationType:
                          type: string
                        StreamQuotas:
                          type: array
                          items:
                            type: object
                            properties:
                              QuotaId:
                                type: integer
                              QuotaUd:
                                type: string
                                format: uuid
                              QuotaName:
                                type: string
                              Quota:
                                type: string
                                description: >-
                                  Target Completes/Survey Starts. Empty string
                                  means no cap (open).
                              Questions:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    StandardGlobalQuestionID:
                                      type: integer
                                    Condition:
                                      type: string
                                    PreCodes:
                                      type: array
                                      items:
                                        type: string
                              QuotaAchieved:
                                type: string
                              QuotaRemaining:
                                type: string
                                description: Pause sample to the cell when 0.
              example:
                Status: 0
                Message: Success
                Data:
                  - StreamNumber: 850
                    StreamUd: f1789d2b-ac7c-415b-bcb5-8b285e60e698
                    StreamStatus: Live
                    QuotasCount: 15
                    CalculationType: Completes
                    StreamQuotas:
                      - QuotaId: 1459
                        QuotaUd: cede32b4-6d66-48d8-aaed-a614739adbeb
                        QuotaName: Male
                        Quota: '100'
                        Questions:
                          - StandardGlobalQuestionID: 43
                            Condition: Is
                            PreCodes:
                              - '1'
                        QuotaAchieved: '0'
                        QuotaRemaining: '100'
                      - QuotaId: 1461
                        QuotaUd: 4761e5f8-0eb1-4158-a2a2-7133c241d4fe
                        QuotaName: 18-24
                        Quota: '30'
                        Questions:
                          - StandardGlobalQuestionID: 42
                            Condition: Is
                            PreCodes:
                              - '18'
                              - '19'
                              - '20'
                              - '21'
                              - '22'
                              - '23'
                              - '24'
                        QuotaAchieved: '0'
                        QuotaRemaining: '30'

````