Skip to content
Reponse.ai LogoDocs
DocsAPISDKsGuides

Search Documentation

Search for an article...

Getting Started

  • Overview
  • Architecture
  • Installation
  • Authentication
  • First Request

Products & Collections

  • Products — List
  • Products — Get
  • Products — Metafields
  • Collections — List
  • Collections — Get
  • Collections — Products

Cart & Checkout

  • Cart — Create
  • Cart — Get
  • Cart — Add Item
  • Cart — Update Item
  • Cart — Remove Item
  • Cart — Apply Promotion
  • Checkout — Stripe
  • Checkout — Payment Intent
  • Checkout — ACP

Orders & Fulfillment

  • Orders — Create
  • Orders — Get
  • Orders — Confirm
  • Orders — Cancel
  • Orders — Fulfill
  • Orders — Refund

Commerce

  • Inventory — Get
  • Inventory — Update
  • Shipping — Rates
  • Discounts — List
  • Discounts — Create
  • Discounts — Validate
  • Subscriptions — Manage

Loyalty & Gift Cards

  • Loyalty — Balance
  • Loyalty — Redeem
  • Loyalty — Referral
  • Gift Cards — List
  • Gift Cards — Redeem

Tickets & Support

  • Tickets — List
  • Tickets — Create
  • Tickets — Reply

Platform

  • Product Feed — JSON
  • Product Feed — CSV
  • Theme — Get
  • Approvals — Execute
  • Approvals — Reject
  • Geocode

SDKs

  • SDK Overview
  • TypeScript SDK
  • React Hooks

Guides

  • Chat Widget
  • Shopify Sync
  • Storefront Starter
  • Loyalty Program
  • Discounts & Promotions
  • Subscriptions
  • Klaviyo Integration
  • Custom Domains
  • Agentic Commerce (ACP)
  • A2A Protocol
  • AI Engines
  • MCP Server

Webhooks

  • Webhooks Overview
  • Events Reference
  • Shopify Webhooks
  • Stripe Webhooks
  • Reviews (Stamped / Trustpilot)
  • Logistics
  • Email Inbound

Resources

  • Environment Variables
  • Rate Limits
  • Changelog
DocsWebhooksLogistics

Logistics

Logistics and shipping webhooks.

2 min read/Last updated Aug 19, 2026
On this page

Overview

Logistics webhooks update fulfillment and tracking state as carriers progress a shipment. When a parcel moves through transit stages (picked up, in transit, delivered, exception), the logistics provider sends an event to Reponse so order fulfillment records stay current and customer notifications can be triggered.

**Endpoint:** `POST /api/webhooks/logistics?provider={name}&workspaceId={id}`

Configuration

  1. In your logistics provider's dashboard (e.g. Sendcloud), navigate to Settings → Webhooks or Integrations → Webhooks.
  2. Add the endpoint URL with query parameters:
    https://api.reponse.ai/api/webhooks/logistics?provider=sendcloud&workspaceId={your_workspace_id}
  3. For Sendcloud: copy the Webhook Secret and save it in your workspace's fulfillment_config.sendcloud_webhook_secret.

Supported providers

ProviderStatusQuery param
Sendcloud✅ Activeprovider=sendcloud
ShipStation🚧 Plannedprovider=shipstation
Easyship🚧 Plannedprovider=easyship
Shippo🚧 Plannedprovider=shippo
Amazon MCF🚧 Plannedprovider=amazon_mcf
ShipBob🚧 Plannedprovider=shipbob
Flexport🚧 Plannedprovider=flexport
Cubyn🚧 Plannedprovider=cubyn

Signature verification (Sendcloud)

Sendcloud signs webhook payloads with HMAC-SHA256. Reponse verifies the signature before processing:

typescript
import crypto from "crypto";

const signature = req.headers.get("sendcloud-signature");
const secret = workspace.fulfillment_config.sendcloud_webhook_secret;

const hmac = crypto.createHmac("sha256", secret);
const computedSignature = hmac.update(rawBody).digest("hex");

if (computedSignature !== signature) {
  return new Response("Unauthorized", { status: 401 });
}

Events

Sendcloud — `parcel_status_changed`

Fired whenever a parcel's status changes in the Sendcloud system. The handler updates the matching fulfillment record with the new status and tracking URL.

**Payload example:**

json
{
  "action": "parcel_status_changed",
  "parcel": {
    "id": 123456789,
    "order_number": "ORD-2026-0042",
    "tracking_number": "3SXYZ1234567890",
    "tracking_url": "https://tracking.sendcloud.sc/forward?carrier=postnl&code=3SXYZ1234567890",
    "carrier": {
      "code": "postnl"
    },
    "status": {
      "id": 11,
      "message": "Delivered"
    },
    "weight": "0.500",
    "to_postal_code": "75001",
    "to_country": "FR",
    "shipment": {
      "id": 987654321,
      "name": "PostNL Standard"
    }
  },
  "timestamp": "2026-05-22T16:45:00Z"
}

Status mapping

Sendcloud status IDStatus messageTypical Reponse mapping
1Announcedpending
3En route to sorting centerin_transit
4Sortingin_transit
6Sortedin_transit
8Delivery attempt failedexception
11Delivereddelivered
12Returned to senderreturned
62Being returnedreturning
999Unknownexception

Processing flow

Logistics provider (e.g. Sendcloud)
  ↓ POST /api/webhooks/logistics?provider=sendcloud&workspaceId=ws_123
  ↓ Verify signature (HMAC-SHA256)
  ↓ Parse payload
  ↓ Match order by order_number + workspace_id
  ↓ Upsert fulfillment record (status, tracking_url, tracking_number)
  ↓ Optionally trigger customer notification
  ↓ Return 200 OK

Retry policy

ProviderRetry behaviour
SendcloudRetries on non-2xx, up to 5 attempts with linear backoff over 24 hours
ShipStation(planned) Retries with exponential backoff

Best practices

  1. Always include both query params — provider and workspaceId are required; requests without them return 400.
  2. Store the webhook secret securely — the Sendcloud secret is stored in fulfillment_config on the workspace, not in environment variables.
  3. Handle unknown providers gracefully — the handler logs the payload and returns 400 for unrecognised providers.
  4. Monitor parcel exceptions — status 8 (delivery attempt failed) and 999 (unknown) should trigger merchant alerts.
  5. Prepare for multi-provider — the architecture supports multiple logistics providers per workspace. The provider query param routes to the correct handler.
PreviousReviews (Stamped / Trustpilot)
NextEmail Inbound