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

# What to buy, how much, by when, and the itemised reasoning behind it (UI spec §16.3).



## OpenAPI

````yaml /api-reference/openapi.json get /purchase_recommendations
openapi: 3.0.0
info:
  description: ''
  title: >-
    The only schema PostgREST exposes (ADR-014). Reads are security_invoker
    views; writes are SECURITY DEFINER functions. Rebuilt wholesale on every
    deploy — it holds no data.
  version: 12.2.3
servers:
  - url: https://app.assetinfinity.ai/api
security: []
tags:
  - name: Signing in
  - name: Profile
  - name: Assets
  - name: Asset lifecycle
  - name: Work lifecycle
  - name: Maintenance
  - name: Inventory
  - name: Inventory detail
  - name: Procurement
  - name: Contracts
  - name: Workforce
  - name: Capacity
  - name: Dispatch
  - name: Routing
  - name: Tools
  - name: Inspections
  - name: Verification
  - name: Reliability
  - name: Parts demand
  - name: Sensors and meters
  - name: Map
  - name: Floor plans
  - name: Labels
  - name: Lost and found
  - name: Root cause analysis
  - name: Reports
  - name: Audit center
  - name: Activity
  - name: Notifications
  - name: Channels
  - name: Search
  - name: Copilot
  - name: Import
  - name: Files
  - name: Sync
  - name: Support
  - name: Admin
  - name: Access
  - name: Lookups
  - name: Read models
  - name: Branding
  - name: Custom fields
  - name: Form studio
  - name: Workflows
  - name: Workflow studio
  - name: Rules
  - name: Statuses and transitions
  - name: Currencies and locales
  - name: Work configuration
  - name: Asset configuration
  - name: Inventory configuration
  - name: Tool configuration
  - name: Workforce configuration
  - name: Vendor and contract configuration
  - name: Document configuration
  - name: Inspection configuration
  - name: Sites, locations and the organisation
  - name: Platform
  - name: Self verification
  - name: Setup
  - name: Tools on a job, and who has them out
  - name: Vendors and contracts
  - name: Work order execution
  - name: Workforce detail
externalDocs:
  description: PostgREST Documentation
  url: https://postgrest.org/en/v12/references/api.html
