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

# get_plan

Get the design (conception) view of one compensation plan.

Returns the plan with its compensations (their periodicity and date range) and
its attributed members. This is the plan-structure counterpart to
get\_statement\_compensation, which returns the *calculated* values on an existing
statement.

Identify the plan by name (or a substring) or by its id; a name that matches
several plans is rejected so you can refine it. A plan you can't access reads
exactly like one that doesn't exist, so the error never reveals anything outside
your scope.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="plan" type="string" required>
    The plan to open, matched against the plan name (case-insensitive substring)
    or, when it is a valid ObjectId, against the plan id. Must resolve to
    exactly one plan.
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="id" type="string" />

  <ResponseField name="resource_url" type="string">
    Deep link to open this plan in the Qobra web app.
  </ResponseField>

  <ResponseField name="name" type="string" />

  <ResponseField name="archived" type="boolean" />

  <ResponseField name="section" type="string">
    Folder/group this plan is filed under (a concept shared with reports); null
    if unfiled.
  </ResponseField>

  <ResponseField name="compensation_count" type="integer">
    How many compensations the plan holds. Open the plan with get\_plan for each
    compensation's design (scopes, variables, formulas) and the plan's members.
  </ResponseField>

  <ResponseField name="compensations" type="object[]">
    The plan's compensations with their configuration.

    <Expandable title="object properties">
      <ResponseField name="id" type="string" />

      <ResponseField name="name" type="string" />

      <ResponseField name="recurring" type="boolean">
        True when the compensation has no fixed date range (it applies every
        period).
      </ResponseField>

      <ResponseField name="start_date" type="string">
        YYYY-MM; null when the compensation is recurring.
      </ResponseField>

      <ResponseField name="end_date" type="string">
        YYYY-MM; null when the compensation is recurring.
      </ResponseField>

      <ResponseField name="period" type="string" />

      <ResponseField name="description" type="string" />
    </Expandable>
  </ResponseField>

  <ResponseField name="members" type="object[]">
    The users and groups attributed to the plan.

    <Expandable title="object properties">
      <ResponseField name="type" type="string" />

      <ResponseField name="id" type="string" />

      <ResponseField name="user_email" type="string">
        User email; null for group attributions.
      </ResponseField>

      <ResponseField name="group_name" type="string">
        Group name; null for user attributions.
      </ResponseField>

      <ResponseField name="arrival_date" type="string" />

      <ResponseField name="departure_date" type="string" />
    </Expandable>
  </ResponseField>
</Accordion>
