> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.12/api-integrations/data-catalog-data-lineage-and-grants-apis/grant-requests.md).

# Grant Requests

## List grant requests

> Lists grant requests visible to the current user.\
> \
> \*\*Behavior differences:\*\*\
> \- \*\*Group route (\`grant\_request\_group\_id\` path param):\*\* Only returns requests belonging to that group.\
> \- \*\*Standard route with \`user=me\`:\*\* Scopes results exclusively to requests created by or assigned to the current user.\
> \- \*\*Standard route without \`user=me\`:\*\* Returns all visible requests based on the user's permissions.\
> \
> \*\*Permissions:\*\*\
> \- Requires either the \*\*'Approve grant request'\*\* or \*\*'Create grant request'\*\* permission.\
> \- When accessed via a group route, the user must have the \*\*'View grant request group'\*\* permission on that specific group.\
> \
> If no explicit \`page\` or \`size\` are sent in the request body, the search layer applies internal defaults (typically page 0, size 20).<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests":{"get":{"description":"Lists grant requests visible to the current user.\n\n**Behavior differences:**\n- **Group route (`grant_request_group_id` path param):** Only returns requests belonging to that group.\n- **Standard route with `user=me`:** Scopes results exclusively to requests created by or assigned to the current user.\n- **Standard route without `user=me`:** Returns all visible requests based on the user's permissions.\n\n**Permissions:**\n- Requires either the **'Approve grant request'** or **'Create grant request'** permission.\n- When accessed via a group route, the user must have the **'View grant request group'** permission on that specific group.\n\nIf no explicit `page` or `size` are sent in the request body, the search layer applies internal defaults (typically page 0, size 20).\n","operationId":"TdDdWeb.GrantRequestController.index (2)","parameters":[{"description":"Grant request group ID (required only when accessing from group route)","in":"path","name":"grant_request_group_id","required":false,"schema":{"type":"integer"}},{"description":"Filter by current user (use 'me')","in":"query","name":"user","required":false,"schema":{"enum":["me"],"type":"string"}},{"description":"Filter by status","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Filter by action (e.g., 'approve')","in":"query","name":"action","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestListResponse"}}},"description":"List of grant requests"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"meta":{"additionalProperties":true,"nullable":true,"type":"object"},"permissions":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data"],"title":"GrantRequestListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Bulk approve grant requests

> Approves or rejects multiple grant requests in one request.\
> \
> Requires \`Approve grant request\` permission.\
> \
> \*\*Request parameters:\*\*\
> \- \`role\` (required) – approval role (e.g., \*\*'approver'\*\*).\
> \- \`comment\` (optional) – attached to each approval.\
> \- \`is\_rejection\` (optional, default \`false\`) – when \`true\`, approvals are treated as rejections.\
> \- Search parameters (\`filters\`, \`must\`, \`query\`, etc.) select the requests; approve‑view filters are automatically applied.\
> \
> Approvals are created in batch; individual failures are logged but do not stop the rest. Returns \`201\` with the list of created approval records.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/bulk_approval":{"post":{"description":"Approves or rejects multiple grant requests in one request.\n\nRequires `Approve grant request` permission.\n\n**Request parameters:**\n- `role` (required) – approval role (e.g., **'approver'**).\n- `comment` (optional) – attached to each approval.\n- `is_rejection` (optional, default `false`) – when `true`, approvals are treated as rejections.\n- Search parameters (`filters`, `must`, `query`, etc.) select the requests; approve‑view filters are automatically applied.\n\nApprovals are created in batch; individual failures are logged but do not stop the rest. Returns `201` with the list of created approval records.\n","operationId":"TdDdWeb.GrantRequestBulkApprovalController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestBulkApprovalRequest"}}},"description":"Grant request bulk approval payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestBulkApprovalResponse"}}},"description":"Grant request approvals created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Bulk approve grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestBulkApprovalRequest":{"additionalProperties":false,"properties":{"comment":{"description":"Optional comment attached to the approval action","nullable":true,"type":"string"},"filters":{"additionalProperties":true,"description":"Search filters for grant requests","nullable":true,"type":"object"},"is_rejection":{"default":false,"description":"Flag that indicates whether the bulk action should be treated as a rejection","type":"boolean"},"must":{"additionalProperties":true,"description":"Must conditions for search","nullable":true,"type":"object"},"role":{"description":"Approval role","type":"string"}},"required":["role"],"title":"GrantRequestBulkApprovalRequest","type":"object"},"GrantRequestBulkApprovalResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"comment":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_rejection":{"type":"boolean"},"role":{"type":"string"}},"required":["id","role","is_rejection"],"type":"object"},"type":"array"}},"required":["data"],"title":"GrantRequestBulkApprovalResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Reindex all grant requests

> Triggers a full grant-request reindex for the search layer and returns \`202\` once the reindex is accepted.\
> \
> Requires administrative privileges (\*\*administrator or service account\*\*).<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/search/reindex_all":{"get":{"description":"Triggers a full grant-request reindex for the search layer and returns `202` once the reindex is accepted.\n\nRequires administrative privileges (**administrator or service account**).\n","operationId":"TdDdWeb.GrantRequestSearchController.reindex_all","parameters":[],"responses":{"202":{"description":"Reindexing accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Reindex all grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List grant request groups

> Lists grant request groups available to the current user, optionally filtered by a list of group IDs.\
> \
> Admins receive the unscoped list. Non-admin users see only groups they own (as target user), have created, or belong to via their user group..\
> \
> No pagination is available for this endpoint; the full list is returned in a single response.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_request_groups":{"get":{"description":"Lists grant request groups available to the current user, optionally filtered by a list of group IDs.\n\nAdmins receive the unscoped list. Non-admin users see only groups they own (as target user), have created, or belong to via their user group..\n\nNo pagination is available for this endpoint; the full list is returned in a single response.\n","operationId":"TdDdWeb.GrantRequestGroupController.index","parameters":[{"description":"Comma-separated list of group IDs to filter. When provided, only those specific groups are returned (still subject to visibility permissions)","in":"query","name":"ids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestGroupListResponse"}}},"description":"List of grant request groups"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant request groups","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestGroupListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["data"],"title":"GrantRequestGroupListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List grant requests

> Lists grant requests visible to the current user.\
> \
> \*\*Behavior differences:\*\*\
> \- \*\*Group route (\`grant\_request\_group\_id\` path param):\*\* Only returns requests belonging to that group.\
> \- \*\*Standard route with \`user=me\`:\*\* Scopes results exclusively to requests created by or assigned to the current user.\
> \- \*\*Standard route without \`user=me\`:\*\* Returns all visible requests based on the user's permissions.\
> \
> \*\*Permissions:\*\*\
> \- Requires either the \*\*'Approve grant request'\*\* or \*\*'Create grant request'\*\* permission.\
> \- When accessed via a group route, the user must have the \*\*'View grant request group'\*\* permission on that specific group.\
> \
> If no explicit \`page\` or \`size\` are sent in the request body, the search layer applies internal defaults (typically page 0, size 20).<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_request_groups/{grant_request_group_id}/grant_requests":{"get":{"description":"Lists grant requests visible to the current user.\n\n**Behavior differences:**\n- **Group route (`grant_request_group_id` path param):** Only returns requests belonging to that group.\n- **Standard route with `user=me`:** Scopes results exclusively to requests created by or assigned to the current user.\n- **Standard route without `user=me`:** Returns all visible requests based on the user's permissions.\n\n**Permissions:**\n- Requires either the **'Approve grant request'** or **'Create grant request'** permission.\n- When accessed via a group route, the user must have the **'View grant request group'** permission on that specific group.\n\nIf no explicit `page` or `size` are sent in the request body, the search layer applies internal defaults (typically page 0, size 20).\n","operationId":"TdDdWeb.GrantRequestController.index","parameters":[{"description":"Grant request group ID (required only when accessing from group route)","in":"path","name":"grant_request_group_id","required":false,"schema":{"type":"integer"}},{"description":"Filter by current user (use 'me')","in":"query","name":"user","required":false,"schema":{"enum":["me"],"type":"string"}},{"description":"Filter by status","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Filter by action (e.g., 'approve')","in":"query","name":"action","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestListResponse"}}},"description":"List of grant requests"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"meta":{"additionalProperties":true,"nullable":true,"type":"object"},"permissions":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data"],"title":"GrantRequestListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Download grant requests as XLSX

> Generates an XLSX file containing grant requests matching the supplied filters.\
> \
> \*\*Permissions:\*\* Requires either the \*\*'Approve grant request'\*\* or \*\*'Create grant request'\*\* permission. The export respects visibility permissions and only includes requests the caller can view.\
> \
> \*\*Request parameters:\*\*\
> \- \`header\_labels\` (required) – Map of original field names to custom column labels for the XLSX file.\
> \- \`lang\` (optional) – Locale for translations (status, types, and template fields). Defaults to the application's default language.\
> \- Search parameters (\`filters\`, \`must\`, \`query\`, etc.) are forwarded to filter the exported data.\
> \- Approve‑view specific filters are automatically applied when present in the payload.\
> \- \`page\`, \`size\`, \`scroll\` and \`scroll\_id\` will be accepted but ignored – The export streams \*\*all\*\* matching records, disregarding pagination.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/xlsx/download":{"post":{"description":"Generates an XLSX file containing grant requests matching the supplied filters.\n\n**Permissions:** Requires either the **'Approve grant request'** or **'Create grant request'** permission. The export respects visibility permissions and only includes requests the caller can view.\n\n**Request parameters:**\n- `header_labels` (required) – Map of original field names to custom column labels for the XLSX file.\n- `lang` (optional) – Locale for translations (status, types, and template fields). Defaults to the application's default language.\n- Search parameters (`filters`, `must`, `query`, etc.) are forwarded to filter the exported data.\n- Approve‑view specific filters are automatically applied when present in the payload.\n- `page`, `size`, `scroll` and `scroll_id` will be accepted but ignored – The export streams **all** matching records, disregarding pagination.\n","operationId":"TdDdWeb.GrantRequestController.download","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestsDownloadRequest"}}},"description":"Grant request download request","required":false},"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"XLSX file downloaded"},"204":{"description":"No grant requests available for download"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Download grant requests as XLSX","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestsDownloadRequest":{"additionalProperties":false,"description":"Request body for `POST /api/grant_requests/xlsx/download`.\n\nMirrors `GrantRequestSearchRequest` so that the payload sent by the\nManage grant requests view (Search or Approve) can be forwarded\nverbatim. Dynamic template fields are not listed here because the\nschema depends on the active templates at runtime; the headers for\neach dynamic column are returned in the same order produced by the\nserver, prefixed by the eight fixed columns.\n\nThe download always exports every record matching the query, so the\npagination and cursor properties of the search payload (`page`,\n`size`, `scroll`, `scroll_id`) are accepted but ignored.\n","properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"header_labels":{"additionalProperties":{"type":"string"},"description":"Localized header labels keyed by column name.","type":"object"},"lang":{"description":"Locale used to translate the status and request type columns and the template fields. Defaults to the default locale.","nullable":true,"type":"string"},"must":{"additionalProperties":true,"nullable":true,"type":"object"},"must_not":{"additionalProperties":true,"nullable":true,"type":"object"},"page":{"description":"Accepted and ignored.","nullable":true,"type":"integer"},"query":{"nullable":true,"type":"string"},"scroll":{"description":"Accepted and ignored.","nullable":true,"type":"string"},"scroll_id":{"description":"Accepted and ignored.","nullable":true,"type":"string"},"search_by":{"default":"all","description":"Accepted and ignored. The Approve view filters are applied whenever the payload carries them, as in the search endpoint.","enum":["approve","all"],"type":"string"},"size":{"description":"Accepted and ignored.","nullable":true,"type":"integer"},"sort":{"description":"Sort criteria. A unique tiebreaker is appended when missing, so that the export cursor cannot skip records.","items":{"oneOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"nullable":true,"type":"array"}},"required":["header_labels"],"title":"GrantRequestsDownloadRequest","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Get grant request by ID

> Retrieves a single grant request by its ID.\
> \
> \*\*Permissions:\*\* Requires the \*\*'View grant request'\*\* permission on the target record.\
> This permission is automatically granted if:\
> \- The user owns the request (is the target user).\
> \- The user created the request.\
> \- The user belongs to the user group associated with the request.\
> \- The user has the \*\*'Approve grant request'\*\* permission on the relevant domains or structures.\
> \
> The response includes embedded resources such as the associated data structure, group, and approval details when available.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/{id}":{"get":{"description":"Retrieves a single grant request by its ID.\n\n**Permissions:** Requires the **'View grant request'** permission on the target record.\nThis permission is automatically granted if:\n- The user owns the request (is the target user).\n- The user created the request.\n- The user belongs to the user group associated with the request.\n- The user has the **'Approve grant request'** permission on the relevant domains or structures.\n\nThe response includes embedded resources such as the associated data structure, group, and approval details when available.\n","operationId":"TdDdWeb.GrantRequestController.show","parameters":[{"description":"Grant request ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestShowResponse"}}},"description":"Grant request retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get grant request by ID","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestShowResponse":{"additionalProperties":false,"properties":{"data":{"properties":{"_embedded":{"additionalProperties":true,"type":"object"},"all_pending_roles":{"items":{"type":"string"},"nullable":true,"type":"array"},"approvals":{"items":{"type":"object"},"nullable":true,"type":"array"},"data_structure_id":{"nullable":true,"type":"integer"},"domain_ids":{"items":{"type":"integer"},"nullable":true,"type":"array"},"dynamic_content":{"additionalProperties":true,"type":"object"},"filters":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date_time","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"pending_roles":{"items":{"type":"string"},"nullable":true,"type":"array"},"request_type":{"enum":["grant_access","grant_removal","grant_modification"],"type":"string"},"status":{"nullable":true,"type":"string"},"status_reason":{"nullable":true,"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date_time","nullable":true,"type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"title":"GrantRequestShowResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Delete grant request

> Permanently deletes (hard delete) the grant request identified by the given ID. The grant request record is removed from the database immediately.\
> \
> Requires the \*\*'Delete grant request'\*\* permission. Currently, this operation is restricted to administrative users (role \`admin\`). Non-admin users will receive a \`403 Forbidden\` response even if they own the request.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/{id}":{"delete":{"description":"Permanently deletes (hard delete) the grant request identified by the given ID. The grant request record is removed from the database immediately.\n\nRequires the **'Delete grant request'** permission. Currently, this operation is restricted to administrative users (role `admin`). Non-admin users will receive a `403 Forbidden` response even if they own the request.\n","operationId":"TdDdWeb.GrantRequestController.delete","parameters":[{"description":"Grant request ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Grant request deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete grant request","tags":["Grant Requests"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Get available grant request filters

> Returns the available grant-request filter values for the current user and the filtered request.\
> \
> Requires \*\*'View grants'\*\* permission.\
> \
> Soft‑deleted grant requests are excluded.\
> \
> No pagination or scrolling is applied; the endpoint returns all available aggregations for the given search context.\
> \
> If no search filters are provided, the response includes filter values for all visible grant requests.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests_filters/search":{"post":{"description":"Returns the available grant-request filter values for the current user and the filtered request.\n\nRequires **'View grants'** permission.\n\nSoft‑deleted grant requests are excluded.\n\nNo pagination or scrolling is applied; the endpoint returns all available aggregations for the given search context.\n\nIf no search filters are provided, the response includes filter values for all visible grant requests.\n","operationId":"TdDdWeb.GrantRequestFilterController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchRequest"}}},"description":"Grant request filter request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestFilterResponse"}}},"description":"Available filters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get available grant request filters","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"properties":{"status":{"description":"Filter by status(es)","items":{"type":"string"},"type":"array"},"type":{"description":"Filter by type(s)","items":{"type":"string"},"type":"array"}},"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions for query","nullable":true,"type":"object"},"page":{"default":0,"description":"Page number (0-indexed)","minimum":0,"nullable":true,"type":"integer"},"query":{"description":"Search query string","nullable":true,"type":"string"},"scroll":{"description":"Scroll ID for pagination (e.g., '1m' for 1 minute)","nullable":true,"type":"string"},"scroll_id":{"description":"Scroll ID to continue a previous search","nullable":true,"type":"string"},"size":{"default":20,"description":"Page size","maximum":100,"minimum":1,"nullable":true,"type":"integer"}},"title":"GrantRequestSearchRequest","type":"object"},"GrantRequestFilterResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":true,"type":"object"}},"title":"GrantRequestFilterResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create grant request status

> Creates or updates the status of a grant request.\
> \
> The request can be cancelled \*\*either\*\* by the user who created the grant request group (ownership), \*\*or\*\* by a user who has the \`Approve grant request\` permission on the associated domains.\
> Non-cancel status updates require the \*\*'Approve grant request'\*\* permission.\
> \
> The optional \`reason\` is passed to non-cancel status updates.\
> \
> Both branches return the updated request with \`201\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/{grant_request_id}/status":{"post":{"description":"Creates or updates the status of a grant request.\n\nThe request can be cancelled **either** by the user who created the grant request group (ownership), **or** by a user who has the `Approve grant request` permission on the associated domains.\nNon-cancel status updates require the **'Approve grant request'** permission.\n\nThe optional `reason` is passed to non-cancel status updates.\n\nBoth branches return the updated request with `201`.\n","operationId":"TdDdWeb.GrantRequestStatusController.create","parameters":[{"description":"Grant request ID","in":"path","name":"grant_request_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestStatusCreateRequest"}}},"description":"Grant request status payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestStatusCreateResponse"}}},"description":"Grant request status created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create grant request status","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestStatusCreateRequest":{"additionalProperties":false,"properties":{"reason":{"nullable":true,"type":"string"},"status":{"enum":["approved","rejected","cancelled","processing"],"type":"string"}},"required":["status"],"title":"GrantRequestStatusCreateRequest","type":"object"},"GrantRequestStatusCreateResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":true,"description":"Embedded resources","type":"object"},"all_pending_roles":{"description":"All pending roles","items":{"type":"string"},"nullable":true,"type":"array"},"data_structure_id":{"description":"Data structure ID","nullable":true,"type":"integer"},"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"nullable":true,"type":"array"},"dynamic_content":{"additionalProperties":true,"description":"Dynamic content","type":"object"},"filters":{"additionalProperties":true,"description":"Applied filters","type":"object"},"id":{"description":"Grant request ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"metadata":{"additionalProperties":true,"description":"Request metadata","type":"object"},"pending_roles":{"description":"Pending roles for current user","items":{"type":"string"},"nullable":true,"type":"array"},"request_type":{"description":"Request type","enum":["grant_access","grant_removal","grant_modification"],"type":"string"},"status":{"description":"Current status","nullable":true,"type":"string"},"status_reason":{"description":"Reason for status change","nullable":true,"type":"string"},"type":{"description":"Type of grant request","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","inserted_at"],"type":"object"}},"required":["data"],"title":"GrantRequestStatusCreateResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Search grant requests

> Searches grant requests using the provided criteria and returns only requests visible to the user.\
> \
> The response includes the total number of matches in \`x-total-count\`, optional aggregation filters, per-result approval permissions, and a \`scroll\_id\` when scroll search is used. \`page\` defaults to \`0\` and \`size\` defaults to \`20\`. Sorting is by relevance unless overridden via \`sort\`.\
> \
> Requires \*\*'View grants'\*\* permission.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/search":{"post":{"description":"Searches grant requests using the provided criteria and returns only requests visible to the user.\n\nThe response includes the total number of matches in `x-total-count`, optional aggregation filters, per-result approval permissions, and a `scroll_id` when scroll search is used. `page` defaults to `0` and `size` defaults to `20`. Sorting is by relevance unless overridden via `sort`.\n\nRequires **'View grants'** permission.\n","operationId":"TdDdWeb.GrantRequestSearchController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchRequest"}}},"description":"Grant request search","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchResponse"}}},"description":"Grant request search response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"properties":{"status":{"description":"Filter by status(es)","items":{"type":"string"},"type":"array"},"type":{"description":"Filter by type(s)","items":{"type":"string"},"type":"array"}},"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions for query","nullable":true,"type":"object"},"page":{"default":0,"description":"Page number (0-indexed)","minimum":0,"nullable":true,"type":"integer"},"query":{"description":"Search query string","nullable":true,"type":"string"},"scroll":{"description":"Scroll ID for pagination (e.g., '1m' for 1 minute)","nullable":true,"type":"string"},"scroll_id":{"description":"Scroll ID to continue a previous search","nullable":true,"type":"string"},"size":{"default":20,"description":"Page size","maximum":100,"minimum":1,"nullable":true,"type":"integer"}},"title":"GrantRequestSearchRequest","type":"object"},"GrantRequestSearchResponse":{"additionalProperties":false,"properties":{"_permissions":{"description":"User permissions for the search results","items":{"type":"string"},"nullable":true,"type":"array"},"data":{"description":"List of grant requests matching the search","items":{"additionalProperties":false,"properties":{"created_by":{"additionalProperties":false,"nullable":true,"properties":{"email":{"type":"string"},"full_name":{"type":"string"},"user_name":{"type":"string"}},"required":["email","full_name","user_name"],"type":"object"},"created_by_id":{"nullable":true,"type":"integer"},"current_status":{"nullable":true,"type":"string"},"data_structure_id":{"nullable":true,"type":"integer"},"data_structure_version":{"additionalProperties":false,"properties":{"data_structure_id":{"type":"integer"},"description":{"nullable":true,"type":"string"},"domain":{"additionalProperties":true,"nullable":true,"type":"object"},"external_id":{"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"mutable_metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"type":"string"},"note":{"nullable":true,"type":"string"},"path":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data_structure_id","external_id","name"],"type":"object"},"domain_ids":{"items":{"type":"integer"},"nullable":true,"type":"array"},"grant":{"additionalProperties":true,"nullable":true,"type":"object"},"group_id":{"type":"integer"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"modification_grant_id":{"nullable":true,"type":"integer"},"request_type":{"enum":["grant_access","grant_removal","grant_modification"],"type":"string"},"user":{"additionalProperties":false,"properties":{"email":{"type":"string"},"full_name":{"type":"string"},"user_name":{"type":"string"}},"required":["email","full_name","user_name"],"type":"object"},"user_group":{"additionalProperties":false,"nullable":true,"properties":{"alias":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"user_group_id":{"nullable":true,"type":"integer"},"user_id":{"nullable":true,"type":"integer"}},"required":["id","group_id","user_id","current_status","inserted_at","user"],"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"description":"Aggregation filters available (facets)","nullable":true,"type":"object"},"scroll_id":{"description":"Scroll ID for pagination","nullable":true,"type":"string"}},"required":["data"],"title":"GrantRequestSearchResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create grant request approval

> Creates an approval record for the selected grant request.\
> \
> Requires the \*\*'Approve grant request'\*\* permission.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/grant_requests/{grant_request_id}/approvals":{"post":{"description":"Creates an approval record for the selected grant request.\n\nRequires the **'Approve grant request'** permission.\n","operationId":"TdDdWeb.GrantRequestApprovalController.create","parameters":[{"description":"Grant request ID","in":"path","name":"grant_request_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestApprovalCreateRequest"}}},"description":"Grant request approval payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestApprovalCreateResponse"}}},"description":"Grant request approval created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create grant request approval","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestApprovalCreateRequest":{"additionalProperties":false,"properties":{"approval":{"additionalProperties":false,"properties":{"comment":{"description":"Optional comment","nullable":true,"type":"string"},"role":{"description":"Approval role","type":"string"}},"required":["role"],"type":"object"}},"required":["approval"],"title":"GrantRequestApprovalCreateRequest","type":"object"},"GrantRequestApprovalCreateResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"properties":{"user":{"additionalProperties":true,"type":"object"}},"type":"object"},"comment":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"is_rejection":{"type":"boolean"},"role":{"type":"string"}},"required":["id","role","is_rejection","inserted_at"],"type":"object"}},"required":["data"],"title":"GrantRequestApprovalCreateResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```
