123FormBuilder · Arazzo Workflow

123FormBuilder Moderate a Submission

Version 1.0.0

Read a single submission, then update its approval and payment status.

1 workflow 1 source API 1 provider
View Spec View on GitHub Online FormsForm BuilderSurveysWorkflowData CollectionSubmissionsWebhooksHIPAAGDPRPaymentsArazzoWorkflows

Provider

123formbuilder

Workflows

moderate-submission
Read a submission and set its approval and payment status.
Logs in for a JWT, fetches the current detail of a submission so the caller can confirm it before acting, then applies new approval and payment status values to that same submission.
3 steps inputs: approved, formId, password, payed, submissionId, username outputs: submission, updated
1
authenticate
login-user-login
Authenticate to obtain a JWT token used as the JWT query parameter on the submission read and update requests.
2
getSubmission
forms-get-submission-details
Fetch the current detail of the submission so the moderator can confirm its contents before changing its status.
3
updateStatus
forms-update-submission
Apply the new approval status, and optional payment status, to the submission.

Source API Descriptions

Arazzo Workflow Specification

123formbuilder-moderate-submission-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: 123FormBuilder Moderate a Submission
  summary: Read a single submission, then update its approval and payment status.
  description: >-
    A moderation flow for an individual submission. After logging in for a JWT
    the workflow reads the current state of a specific submission and then
    updates its approval and payment status via the submission update endpoint.
    Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: formBuilderApi
  url: ../openapi/123formbuilder-rest-api-v2-openapi.yml
  type: openapi
workflows:
- workflowId: moderate-submission
  summary: Read a submission and set its approval and payment status.
  description: >-
    Logs in for a JWT, fetches the current detail of a submission so the caller
    can confirm it before acting, then applies new approval and payment status
    values to that same submission.
  inputs:
    type: object
    required:
    - username
    - password
    - formId
    - submissionId
    - approved
    properties:
      username:
        type: string
        description: The 123FormBuilder username to authenticate with.
      password:
        type: string
        description: The plain text password for the account.
      formId:
        type: integer
        description: The ID of the form the submission belongs to.
      submissionId:
        type: integer
        description: The ID of the submission to moderate.
      approved:
        type: integer
        description: 'Approval status: 0 (N/A), 1 (Approved), 2 (Rejected).'
      payed:
        type: string
        description: >-
          Payment status. Possible values include 0 (no), 1 (payed),
          2 (invoiced), 3 (pending), 4 (declined).
  steps:
  - stepId: authenticate
    description: >-
      Authenticate to obtain a JWT token used as the JWT query parameter on the
      submission read and update requests.
    operationId: login-user-login
    parameters:
    - name: username
      in: query
      value: $inputs.username
    - name: password
      in: query
      value: $inputs.password
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      token: $response.body#/token
  - stepId: getSubmission
    description: >-
      Fetch the current detail of the submission so the moderator can confirm
      its contents before changing its status.
    operationId: forms-get-submission-details
    parameters:
    - name: JWT
      in: query
      value: $steps.authenticate.outputs.token
    - name: form_id
      in: path
      value: $inputs.formId
    - name: submission_id
      in: path
      value: $inputs.submissionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      submission: $response.body#/data
  - stepId: updateStatus
    description: >-
      Apply the new approval status, and optional payment status, to the
      submission.
    operationId: forms-update-submission
    parameters:
    - name: JWT
      in: query
      value: $steps.authenticate.outputs.token
    - name: form_id
      in: path
      value: $inputs.formId
    - name: submission_id
      in: path
      value: $inputs.submissionId
    - name: approved
      in: query
      value: $inputs.approved
    - name: payed
      in: query
      value: $inputs.payed
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      updated: $response.body#/data
  outputs:
    submission: $steps.getSubmission.outputs.submission
    updated: $steps.updateStatus.outputs.updated