---
title: "Retrieves a specific compliance rule for a specific agency"
method: GET
path: "/agency/{agency_id}/compliance-rule/{rule_id}"
tags: ["Agency Compliance Rule"]
---

# Retrieves a specific compliance rule for a specific agency

`GET /agency/{agency_id}/compliance-rule/{rule_id}`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/agency/{agency_id}/compliance-rule/{rule_id}`
- Auth: HTTP basic

## Headers

- `Authorization` string, string, required
- `Context` string, string, required
- `Accept` 'application/json', required
- `X-Accept-Timezone` string

## Response `200`

Specific agency compliance rule will be returned

- object
  - `_id` string, required
  - `updated_at` string, date-time, required
  - `created_at` string, date-time, required
  - `__v` integer, required
  - `name` string, required
  - `description` string
  - `agency_group_id` string, required
  - `condition` object[], required
    - `name` string, required
    - `description` string
    - `search_term` object, required
    - `search_url` string
    - `applicable_position_types` string[], required
    - `variable_field_identifiers` object[]
      - `_id` string, required
      - `temporal_field` string, required
      - `temporal_field_data_type` string, required
      - `field_extract` object[], required
        - `field_full_path` string, required
        - `full_iteration_path` string
        - `field_extract_type` 'static' | 'temporal', required
        - `field_operation` object, required
    - `_id` string, required
    - `fields` string[], required
  - `agencies_to_default` string[]
  - `is_default` boolean
  - `time_zone` string
  - `has_temporal_conditions` boolean, required

## Other responses

- `400`: Validation error on get
- `401`: Failed to authenticate the user making the request
- `403`: Permission denied error
- `404`: Resource not found
- `default`: Server error occurred

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) - [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/revisions/1f079f6b65f5?raw)
