# Factory Sales API > Create and read sales orders and quotes, customers, and the supporting product catalogue, for your company. JSON over HTTPS at `https://api.factory.app/v1`. One bearer token per company. 59 operations across 12 services. Every page below is also available as Markdown by appending `.md`. ## Getting started - [Factory API — sales orders, quotes and catalogue](https://developer.factory.app/index.md): Create and read sales orders, quotes, customers and the supporting product catalogue. JSON over HTTPS, one bearer token, scoped to your company. - [Quickstart](https://developer.factory.app/quickstart.md): Four calls from API key to a written order: confirm the key, resolve a customer, find a product, then create a draft order. - [Authentication](https://developer.factory.app/authentication.md): One bearer token in the Authorization header, scoped to a single company. No OAuth flow, no request signing, no query-string key. - [Core concepts](https://developer.factory.app/concepts.md): Money as micros, 64-bit numbers as strings, type-prefixed ids, enum names, pagination and idempotency — read once, and the reference is obvious. - [Field filtering](https://developer.factory.app/filtering.md): Trim responses to the fields you need with fields and excludeFields — camelCase names, dot paths into nested objects and across arrays, unknown names ignored rather than rejected. - [Errors and status codes](https://developer.factory.app/errors.md): The validation-failure envelope, the stable error codes worth branching on, and the HTTP status codes and error types the API returns. - [API conventions](https://developer.factory.app/conventions.md): The request-level rules: authentication and scoping, the error envelope and its types, rate limits, field filtering, and webhook deliveries. ## Guides - [Push an order in from another system](https://developer.factory.app/guides/push-an-order-in.md): Take an order from a CRM, ERP or spreadsheet and land it on the floor: resolve the customer, build the lines, write it once safely, recover from a rejection. - [Resolve customers and catalogue](https://developer.factory.app/guides/resolve-customers-and-catalogue.md): Nothing on a sales document is written by name. How to resolve customer ids, search the catalogue, and pick the right id out of four that look alike. - [Keep another system in sync](https://developer.factory.app/guides/keep-in-sync.md): Build a poller on the change feed with an updatedSince checkpoint, let webhook deliveries trigger it, and reconcile quotes that become orders. - [Build a flashing line](https://developer.factory.app/guides/build-a-flashing-line.md): Put a hand-drawn flashing on an order, worked end to end: the cut list, the drawing geometry, the girth, bend and length figures you compute yourself, the write, and the SVG upload. ## Reference - [API reference](https://developer.factory.app/reference.md): Every operation in the Factory Sales API v1, grouped by service and generated from the OpenAPI description. - [OpenAPI documents](https://developer.factory.app/openapi-documents.md): The Factory Sales API as machine-readable files: one complete OpenAPI 3.0 document per service, sized for an LLM context window, plus the whole-API document in OpenAPI 3.0 and Swagger 2.0. - [Changelog](https://developer.factory.app/changelog.md): Changes inside v1 are additive. Anything breaking ships under a new version path, announced ahead of time. ## Reference: Catalogue - [List flashings — Catalogue](https://developer.factory.app/reference/catalogue/list-flashings.md): Returns a paginated list of flashing templates. A flashing line item must reference one of these templates by id, so use this list to find the template for… - [Get flashing — Catalogue](https://developer.factory.app/reference/catalogue/get-flashing.md): Returns the full flashing template, including its thickness and selectable colours. - [List kits — Catalogue](https://developer.factory.app/reference/catalogue/list-kits.md): Returns a paginated list of product kit summaries. This is a lightweight listing: rows, components, and sub-assemblies are not populated — use GetKit to… - [Get kit — Catalogue](https://developer.factory.app/reference/catalogue/get-kit.md): Returns the kit with its priced rows, top-level component products, and sub-assemblies — the single call that lets you drill into one kit's full detail. - [List products — Catalogue](https://developer.factory.app/reference/catalogue/list-products.md): Returns a paginated list of catalogue product summaries. The listing is lightweight: rows is not populated — retrieve a product with GetProduct to get its… - [Get product — Catalogue](https://developer.factory.app/reference/catalogue/get-product.md): Returns the full product, including all of its priced variant rows. ## Reference: Search - [Search catalogue — Search](https://developer.factory.app/reference/search/search-catalogue.md): Searches products, kits, and flashings by text query and returns one ranked list of minimal hits, most relevant first. ## Reference: Company - [Get company — Company](https://developer.factory.app/reference/company/get-company.md): A singleton read keyed by the bearer token. Returns the company's identity, locale and currency settings, the measurement system its quantities and… - [List company custom fields — Company](https://developer.factory.app/reference/company/list-company-custom-fields.md): Custom fields are account-configured, typed fields on sales documents, customers, and suppliers. ## Reference: Labels - [List labels — Labels](https://developer.factory.app/reference/labels/list-labels.md): Returns the labels configured for the authenticated company. Use the returned label ids when replacing an order's labels with SetOrderLabels. ## Reference: Order statuses - [List order statuses — Order statuses](https://developer.factory.app/reference/order-statuses/list-order-statuses.md): Returns the order statuses (workflow columns) configured for the authenticated company, in display order. ## Reference: Customers - [List customers — Customers](https://developer.factory.app/reference/customers/list-customers.md): A company-scoped list of customers, optionally filtered by company name (a case-insensitive contains-match). - [Create customer — Customers](https://developer.factory.app/reference/customers/create-customer.md): Adds a new customer — company details, addresses, and contacts — to your company. - [Get customer — Customers](https://developer.factory.app/reference/customers/get-customer.md): Returns the full customer record — company details, addresses, contacts, and account flags — for the given id, scoped to your company. ## Reference: Inventory - [List inventory — Inventory](https://developer.factory.app/reference/inventory/list-inventory.md): Returns a paginated list of stock entries — one per product row per colour — for every catalogue product that has inventory tracking enabled. - [Get product inventory — Inventory](https://developer.factory.app/reference/inventory/get-product-inventory.md): Returns every stock entry for the given product — one per row per colour. - [Set stock levels — Inventory](https://developer.factory.app/reference/inventory/set-stock-levels.md): Replaces the on-hand quantity for each row+colour combination you include. ## Reference: Orders - [List orders — Orders](https://developer.factory.app/reference/orders/list-orders.md): A flat, company-scoped list of orders. Confirmed orders only: quotes are read through QuoteService, and work-in-progress documents that have not yet become… - [Create order — Orders](https://developer.factory.app/reference/orders/create-order.md): The primary write endpoint: submit a complete order — header, line items, adjustments, and addresses — in one call, either saved as a draft or submitted… - [Get order — Orders](https://developer.factory.app/reference/orders/get-order.md): Returns the full order — header, lines, adjustments, totals, and server-derived fields — for the given id, scoped to the authenticated company. - [List attachments — Orders](https://developer.factory.app/reference/orders/list-attachments.md): Returns every file on the order's conversation as a flat list, oldest first: files your team attached and documents the Factory app generated (isGenerated… - [Upload attachment — Orders](https://developer.factory.app/reference/orders/upload-attachment.md): Uploads one file, up to 20 MB, into the order's conversation, where it appears immediately in the Factory app's Collaborate tab. - [Get attachment — Orders](https://developer.factory.app/reference/orders/get-attachment.md): Returns the attachment's details and a fresh presigned download URL. - [Delete attachment — Orders](https://developer.factory.app/reference/orders/delete-attachment.md): Removes the file from the order's conversation and from attachment lists. - [Upload drawing SVG — Orders](https://developer.factory.app/reference/orders/upload-drawing-svg.md): Drawings exist only on flashing lines: a drawing is the folded profile of a sheet-metal flashing, not a general image or file attachment for the order. - [Set order labels — Orders](https://developer.factory.app/reference/orders/set-order-labels.md): The list you send becomes the order's complete label set: labels not listed are removed, and an empty list removes them all. - [Add order line item — Orders](https://developer.factory.app/reference/orders/add-order-line-item.md): Build an order up over time: each call creates one line under the order and recomputes the order's totals. - [Update order line item — Orders](https://developer.factory.app/reference/orders/update-order-line-item.md): Send the full replacement line content; the whole line is replaced and the order's totals are recomputed. - [Delete order line item — Orders](https://developer.factory.app/reference/orders/delete-order-line-item.md): Identify the line by the server-assigned id returned when you read the order; the order's totals are recomputed after removal. - [List messages — Orders](https://developer.factory.app/reference/orders/list-messages.md): Returns the order's conversation — the same thread shown in the Factory app's Collaborate tab — oldest message first: text written by your team, files they… - [Post message — Orders](https://developer.factory.app/reference/orders/post-message.md): Adds a plain-text message to the order's conversation, visible immediately in the Factory app's Collaborate tab. - [Query orders — Orders](https://developer.factory.app/reference/orders/query-orders.md): Like ListOrders, but ordered by when each order last changed (oldest first) and filterable by an updatedSince / updatedBefore time window — so a poller… ## Reference: Quotes - [List quotes — Quotes](https://developer.factory.app/reference/quotes/list-quotes.md): A flat, company-scoped list of quotes. Quotes only — confirmed orders are read through OrderService. Quotes are returned most recently updated first;… - [Create quote — Quotes](https://developer.factory.app/reference/quotes/create-quote.md): Submit a complete quote — customer, line items, adjustments, and addresses — in one call, either saved as a draft or finalised and sent. - [Get quote — Quotes](https://developer.factory.app/reference/quotes/get-quote.md): Returns the full quote — header, lines, adjustments, totals, and server-derived fields — for the given id, scoped to the authenticated company. - [List attachments — Quotes](https://developer.factory.app/reference/quotes/list-attachments.md): Returns every file on the quote's conversation as a flat list, oldest first: files your team attached and documents the Factory app generated (isGenerated… - [Upload attachment — Quotes](https://developer.factory.app/reference/quotes/upload-attachment.md): Uploads one file, up to 20 MB, into the quote's conversation, where it appears immediately in the Factory app's Collaborate tab. - [Get attachment — Quotes](https://developer.factory.app/reference/quotes/get-attachment.md): Returns the attachment's details and a fresh presigned download URL. - [Delete attachment — Quotes](https://developer.factory.app/reference/quotes/delete-attachment.md): Removes the file from the quote's conversation and from attachment lists. - [Upload drawing SVG — Quotes](https://developer.factory.app/reference/quotes/upload-drawing-svg.md): Drawings exist only on flashing lines: a drawing is the folded profile of a sheet-metal flashing, not a general image or file attachment for the quote. - [Set quote labels — Quotes](https://developer.factory.app/reference/quotes/set-quote-labels.md): The list you send becomes the quote's complete label set: labels not listed are removed, and an empty list removes them all. - [Add quote line item — Quotes](https://developer.factory.app/reference/quotes/add-quote-line-item.md): Build a quote up over time: each call creates one line under the quote and recomputes the quote's totals. - [Update quote line item — Quotes](https://developer.factory.app/reference/quotes/update-quote-line-item.md): Send the full replacement line content; the whole line is replaced and the quote's totals are recomputed. - [Delete quote line item — Quotes](https://developer.factory.app/reference/quotes/delete-quote-line-item.md): Identify the line by the server-assigned id returned when you read the quote; the quote's totals are recomputed after removal. - [List messages — Quotes](https://developer.factory.app/reference/quotes/list-messages.md): Returns the quote's conversation — the same thread shown in the Factory app's Collaborate tab — oldest message first: text written by your team, files they… - [Post message — Quotes](https://developer.factory.app/reference/quotes/post-message.md): Adds a plain-text message to the quote's conversation, visible immediately in the Factory app's Collaborate tab. - [Query quotes — Quotes](https://developer.factory.app/reference/quotes/query-quotes.md): Like ListQuotes, but ordered by when each quote last changed (oldest first) and filterable by an updatedSince / updatedBefore time window — so a poller… ## Reference: Suppliers - [List suppliers — Suppliers](https://developer.factory.app/reference/suppliers/list-suppliers.md): Returns a paginated list of your company's suppliers. Useful for discovering supplier ids to pass as filters on the inventory list. Suppliers are ordered… - [Get supplier — Suppliers](https://developer.factory.app/reference/suppliers/get-supplier.md): Returns the supplier matching the given id. Useful when you already have a supplier id (for example from an inventory filter) and need its details without… ## Reference: Users - [List users — Users](https://developer.factory.app/reference/users/list-users.md): A company-scoped list of users, returning active users by default. - [Get user — Users](https://developer.factory.app/reference/users/get-user.md): Returns the user record — name, email, and active status — for the given id, scoped to your company. ## Reference: Webhooks - [List webhook deliveries — Webhooks](https://developer.factory.app/reference/webhooks/list-webhook-deliveries.md): Records cover the last 30 days. Filter by subscription, state, or a creation-time window; combine filters freely. - [Get webhook delivery — Webhooks](https://developer.factory.app/reference/webhooks/get-webhook-delivery.md): Fetch one delivery record. - [List webhooks — Webhooks](https://developer.factory.app/reference/webhooks/list-webhooks.md): Sorted by creation time, newest first. Secrets are never included. - [Create webhook — Webhooks](https://developer.factory.app/reference/webhooks/create-webhook.md): Creates a subscription delivering the requested event types to an HTTPS endpoint. - [Get webhook — Webhooks](https://developer.factory.app/reference/webhooks/get-webhook.md): The secret is never included — it is returned only by CreateWebhook. - [Delete webhook — Webhooks](https://developer.factory.app/reference/webhooks/delete-webhook.md): Deliveries stop immediately. Existing delivery records remain readable until their 30-day retention lapses. - [Update webhook — Webhooks](https://developer.factory.app/reference/webhooks/update-webhook.md): Fields left unset keep their current value. The secret cannot be changed (rotation is not available in v1); to stop deliveries set status to disabled, to… - [Test webhook — Webhooks](https://developer.factory.app/reference/webhooks/test-webhook.md): POSTs a synthetic ping event through the real signing and delivery path and reports what the endpoint answered. ## OpenAPI documents One complete OpenAPI 3.0 document per service — self-contained, served byte-for-byte, ~5k–66k tokens each where the whole API is ~160k. Manifest: https://developer.factory.app/openapi/services/index.json - [Catalogue — catalogue.openapi3.json](https://developer.factory.app/openapi/services/catalogue.openapi3.json): Your product catalogue — the products, kits, and flashings you sell. 6 operations, ~18k tokens, updated 2026-09-16. - [Company — company.openapi3.json](https://developer.factory.app/openapi/services/company.openapi3.json): Your company's settings and custom-field definitions — identity, currency and locale, the measurement system quantities are expressed in, tax context, and… 2 operations, ~10k tokens, updated 2026-09-16. - [Customers — customer.openapi3.json](https://developer.factory.app/openapi/services/customer.openapi3.json): Your company's customers — the businesses you quote and sell to. 3 operations, ~12k tokens, updated 2026-09-16. - [Inventory — inventory.openapi3.json](https://developer.factory.app/openapi/services/inventory.openapi3.json): Read and update stock levels for your catalogue products. Stock is tracked per product variant row, optionally split by colour. Each entry carries on-hand,… 3 operations, ~10k tokens, updated 2026-09-16. - [Labels — label.openapi3.json](https://developer.factory.app/openapi/services/label.openapi3.json): The labels your company uses to tag orders. 1 operation, ~5k tokens, updated 2026-09-16. - [Order statuses — order-status.openapi3.json](https://developer.factory.app/openapi/services/order-status.openapi3.json): The workflow statuses your company's orders move through. 1 operation, ~5k tokens, updated 2026-09-16. - [Orders — order.openapi3.json](https://developer.factory.app/openapi/services/order.openapi3.json): Create sales orders, read and list them, upload flashing-drawing SVGs, and work with each order's conversation (messages and file attachments) — the order… 15 operations, ~66k tokens, updated 2026-09-17. - [Quotes — quote.openapi3.json](https://developer.factory.app/openapi/services/quote.openapi3.json): Create quotes, read them, add, update, and remove their line items, upload flashing-drawing SVGs, and work with each quote's conversation (messages and file… 15 operations, ~62k tokens, updated 2026-09-17. - [Search — search.openapi3.json](https://developer.factory.app/openapi/services/search.openapi3.json): Preview: free-text search across your catalogue. This service is in preview — published for early use, not yet covered by the compatibility guarantees in… 1 operation, ~6k tokens, updated 2026-09-16. - [Suppliers — supplier.openapi3.json](https://developer.factory.app/openapi/services/supplier.openapi3.json): List your company's suppliers. Suppliers are managed in the Factory purchasing UI — this read-only surface lets API consumers discover supplier ids for use… 2 operations, ~7k tokens, updated 2026-09-16. - [Users — user.openapi3.json](https://developer.factory.app/openapi/services/user.openapi3.json): The people in your company, for assigning work to. 2 operations, ~7k tokens, updated 2026-09-16. - [Webhooks — webhook.openapi3.json](https://developer.factory.app/openapi/services/webhook.openapi3.json): Register HTTPS endpoints to be notified when orders and quotes change, and inspect what was delivered. 8 operations, ~18k tokens, updated 2026-09-16. - [Whole API — factory_api_v1.openapi3.json](https://developer.factory.app/openapi/factory_api_v1.openapi3.json): the entire v1 contract as one OpenAPI 3.0 document, ~160k tokens. - [Whole API — factory_api_v1.swagger.json](https://developer.factory.app/openapi/factory_api_v1.swagger.json): the same contract as a Swagger 2.0 document. ## Optional - [OpenAPI description](https://developer.factory.app/openapi.json): the machine-readable v1 spec these docs are generated from - [Full docs corpus](https://developer.factory.app/llms-full.txt): every page above concatenated into one file