---
title: "Get the required-field policy for the scratch-template builder"
method: GET
path: "/templates/scratch/required-fields"
tags: ["Template"]
---

# Get the required-field policy for the scratch-template builder

`GET /templates/scratch/required-fields`

Returns the tenant-aware required-field policy (mandatory attributes, identity one-of groups, and service-address co-requisite groups) for the given roster type. The builder uses it to mirror the server-side validation the create/update endpoints enforce.

## Query parameters

- `type` 'PRACTITIONER' | 'FACILITY' | 'GROUP', required

## Headers

- `tenant-id` string, required

## Response `200`

Policy retrieved successfully

- RequiredFieldPolicyResponse
  - `mandatoryKeys` string[]
  - `oneOfGroups` array[]
    - string[]
  - `coRequisiteGroups` CoRequisiteFieldGroup[]
    - `triggerKeys` string[]
    - `requiredKeys` string[]

## Other responses

- `400` — Invalid or missing roster type
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
