Including Related Data

Use the include query parameter to fetch related data alongside search results

Some search endpoints support an include query parameter that lets you fetch related data in a single request, avoiding extra API calls. Without include, related properties are omitted entirely from the response. With it, the requested relationships are populated inline.


Syntax

Pass a comma-separated list of relationship names as the include query parameter:

GET /{resource}/search?q=<query>&include=<relationship1>,<relationship2>

Values are case-sensitive and must match the relationship names documented for each endpoint. Unrecognized values are silently ignored.


Supported Endpoints

API: Internal API

Relationship
Description

lineItems

Line item details for each order (part number, quantity, price, status)

shippingInfo

Shipping details for each order (address, carrier, service level)

Without includelineItems and shippingInfo are not present in the response:

{
  "data": {
    "orders": [
      {
        "orderId": 5499760,
        "companyId": 12345,
        "requesterId": 500,
        "poNumber": "PO-456",
        "requesterName": "Jane Smith",
        "statusName": "Processing",
        "createdTimestamp": "2026-01-15T10:30:00Z"
      }
    ],
    "pagination": { "total": 1, "limit": 50, "offset": 0, "hasMore": false }
  }
}

With include=lineItems,shippingInfo:

You can include one or both relationships:


Performance Considerations

Including related data increases response size and may add latency. Only request relationships you need. For large result sets, consider:

  • Using a narrower search query to reduce the number of orders returned

  • Reducing the limit parameter when including related data

  • Omitting include when you only need order-level summary information

Last updated