description |
---|
Custom SDC operations supported by Aidbox Forms. |
This operation generates a link to a web page to be used to continue answering a specified QuestionnaireResponse.
POST [base]/QuestionnaireResponse/[id]/$generate-link
{% hint style="warning" %}
NOTE: All parameters wrapped with Parameters object
resourceType: Parameters
parameter:
- name: [var-name]
value: [var-value]
{% endhint %}
Whether the generated link will allow amending and re-submitting the form.
name: allow-amend
value:
Boolean: true
A URL where the user will be redirected to after successfully submitting the form.
name: redirect-on-submit
value:
String: https://example.com/submit-hook?questionnaire=123
{% tabs %} {% tab title="Request" %}
POST [base]/QuestionnaireResponse/[id]/$generate-link
content-type: text/yaml
resourceType: Parameters
parameter:
- name: allow-amend
value:
Boolean: true
- name: redirect-on-submit
value:
String: https://example.com/submit-hook?questionnaire=123
{% endtab %}
{% tab title="Success Response" %}
HTTP status: 200
link: http://forms.aidbox.io/ui/sdc#/questionnaire-response/12c1178c-70a9-4e02-a53d-65b13373926e?token=eyJhbGciOiJIUzI
{% endtab %}
{% tab title="Failure Response" %}
HTTP status: 422
resourceType: OperationOutcome
text:
status: generated
div: Parameters are invalid
issue:
- severity: error
code: invalid
expression:
- parameter.0.resource
diagnostics: unknown key :resource
{% endtab %}
{% endtabs %}