arazzo: 1.0.1 info: title: Salla Order Fulfillment summary: Read an order, create its shipment, and advance the order status. description: >- The core fulfillment flow for a Salla merchant. The order is read in full, its line items are listed to confirm what is being shipped, a shipment is created against the order with a courier and tracking number, and finally the order status is advanced to reflect that it has shipped. Each 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: merchantApi url: ../openapi/salla-merchant-api-openapi.yml type: openapi workflows: - workflowId: fulfill-order summary: Create a shipment for an order and advance its status. description: >- Reads an order and its items, creates a shipment against it, and updates the order status to reflect that fulfillment has started. inputs: type: object required: - orderId - shipmentPayload - statusSlug properties: orderId: type: integer description: The order to fulfill. shipmentPayload: type: object description: The shipment body (courier, tracking, packages) to create against the order. statusSlug: type: string description: The order status slug to advance to (e.g. "in_progress", "shipped"). statusNote: type: string description: Optional note recorded with the status change. steps: - stepId: getOrder description: >- Read the order in full to confirm it exists and is in a fulfillable state. operationId: getOrder parameters: - name: order_id in: path value: $inputs.orderId successCriteria: - condition: $statusCode == 200 outputs: currentStatus: $response.body#/data/status/slug canCancel: $response.body#/data/can_cancel - stepId: listItems description: >- List the order line items to confirm what is being shipped. operationId: listOrderItems parameters: - name: order_id in: path value: $inputs.orderId successCriteria: - condition: $statusCode == 200 - stepId: createShipment description: >- Create a shipment against the order with the supplied courier and tracking details. operationId: createShipment requestBody: contentType: application/json payload: $inputs.shipmentPayload successCriteria: - condition: $statusCode == 201 - stepId: advanceStatus description: >- Advance the order status to reflect that fulfillment has started. operationId: updateOrderStatus parameters: - name: order_id in: path value: $inputs.orderId requestBody: contentType: application/json payload: slug: $inputs.statusSlug note: $inputs.statusNote successCriteria: - condition: $statusCode == 200 outputs: orderId: $inputs.orderId previousStatus: $steps.getOrder.outputs.currentStatus