---
title: MarginEdge API Integration on Truto
slug: marginedge
category: Accounting
canonical: "https://truto.one/integrations/detail/marginedge/"
---

# MarginEdge API Integration on Truto



**Category:** Accounting  
**Status:** Beta

## MCP-ready AI tools

Truto exposes 47 tools for MarginEdge that AI agents can call directly.

- **list_all_margin_edge_categories** — Get categories. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at categories.
- **get_single_margin_edge_countsheet_by_id** — Get count sheet detail. Returns a single count sheet with its sections. Required: id, restaurantUnitId.
- **list_all_margin_edge_countsheets** — Get countsheets. Returns a paginated list of count sheets for a restaurant unit. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at countsheets.
- **list_all_margin_edge_inventories** — Get inventories. Returns a paginated list of inventories for a restaurant unit, optionally filtered by count sheet, date range, and status. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at inventories.
- **list_all_margin_edge_inventory_section_items** — Get inventory section items. Returns a paginated list of counted items within a specific inventory section. Required: restaurantUnitId, inventory_id, section_id. Truto follows MarginEdge's nextPage cursor (100 a page); records at items.
- **list_all_margin_edge_inventory_sections** — Get inventory detail. Returns a single inventory with its sections, paginated by section. Truto returns the inventory's sections (the inventory's own fields are in inventories.list). Required: restaurantUnitId, inventory_id. Truto follows MarginEdge's nextPage cursor (100 a page); records at sections.
- **list_all_margin_edge_new_item_reviews** — Get new item review. Returns vendor items first seen in a date range, newest first, with their review status and the product each was mapped to. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at newItemReviews.
- **create_a_margin_edge_order_export_request** — Submit orders export request. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_order_export_request_by_id** — Get orders export status. Required: id.
- **list_all_margin_edge_order_export_requests** — List orders export requests. Truto follows MarginEdge's nextPage cursor (100 a page); records at exportRequests.
- **get_single_margin_edge_order_by_id** — Get order detail. Required: id, restaurantUnitId.
- **list_all_margin_edge_orders** — Get orders. Required: endDate, restaurantUnitId, startDate. Truto follows MarginEdge's nextPage cursor (100 a page); records at orders.
- **create_a_margin_edge_product_export_request** — Submit products export request. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_product_export_request_by_id** — Get products export status. Required: id.
- **list_all_margin_edge_product_export_requests** — List products export requests. Truto follows MarginEdge's nextPage cursor (100 a page); records at exportRequests.
- **list_all_margin_edge_product_price_histories** — Get product price history. Returns the paginated price history for a product over a date range within a restaurant unit. Required: restaurantUnitId, company_concept_product_id. Truto follows MarginEdge's nextPage cursor (100 a page); records at priceHistory.
- **list_all_margin_edge_product_units** — Get product units. Returns all units defined for a product identified by its company concept product id within a restaurant unit. Required: restaurantUnitId, company_concept_product_id. Records at units.
- **list_all_margin_edge_products** — Get products. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at products.
- **list_all_margin_edge_profit_and_loss_reports** — Get profit and loss report. Returns complete P&L report data for a date range, scoped to a single restaurant unit or a restaurant unit group. Provide exactly one of restaurantUnitId or groupId (mutually exclusive); the user must have access to the requested scope. Required: startDate, endDate. Records at profitAndLossReports.
- **list_all_margin_edge_recipe_conversions** — Get recipe conversions. Returns a paginated list of recipe unit conversions for a restaurant unit. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at recipeConversions.
- **list_all_margin_edge_recipe_cost_histories** — Get recipe cost histories. Recipe cost history for one restaurant unit: each recipe's cost on each date it was recorded, for cost trends and past costs. recipeId limits the history to one recipe, and startDate and endDate bound the recorded dates: they default to the last 12 months and may span at most one year. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at recipeCostHistories.
- **create_a_margin_edge_recipe_cost_history_export_request** — Submit recipe cost histories export request. Submits an asynchronous bulk export of recipe cost histories. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_recipe_cost_history_export_request_by_id** — Get recipe cost histories export status. Returns the status of a single recipe cost histories export request and, once complete, a pre-signed download URL. Required: id.
- **list_all_margin_edge_recipe_cost_history_export_requests** — List recipe cost histories export requests. Returns a paginated list of submitted recipe cost histories export requests. Truto follows MarginEdge's nextPage cursor (100 a page, limit = page size up to 100); records at exportRequests.
- **create_a_margin_edge_recipe_export_request** — Submit recipes export request. Submits an asynchronous bulk export of recipes. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_recipe_export_request_by_id** — Get recipes export status. Returns the status of a single recipes export request and, once complete, a pre-signed download URL. Required: id.
- **list_all_margin_edge_recipe_export_requests** — List recipes export requests. Returns a paginated list of submitted recipes export requests. Truto follows MarginEdge's nextPage cursor (100 a page, limit = page size up to 100); records at exportRequests.
- **create_a_margin_edge_recipe_ingredient_export_request** — Submit recipe ingredients export request. Submits an asynchronous bulk export of recipe ingredients. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_recipe_ingredient_export_request_by_id** — Get recipe ingredients export status. Returns the status of a single recipe ingredients export request and, once complete, a pre-signed download URL. Required: id.
- **list_all_margin_edge_recipe_ingredient_export_requests** — List recipe ingredients export requests. Returns a paginated list of submitted recipe ingredients export requests. Truto follows MarginEdge's nextPage cursor (100 a page, limit = page size up to 100); records at exportRequests.
- **list_all_margin_edge_recipe_ingredients** — Get recipe ingredients. Returns a paginated list of recipe ingredients for a restaurant unit. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at recipeIngredients.
- **list_all_margin_edge_recipe_types** — Get recipe types. Returns the list of recipe types defined for a restaurant unit. Required: restaurantUnitId. Records at recipeTypes.
- **list_all_margin_edge_recipes** — Get recipes. Returns a paginated list of recipes for a restaurant unit with optional filters. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at recipes.
- **list_all_margin_edge_restaurant_unit_group_categories** — Get restaurant unit group categories. Truto follows MarginEdge's nextPage cursor (100 a page); records at groupCategories.
- **list_all_margin_edge_restaurant_unit_groups** — Get restaurant unit groups. Truto follows MarginEdge's nextPage cursor (100 a page); records at groups.
- **list_all_margin_edge_restaurant_units** — Get restaurant units. Records at restaurants.
- **list_all_margin_edge_sales_reports** — Get sales report. Returns sales report data for a date range, scoped to a single restaurant unit or a restaurant unit group. Provide exactly one of restaurantUnitId or groupId (mutually exclusive); the user must have access to the requested scope. Required: startDate, endDate. Records at salesReports.
- **create_a_margin_edge_usage_export_request** — Submit usage export request. Submits a new asynchronous bulk usage export request for the given inventory date range and returns the created export request details. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL. Required: startInventoryDate, endInventoryDate.
- **get_single_margin_edge_usage_export_request_by_id** — Get usage export status. Retrieves the current status and download information for a specific usage export request. Required: id.
- **list_all_margin_edge_usage_export_requests** — List usage export requests. Lists usage export requests for the authenticated user, optionally filtered by request date range, with cursor-based pagination. Truto follows MarginEdge's nextPage cursor (100 a page); records at exportRequests.
- **create_a_margin_edge_vendor_item_export_request** — Submit vendor items export request. Bulk exports are asynchronous: poll the matching get until the status is complete, then download the file from its URL.
- **get_single_margin_edge_vendor_item_export_request_by_id** — Get vendor items export status. Required: id.
- **list_all_margin_edge_vendor_item_export_requests** — List vendor items export requests. Truto follows MarginEdge's nextPage cursor (100 a page); records at exportRequests.
- **list_all_margin_edge_vendor_item_packagings** — Get vendor items packaging. Required: restaurantUnitId, vendor_id, vendor_item_code. Truto follows MarginEdge's nextPage cursor (100 a page); records at packagings.
- **list_all_margin_edge_vendor_items** — Get vendor items. Required: restaurantUnitId, vendor_id. Truto follows MarginEdge's nextPage cursor (100 a page); records at vendorItems.
- **list_all_margin_edge_vendor_items_by_product** — Get vendor items by product. Returns the paginated list of vendor items (with conversions) available for a product within a restaurant unit. Required: restaurantUnitId, companyConceptProductId. Truto follows MarginEdge's nextPage cursor (100 a page); records at vendorItems.
- **list_all_margin_edge_vendors** — Get vendors. Required: restaurantUnitId. Truto follows MarginEdge's nextPage cursor (100 a page); records at vendors.

