Developer API Documentation

Complete reference for integrating with InventoryArts. Build custom workflows, connect to Zapier, or sync data with external systems.

Authentication

InventoryArts uses standard OAuth 2.0 (Authorization Code Grant) for secure access. All API requests must be authenticated using a Bearer Token.

HEADER Authorization

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Note for Zapier Users: If you are building a Zapier integration, use the "OAuth2" authentication scheme. Our system handles token refresh automatically via the endpoints documented below.

Base URL

All API endpoints are relative to the base URL:

https://inventoryarts.com/

Common Headers

Requests should generally include the following headers:

HeaderValueDescription
Content-Type application/json Required for POST requests.
Accept application/json Ensures you receive JSON responses.

User Profile

Retrieve details about the currently authenticated user. This is often used to test connections or display the connected account name.

GET /api/v1/me.php

Response Example

{
  "id": 1,
  "username": "jdoe",
  "email": "jdoe@example.com",
  "name": "John Doe",
  "connection_label": "jdoe - High School Band"
}

Purchase Orders

Poll for new Purchase Orders created in the system. This endpoint returns the 20 most recent POs, designed for use with Zapier Polling Triggers.

GET /api/v1/purchase_orders.php

Response Fields

FieldTypeDescription
idIntegerUnique PO ID. Used for deduplication.
po_numberStringThe human-readable PO number (e.g., PO-250101-1).
vendor_nameStringName of the vendor.
grand_totalFloatTotal cost of the PO.
pdf_urlStringSecure Link. An authenticated URL to download the PDF. Valid for 1 hour.
items_summaryStringA single string summarizing contents (e.g., "2x Snare Drum, 5x Cables").

Response Example

[
  {
    "id": 105,
    "po_number": "PO-260105-1",
    "vendor_name": "Sweetwater",
    "grand_total": "1200.50",
    "status": "Draft",
    "pdf_url": "https://inventoryarts.com/print_po.php?po_id=105&token=...",
    "items_summary": "1x Yamaha Synth, 2x Cables"
  }
]

Inventory Actions

Perform actions on inventory items, such as checking them back in from a loan or student borrow.

POST /api/v1/item_checkin.php

Request Body

ParameterTypeRequiredDescription
idIntegerYesThe ID of the inventory item.
typeStringYesAction type: return_borrowed or checkin_loaned.

Example Request

{
  "id": 502,
  "type": "return_borrowed"
}

Example Response

{
  "success": true,
  "id": 502,
  "message": "Borrowed item returned and removed from active inventory."
}

OAuth Token Refresh

When an Access Token expires (usually after 1 hour), use this endpoint to exchange your Refresh Token for a new pair of tokens.

POST /oauth/oauth_refresh.php

Important: Provide credentials in the JSON body, not the header.

Request Body

{
  "refresh_token": "YOUR_REFRESH_TOKEN",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "grant_type": "refresh_token"
}

Response

{
  "access_token": "new_access_token_string...",
  "refresh_token": "new_refresh_token_string...",
  "expires_in": 3600,
  "token_type": "Bearer"
}