paths:
  /purchase_recommendations:
    get:
      tags:
        - Inventory detail
      summary: >-
        What to buy, how much, by when, and the itemised reasoning behind it (UI
        spec §16.3).
      parameters:
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.id'
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.part_id'
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.part_number
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.part_name'
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.part_criticality
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.unit_of_measure
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.warehouse_id
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.warehouse_code
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.warehouse_name
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.recommended_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.demand_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.available_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.reserved_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.on_order_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.safety_stock_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.minimum_order_quantity
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.required_by
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.is_late'
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.lead_time_days
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.suggested_vendor_id
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.suggested_vendor_name
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.estimated_cost
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.status'
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.urgency'
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.reason'
        - $ref: '#/components/parameters/rowFilter.purchase_recommendations.evidence'
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.computed_at
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.actioned_at
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.dismissed_reason
        - $ref: >-
            #/components/parameters/rowFilter.purchase_recommendations.row_version
        - $ref: '#/components/parameters/select'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/range'
        - $ref: '#/components/parameters/rangeUnit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/preferCount'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/purchase_recommendations'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/purchase_recommendations'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/purchase_recommendations'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/purchase_recommendations'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.purchase_recommendations.id:
      in: query
      name: id
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.part_id:
      in: query
      name: part_id
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.part_number:
      in: query
      name: part_number
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.part_name:
      in: query
      name: part_name
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.part_criticality:
      in: query
      name: part_criticality
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.unit_of_measure:
      in: query
      name: unit_of_measure
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.warehouse_id:
      in: query
      name: warehouse_id
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.warehouse_code:
      in: query
      name: warehouse_code
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.warehouse_name:
      in: query
      name: warehouse_name
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.recommended_quantity:
      in: query
      name: recommended_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.demand_quantity:
      in: query
      name: demand_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.available_quantity:
      in: query
      name: available_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.reserved_quantity:
      in: query
      name: reserved_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.on_order_quantity:
      in: query
      name: on_order_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.safety_stock_quantity:
      in: query
      name: safety_stock_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.minimum_order_quantity:
      in: query
      name: minimum_order_quantity
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.required_by:
      in: query
      name: required_by
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.is_late:
      in: query
      name: is_late
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.lead_time_days:
      in: query
      name: lead_time_days
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.suggested_vendor_id:
      in: query
      name: suggested_vendor_id
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.suggested_vendor_name:
      in: query
      name: suggested_vendor_name
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.estimated_cost:
      in: query
      name: estimated_cost
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.status:
      in: query
      name: status
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.urgency:
      in: query
      name: urgency
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.reason:
      in: query
      name: reason
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.evidence:
      in: query
      name: evidence
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.computed_at:
      in: query
      name: computed_at
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.actioned_at:
      in: query
      name: actioned_at
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.dismissed_reason:
      in: query
      name: dismissed_reason
      required: false
      schema:
        type: string
    rowFilter.purchase_recommendations.row_version:
      in: query
      name: row_version
      required: false
      schema:
        type: string
    select:
      description: Filtering Columns
      in: query
      name: select
      required: false
      schema:
        type: string
    order:
      description: Ordering
      in: query
      name: order
      required: false
      schema:
        type: string
    range:
      description: Limiting and Pagination
      in: header
      name: Range
      required: false
      schema:
        type: string
    rangeUnit:
      description: Limiting and Pagination
      in: header
      name: Range-Unit
      required: false
      schema:
        default: items
        type: string
    offset:
      description: Limiting and Pagination
      in: query
      name: offset
      required: false
      schema:
        type: string
    limit:
      description: Limiting and Pagination
      in: query
      name: limit
      required: false
      schema:
        type: string
    preferCount:
      description: Preference
      in: header
      name: Prefer
      required: false
      schema:
        enum:
          - count=none
        type: string
  schemas:
    purchase_recommendations:
      description: >-
        What to buy, how much, by when, and the itemised reasoning behind it (UI
        spec §16.3).
      properties:
        actioned_at:
          format: timestamp with time zone
          type: string
        available_quantity:
          format: numeric
          type: number
        computed_at:
          format: timestamp with time zone
          type: string
        demand_quantity:
          format: numeric
          type: number
        dismissed_reason:
          format: text
          type: string
        estimated_cost:
          format: numeric
          type: number
        evidence:
          format: jsonb
        id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        is_late:
          format: boolean
          type: boolean
        lead_time_days:
          format: integer
          type: integer
        minimum_order_quantity:
          format: numeric
          type: number
        on_order_quantity:
          format: numeric
          type: number
        part_criticality:
          format: character varying
          maxLength: 20
          type: string
        part_id:
          description: >-
            Note:

            This is a Foreign Key to `inventory_available.part_id`.<fk
            table='inventory_available' column='part_id'/>
          format: uuid
          type: string
        part_name:
          format: character varying
          maxLength: 250
          type: string
        part_number:
          format: character varying
          maxLength: 80
          type: string
        reason:
          format: text
          type: string
        recommended_quantity:
          format: numeric
          type: number
        required_by:
          format: date
          type: string
        reserved_quantity:
          format: numeric
          type: number
        row_version:
          format: bigint
          type: integer
        safety_stock_quantity:
          format: numeric
          type: number
        status:
          format: character varying
          maxLength: 30
          type: string
        suggested_vendor_id:
          description: >-
            Note:

            This is a Foreign Key to `vendor_directory.vendor_id`.<fk
            table='vendor_directory' column='vendor_id'/>
          format: uuid
          type: string
        suggested_vendor_name:
          format: character varying
          maxLength: 200
          type: string
        unit_of_measure:
          format: character varying
          maxLength: 30
          type: string
        urgency:
          format: character varying
          maxLength: 20
          type: string
        warehouse_code:
          format: character varying
          maxLength: 60
          type: string
        warehouse_id:
          description: >-
            Note:

            This is a Foreign Key to `warehouse_settings.id`.<fk
            table='warehouse_settings' column='id'/>
          format: uuid
          type: string
        warehouse_name:
          format: character varying
          maxLength: 200
          type: string
      type: object

````

## Related topics

- [Reorder recommendations](/inventory/reorder.md)
- [Inventory settings](/config/inventory.md)
- [The asset register](/assets/register.md)
- [Asset settings](/config/assets.md)
- [Purchase requests](/commercial/purchase-requests.md)
