arazzo: 1.0.1 info: title: Sendcloud Ship an Order Synchronously and Track It summary: Request a label for an order synchronously, then pull its v3 tracking detail. description: >- Uses the Ship an Order API to request a label for a single existing order synchronously, returning the parcel id, tracking number, and the label file in the same response, then queries the v3 Parcel Tracking API by tracking number to surface the parcel's current status and recent events. 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: shipAnOrderApi url: ../openapi/sendcloud-v3-ship-an-order-openapi.yml type: openapi - name: parcelTrackingApi url: ../openapi/sendcloud-v3-parcel-tracking-openapi.yml type: openapi workflows: - workflowId: ship-order-sync-track summary: Synchronously label an existing order and retrieve its tracking detail. description: >- Requests a synchronous label for an order via a chosen integration and shipping option, captures the resulting tracking number, then retrieves the parcel tracking record for that tracking number. inputs: type: object required: - integrationId - orderNumber properties: integrationId: type: integer description: The id of the integration the order belongs to. orderNumber: type: string description: The order number to request a label for. shippingOptionCode: type: string description: Shipping option code selecting carrier and method (e.g. postnl:standard). contractId: type: integer description: Optional direct carrier contract id to use. senderAddressId: type: integer description: Optional sender address id to ship from. steps: - stepId: shipOrderSync description: >- Request a label for the single order synchronously, returning the parcel id, tracking number, and the label file in the response. operationId: sc-public-v3-orders_labels-post-create_labels_sync requestBody: contentType: application/json payload: integration_id: $inputs.integrationId sender_address_id: $inputs.senderAddressId label_details: mime_type: application/pdf dpi: 72 ship_with: type: shipping_option_code properties: contract_id: $inputs.contractId shipping_option_code: $inputs.shippingOptionCode order: order_number: $inputs.orderNumber successCriteria: - condition: $statusCode == 201 outputs: parcelId: $response.body#/data/0/parcel_id shipmentId: $response.body#/data/0/shipment_id trackingNumber: $response.body#/data/0/tracking_number trackingUrl: $response.body#/data/0/tracking_url - stepId: trackParcel description: >- Retrieve the v3 parcel tracking record by tracking number to surface the parcel's current status and recent tracking events. operationId: sc-public-v3-shipping_intelligence_engine-get-get_parcel_by_tracking_number parameters: - name: tracking_number in: path value: $steps.shipOrderSync.outputs.trackingNumber successCriteria: - condition: $statusCode == 200 outputs: events: $response.body#/events trackingNumbers: $response.body#/tracking_numbers outputs: parcelId: $steps.shipOrderSync.outputs.parcelId shipmentId: $steps.shipOrderSync.outputs.shipmentId trackingNumber: $steps.shipOrderSync.outputs.trackingNumber trackingUrl: $steps.shipOrderSync.outputs.trackingUrl events: $steps.trackParcel.outputs.events