Print Hive Inventory API

The Inventory API from Print Hive — 4 operation(s) for inventory.

GitHub OpenAPI

Operations 4

POST /v1/inventory/{itemId}/add Add stock to inventory item #
POST /v1/inventory/{itemId}/remove Remove stock from inventory item #
POST /v1/inventory/reconcile Reconcile inventory against filament_consumption #
PATCH /v1/inventory/{itemId}/material Edit material + inventory_item atomically #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/printhiv3d-com:printhiv3d-com-inventory-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

printhiv3d-com-inventory-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Print Hive API Documentation Inventory API
  description: 'REST API for the Print Hive print farm management platform: printers, print jobs, models, materials, inventory, smart queue, and integrations.'
  version: 1.0.0
servers:
- url: https://api.printhiv3d.com
  description: Production
tags:
- name: Inventory
paths:
  /v1/inventory/{itemId}/add:
    post:
      summary: Add stock to inventory item
      tags:
      - Inventory
      description: Increments the quantity of an inventory item and creates an audit transaction record.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - quantity
              properties:
                quantity:
                  type: number
                  minimum: 1
                unit:
                  type: string
                weight_per_unit:
                  type: number
                  minimum: 0
                organizationId:
                  type: string
                  description: Organization ID (optional, defaults to user's primary organization)
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: itemId
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  organization_id:
                    type: string
                  material_id:
                    type: string
                  quantity:
                    type: number
                  unit:
                    type: string
                  weight_per_unit:
                    type: number
                  minimum_stock:
                    type: number
                  location:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      operationId: postV1InventoryByItemIdAdd
      x-operation-id-source: derived
  /v1/inventory/{itemId}/remove:
    post:
      summary: Remove stock from inventory item
      tags:
      - Inventory
      description: Decrements the quantity of an inventory item and creates an audit transaction record with optional notes.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - quantity
              properties:
                quantity:
                  type: number
                  minimum: 1
                unit:
                  type: string
                notes:
                  type: string
                  maxLength: 500
                organizationId:
                  type: string
                  description: Organization ID (optional, defaults to user's primary organization)
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: itemId
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  organization_id:
                    type: string
                  material_id:
                    type: string
                  quantity:
                    type: number
                  unit:
                    type: string
                  weight_per_unit:
                    type: number
                  minimum_stock:
                    type: number
                  location:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      operationId: postV1InventoryByItemIdRemove
      x-operation-id-source: derived
  /v1/inventory/reconcile:
    post:
      summary: Reconcile inventory against filament_consumption
      tags:
      - Inventory
      description: Finds print jobs in the last N days with consumption records that were never deducted from inventory, and enqueues deduction jobs for each.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                organizationId:
                  type: string
                lookbackDays:
                  type: integer
                  minimum: 1
                  maximum: 365
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postV1InventoryReconcile
      x-operation-id-source: derived
  /v1/inventory/{itemId}/material:
    patch:
      summary: Edit material + inventory_item atomically
      tags:
      - Inventory
      description: Atomically updates whitelisted fields on a materials row and its joined inventory_items row. Quantity is not editable here (use /add and /remove). Returns 409 with conflict_side on optimistic-concurrency mismatch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                material:
                  type: object
                  additionalProperties: false
                  properties:
                    name:
                      type: string
                      minLength: 1
                    brand:
                      type:
                      - string
                      - 'null'
                    material_type:
                      type: string
                      minLength: 1
                    color:
                      type:
                      - string
                      - 'null'
                    diameter:
                      type: number
                      exclusiveMinimum: 0
                    category:
                      type: string
                      enum:
                      - filament
                      - shop_supplies
                      - shipping_supplies
                      - parts
                    metadata:
                      type: object
                      additionalProperties: true
                    asin:
                      type:
                      - string
                      - 'null'
                    sku:
                      type:
                      - string
                      - 'null'
                    filament_profile_id:
                      type:
                      - integer
                      - 'null'
                inventory_item:
                  type: object
                  additionalProperties: false
                  properties:
                    location:
                      type:
                      - string
                      - 'null'
                    unit:
                      type: string
                      minLength: 1
                    minimum_stock:
                      type:
                      - integer
                      - 'null'
                      minimum: 0
                expected_material_updated_at:
                  type:
                  - string
                  - 'null'
                  format: date-time
                expected_inventory_updated_at:
                  type:
                  - string
                  - 'null'
                  format: date-time
                organizationId:
                  type: string
                  format: uuid
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: itemId
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  material_updated_at:
                    type: string
                  inventory_updated_at:
                    type: string
                  material:
                    type: object
                    additionalProperties: true
                  inventory_item:
                    type: object
                    additionalProperties: true
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  conflict_side:
                    type: string
                    enum:
                    - material
                    - inventory
      operationId: patchV1InventoryByItemIdMaterial
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      description: 'Consistent Print Hive API error body: a machine-readable error code and a human-readable message.'
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable explanation of the failure.
      required:
      - error
      - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    apiKey:
      type: apiKey
      in: header
      name: x-api-key