> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get Business Rule test fields
> Return the fields available for testing one saved Business Rule.
Returns the test fields Fini derives from one saved Business Rule. Use this to build a rule test form or validate which fields are required before running an evaluation.
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>
## Path parameters
<ParamField path="id" type="string" required>
Business Rule ID.
</ParamField>
## Response
<RequestExample>
~~~bash cURL theme={null}
curl --request GET \
--url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public' \
--header 'Authorization: Bearer fini_your_api_key'
~~~
~~~javascript Node.js theme={null}
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
~~~
~~~python Python theme={null}
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
[
{
"path": "interactionHistoryTranscript",
"dataType": "string",
"testValue": "User: Hi, I need help with my account"
},
{
"path": "formattedUserAttributes",
"dataType": "string",
"testValue": "Plan: Premium"
}
]
~~~
</ResponseExample>
Returns an array of test field definitions.
## Errors
<AccordionGroup>
<Accordion title="401 Unauthorized" icon="lock">
The API key is missing, malformed, revoked, or invalid.
</Accordion>
<Accordion title="403 Forbidden" icon="shield-halved">
The API key does not include the `read` scope required for this route.
</Accordion>
<Accordion title="404 Not Found" icon="ghost">
The Business Rule does not exist in your workspace.
</Accordion>
</AccordionGroup>
## Related topics
- [Preview Business Rule test fields](/en/api-reference/preview-business-rule-test-fields.md)
- [Overview](/en/api-reference/business-rules.md)
- [Get Business Rule fields context](/en/api-reference/get-business-rule-fields-context.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Business Rules

