# Get a template's data contract (/docs/reference/Rest-API/api-docs/templates/getTemplateDataContract)


{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

## GET /v2/templates/{template_id}/data-contract

`GET https://api.verdocs.com/v2/templates/{template_id}/data-contract`

### Path parameters

- `template_id` (string, required)

### Responses

#### 200: Success

Content type `application/json`.

Type: `IDataContract`

- `contract_hash` (string, required): Changes only when the keys, their types, whether they're needed, or their options change.
- `json_schema` (string, required): A JSON Schema for the prefill_data this template accepts.
- `keys` (string, required): Every data key the template's fields use, sorted by key.
- `template_id` (string, required): The template this contract describes.

#### 400: Request Error

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 401: Access Denied

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 404: Not Found

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 406: Invalid Parameter

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

### Example request

```bash
curl -X GET "https://api.verdocs.com/v2/templates/TEMPLATE_ID/data-contract" \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -H "content-type: application/json" \
    -d '{"param": "value"}'
```
