ShipStation (Apps step)
ShipStation
Lists, reads and creates ShipStation orders, buys labels for them and lists shipments through the ShipStation API (V1).
Use it to connect ShipStation to the plant's orders: send orders from Plex to ShipStation to be shipped, buy a label for an order from a workflow, or bring tracking numbers back once orders ship.
Beta. This step has not yet been checked against a live ShipStation account, so treat its first runs as a test, and tell us if an operation does not answer as described.
Find it in the workflow editor's palette under Apps. See Apps steps for what every Apps step has in common.
Set it up
- In ShipStation, open Settings › Account › API Settings and generate an API Key and API Secret (API access needs a ShipStation plan that includes it).
- In DataMagik, open Script Engine › Credentials and add a "Basic Auth (Username/Password)" credential with the API Key as the username and the API Secret as the password.
- Add ssapi.shipstation.com to Allowed Domains in the workflow's Script settings.
Credential: A Basic credential: the ShipStation API Key as the username and the API Secret as the password.
Hosts it calls: ssapi.shipstation.com
Operations
| Operation | What it does |
|---|---|
| Order › List | Lists orders that match the filters, 100 per request, following every page up to the step's page limit. |
| Order › Get | Reads one order by its ShipStation order ID. |
| Order › Create or update | Creates an order, or updates the one with the same orderKey. |
| Label › Buy for order | Buys a shipping label for an existing order and marks the order shipped. |
| Shipment › List | Lists shipments (labels bought) that match the filters, 100 per request, following every page up to the step's page limit. |
Order › List
Lists orders that match the filters, 100 per request, following every page up to the step's page limit.
Calls GET /orders. Follows the pages, up to Most pages (10 unless you change it).
| Field | Required | What to put |
|---|---|---|
| Status | No | Only orders with this status. One of: Awaiting payment, Awaiting shipment, Pending fulfillment, Shipped, On hold, Cancelled. |
| Order number | No | Only orders whose number starts with this text. Leave empty for all. For example PO-88123. |
| Changed since | No | Only orders changed on or after this date and time, in ShipStation's time (US Pacific). Leave empty for all. For example 2026-11-22 00:00:00. |
What comes out: One item per order: {{ $json.orderId }}, {{ $json.orderNumber }}, {{ $json.orderKey }}, {{ $json.orderStatus }}, {{ $json.orderDate }}, {{ $json.shipTo }} (with name, street1, city, state, postalCode), {{ $json.items }} (each with sku, name and quantity) and {{ $json.weight }}.
Example: List the orders awaiting shipment each morning and email the shipping team the count by customer.
Order › Get
Reads one order by its ShipStation order ID.
Calls GET /orders/{orderId}.
| Field | Required | What to put |
|---|---|---|
| Order ID | Yes | ShipStation's numeric order ID (orderId), not the order number. For example 123456789. Choose from list beside the field fetches the choices from your account. |
What comes out: One item: the order, with {{ $json.orderId }}, {{ $json.orderNumber }}, {{ $json.orderStatus }}, {{ $json.shipTo }}, {{ $json.items }} and {{ $json.weight }}.
Example: Read {{ $json.orderId }} to check it is still awaiting shipment before buying its label.
Order › Create or update
Creates an order, or updates the one with the same orderKey.
Calls POST /orders/createorder.
| Field | Required | What to put |
|---|---|---|
| Order | Yes | The order as ShipStation's API reference describes it. orderNumber, orderDate, orderStatus, billTo and shipTo are required; orderKey makes a later call update this order instead of adding another. For example {"orderNumber": "{{ $json.po }}", "orderKey": "{{ $json.po }}-{{ $json.release }}", "orderDate": "{{ $now }}", "orderStatus": "awaiting_shipment", "billTo": {"name": "{{ $json.customer }}"}, "shipTo": {"name": "{{ $json.customer }}", "street1": "{{ $json.street }}", "city": "{{ $json.city }}", "state": "{{ $json.state }}", "postalCode": "{{ $json.zip }}", "country": "US"}, "items": [{"sku": "{{ $json.part_no }}", "name": "{{ $json.part_name }}", "quantity": {{ $json.qty }}}]}. |
What comes out: One item: the order as ShipStation saved it, with {{ $json.orderId }} (keep it to buy the label), {{ $json.orderNumber }}, {{ $json.orderKey }} and {{ $json.orderStatus }}.
Example: For each Plex release due to ship today, create or update the ShipStation order with orderKey {{ $json.po }}-{{ $json.release }} so the shipping desk sees it.
Label › Buy for order
Buys a shipping label for an existing order and marks the order shipped.
Calls POST /orders/createlabelfororder.
| Field | Required | What to put |
|---|---|---|
| Order ID | Yes | ShipStation's numeric order ID (orderId), not the order number. For example 123456789. Choose from list beside the field fetches the choices from your account. |
| Label details | Yes | The carrier, service, package, ship date and weight, as ShipStation's API reference describes them. The carrier and service codes are the ones ShipStation lists for your connected carriers. For example {"carrierCode": "ups_walleted", "serviceCode": "ups_ground", "packageCode": "package", "confirmation": "none", "shipDate": "2026-11-22", "weight": {"value": {{ $json.weight_lb }}, "units": "pounds"}, "testLabel": false}. |
What comes out: One item: {{ $json.shipmentId }}, {{ $json.trackingNumber }}, {{ $json.shipmentCost }}, {{ $json.insuranceCost }}, and {{ $json.labelData }}, the label as base64 text of a PDF (not a file).
Example: When the dock scans an order's last carton, buy its UPS Ground label, save {{ $json.trackingNumber }} on the Plex shipper and email the PDF to the dock printer's mailbox.
Shipment › List
Lists shipments (labels bought) that match the filters, 100 per request, following every page up to the step's page limit.
Calls GET /shipments. Follows the pages, up to Most pages (10 unless you change it).
| Field | Required | What to put |
|---|---|---|
| Order number | No | Only shipments whose order number starts with this text. Leave empty for all. For example PO-88123. |
| Shipped on or after | No | Only shipments with a ship date on or after this date. Leave empty for all. For example 2026-11-22. |
What comes out: One item per shipment: {{ $json.shipmentId }}, {{ $json.orderId }}, {{ $json.orderNumber }}, {{ $json.trackingNumber }}, {{ $json.carrierCode }}, {{ $json.serviceCode }}, {{ $json.shipDate }}, {{ $json.shipmentCost }} and {{ $json.voided }} (true when the label was voided).
Example: List today's shipments and write each tracking number back to the Plex shipper with the same order number.
Trigger: ShipStation: New Items
Under Triggers in the palette. It looks at ShipStation on a schedule (every 15 minutes unless you change Look every) with one of these operations: Order › List; Shipment › List, and starts the workflow with the items it has not seen on an earlier look, one item each. Saving the workflow sets up the schedule.
- New means: not seen before, by the item's id (or the field you name in Item field), or newer than the newest one last time, by a date or increasing number.
- On the first run it only remembers what is there, unless you choose Start with everything.
- Test runs show what would be new without remembering it. It remembers the last 5000 ids, so filter the list to keep it shorter than that.
Example
A ShipStation: New Items trigger watches Shipments › List; for each new shipment it writes {{ $json.trackingNumber }} and {{ $json.shipmentCost }} back to the Plex order whose number is {{ $json.orderNumber }}.
Tips
- ShipStation allows 40 requests a minute per API key; set "Most requests per second" to 0.6 on steps that run once per item over many items.
- Create or update order updates the order whose orderKey matches, so send the same orderKey (such as the Plex PO and release) every time to update rather than duplicate it.
- Dates in filters are in ShipStation's own time zone (US Pacific), as 2026-11-22 08:00:00.
- Buy label buys a real label charged to the carrier account, on test runs too; add "testLabel": true to its details while building.
Settings every Apps step has
- More query parameters: any query parameter the fields do not offer, sent as is.
- More body fields: a JSON object merged into the request body; nested objects merge, other values replace.
- Most requests per second: spaces the calls out for rate limits. A "too many requests" (429) answer is retried after the wait the API asks for.
- Most pages: for operations that follow pages, the most pages to fetch (10 unless you change it, up to 100). The run warns when it stops with more to get.
- Fail on a non-2xx response: on by default. Turn it off to handle errors yourself.
ShipStation's own API documentation: https://www.shipstation.com/docs/api/