## How it works

1. **Link your customer's MarginEdge account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach MarginEdge.** The Proxy API is a 1-to-1 mapping of the MarginEdge API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Embed MarginEdge in dynamic menu pricing platforms** — Digital menu and QR ordering SaaS can pull live recipe cost histories from MarginEdge to automatically flag or adjust menu prices when wholesale ingredient costs spike, helping restaurants protect margin without manual intervention.
- **Power AI operational co-pilots for restaurants** — AI assistants for chefs and GMs can answer natural language questions about food costs, vendor pricing, and daily P&L by querying MarginEdge recipes, product price histories, and profit and loss reports in real time.
- **Feed multi-unit BI dashboards with back-office data** — Restaurant analytics platforms serving franchisees can orchestrate MarginEdge's asynchronous bulk exports for orders, products, usage, and recipe cost history, then load the data into warehouses like Snowflake for cross-source KPI dashboards.
- **Enrich back-of-house ops and prep apps with inventory context** — Task management and prep-list SaaS can read MarginEdge inventories, countsheets, and usage data to automatically generate restocking tasks and prioritize prep based on what's actually on the shelf.
- **Build vendor and supply chain intelligence tools** — Procurement and spend analytics platforms can tap MarginEdge vendors, vendor items, orders, and product price histories to surface week-over-week inflation, supplier performance, and purchase anomalies across a restaurant group.

