For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search for orders in the external order system

Search for orders in the tenant's external order system.

Requires the EXTERNAL_ORDER_SEARCH extension to be active on the tenant, pointing at the extension that does the searching.

post
/tenants/{tenantUid}/orders/search/external
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Query parameters
pageNumberintegerOptional

Reference to a specific page in a result set.

pageSizeintegerOptional

The number of items per page in a result set.

Body

Search criteria for orders in the external order system.

querystringOptional

Free text search. Matches order number, customer and product lines.

storeUidsstring[]Optional

Narrow the search to these stores. The caller must have access to every store listed, and they must all belong to the same organization.

Leave it out to search every order the tenant has in the external system. Note that orders which did not originate in Flow may not carry a store at all, so a store filter hides them.

customerUidsstring[]Optional

Narrow the search to these customers. These are Flow customer uids — the search resolves each one to the id the external system holds on the order, which is the customer's external id when it has one and the Flow uid otherwise, and asks for both.

Leave it out to search orders for every customer. A uid the tenant does not have is an error, not an empty result.

Responses
200

Example response

application/json
post/tenants/{tenantUid}/orders/search/external
POST /v2/tenants/{tenantUid}/orders/search/external HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "query": "text",
  "storeUids": [
    "text"
  ],
  "customerUids": [
    "text"
  ]
}
200

Example response

{
  "items": [
    {
      "orderUid": "text",
      "orderNumber": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "customerAddress": {
        "address": "text",
        "city": "text",
        "companyName": "text",
        "countryCode": "text",
        "email": "text",
        "firstname": "text",
        "lastname": "text",
        "mobile": "text",
        "postalCode": "text",
        "vatNumber": "text",
        "displayName": "text"
      },
      "customerUid": "text",
      "note": "text",
      "orderTotals": {
        "grandTotal": 1
      },
      "storeUid": "text",
      "storeName": "text",
      "tenantUserDisplayName": "text",
      "voucherNumber": "text",
      "items": [
        {
          "orderItemUid": "text",
          "allowedActions": [
            "QUANTITY_SOLD"
          ],
          "createdAt": "2026-01-01T00:00:00.000Z",
          "sku": "text",
          "name": "text",
          "note": "text",
          "productUid": "text",
          "coverImage": {
            "productMediaUid": "text",
            "mainUrl": "text",
            "thumbnailUrl": "text"
          },
          "itemPrice": 1,
          "itemDiscountAmount": 1,
          "totalPrice": 1,
          "totalDiscountAmount": 1,
          "quantityOrdered": 1,
          "quantityCredited": 1,
          "quantityDelivered": 1,
          "quantityReserved": 1,
          "serialnumber": "text",
          "sortOrder": 1,
          "tenantUserDisplayName": "text"
        }
      ]
    }
  ],
  "paging": {
    "pageNumber": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}

Last updated

Was this helpful?