# Get Programs

A Program is a grouping of projects which are being done under a shared contract.

Endpoint: POST /core/programs/select
Version: 0.0.5
Security: OAuth2, apiKeyAuth

## Request fields (application/json):

  - `search_query` (string)
    A JSON-encoded string containing the query options.

  - `filter_ids` (array)
    Returns data for the specified UUIDs. If this filter is specifed, all other filters will be ignored.

  - `filter_organization_ids` (array)
    Returns data for the specified Organization UUIDs

  - `filter_statuses` (array)
    Provide the values in an array. If more than one value is given, they will be combined with AND.
If no value is supplied, `active` is assumed.

  - `data_quantity` (string)
    If caching data on the client side, the `data_quantity=id_only|basic|complete` option can be passed to manage the completeness of the data received and therefore rate limiting.
    Enum: "id_only", "basic", "complete"

  - `page_size` (integer)
    The number of results to return per page

  - `page_number` (integer)
    Which page of the results to return

  - `sort_by_programs` (string)
    The **field** by which to sort the results
    Enum: "programNumber", "nameLong", "nameShort"

  - `sort_direction` (string)
    The sort direction for the results
    Enum: "asc", "desc"

## Response 200 fields (application/json):

  - `status` (string, required)
    Enum: "success"

  - `data` (array, required)

  - `data.datetimeCreated` (string)
    The date and time this Program was created.

  - `data.datetimeUpdated` (string)
    The date and time this Program was last updated.

  - `data.status` (string)
    Whether the item is active or inactive in TonicDM. Potentially the item could be (soft) deleted.
    Enum: "active", "inactive", "deleted"

  - `data.zone` (string)
    The name of the default Zone (data center) the Projects in the Program should be is stored in.

  - `data.isLocked` (boolean)
    Restricts access to the Program's information to active team members of the Program's projects. It also enforces isLocked on all the Program's Projects.
This field can only be set by one of the Tenant Adminstrators.

  - `data.programNumber` (string)
    Program Reference Number

  - `data.programNameLegal` (string, required)
    The full official name of the Program (used on Transmittals).

  - `data.programNameKnownAs` (string)
    A friendly name for the Program (used in the TonicDM app and Outlook sidebar)

  - `data.programSearchWords` (string)
    Text to assist staff when searching for the program.

  - `data.programManager` (any)
    Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.programPrincipal` (any)
    Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.brand` (any)
    Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.location` (any)
    Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.division1` (any)
    REQUIRES the TonicDM AdvancedMetrics license.
Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.division2` (any)
    REQUIRES the TonicDM AdvancedMetrics license.
Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.division3` (any)
    REQUIRES the TonicDM AdvancedMetrics license.
Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.division4` (any)
    REQUIRES the TonicDM AdvancedMetrics license.
Refer to the `data_quantity` Request parameter to understand the level of detail returned.

  - `data.clientOrganization` (string)
    NOT YET IMPLEMENTED.
Refer to the `data_quantity` Request parameter to understand the level of detail returned.
The TonicDM OrganizationId of the Program's client (so their name can appear on the Transmittal).

  - `data.clientProgramNumber` (string)
    NOT YET IMPLEMENTED.
The Program reference number of the Program's client (for use on the Transmittal).

  - `data.customerDataWarehouseId` (string)
    The ID of the Person in the Customer's Data Warehouse.
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `data.customerErpId` (string)
    The ID of the Person in the Customer's ERP system (eg. Deltek Vantagepoint).
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `data.customerCrmId` (string)
    The ID of the Person in the Customer's CRM system (eg. Deltek Salesforce).
FOR USE BY CUSTOMER. NOT YET IMPLEMENTED.
REQUIRES the TonicDM AdvancedMetrics license.

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 400 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 401 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 403 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 404 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 429 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

## Response 500 fields (application/json):

  - `status` (string, required)
    Enum: "fail", "error"

  - `error` (object, required)

  - `error.code` (string, required)
    Example: VALIDATION_ERROR

  - `error.message` (string, required)
    Example: Invalid input

  - `metadata` (object, required)
    Present on every JSON response. For non-paginated operations, use `page` 1, `total_pages` 1,
and `total_records` equal to the number of elements in `data`.

  - `metadata.timestamp` (string, required)

  - `metadata.correlation_id` (string, required)

  - `metadata.page` (integer, required)

  - `metadata.total_pages` (integer, required)

  - `metadata.total_records` (integer, required)

