InventoryPro

Contents

api

OData Feeds

OData Feeds

The OData endpoint exposes read-only feeds of Inventory Pro data at /odata. It is designed for reporting and analytics tools — particularly Power BI — that understand the OData protocol natively. You get rich filtering and column selection without writing custom code.

The OData feeds and the REST API use the same bearer token authentication and the same action-level API permissions.

Quick start:

  • Request a bearer token with POST /Token
  • Query feeds at https://<your-host>/odata/<FeedName>
  • Fetch the service metadata from /odata/$metadata
  • Use $filter, $select, $orderby, $top, $skip, and $count to shape results

When to Use OData vs REST

Use caseUse
Power BI reports, Excel data connectionsOData
Paginated data for reporting or BI toolsOData
Reading bulk reference data (items, vendors, POs)OData
Writing data (receive, move, issue stock)REST API
Transactional operations with precise error handlingREST API
Webhook subscriptions and event-driven workflowsREST API

OData is read-only. If you need to create, update, or delete records, use the REST API.

Base URL

https://<your-host>/odata

HTTPS is required. HTTP requests are rejected.

Authentication

OData uses the same bearer token as the REST API. Obtain a token from POST /Token using your client credentials, then include it in the Authorization header of every OData request.

See Authentication for the full token request flow and token lifecycle details.

Authorization: Bearer <access_token>

Available Feeds

FeedURL
Items/odata/Items
Assets/odata/Assets
Asset Types/odata/AssetTypes
Categories/odata/Categories
Customers/odata/Customers
Vendors/odata/Vendors
Purchase Orders/odata/PurchaseOrders
Purchase Order Lines/odata/PurchaseOrderLines
Shipping Orders/odata/ShippingOrders
Shipping Order Lines/odata/ShippingOrderLines
Work Orders/odata/WorkOrders
Work Order Lines/odata/WorkOrderLines

Service Document

The OData service document lists all available feeds:

GET https://your-host/odata
Authorization: Bearer <access_token>

Metadata Document

The canonical OData metadata document is available as XML at:

GET https://your-host/odata/$metadata
Authorization: Bearer <access_token>

The Items feed omits legacy columns WtVary, Store, and FixedSpot. The PurchaseOrders feed omits QBConsolidatedInvoice and QBReadyForProccessing.

Query Options

OptionDescriptionExample
$filterFilter rows by field values$filter=Category eq 5
$selectReturn only specific fields$select=PartNo,ShortID,Description
$orderbySort results$orderby=Description asc
$topLimit the number of rows returned$top=100
$skipSkip rows for manual paging$skip=200
$countInclude total row count in response$count=true

Combine options using &:

 /odata/Items?$select=PartNo,ShortID,Description&$filter=Category eq 5&$orderby=ShortID&$top=50

Filter Examples

# Items in a specific category
/odata/Items?$filter=Category eq 12

# Purchase orders modified after a date
/odata/PurchaseOrders?$filter=Modified gt 2025-01-01T00:00:00Z

# Open shipping orders
/odata/ShippingOrders?$filter=Complete eq 0&$select=Rec,Associate,Created

# Return a small item extract for reporting
/odata/Items?$select=PartNo,ShortID,Description&$orderby=ShortID&$top=25

Connecting Power BI

Power BI has native OData support via Get Data → OData Feed.

  1. Open Power BI Desktop.

  2. Select Home → Get Data → OData Feed.

  3. Enter the feed URL, for example:

    https://your-host/odata/Items
  4. When prompted for authentication, choose Anonymous — you will pass the token manually, or use the Advanced option to add headers.

    Recommended approach: Use a blank query with OData.Feed and pass the Authorization header directly:

    let
        token = "eyJ0eXAiOiJKV1Qi...",
        source = OData.Feed(
            "https://your-host/odata/Items",
            null,
            [
                Headers = [Authorization = "Bearer " & token],
                ODataVersion = 4
            ]
        )
    in
        source
  5. Replace the token value with your actual access token. For production reports, store the token in a Power BI parameter or use a dataflow with scheduled token refresh.

  6. Apply any $filter or $select options by appending them to the URL string before calling OData.Feed.

Refreshing Tokens in Power BI

Tokens expire after 4 hours. For scheduled dataset refreshes, automate token acquisition using a Power Automate flow or a gateway-side script that updates the Power BI parameter holding the token before each refresh.

Limitations

LimitationDetail
Read-onlyOData feeds do not support POST, PUT, PATCH, or DELETE.
$expand not supportedRelated entities cannot be fetched in a single request. Query each feed separately and join in your reporting tool.
HTTPS requiredHTTP is not accepted.
Permission scopeFeed access is controlled by the same API security rights used by the REST API.
No batch requests$batch is not supported.

Troubleshooting

401 Unauthorized Your token is missing, expired, or malformed. Request a new token from POST /Token. See Authentication.

403 Forbidden Your integration user does not have permission to access the requested feed. Contact your Inventory Pro administrator to review the API user’s security rights.

404 Not Found The feed name is case-sensitive. Check the URL against the Available Feeds table above.

Power BI shows “Web.Contents is not enabled for this extension” Use OData.Feed instead of Web.Contents for OData URLs. Power BI treats these differently for scheduled refresh compatibility.

Empty results Your API user may not have access to the requested feed, or a $filter value may not match any records. Try the feed URL without filters to confirm data is reachable.

On this page