arazzo: 1.0.1 info: title: parcelLab Send Event and Refresh Status summary: Push a warehouse or shop event into the timeline, then refresh the order status. description: >- Warehouses and shops emit lifecycle milestones (pick, pack, dispatch) that belong in the parcelLab tracking timeline. This workflow sends a custom shop event identified by courier and tracking number, then reads back the order info so the caller can confirm the new checkpoint has landed on the tracking. 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: send-event-and-refresh summary: Add a custom event to a tracking and verify it on the refreshed order status. description: >- Posts a shop or warehouse event for a courier+tracking pair and then fetches the live-refreshed order info to surface the updated checkpoint list. inputs: type: object required: - authToken - account - courier - trackingNumber - eventTimestamp - eventStatus properties: authToken: type: string description: Authorization header value for the parcelLab API. account: type: integer description: The parcelLab account id that owns the tracking. courier: type: string description: Courier code identifying the shipment. trackingNumber: type: string description: Tracking number identifying the shipment. eventTimestamp: type: string description: ISO 8601 timestamp of the event. eventStatus: type: string description: Status label for the event (e.g. "OrderProcessed"). eventDetails: type: string description: Free-text detail for the event. location: type: string description: Location where the event occurred. steps: - stepId: sendEvent description: >- Push the custom shop or warehouse event into the order timeline for the given courier and tracking number. operationId: sendShopEvent parameters: - name: Authorization in: header value: $inputs.authToken requestBody: contentType: application/json payload: event_timestamp: $inputs.eventTimestamp event_status: $inputs.eventStatus event_details: $inputs.eventDetails location: $inputs.location account: $inputs.account courier: $inputs.courier tracking_number: $inputs.trackingNumber successCriteria: - condition: $statusCode == 204 onSuccess: - name: accepted type: goto stepId: refreshStatus criteria: - condition: $statusCode == 204 - stepId: refreshStatus description: >- Read the order info with a live refresh so the newly sent event appears in the tracking checkpoints. operationId: getOrderInfo parameters: - name: Authorization in: header value: $inputs.authToken - name: account in: query value: $inputs.account - name: tracking_number in: query value: $inputs.trackingNumber - name: courier in: query value: $inputs.courier - name: live_refresh in: query value: true successCriteria: - condition: $statusCode == 200 outputs: trackingStatus: $response.body#/trackings/0/status checkpoints: $response.body#/trackings/0/checkpoints latestCheckpointStatus: $response.body#/trackings/0/checkpoints/0/status outputs: trackingStatus: $steps.refreshStatus.outputs.trackingStatus checkpoints: $steps.refreshStatus.outputs.checkpoints