> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arcuserp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reorder Report (products below reorder point + demand-driven recommendations)

> Returns products below their reorder point for the authenticated entity, plus a
second `configure_recommended[]` section listing demand-driven products with no
configured reorder_point. The Reorder Report is the canonical workflow operators
use to place purchase orders with vendors.

**Location-awareness (HOTFIX-REORDER-INTELLIGENCE Phase 4B, 2026-05-27):**
accepts optional `location_id` query parameter to scope to one location's
inventory_balances row. When omitted, returns an entity-wide rollup; each row
carries a `locations_below[]` array detailing per-location shortfalls so a
below-rp condition at Location B is never masked by surplus at Location A.

**Vendor lead-time precedence (§C9):** lead times displayed for each vendor row
are read from `product_vendors` with precedence: observed (sample_count >= 3)
-> manual (COALESCE(lead_time_days_manual, lead_time_days)) -> entity default
-> 14 days. Per ERP-CORRECTNESS-RULES §C9 + §C10.

**Purchaseable-only + on-PO netting (HOTFIX-REORDER-REPORT-READINESS, 2026-05-27,
ERP-CORRECTNESS-RULES §C11):** only purchaseable product types (`physical`, `box`)
appear -- kits, services, and variant-parents are excluded because you purchase
the components, not the assembly. Open purchase-order quantity (`on_purchase_order`)
is subtracted in every inclusion branch, so a product whose incoming PO already
covers its shortfall does not reappear. Each row carries `trigger_reason` naming
which branch fired (aggregate-below / dependent-demand / location-specific) so the
caller can explain WHY each product is on the list.

Industry parity: NetSuite Reorder Report, Acumatica Demand-Based Replenishment,
Cin7 "Configure Recommended" pattern, Brightpearl per-warehouse reorder.




## OpenAPI

````yaml /openapi.yaml get /purchasing/reorder-report
openapi: 3.1.0
info:
  title: Arcus ERP Public API
  version: 1.0.0
  description: >
    Arcus ERP public REST API. Designed for external integrations and data
    migration.


    **Authentication.** Bearer token (API key) via the `Authorization` header.

    Format: `Authorization: Bearer ark_live_ent_<code>_<random>` (or
    `ark_test_*` for sandbox).

    API keys are issued per-entity in **Settings > Developers > API Keys**.


    **Entity scoping.** The entity is encoded in the API key prefix; routes are
    flat

    (e.g. `/v1/accounts`, `/v1/orders`, `/v1/products`). A small set of platform
    endpoints

    (migration, reconciliation, events, webhook endpoints, API keys) use the

    `/v1/entities/{entity_id}/...` form -- those are noted in their tags.


    **Key capabilities.**
      - Related-resource hydration via `?expand[]=` (see `x-arcus-expand` on each resource).
      - Cursor-based pagination (`starting_after` / `ending_before` / `limit`).
      - Idempotency via the `Idempotency-Key` header.
      - Webhook events for asynchronous notification.
      - Conditional requests / ETag for cache validation.
servers:
  - url: https://api.arcuserp.com/v1
    description: Arcus ERP API (accepts both live `ark_live_*` and test `ark_test_*` keys)
  - url: https://dev-api.arcuserp.com/v1
    description: >-
      Dev sandbox API (test-only data, accepts `ark_test_*` keys against dev
      RDS)