## What you can build

- **Recipe margin monitoring engine** — Pull recipes, recipe ingredients, and recipe cost histories to compute real-time margin per menu item and trigger alerts when COGS crosses a configurable threshold.
- **Multi-location P&L rollups** — Aggregate profit and loss reports and sales reports across restaurant units or an entire group to render consolidated financial dashboards for multi-unit operators.
- **Ingredient inflation tracker** — Use product price histories and vendor items to visualize week-over-week and vendor-by-vendor price changes on key SKUs like proteins, dairy, and produce.
- **Async bulk export pipeline to a data warehouse** — Trigger order, product, usage, vendor item, recipe, and recipe cost history export requests, poll their status, and automatically ingest the resulting files into BI or warehouse destinations.
- **Inventory-aware prep list generator** — Combine inventories, inventory sections, inventory section items, and countsheets to auto-generate daily prep and restock tasks based on current on-hand quantities.
- **Vendor order lookup and reconciliation** — Expose searchable vendor orders and line-item vendor item packagings inside your app so operators can verify what was ordered, received, and priced without logging into MarginEdge.

## FAQs

### How does authentication work for MarginEdge via Truto?

End users connect their MarginEdge account through Truto's managed connection flow. Truto handles credential storage, refresh, and per-tenant isolation so you never need to build or maintain the MarginEdge auth layer yourself.

### Is the integration read-only or does it support writes?

MarginEdge's public API is predominantly a one-way flow of data out of MarginEdge. The Truto toolset reflects this: most endpoints are list/get operations, with write capabilities limited to creating asynchronous bulk export requests (orders, products, usage, vendor items, recipes, recipe ingredients, and recipe cost history).

### How does Truto handle MarginEdge's asynchronous bulk exports?

Truto exposes the full async pattern: you call a create export request tool, poll the corresponding get-by-id tool for status, and retrieve the pre-signed download URL once the export is ready. This lets you ingest large historical datasets without managing the polling loop yourself.

### How is pagination handled across MarginEdge list endpoints?

MarginEdge uses cursor-based pagination with up to 100 items per page. Truto normalizes cursor handling across all list endpoints so you can iterate large result sets with a consistent pattern.

### Can I scope data to a single location or an entire restaurant group?

Yes. Endpoints like profit and loss reports and sales reports accept either a restaurantUnitId for a single location or a groupId to aggregate across a franchise or hospitality group, which is useful for both single-store apps and multi-unit analytics.

### How fresh is the data returned from MarginEdge?

Truto proxies MarginEdge's APIs directly, so list endpoints reflect the current state in MarginEdge at query time. For warehouse-scale historical data, the bulk export endpoints return point-in-time snapshots generated when the export request completes.

### What kinds of operational data can I pull beyond financials?

In addition to P&L and sales reports, you can access recipes, recipe ingredients, recipe conversions, recipe types, products, product units, vendors, vendor items, vendor item packagings, orders, inventories and sections, countsheets, categories, restaurant units and unit groups, and new item reviews.
