canonical: https://jentic.com/apis/flexonthejob.com/flexonthejob

# Flexonthejob Flex API

The Flex API manages the inventory, catalog, and billing of a field-service or trade business, so an application can track stock across locations, build invoices from jobs, and keep customers and vendors in sync. You maintain catalog items with price tiers, barcodes, and per-location stock, organise them with categories and custom properties, and move stock with purchase orders, sales orders, transfers, and reorder points. Invoices can be created standalone or drawn from a job, then marked sent, paid, or voided, and webhooks notify your systems when records change.

## For AI agents

Track catalog items and per-location stock, build and settle invoices, manage customers, vendors, and purchase orders, and subscribe to change webhooks in Flex. Authenticates with a bearer token created inside Flex.

## Scope

Does not process card payments, run payroll, or manage a public storefront. Use for field-service inventory, catalog, and invoicing only.

## Capabilities

- Track catalog items with price tiers, barcodes, and per-location stock levels
- Create an invoice from a job or from explicit lines, then mark it sent, paid, or void
- Record a payment or apply store credit against an invoice
- Move stock with purchase orders, sales orders, transfers, and reorder points
- Organise items with categories, inherited properties, and custom fields
- Keep customers, their job-site locations, and vendors up to date
- Subscribe to webhooks that fire when Flex records change

## Use cases

### Agent-Driven Billing

An AI agent connected through Jentic turns a finished job into money owed by creating a draft invoice from the job, refreshing its total from the job's unbilled amount, and marking it sent, so a business owner never has to assemble an invoice by hand. Because Flex keeps payments on the invoice, the agent can later record a payment or apply store credit in the same flow.

Example prompt: Create a draft invoice from this job, refresh its total, mark it sent, and record the customer's payment when it arrives

### Inventory and Reorder Automation

A stock workflow reads each item's on-hand quantity by location, compares it to its reorder point, and raises a purchase order for anything running low, so a shop keeps shelves stocked without a manual count. Flex tracks per-location stock and supports transfers, so the workflow can also move stock between sites instead of buying more.

Example prompt: List items below their reorder point and create a purchase order to restock each one from its preferred vendor

### Catalog Maintenance

A catalog workflow keeps items, categories, and custom properties consistent by creating categories, assigning items to them, and setting several custom-field values at once, so a growing product list stays organised and searchable. Categories inherit properties from their parents, so the workflow can define a field once and have it apply down the tree.

Example prompt: Create a category, assign the matching items to it, and set their shared custom-field values in one pass

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/v1/items` | List catalog items with pricing and on-hand stock |
| GET | `/api/v1/items/{id}` | Get one item with properties, price tiers, barcodes, and per-location stock |
| GET | `/api/v1/invoices` | List invoice headers |
| POST | `/api/v1/invoices/from-job` | Create a draft invoice for a job |
| POST | `/api/v1/invoices/{id}/payments` | Record a payment or apply store credit to an invoice |
| GET | `/api/v1/customers` | List customers |
| POST | `/api/v1/customers` | Create a customer |

## Key resources

- **Items** — Catalog items with price tiers, barcodes, custom properties, and per-location stock
- **Invoices** — Standalone or job-based invoices with lines, payments, and send/void actions
- **Customers** — Customers and their additional job-site locations
- **Stock Movement** — Purchase orders, sales orders, transfers, and reorder points

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 64 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 73 / 100
  - Developer Experience & Jentic Compatibility: 64 / 100
  - AI-Readiness & Agent Experience: 60 / 100
  - Agent Usability: 58 / 100
  - Security: 60 / 100
  - AI Discoverability: 85 / 100
- **View full report:** https://jentic.com/apis/flexonthejob.com/flexonthejob/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Flex API by hand means creating a scoped bearer token in Flex, learning which permission each endpoint needs, and choosing between the production and sandbox hosts. Through Jentic you install once, import Flex from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** You choose which operations your agent may call, so you can allow listing items and drafting invoices while leaving destructive ones like deleting a customer or voiding an invoice out. Rules bound which operations run, so the agent works the catalog and billing you grant and nothing else.
- **Credential handling:** Your Flex token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an invoice from a job' or 'list low-stock items', and Jentic returns the matching Flex operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Square API** — Point-of-sale platform with catalog, inventory, invoicing, and payments for small businesses
- **Shopify API** — E-commerce platform with product catalog, inventory, and order management for online stores
- **Stripe API** — Payment processing for cards, wallets, and bank transfers

## FAQ

### Is there a Flex MCP server?

You don't need an MCP server to give your agent the Flex API. Jentic connects it directly from the API Directory: import it, store your token once, and your agent can track inventory, build invoices, and manage customers straight away, with no extra server to run and no tool definitions sitting in the agent's context.

### Can I limit what my agent is allowed to do with the Flex API?

Yes. Write a rule that allows only the operations the agent needs, such as listing items and creating draft invoices, and leave deletions and void actions out. Every call the agent makes is logged, so you can see exactly which invoices and stock changes it touched.

### What authentication does the Flex API use?

The Flex API authenticates with a bearer token per its OpenAPI spec: an API key created by an organization administrator inside Flex and sent in the Authorization header, prefixed flx_live_. The key is scoped to one organization and granted a subset of permissions. Through Jentic the token is stored encrypted by your own instance and injected at call time, so it never appears in the agent's prompt or logs.

### Can I create an invoice from a job with the Flex API?

Yes. One operation creates a draft invoice directly from a job, another recomputes its total from the job's current unbilled amount, and a third marks it sent. From there the agent can record payments, apply store credit, or void the invoice as needed.

### What are the rate limits for the Flex API?

The OpenAPI spec does not state request rate limits for the Flex API. For current limits and fair-use guidance, check the provider documentation at https://app.flexonthejob.com.

### How do I bill a job through Jentic?

Import the Flex API from the Jentic API Directory, then have your agent issue a request such as 'create an invoice for this completed job'. Jentic matches the intent to the invoice-from-job operation and returns its input schema so the agent builds the correct request, with your stored token injected at call time. To run it on your own infrastructure, install Jentic One from its GitHub repo.
