ShipStation
Create Integration Instance
Creates a new ShipStation integration instance.
Get Integration Instance
Returns a single ShipStation integration instance with its connection settings and integration settings.
Update Integration Instance
Update an existing ShipStation integration instance. All fields are optional. Requires Bearer token.
Delete Integration Instance
Deletes a ShipStation integration instance. The deletion runs asynchronously — a background job removes the instance and its related data (orders, warehouses, shipping method mappings, webhook events/subscriptions).
Get Dashboard Metrics
Returns dashboard metrics for a ShipStation integration instance.
Get Orders Chart (Date Range)
Returns a daily order-count time series for a ShipStation integration instance over the given date range, powering the dashboard orders trend chart's custom range selection.
Test Connection
Tests the ShipStation API connection for an integration instance by calling the ShipStation V1 List Warehouses endpoint with the instance's stored apiKey/apiSecret.
Preview Cost Line Type Impact
Preview how many ShipStation cost financial lines and sales orders would be touched if the fulfillment-cost financial line type changed to new_type_id. Read-only. Requires Bearer token.
Update Fulfillment Routing
Saves per-warehouse fulfillment routing for a ShipStation integration instance — which SKU warehouses participate in ShipStation fulfillment and which of those are pushed automatically (no manual review). Stored under integration_settings.fulfillment.
List Orders
Paginated list of locally cached ShipStation orders for an integration instance (default sort `-id`, default 10 per page). Eager loads the linked SKU fulfillment (+ sales order number and warehouse).
Search Orders (Live)
Search ShipStation **live** for orders matching a phrase, for the refresh modal's 'Search Specific Order' tab. ShipStation's V1 `orderNumber` filter is a **starts-with** match, so the query should be an order number or its prefix (up to 50 results are fetched). Each result is flagged with whether it already exists in this instance's local cache so the UI can offer Download (new) vs Update (existing).
Sync Orders
Queue a background orders sync from ShipStation into the local cache. Dispatches a tracked job (a background job, job name `Sync ShipStation Orders: {instance name}`) and returns its `tracked_job_log_id` for polling via the tracked job log endpoints or the `sync-progress` endpoint.
Sync Info
Header data for the orders refresh modal: the most recently dated order (number + ISO-8601 order date), the total cached order count, and the effective **order start date** the 'Fetch from Start Date' sync option will use.
Sync Progress
Poll the progress of a queued orders sync by its tracked job log id (returned by POST `/orders/sync`).
Refresh Single Order
Download (or update) a single order **live** from ShipStation by its ShipStation order id and upsert it into the local cache with detailed data (`has_detailed_data: true`, `details_last_updated` stamped). Backs the search tab's per-result Download/Update buttons. Newly downloaded orders are auto-linked to a matching SKU fulfillment when an unambiguous match exists.
Submit Fulfillment
Manually re-dispatch a SKU.io SalesOrderFulfillment's sales order to ShipStation via the canonical operator-initiated FulfillmentDispatcher. On the `defer_dispatch_sof` canary this submits the FulfillmentOrder with NO SalesOrderFulfillment at submit (the shipment SOF is minted at ship); it is idempotent — already-submitted FulfillmentOrders are skipped.
Get Order
Returns a single ShipStation order from the local cache, serialized via ShipStation order object. Includes the order status (value + label + color), carrier/service codes, a resolved `tracking_url` (derived from `carrier_code` + `tracking_number` via `ShipstationTrackingUrl::resolve`), and the linked SKU.io sales order fulfillment (`sku_fulfillment`, null when not linked).
Get Order Detail (raw JSON)
Returns the full cached detail for a ShipStation order: the complete raw `json_object` payload (including `items`, addresses, weight, advanced options, etc. when full detail has been fetched), plus `has_detailed_data` indicating whether the per-order detail endpoint has been synced (via `POST .../sync-detail`) and `details_last_updated` for when that happened.
Get Order Webhook Events
Recent webhook events scoped to this single ShipStation order, matched on the order's `order_number`, `tracking_number` or `shipstation_order_id`. Used by the order detail page to render a per-order webhook audit trail.
Refresh Order Tracking
Refreshes tracking for a single order live from ShipStation's V1 `/shipments` endpoint (looked up by the order's ShipStation order ID), persists the tracking number / carrier / ship date to the local order cache, and applies the tracking to the linked SKU.io SalesOrderFulfillment (if any). Mirrors the Starshipit 'Refresh Order Tracking' endpoint.
Sync Order Detail
Fetches the full order detail for a single order live from the ShipStation API, replacing the cached `json_object` with the complete per-order payload (items, addresses, weight, advanced options) and setting `has_detailed_data=true` + `details_last_updated`.
Link Order to Fulfillment
Manually links a cached ShipStation order to a SKU.io SalesOrderFulfillment by setting `sku_fulfillment_id` on the order (matched by its ShipStation order ID).
Unlink Order from Fulfillment
Removes the manual link between a cached ShipStation order and its SKU.io SalesOrderFulfillment by clearing `sku_fulfillment_id` on the order.
Download Shipping Services
Download available shipping services from ShipStation and seed them into the shipping method mapping table.
Get Order Activity Log
Paginated Spatie activity-log entries for a single Shipstation order (by local row id) — the order detail page's Activity Log tab. Each entry: id, description, event (created/updated/deleted), subject_type, subject_id, properties (changed attributes), causer_name, created_at. Ordered newest first.
List Shipments
List label shipments for a ShipStation integration instance (paginated). Backed by the dedicated shipstation_shipments table populated from ShipStation's GET /shipments endpoint.
Get Shipment
Get a single ShipStation shipment by local row id. Returns 404 when the shipment does not belong to the instance.
Refresh Shipment From ShipStation
Fetch fresh shipment data live from the ShipStation API and upsert it into the local row, then return the refreshed resource (including the raw json_object payload).
Sync Shipments
Queue a tracked background sync that pages ShipStation's GET /shipments endpoint into the shipstation_shipments table (and applies tracking to linked orders/fulfillments, including a second pass over GET /fulfillments for externally fulfilled orders).
Shipments Sync Info
Header data for the shipments refresh modal: the most recently created shipment (by ShipStation createDate), the total shipment count, and the effective sync start date for this instance.
Search Shipments
Search ShipStation live for label shipments matching an order number or tracking number. Backs the 'Search Specific Shipment' tab of the shipments refresh modal.
Refresh Single Shipment
Download (or update) a single label shipment live from ShipStation and persist it to the local cache. Backs the per-result Download/Update buttons on the shipments refresh modal's search tab.
List Warehouses
All cached ShipStation warehouses for this instance, ordered by name (no pagination or filters). Each entry includes the optional SKU.io warehouse link (`warehouse_id` + `warehouse_name`) and origin-address fields.
Sync Warehouses
Queues a background job as a tracked job that pulls the warehouse list from the ShipStation API and upserts the local cache. No request body. Returns `data.tracked_job_log_id` for the tracked job log endpoints.
Link Warehouse
Links (or unlinks) a ShipStation warehouse to a SKU.io warehouse.
Get ShipStation Warehouses
List all ShipStation warehouses that have been downloaded from ShipStation.
Get Warehouse Mappings
Retrieve all mappings between SKU warehouses and ShipStation warehouses.
Download ShipStation Warehouses
Download warehouses from ShipStation and store them locally.
Map Warehouses
Create mappings between SKU warehouses and ShipStation warehouses.
Unmap Warehouses
Remove warehouse mappings between SKU and ShipStation.
List Shipping Methods
Returns every ShipStation carrier/service combination for the instance (flattened to `carrier_code|service_code` codes, cached 10 minutes from the ShipStation /carriers + /services endpoints, sorted by carrier then service name) with its current SKU.io mapping (or null), plus the list of available SKU.io shipping methods for the mapping dropdown.
Sync Shipping Methods
Queues a background job as a tracked job that force-refreshes the carrier/service cache from ShipStation. No request body. Returns `data.tracked_job_log_id` for the tracked job log endpoints.
Export Shipping Method Mappings (CSV)
Downloads the persisted mappings as CSV (Content-Type: text/csv, Content-Disposition attachment named `shipstation-shipping-methods-{instance}-{date}.csv`). Only stored mappings are exported — no live ShipStation API calls.
Import Shipping Method Mappings (CSV)
Uploads a CSV of mappings (multipart/form-data).
Map Shipping Method
Creates or updates a single mapping from a ShipStation `carrier_code|service_code` code to a SKU.io shipping method. Carrier/service metadata is captured from the cached service list when the code is recognized.
Bulk Map Shipping Methods
Maps many ShipStation service codes to a single SKU.io shipping method in one call. Duplicate codes are de-duplicated; carrier/service metadata is derived from the `carrier_code|service_code` split (no live ShipStation lookup).
Unmap Shipping Method
Deletes the mapping for a ShipStation service code.
List Webhook Events
Paginated list of inbound webhook events recorded for this ShipStation integration instance, newest first (default sort -id).
Get Webhook Event
Returns the full detail for a single webhook event, including the raw inbound `payload`, processing status, error message (if processing failed), dedup key and signature validity.
Retry Webhook Event
Queues the webhook event for reprocessing by dispatching a background job. Typically used on events whose `processed` flag is false and `error_message` is set (e.g. a transient ShipStation API failure during the resource fetch).
List Webhook Configurations
Returns the webhook configuration matrix for the instance:
Subscribe to Webhook Event
Creates a webhook subscription on the ShipStation account (POST /webhooks/subscribe via the ShipStation V1 API) pointing at this instance's ingress URL, then records it locally.
Sync Subscriptions from ShipStation
Reconciles the local subscription table with the live webhook list on the ShipStation account (GET /webhooks):
Unsubscribe Webhook
Removes the webhook subscription from the ShipStation account (DELETE /webhooks/{id}) and deletes the local record.