Inventory
Track and manage inventory items and stock levels
Overview
Inventory items represent chemicals, equipment, parts, and supplies used in pool services. Track stock levels, set reorder points, and transfer items between locations. Items can sync with QuickBooks for accounting.
List Inventory Items
Retrieve a paginated list of inventory items.
query InfiniteInventory($first: Int!, $after: String, $filter: InventoryFilter) {
infiniteInventoryItems(first: $first, after: $after, filter: $filter) {
edges {
node {
id
name
sku
category
unitPrice
quantity
reorderPoint
location {
id
name
}
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Variables
{
"first": 20,
"filter": {
"category": "CHEMICAL",
"lowStock": true
}
}Response:
{
"data": {
"infiniteInventoryItems": {
"edges": [
{
"node": {
"id": "inv_item_001",
"name": "Chlorine Tablets 3\"",
"sku": "CHEM-CL-3",
"category": "CHEMICAL",
"unitPrice": 89.99,
"quantity": 15,
"reorderPoint": 20,
"location": {
"id": "loc_001",
"name": "Main Warehouse"
}
},
"cursor": "eyJpZCI6Imludl9pdGVtXzAwMSJ9"
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "eyJpZCI6Imludl9pdGVtXzAwMSJ9"
}
}
}
}Get Single Inventory Item
Retrieve detailed information about an inventory item.
query InventoryItem($selector: InventoryItemSelector!) {
inventoryItem(selector: $selector) {
id
name
sku
description
category
unitPrice
costPrice
quantity
reorderPoint
unit
location {
id
name
address
}
quickbooksId
isActive
createdAt
updatedAt
}
}
# Variables
{
"selector": {
"id": "inv_item_001"
}
}Response:
{
"data": {
"inventoryItem": {
"id": "inv_item_001",
"name": "Chlorine Tablets 3\"",
"sku": "CHEM-CL-3",
"description": "50lb bucket of 3-inch stabilized chlorine tablets",
"category": "CHEMICAL",
"unitPrice": 89.99,
"costPrice": 65.00,
"quantity": 15,
"reorderPoint": 20,
"unit": "bucket",
"location": {
"id": "loc_001",
"name": "Main Warehouse",
"address": "500 Industrial Blvd"
},
"quickbooksId": "QB-INV-001",
"isActive": true,
"createdAt": "2023-06-01T10:00:00Z",
"updatedAt": "2024-01-18T16:00:00Z"
}
}
}Create Inventory Item
Add a new inventory item.
mutation CreateInventoryItem($input: CreateInventoryItemInput!) {
createInventoryItem(input: $input) {
id
name
sku
category
unitPrice
quantity
createdAt
}
}
# Variables
{
"input": {
"name": "Pool Filter Cartridge",
"sku": "EQUIP-FC-001",
"description": "Replacement filter cartridge for standard pool filters",
"category": "PARTS",
"unitPrice": 45.00,
"costPrice": 28.00,
"quantity": 50,
"reorderPoint": 10,
"unit": "each",
"locationId": "loc_001"
}
}Response:
{
"data": {
"createInventoryItem": {
"id": "inv_item_020",
"name": "Pool Filter Cartridge",
"sku": "EQUIP-FC-001",
"category": "PARTS",
"unitPrice": 45.00,
"quantity": 50,
"createdAt": "2024-01-20T09:00:00Z"
}
}
}Update Inventory Quantity
Adjust inventory quantity (add or remove stock).
mutation UpdateInventoryItem($id: ID!, $input: UpdateInventoryItemInput!) {
updateInventoryItem(id: $id, input: $input) {
id
name
quantity
updatedAt
}
}
# Variables
{
"id": "inv_item_001",
"input": {
"quantity": 45,
"note": "Restocked from supplier order #12345"
}
}Response:
{
"data": {
"updateInventoryItem": {
"id": "inv_item_001",
"name": "Chlorine Tablets 3\"",
"quantity": 45,
"updatedAt": "2024-01-20T10:00:00Z"
}
}
}Transfer Inventory
Transfer inventory between locations.
mutation TransferInventory($input: TransferInventoryInput!) {
transferInventory(input: $input) {
success
fromLocation {
id
name
}
toLocation {
id
name
}
quantity
item {
id
name
}
}
}
# Variables
{
"input": {
"itemId": "inv_item_001",
"fromLocationId": "loc_001",
"toLocationId": "loc_002",
"quantity": 10
}
}Response:
{
"data": {
"transferInventory": {
"success": true,
"fromLocation": {
"id": "loc_001",
"name": "Main Warehouse"
},
"toLocation": {
"id": "loc_002",
"name": "Service Truck #1"
},
"quantity": 10,
"item": {
"id": "inv_item_001",
"name": "Chlorine Tablets 3\""
}
}
}
}REST Endpoints
Export inventory and manage transfers.
GET
/inventory/export/csvExport inventory items to CSV format
curl -X GET "https://api.poolservicemanager.com/inventory/export/csv?category=CHEMICAL" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-o inventory.csvPOST
/inventory/transferTransfer inventory between locations
curl -X POST "https://api.poolservicemanager.com/inventory/transfer" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"itemId": "inv_item_001",
"fromLocationId": "loc_001",
"toLocationId": "loc_002",
"quantity": 10
}'Field Reference
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier |
name | String! | Item name |
sku | String(nullable) | Stock keeping unit |
description | String(nullable) | Item description |
category | InventoryCategory! | Category (CHEMICAL, EQUIPMENT, PARTS, SUPPLIES) |
unitPrice | Float! | Unit price |
costPrice | Float(nullable) | Cost price |
quantity | Int! | Current stock quantity |
reorderPoint | Int(nullable) | Low stock alert threshold |
location | InventoryLocation(nullable) | Storage location |
unit | String(nullable) | Unit of measure (e.g., gallon, each) |
quickbooksId | String(nullable) | QuickBooks item ID |
isActive | Boolean! | Whether item is active |
createdAt | DateTime! | Creation timestamp |
updatedAt | DateTime! | Last update timestamp |