parcelLab · Arazzo Workflow

parcelLab Survey Fetch and Submit

Version 1.0.0

Load a survey, fetch its prefilled answers for a reference, then submit a response.

1 workflow 1 source API 1 provider
View Spec View on GitHub Post-PurchaseE-CommerceTrackingReturnsShippingDeliveryCustomer ExperienceLogisticsCommunicationsGermanyArazzoWorkflows

Provider

parcellab

Workflows

survey-fetch-and-submit
Fetch a survey, load its prefilled answers, and submit a response.
Reads the survey definition, fetches prefilled answers for a reference, then submits the customer's completed survey response.
3 steps inputs: authToken, refId, referenceType, surveyData, surveyId outputs: surveyComplete, surveyName
1
getSurvey
getSurvey
Load the survey definition so the caller knows its status and config before collecting answers.
2
getPrefilled
getSurveyAnswer
Fetch any prefilled answers for the survey scoped to the supplied reference.
3
submitSurvey
submitSurveyAnswer
Submit the completed survey response for the same survey and reference.

Source API Descriptions

Arazzo Workflow Specification

parcellab-survey-fetch-and-submit-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: parcelLab Survey Fetch and Submit
  summary: Load a survey, fetch its prefilled answers for a reference, then submit a response.
  description: >-
    Drives the customer survey experience end to end. The workflow loads the
    survey definition by id, retrieves any prefilled answers for a given
    reference (a tracking or return registration), and then submits the completed
    response. 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: parcellabApi
  url: ../openapi/parcellab-openapi.yml
  type: openapi
workflows:
- workflowId: survey-fetch-and-submit
  summary: Fetch a survey, load its prefilled answers, and submit a response.
  description: >-
    Reads the survey definition, fetches prefilled answers for a reference, then
    submits the customer's completed survey response.
  inputs:
    type: object
    required:
    - authToken
    - surveyId
    - refId
    - surveyData
    properties:
      authToken:
        type: string
        description: Authorization header value for the parcelLab API.
      surveyId:
        type: string
        description: The survey id (uuid).
      refId:
        type: string
        description: Reference id (tracking or return registration) to prefill from.
      referenceType:
        type: string
        description: Reference type, one of return_registration or tracking.
      surveyData:
        type: object
        description: The completed survey answer payload.
  steps:
  - stepId: getSurvey
    description: >-
      Load the survey definition so the caller knows its status and config before
      collecting answers.
    operationId: getSurvey
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authToken
    - name: id
      in: path
      value: $inputs.surveyId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      surveyName: $response.body#/name
      surveyStatus: $response.body#/status
      surveyUrl: $response.body#/surveyUrl
  - stepId: getPrefilled
    description: >-
      Fetch any prefilled answers for the survey scoped to the supplied
      reference.
    operationId: getSurveyAnswer
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authToken
    - name: id
      in: path
      value: $inputs.surveyId
    - name: ref_id
      in: query
      value: $inputs.refId
    - name: reference_type
      in: query
      value: $inputs.referenceType
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      editable: $response.body#/editable
  - stepId: submitSurvey
    description: >-
      Submit the completed survey response for the same survey and reference.
    operationId: submitSurveyAnswer
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authToken
    - name: id
      in: path
      value: $inputs.surveyId
    requestBody:
      contentType: application/json
      payload:
        data: $inputs.surveyData
        is_complete: true
        reference_id: $inputs.refId
        reference_type: $inputs.referenceType
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      isComplete: $response.body#/isComplete
      detail: $response.body#/detail
  outputs:
    surveyName: $steps.getSurvey.outputs.surveyName
    surveyComplete: $steps.submitSurvey.outputs.isComplete