GraphQL Queries (Read)

Fetch data with type-safe GraphQL queries

5 min read

The GraphQL endpoint at /api/v1/graphql supports 7 read queries that mirror the most-used REST endpoints: whoami, workOrders, workOrder(id), assets, asset(id), parts (with lowStock filter), locations, vendors, customers.

Endpoint

POST https://freemaint.com/api/v1/graphql with Content-Type: application/json. Each query consumes 1 from your daily quota.

Example: list work orders

Query { workOrders(limit: 10, status: "OPEN") { id title priority status assetId locationId dueDate } }. Returns up to 200 rows; default limit is 50.

Fetch one part (by id or barcode)

Use part(id: N) or part(barcode: "CODE") to fetch a single part. barcode matches the barcode, QR code, part number and reference (case-insensitive, active parts only) โ€” the same matching the in-app scanner uses โ€” and returns null when nothing matches. Example: query { part(barcode: "ABC-123") { id name description partNumber quantity minQuantity maxStockLevel unitOfMeasure imageUrl area location { name } vendor { name website } } } The part also returns description, minQuantity, maxStockLevel, imageUrl and the nested location and vendor โ€” enough to fill a kiosk's item screen in a single query.

Available filters

  • workOrders(limit, status) โ€” limit 1-200, status string filter
  • assets(limit) โ€” limit 1-200
  • parts(limit, lowStock) โ€” lowStock=true returns only items below minQuantity
  • locations, vendors, customers โ€” return up to 200 rows ordered by name
  • part(id, barcode) โ€” single-part lookup; barcode matches barcode, QR code, part number and reference, ideal for scanners
  • floorPlans(locationId) โ€” floor plans of a location, with their markers (percentage x/y coordinates); lets a kiosk render where a part is stored

Schema introspection

Introspection is enabled โ€” point Apollo Sandbox or GraphiQL at /api/v1/graphql with your Bearer token to explore the full schema interactively.

Tip

Combine multiple queries in one request: { workOrders(limit:5){ id } assets(limit:5){ id } } โ€” counts as 1 quota hit.

Was this page helpful?