← All posts
Linnworks + AI 2 December 2026 6 min read

Linnworks API: get an order by order number, reference or ID

It depends which identifier you have. For the order's GUID (pkOrderId), call GetOrdersById, which returns an array even for one order. For the order number people see in Linnworks (NumOrderId), call GetOrderDetailsByNumOrderId, which returns an empty object rather than an error when nothing matches. For the channel's reference, call GetOrderDetailsByReferenceId, which can return several orders. To find processed orders by date, search first with SearchProcessedOrders, then fetch the ones you need by ID.

Which identifiers does a Linnworks order have?

The OrderDetails schema in the GetOrdersById reference lists them:

Don't confuse any of these with order identifiers in the Linnworks interface, which are tags you assign; order identifiers and the Rules Engine covers those. Treat the secondary and external references as optional: not every channel fills them in.

Why does GetOrdersById return an array?

Because it is a batch call. Its request has one property, pkOrderIds, which is a list of GUIDs, and its response schema is an array of OrderDetails. Ask for one order and you still get a list, so take the first element and check that it exists. Sent form-encoded, the list is a JSON string in a single field:

POST {Server}/api/Orders/GetOrdersById
Authorization: your-session-token
Content-Type: application/x-www-form-urlencoded

pkOrderIds=["9b1d...-...-..."]

Then, in JavaScript:

const orders = await res.json();   // always an array
const order = orders[0];
if (!order) throw new Error("No order with that pkOrderId");

That is exactly what the hosted server's open code does when it needs one order: it sends a one-item list, takes element zero, and raises a clear error if the list is empty. The reply is rich: GeneralInfo, ShippingInfo, CustomerInfo, TotalsInfo, Items, Notes, ExtendedProperties and folder names, plus Processed and ProcessedDateTime so you can tell open from processed orders. The reference also needs the GlobalPermissions.OrderBook.ViewOrderDetailsNode permission and shows a rate limit of 250 calls a minute.

Order lines carry their own IDs. OrderItem.ItemId is the stock item's GUID, the same value stock calls call StockItemId, and ItemNumber on an order line is the channel's item number, not your SKU; the SKU has its own field. How to read a Linnworks API reference page has the full list of stock ID names.

How do you get an order by its order number?

Use GetOrderDetailsByNumOrderId. Two details catch people out:

GET {Server}/api/Orders/GetOrderDetailsByNumOrderId?OrderId=123456
Authorization: your-session-token

How do you find an order by the channel's reference?

GetOrderDetailsByReferenceId is also a GET, with a ReferenceId query parameter. It returns an array of OrderDetails, at most 50, so handle more than one match: a reference is only as unique as the channel made it. If your code assumes one order per reference, check the array length and stop when it's ambiguous rather than picking the first row.

Is there a faster call for open orders?

Yes. The order lookup pages recommend OpenOrders/GetOpenOrdersDetails for open orders. Its reference says it returns only open orders, is much faster than the general detail call, and isn't limited in how many orders you can ask for. It takes OrderIds and an optional DetailLevel list (FOLDER, NOTES, IDENTIFIERS, EXTENDEDPROPERTIES, BINRACKS); leave DetailLevel empty for full details. Its reply has a different shape from GetOrdersById, so don't reuse the same parser blindly.

How do you search processed orders?

Processed orders have their own controller. SearchProcessedOrders takes a single request object with these properties:

Form-encoded, the whole object goes in one field called request, as a JSON string. Before encoding it looks like this:

POST {Server}/api/ProcessedOrders/SearchProcessedOrders
Authorization: your-session-token
Content-Type: application/x-www-form-urlencoded

request={"DateField":"processed","FromDate":"2026-11-01T00:00:00Z","ToDate":"2026-11-30T23:59:59Z","SearchFilters":[{"SearchField":"Source","SearchTerm":"EBAY"}],"SearchSorting":{"SortField":"dProcessedOn","SortDirection":"DESC"},"PageNumber":1,"ResultsPerPage":50}

