QuestionnaireResponse
This is based on the FHIR QuestionnaireResponse resource.
Key Information
Fetching a questionnaire response in the Bingli API allows you to retrieve all answers associated with a specific survey task. This enables access to structured response data following FHIR standards.
Essential Parameters
Task ID
- Description: The unique identifier of the task for which the questionnaire responses need to be fetched.
- Usage: Must be provided in the request query to identify the associated questionnaire response.
API Environments
Bingli provides multiple environments for different use cases:
- Production EU:
https://fhir-gateway.api.bingli.eu/tenant-api/questionnaireResponse
- Acceptance EU:
https://fhir-gateway.api.acc.bingli.be/tenant-api/questionnaireResponse
- Production US:
https://fhir-gateway.api.bingli.us/tenant-api/questionnaireResponse
Fetching a Questionnaire Response
GET - Fetch Questionnaire Response
Endpoint
https://fhir-gateway.api.bingli.eu/tenant-api/questionnaireResponse?identifier=http://fhirgateway.bingli.com/identifier/TaskId|<YOUR-TASK-ID>
Description
This endpoint retrieves all answers associated with a given survey task. The response includes structured questionnaire response data following the FHIR standard.
Request Details
Headers
Key | Value |
---|---|
Content-Type | application/fhir+json |
Authorization | Bearer JWTTOKEN |
Query Parameters
Parameter | Description |
---|---|
identifier | The Task ID reference, formatted as `http://fhirgateway.bingli.com/identifier/TaskId |
Example Request URL
https://fhir-gateway.api.bingli.eu/tenant-api/questionnaireResponse?identifier=http://fhirgateway.bingli.com/identifier/TaskId|12345abcde
cURL Request
To fetch a questionnaire response using cURL, use the following command:
curl --location 'https://fhir-gateway.api.bingli.eu/tenant-api/questionnaireResponse?identifier=http://fhirgateway.bingli.com/identifier/TaskId|<YOUR-TASK-ID>' \
--header 'Content-Type: application/fhir+json' \
--header 'Authorization: Bearer <TOKEN>'
Response Example
{
"resourceType": "QuestionnaireResponse",
"id": "987654321",
"status": "completed",
"questionnaire": "Questionnaire/123456789",
"item": [
{
"linkId": "q1",
"text": "What is your name?",
"answer": [{ "valueString": "John Doe" }]
},
{
"linkId": "q2",
"text": "What is your date of birth?",
"answer": [{ "valueDate": "1990-05-15" }]
}
]
}
Parameters Explanation
resourceType
: AlwaysQuestionnaireResponse
to define the FHIR resource type.id
: Unique identifier of the questionnaire response.status
: Indicates if the response is completed.questionnaire
: Links the response to the original questionnaire.item
: An array containing all answered questions.linkId
: The unique identifier for each question.text
: The question text.answer
: The recorded answer for the corresponding question.
Conclusion
Fetching a questionnaire response allows you to retrieve all answers associated with a specific task. For further details, refer to the Bingli API Documentation or contact support@mybingli.com.