security: []
paths:
  /purchasing/reorder-report:
    get:
      tags:
        - Purchasing
      summary: >-
        Reorder Report (products below reorder point + demand-driven
        recommendations)
      description: >
        Returns products below their reorder point for the authenticated entity,
        plus a

        second `configure_recommended[]` section listing demand-driven products
        with no

        configured reorder_point. The Reorder Report is the canonical workflow
        operators

        use to place purchase orders with vendors.


        **Location-awareness (HOTFIX-REORDER-INTELLIGENCE Phase 4B,
        2026-05-27):**

        accepts optional `location_id` query parameter to scope to one
        location's

        inventory_balances row. When omitted, returns an entity-wide rollup;
        each row

        carries a `locations_below[]` array detailing per-location shortfalls so
        a

        below-rp condition at Location B is never masked by surplus at Location
        A.


        **Vendor lead-time precedence (§C9):** lead times displayed for each
        vendor row

        are read from `product_vendors` with precedence: observed (sample_count
        >= 3)

        -> manual (COALESCE(lead_time_days_manual, lead_time_days)) -> entity
        default

        -> 14 days. Per ERP-CORRECTNESS-RULES §C9 + §C10.


        **Purchaseable-only + on-PO netting (HOTFIX-REORDER-REPORT-READINESS,
        2026-05-27,

        ERP-CORRECTNESS-RULES §C11):** only purchaseable product types
        (`physical`, `box`)

        appear -- kits, services, and variant-parents are excluded because you
        purchase

        the components, not the assembly. Open purchase-order quantity
        (`on_purchase_order`)

        is subtracted in every inclusion branch, so a product whose incoming PO
        already

        covers its shortfall does not reappear. Each row carries
        `trigger_reason` naming

        which branch fired (aggregate-below / dependent-demand /
        location-specific) so the

        caller can explain WHY each product is on the list.


        Industry parity: NetSuite Reorder Report, Acumatica Demand-Based
        Replenishment,

        Cin7 "Configure Recommended" pattern, Brightpearl per-warehouse reorder.
      operationId: getReorderReportV1
      parameters:
        - name: location_id
          in: query
          description: >
            Optional UUID. When provided, the report is scoped to the specified
            location's

            inventory_balances row. When omitted, the report is entity-wide with
            per-row

            `locations_below[]` detail.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Reorder report sections (below-rp + configure-recommended).
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        product_id:
                          type: string
                          format: uuid
                        sku:
                          type: string
                          nullable: true
                        product_name:
                          type: string
                        available_qty:
                          type: number
                        on_hand:
                          type: number
                        on_purchase_order:
                          type: number
                        reorder_point:
                          type: number
                        reorder_qty:
                          type: number
                        shortage_qty:
                          type: number
                        no_vendor:
                          type: boolean
                        vendor_id:
                          type: string
                          format: uuid
                          nullable: true
                        vendor_name:
                          type: string
                          nullable: true
                        lead_time_days:
                          type: integer
                          nullable: true
                        best_unit_cost:
                          type: number
                        est_cost:
                          type: number
                        dependent_demand_units:
                          type: integer
                          description: >
                            Released/in-progress work-order demand for this
                            product

                            (sum of GREATEST(required - issued, 0)). Surfaced so
                            the

                            caller can explain a dependent_demand_exceeds_supply
                            trigger.
                        trigger_reason:
                          type: string
                          enum:
                            - below_aggregate_no_pipeline
                            - below_aggregate_with_pipeline
                            - dependent_demand_exceeds_supply
                            - location_specific_below
                            - unknown
                          description: >
                            HOTFIX-REORDER-REPORT-READINESS Fix 3
                            (ERP-CORRECTNESS-RULES §C11).

                            Names which inclusion branch put this product on the
                            report so the

                            operator/caller can see WHY each row appears.
                            on_purchase_order is

                            netted out of every branch before this is computed.
                        all_vendors:
                          type: array
                          items:
                            type: object
                        locations_below:
                          type: array
                          description: >
                            Per-location shortfall detail. Empty array when no
                            locations

                            are below their own reorder point.
                            HOTFIX-REORDER-INTELLIGENCE

                            Phase 4B Fix 3 -- prevents the masking pattern where

                            SUM(available) > MAX(reorder_point) hides
                            per-location shortages.

                            HOTFIX-REORDER-REPORT-READINESS Fix 2 -- `shortfall`
                            is net of

                            each location's `on_purchase_order`.
                          items:
                            type: object
                            properties:
                              location_id:
                                type: string
                                format: uuid
                              location_name:
                                type: string
                                nullable: true
                              available:
                                type: number
                              on_purchase_order:
                                type: number
                              reorder_point:
                                type: number
                              shortfall:
                                type: number
                  configure_recommended:
                    type: array
                    description: >
                      Products with `demand_avg_per_day > 0` but no configured
                      reorder_point.

                      Industry pattern: Cin7 "Configure Recommended" + NetSuite
                      Auto-Replenishment.

                      Each row includes a system-recommended reorder_point
                      computed from

                      demand x entity default lead time.
                    items:
                      type: object
                      properties:
                        product_id:
                          type: string
                          format: uuid
                        sku:
                          type: string
                          nullable: true
                        product_name:
                          type: string
                        demand_avg_per_day:
                          type: number
                        demand_stddev_per_day:
                          type: number
                        demand_last_computed_at:
                          type: string
                          format: date-time
                          nullable: true
                        total_available:
                          type: number
                        recommended_reorder_point:
                          type: integer
                        recommended_reorder_qty:
                          type: integer
                        min_pallet_qty:
                          type: integer
                          nullable: true
                        current_reorder_point:
                          type: integer
                          nullable: true
                  summary:
                    type: object
                    properties:
                      total_products:
                        type: integer
                      no_vendor_count:
                        type: integer
                      vendor_count:
                        type: integer
                      est_total_cost:
                        type: number
                      configure_recommended_count:
                        type: integer
                      location_id:
                        type: string
                        format: uuid
                        nullable: true
                        description: >
                          The location_id query param if scoped; null when
                          entity-wide.
        '400':
          description: Invalid location_id (must be UUID).
        '401':
          description: Unauthorized (missing or invalid API key).
        '403':
          description: Forbidden (missing `purchasing:read` scope).
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: |
        API key issued per entity via Settings > Developers > API Keys.
        Each key carries scopes (e.g. orders:read, products:write).
        Bearer token format: Authorization: Bearer ark_live_ent_<code>_<random>
        Test keys use ark_test_ent_<code>_<random>. Both are issued per entity
        via Settings > Developers > API Keys.

````