The reply wraps a paged result in a ProcessedOrders property: PageNumber, EntriesPerPage, TotalEntries, TotalPages and a Data list. Loop until PageNumber reaches TotalPages. The hosted server's code always sends a date range, sorts by processed date, newest first, and keeps ResultsPerPage between 20 and 200; its notes say Linnworks returns at least 20 results per page.

Watch the field names in search results

Search rows (ProcessedOrderWeb in the reference) don't use the same names as OrderDetails:

Map them explicitly in one place, and use the pkOrderID from a search row when you call GetOrdersById for the full record.

The older paged search

There is also SearchProcessedOrdersPaged, with lower-case parameters: from, to, dateType (ALLDATES, RECEIVED, PROCESSED, PAYMENTRECEIVED or CANCELLED), searchField, exactMatch, searchTerm, pageNum and numEntriesPerPage (maximum 200). Its reference says the maximum date range is three months. Pick one search call and stick with it, because their parameter names don't line up.

If an order you processed a moment ago isn't in the search results, read processed orders not showing in search before you debug your code, and open vs processed orders for what processing changes.

Which call should you use?

  1. You have pkOrderId GUIDs: GetOrdersById, and take element zero for one order.
  2. You have the order number: GetOrderDetailsByNumOrderId, and check the reply isn't empty.
  3. You have the channel's reference: GetOrderDetailsByReferenceId, and expect more than one match.
  4. The orders are open and you want speed: GetOpenOrdersDetails.
  5. You need processed orders over a period: SearchProcessedOrders, then GetOrdersById for full records.

Or skip building it

If the goal is an AI assistant that can answer "what happened to order 123456?" or "what did we sell on eBay last week?", the order tools already exist. The Hosted MCP Server for Linnworks gives Claude read-only tools to search open and processed orders and pull an order's full record, with nothing to deploy. The Linnworks MCP source code has the same order tools, and you run it on your own Cloudflare account and change it as you like.

MCP-G is part of Green & Home Limited and is not affiliated with, endorsed by or sponsored by Linnworks or Anthropic.

Rather not write the order lookups yourself? Start a 14-day free trial of the hosted server (Starter is C$26.79 a month + tax where applicable afterwards), or buy the self-host source for C$940 + tax where applicable, one-off.

Frequently asked questions

Why does GetOrdersById return an array?

It is a batch call: its request takes pkOrderIds, a list of order GUIDs, and its response schema is an array of OrderDetails. Asking for one order still returns a list, so take element zero and handle an empty list as not found.

How do I get a Linnworks order by its order number through the API?

Call GetOrderDetailsByNumOrderId, a GET request whose OrderId query parameter takes the numeric order number. Linnworks’ reference says it returns an empty class if the order is not found, so check the reply has an OrderId before using it.

How do I find an order by the marketplace order reference?

Use GetOrderDetailsByReferenceId with the ReferenceId query parameter. It returns an array of up to 50 orders, so be ready for more than one match.

How do I search processed orders by date with the Linnworks API?

Call SearchProcessedOrders with a request object that sets DateField (processed, payment, cancelled or received), FromDate and ToDate, plus optional SearchTerm, SearchFilters for Source, SubSource or ItemIdentifier, paging and sorting. Then fetch full records with GetOrdersById.

What is the difference between pkOrderId and NumOrderId?

pkOrderId is the order’s GUID, which most order calls take. NumOrderId is the Linnworks order number, an integer that people see and quote. Processed order search results call them pkOrderID and nOrderId.

Is there a faster way to get open order details?

Yes. Linnworks recommends OpenOrders/GetOpenOrdersDetails for open orders. Its reference says it returns only open orders, is much faster than the general detail call and has no limit on the number of orders, with an optional DetailLevel list to trim the reply.

Ask Claude about your Linnworks account

The Hosted MCP Server for Linnworks connects Claude to your own Linnworks account, read-only. 14-day free trial, then C$26.79 a month + tax where applicable.

See the hosted server

Want to run it yourself today? Buy the Linnworks MCP source code and deploy it to your own Cloudflare account. C$940 + tax where applicable, one-off.