{
  "openapi": "3.1.0",
  "info": {
    "title": "Carbon REST API",
    "version": "1.0.0",
    "summary": "Programmatic read and write access to Carbon, the API-first operating system for manufacturing.",
    "description": "Carbon exposes every module — items, sales, purchasing, production, inventory, quality and accounting — over one REST API. This document describes the core resources in full; the complete catalogue of every table Carbon publishes is generated into the reference at https://docs.carbon.ms/api-reference.\n\n**Authentication.** Create a scoped API key in Settings → API Keys and send it as `Authorization: Bearer <api-key>`, or in the `carbon-key` header. A key belongs to one company and carries an explicit set of module permissions; row-level security in the database — not just the application — confines every request to that scope.\n\n**OAuth 2.0.** Agents that cannot hold a long-lived key can obtain a token instead: https://app.carbon.ms is the authorization server, and its metadata is published at https://app.carbon.ms/.well-known/oauth-authorization-server (RFC 8414), with protected-resource metadata at https://app.carbon.ms/.well-known/oauth-protected-resource (RFC 9728). Both are mirrored from https://carbon.ms by redirect. The MCP endpoint returns `401` with a `WWW-Authenticate: Bearer resource_metadata=\"…\"` header pointing at the same document.\n\n**Rate limiting.** Every key allows 60 requests per minute. The limit is platform-controlled, not configurable per key. A refused request returns `429` with `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` and `Retry-After` — wait out `Retry-After` rather than retrying immediately.\n\n**Querying.** The API is PostgREST-shaped: filter with `?column=eq.value`, choose columns with `select`, sort with `order`, page with `limit`/`offset`, and embed relations inside `select`. There are no `/{id}` paths — address a single row with `?id=eq.<id>`.\n\n**Agents.** Carbon also speaks the Model Context Protocol over Streamable HTTP at https://app.carbon.ms/api/mcp, with the manifest at https://carbon.ms/.well-known/mcp.json.\n\n**Versioning and deprecation.**\n- The OpenAPI document is versioned by `info.version`, semver. It is served from a stable URL (`/openapi.json`) and its version is bumped whenever the published contract changes.\n- A breaking change to a published operation — a removed operation, a removed or retyped field, a new required parameter — bumps the MAJOR. Additive changes bump the MINOR.\n- The REST API itself carries no version segment in its URL today: resources are addressed directly (`/item`, `/salesOrder`). Pin the spec version you built against, and diff `info.version` before upgrading.",
    "termsOfService": "https://carbon.ms/terms",
    "contact": {
      "name": "Carbon support",
      "email": "support@carbon.ms",
      "url": "https://carbon.ms/contact"
    },
    "license": {
      "name": "Carbon source-available license",
      "url": "https://github.com/crbnos/carbon/blob/main/LICENSE"
    }
  },
  "externalDocs": {
    "description": "Carbon documentation and the full API reference",
    "url": "https://docs.carbon.ms/api-reference"
  },
  "servers": [
    {
      "url": "https://rest.carbon.ms",
      "description": "Carbon hosted REST API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "carbonKey": []
    }
  ],
  "tags": [
    {
      "name": "Items",
      "description": "Parts, materials, tools, services, consumables and fixtures — the master data everything else references."
    },
    {
      "name": "Sales",
      "description": "Customers, quotes, sales orders and their lines."
    },
    {
      "name": "Purchasing",
      "description": "Suppliers, purchase orders and their lines."
    },
    {
      "name": "Production",
      "description": "Jobs and the work that fulfils them."
    },
    {
      "name": "People",
      "description": "Employees and their access."
    }
  ],
  "paths": {
    "/item": {
      "get": {
        "operationId": "listItem",
        "summary": "List items",
        "description": "Return items for the company the API key belongs to. The master record every other module points at: parts, materials, tools, services, consumables and fixtures. `readableId` is the human part number; `id` is the stable key used by every relation. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/item.id"
          },
          {
            "$ref": "#/components/parameters/item.readableId"
          },
          {
            "$ref": "#/components/parameters/item.type"
          },
          {
            "$ref": "#/components/parameters/item.active"
          },
          {
            "$ref": "#/components/parameters/item.revisionStatus"
          },
          {
            "$ref": "#/components/parameters/item.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching items.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/item"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/item"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createItem",
        "summary": "Create an item",
        "description": "Insert an item. The master record every other module points at: parts, materials, tools, services, consumables and fixtures. `readableId` is the human part number; `id` is the stable key used by every relation. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The item to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/item"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/item"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/item"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateItem",
        "summary": "Update items",
        "description": "Patch every row matching the query. The master record every other module points at: parts, materials, tools, services, consumables and fixtures. `readableId` is the human part number; `id` is the stable key used by every relation. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/item.id"
          },
          {
            "$ref": "#/components/parameters/item.readableId"
          },
          {
            "$ref": "#/components/parameters/item.type"
          },
          {
            "$ref": "#/components/parameters/item.active"
          },
          {
            "$ref": "#/components/parameters/item.revisionStatus"
          },
          {
            "$ref": "#/components/parameters/item.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/item"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteItem",
        "summary": "Delete items",
        "description": "Delete every row matching the query. The master record every other module points at: parts, materials, tools, services, consumables and fixtures. `readableId` is the human part number; `id` is the stable key used by every relation. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/item.id"
          },
          {
            "$ref": "#/components/parameters/item.readableId"
          },
          {
            "$ref": "#/components/parameters/item.type"
          },
          {
            "$ref": "#/components/parameters/item.active"
          },
          {
            "$ref": "#/components/parameters/item.revisionStatus"
          },
          {
            "$ref": "#/components/parameters/item.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/item"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/part": {
      "get": {
        "operationId": "listPart",
        "summary": "List parts",
        "description": "Return parts for the company the API key belongs to. The part-specific record for an item of type `Part`. Shares its `id` with the item. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/part.id"
          },
          {
            "$ref": "#/components/parameters/part.approved"
          },
          {
            "$ref": "#/components/parameters/part.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching parts.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/part"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/part"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createPart",
        "summary": "Create a part",
        "description": "Insert a part. The part-specific record for an item of type `Part`. Shares its `id` with the item. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The part to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/part"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/part"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/part"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updatePart",
        "summary": "Update parts",
        "description": "Patch every row matching the query. The part-specific record for an item of type `Part`. Shares its `id` with the item. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/part.id"
          },
          {
            "$ref": "#/components/parameters/part.approved"
          },
          {
            "$ref": "#/components/parameters/part.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/part"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/part"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deletePart",
        "summary": "Delete parts",
        "description": "Delete every row matching the query. The part-specific record for an item of type `Part`. Shares its `id` with the item. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/part.id"
          },
          {
            "$ref": "#/components/parameters/part.approved"
          },
          {
            "$ref": "#/components/parameters/part.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/part"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/material": {
      "get": {
        "operationId": "listMaterial",
        "summary": "List materials",
        "description": "Return materials for the company the API key belongs to. The material-specific record for an item of type `Material`, carrying substance, form, grade, dimension and finish. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/material.id"
          },
          {
            "$ref": "#/components/parameters/material.approved"
          },
          {
            "$ref": "#/components/parameters/material.materialSubstanceId"
          },
          {
            "$ref": "#/components/parameters/material.materialFormId"
          },
          {
            "$ref": "#/components/parameters/material.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching materials.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/material"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/material"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createMaterial",
        "summary": "Create a material",
        "description": "Insert a material. The material-specific record for an item of type `Material`, carrying substance, form, grade, dimension and finish. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The material to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/material"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/material"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/material"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateMaterial",
        "summary": "Update materials",
        "description": "Patch every row matching the query. The material-specific record for an item of type `Material`, carrying substance, form, grade, dimension and finish. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/material.id"
          },
          {
            "$ref": "#/components/parameters/material.approved"
          },
          {
            "$ref": "#/components/parameters/material.materialSubstanceId"
          },
          {
            "$ref": "#/components/parameters/material.materialFormId"
          },
          {
            "$ref": "#/components/parameters/material.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/material"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/material"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteMaterial",
        "summary": "Delete materials",
        "description": "Delete every row matching the query. The material-specific record for an item of type `Material`, carrying substance, form, grade, dimension and finish. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/material.id"
          },
          {
            "$ref": "#/components/parameters/material.approved"
          },
          {
            "$ref": "#/components/parameters/material.materialSubstanceId"
          },
          {
            "$ref": "#/components/parameters/material.materialFormId"
          },
          {
            "$ref": "#/components/parameters/material.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/material"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/customer": {
      "get": {
        "operationId": "listCustomer",
        "summary": "List customers",
        "description": "Return customers for the company the API key belongs to. Companies you sell to. Quotes, sales orders and sales invoices all reference `customer.id`. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/customer.id"
          },
          {
            "$ref": "#/components/parameters/customer.readableId"
          },
          {
            "$ref": "#/components/parameters/customer.name"
          },
          {
            "$ref": "#/components/parameters/customer.customerTypeId"
          },
          {
            "$ref": "#/components/parameters/customer.customerStatusId"
          },
          {
            "$ref": "#/components/parameters/customer.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching customers.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/customer"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/customer"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createCustomer",
        "summary": "Create a customer",
        "description": "Insert a customer. Companies you sell to. Quotes, sales orders and sales invoices all reference `customer.id`. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The customer to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/customer"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/customer"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/customer"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateCustomer",
        "summary": "Update customers",
        "description": "Patch every row matching the query. Companies you sell to. Quotes, sales orders and sales invoices all reference `customer.id`. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/customer.id"
          },
          {
            "$ref": "#/components/parameters/customer.readableId"
          },
          {
            "$ref": "#/components/parameters/customer.name"
          },
          {
            "$ref": "#/components/parameters/customer.customerTypeId"
          },
          {
            "$ref": "#/components/parameters/customer.customerStatusId"
          },
          {
            "$ref": "#/components/parameters/customer.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/customer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/customer"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteCustomer",
        "summary": "Delete customers",
        "description": "Delete every row matching the query. Companies you sell to. Quotes, sales orders and sales invoices all reference `customer.id`. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/customer.id"
          },
          {
            "$ref": "#/components/parameters/customer.readableId"
          },
          {
            "$ref": "#/components/parameters/customer.name"
          },
          {
            "$ref": "#/components/parameters/customer.customerTypeId"
          },
          {
            "$ref": "#/components/parameters/customer.customerStatusId"
          },
          {
            "$ref": "#/components/parameters/customer.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/customer"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/supplier": {
      "get": {
        "operationId": "listSupplier",
        "summary": "List suppliers",
        "description": "Return suppliers for the company the API key belongs to. Companies you buy from. Purchase orders, receipts and supplier quotes reference `supplier.id`. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/supplier.id"
          },
          {
            "$ref": "#/components/parameters/supplier.readableId"
          },
          {
            "$ref": "#/components/parameters/supplier.name"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierTypeId"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierStatus"
          },
          {
            "$ref": "#/components/parameters/supplier.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching suppliers.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/supplier"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/supplier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createSupplier",
        "summary": "Create a supplier",
        "description": "Insert a supplier. Companies you buy from. Purchase orders, receipts and supplier quotes reference `supplier.id`. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The supplier to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/supplier"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/supplier"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/supplier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateSupplier",
        "summary": "Update suppliers",
        "description": "Patch every row matching the query. Companies you buy from. Purchase orders, receipts and supplier quotes reference `supplier.id`. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/supplier.id"
          },
          {
            "$ref": "#/components/parameters/supplier.readableId"
          },
          {
            "$ref": "#/components/parameters/supplier.name"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierTypeId"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierStatus"
          },
          {
            "$ref": "#/components/parameters/supplier.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/supplier"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/supplier"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteSupplier",
        "summary": "Delete suppliers",
        "description": "Delete every row matching the query. Companies you buy from. Purchase orders, receipts and supplier quotes reference `supplier.id`. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/supplier.id"
          },
          {
            "$ref": "#/components/parameters/supplier.readableId"
          },
          {
            "$ref": "#/components/parameters/supplier.name"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierTypeId"
          },
          {
            "$ref": "#/components/parameters/supplier.supplierStatus"
          },
          {
            "$ref": "#/components/parameters/supplier.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/supplier"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/salesOrder": {
      "get": {
        "operationId": "listSalesOrder",
        "summary": "List sales orders",
        "description": "Return sales orders for the company the API key belongs to. A confirmed customer order. `salesOrderId` is the document number a customer would quote back at you; `status` drives fulfilment. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/salesOrder.id"
          },
          {
            "$ref": "#/components/parameters/salesOrder.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.status"
          },
          {
            "$ref": "#/components/parameters/salesOrder.customerId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/salesOrder.locationId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching sales orders.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrder"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createSalesOrder",
        "summary": "Create a sales order",
        "description": "Insert a sales order. A confirmed customer order. `salesOrderId` is the document number a customer would quote back at you; `status` drives fulfilment. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The sales order to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/salesOrder"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/salesOrder"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateSalesOrder",
        "summary": "Update sales orders",
        "description": "Patch every row matching the query. A confirmed customer order. `salesOrderId` is the document number a customer would quote back at you; `status` drives fulfilment. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/salesOrder.id"
          },
          {
            "$ref": "#/components/parameters/salesOrder.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.status"
          },
          {
            "$ref": "#/components/parameters/salesOrder.customerId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/salesOrder.locationId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/salesOrder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrder"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteSalesOrder",
        "summary": "Delete sales orders",
        "description": "Delete every row matching the query. A confirmed customer order. `salesOrderId` is the document number a customer would quote back at you; `status` drives fulfilment. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/salesOrder.id"
          },
          {
            "$ref": "#/components/parameters/salesOrder.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.status"
          },
          {
            "$ref": "#/components/parameters/salesOrder.customerId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/salesOrder.locationId"
          },
          {
            "$ref": "#/components/parameters/salesOrder.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrder"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/salesOrderLine": {
      "get": {
        "operationId": "listSalesOrderLine",
        "summary": "List sales order lines",
        "description": "Return sales order lines for the company the API key belongs to. One line of a sales order: what was ordered, how much, at what price, and how much of it has shipped and been invoiced. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.status"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching sales order lines.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrderLine"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrderLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createSalesOrderLine",
        "summary": "Create a sales order line",
        "description": "Insert a sales order line. One line of a sales order: what was ordered, how much, at what price, and how much of it has shipped and been invoiced. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The sales order line to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/salesOrderLine"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/salesOrderLine"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrderLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateSalesOrderLine",
        "summary": "Update sales order lines",
        "description": "Patch every row matching the query. One line of a sales order: what was ordered, how much, at what price, and how much of it has shipped and been invoiced. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.status"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/salesOrderLine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrderLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteSalesOrderLine",
        "summary": "Delete sales order lines",
        "description": "Delete every row matching the query. One line of a sales order: what was ordered, how much, at what price, and how much of it has shipped and been invoiced. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.salesOrderId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.status"
          },
          {
            "$ref": "#/components/parameters/salesOrderLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/salesOrderLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/purchaseOrder": {
      "get": {
        "operationId": "listPurchaseOrder",
        "summary": "List purchase orders",
        "description": "Return purchase orders for the company the API key belongs to. An order placed with a supplier. `purchaseOrderType` separates a normal purchase from a return or outside processing. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.status"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.supplierId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderType"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching purchase orders.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrder"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createPurchaseOrder",
        "summary": "Create a purchase order",
        "description": "Insert a purchase order. An order placed with a supplier. `purchaseOrderType` separates a normal purchase from a return or outside processing. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The purchase order to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/purchaseOrder"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/purchaseOrder"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updatePurchaseOrder",
        "summary": "Update purchase orders",
        "description": "Patch every row matching the query. An order placed with a supplier. `purchaseOrderType` separates a normal purchase from a return or outside processing. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.status"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.supplierId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderType"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/purchaseOrder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrder"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deletePurchaseOrder",
        "summary": "Delete purchase orders",
        "description": "Delete every row matching the query. An order placed with a supplier. `purchaseOrderType` separates a normal purchase from a return or outside processing. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.status"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.supplierId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.orderDate"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.purchaseOrderType"
          },
          {
            "$ref": "#/components/parameters/purchaseOrder.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrder"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/purchaseOrderLine": {
      "get": {
        "operationId": "listPurchaseOrderLine",
        "summary": "List purchase order lines",
        "description": "Return purchase order lines for the company the API key belongs to. One line of a purchase order, including the purchase unit of measure and the conversion factor back to the inventory unit. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.jobId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching purchase order lines.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createPurchaseOrderLine",
        "summary": "Create a purchase order line",
        "description": "Insert a purchase order line. One line of a purchase order, including the purchase unit of measure and the conversion factor back to the inventory unit. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The purchase order line to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/purchaseOrderLine"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updatePurchaseOrderLine",
        "summary": "Update purchase order lines",
        "description": "Patch every row matching the query. One line of a purchase order, including the purchase unit of measure and the conversion factor back to the inventory unit. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.jobId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/purchaseOrderLine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deletePurchaseOrderLine",
        "summary": "Delete purchase order lines",
        "description": "Delete every row matching the query. One line of a purchase order, including the purchase unit of measure and the conversion factor back to the inventory unit. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Purchasing"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.id"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.purchaseOrderId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.itemId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.jobId"
          },
          {
            "$ref": "#/components/parameters/purchaseOrderLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/purchaseOrderLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/quote": {
      "get": {
        "operationId": "listQuote",
        "summary": "List quotes",
        "description": "Return quotes for the company the API key belongs to. A priced offer to a customer. A quote that is accepted becomes a sales order; `status` records where it got to. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/quote.id"
          },
          {
            "$ref": "#/components/parameters/quote.quoteId"
          },
          {
            "$ref": "#/components/parameters/quote.status"
          },
          {
            "$ref": "#/components/parameters/quote.customerId"
          },
          {
            "$ref": "#/components/parameters/quote.expirationDate"
          },
          {
            "$ref": "#/components/parameters/quote.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching quotes.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quote"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quote"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createQuote",
        "summary": "Create a quote",
        "description": "Insert a quote. A priced offer to a customer. A quote that is accepted becomes a sales order; `status` records where it got to. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The quote to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/quote"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/quote"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quote"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateQuote",
        "summary": "Update quotes",
        "description": "Patch every row matching the query. A priced offer to a customer. A quote that is accepted becomes a sales order; `status` records where it got to. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/quote.id"
          },
          {
            "$ref": "#/components/parameters/quote.quoteId"
          },
          {
            "$ref": "#/components/parameters/quote.status"
          },
          {
            "$ref": "#/components/parameters/quote.customerId"
          },
          {
            "$ref": "#/components/parameters/quote.expirationDate"
          },
          {
            "$ref": "#/components/parameters/quote.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quote"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuote",
        "summary": "Delete quotes",
        "description": "Delete every row matching the query. A priced offer to a customer. A quote that is accepted becomes a sales order; `status` records where it got to. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/quote.id"
          },
          {
            "$ref": "#/components/parameters/quote.quoteId"
          },
          {
            "$ref": "#/components/parameters/quote.status"
          },
          {
            "$ref": "#/components/parameters/quote.customerId"
          },
          {
            "$ref": "#/components/parameters/quote.expirationDate"
          },
          {
            "$ref": "#/components/parameters/quote.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quote"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/quoteLine": {
      "get": {
        "operationId": "listQuoteLine",
        "summary": "List quote lines",
        "description": "Return quote lines for the company the API key belongs to. One line of a quote, including the quantity breaks and the method used to price it. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/quoteLine.id"
          },
          {
            "$ref": "#/components/parameters/quoteLine.quoteId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.itemId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.status"
          },
          {
            "$ref": "#/components/parameters/quoteLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching quote lines.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quoteLine"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quoteLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createQuoteLine",
        "summary": "Create a quote line",
        "description": "Insert a quote line. One line of a quote, including the quantity breaks and the method used to price it. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The quote line to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/quoteLine"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/quoteLine"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quoteLine"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateQuoteLine",
        "summary": "Update quote lines",
        "description": "Patch every row matching the query. One line of a quote, including the quantity breaks and the method used to price it. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/quoteLine.id"
          },
          {
            "$ref": "#/components/parameters/quoteLine.quoteId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.itemId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.status"
          },
          {
            "$ref": "#/components/parameters/quoteLine.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/quoteLine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quoteLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuoteLine",
        "summary": "Delete quote lines",
        "description": "Delete every row matching the query. One line of a quote, including the quantity breaks and the method used to price it. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Sales"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/quoteLine.id"
          },
          {
            "$ref": "#/components/parameters/quoteLine.quoteId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.itemId"
          },
          {
            "$ref": "#/components/parameters/quoteLine.status"
          },
          {
            "$ref": "#/components/parameters/quoteLine.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/quoteLine"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/job": {
      "get": {
        "operationId": "listJob",
        "summary": "List jobs",
        "description": "Return jobs for the company the API key belongs to. A production order: what is being made, how many, by when, and how far along it is. Jobs carry the operations and materials the shop floor reports against. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/job.id"
          },
          {
            "$ref": "#/components/parameters/job.jobId"
          },
          {
            "$ref": "#/components/parameters/job.status"
          },
          {
            "$ref": "#/components/parameters/job.itemId"
          },
          {
            "$ref": "#/components/parameters/job.locationId"
          },
          {
            "$ref": "#/components/parameters/job.dueDate"
          },
          {
            "$ref": "#/components/parameters/job.customerId"
          },
          {
            "$ref": "#/components/parameters/job.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching jobs.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createJob",
        "summary": "Create a job",
        "description": "Insert a job. A production order: what is being made, how many, by when, and how far along it is. Jobs carry the operations and materials the shop floor reports against. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The job to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/job"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/job"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateJob",
        "summary": "Update jobs",
        "description": "Patch every row matching the query. A production order: what is being made, how many, by when, and how far along it is. Jobs carry the operations and materials the shop floor reports against. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/job.id"
          },
          {
            "$ref": "#/components/parameters/job.jobId"
          },
          {
            "$ref": "#/components/parameters/job.status"
          },
          {
            "$ref": "#/components/parameters/job.itemId"
          },
          {
            "$ref": "#/components/parameters/job.locationId"
          },
          {
            "$ref": "#/components/parameters/job.dueDate"
          },
          {
            "$ref": "#/components/parameters/job.customerId"
          },
          {
            "$ref": "#/components/parameters/job.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteJob",
        "summary": "Delete jobs",
        "description": "Delete every row matching the query. A production order: what is being made, how many, by when, and how far along it is. Jobs carry the operations and materials the shop floor reports against. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/job.id"
          },
          {
            "$ref": "#/components/parameters/job.jobId"
          },
          {
            "$ref": "#/components/parameters/job.status"
          },
          {
            "$ref": "#/components/parameters/job.itemId"
          },
          {
            "$ref": "#/components/parameters/job.locationId"
          },
          {
            "$ref": "#/components/parameters/job.dueDate"
          },
          {
            "$ref": "#/components/parameters/job.customerId"
          },
          {
            "$ref": "#/components/parameters/job.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/employee": {
      "get": {
        "operationId": "listEmployee",
        "summary": "List employees",
        "description": "Return employees for the company the API key belongs to. A person with access to a company in Carbon, and the employee type that grants their permissions. Results are filtered by row-level security, so a key only ever sees rows its scopes allow. Use `select` to narrow the columns, `order` to sort, and `limit`/`offset` to page.",
        "tags": [
          "People"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/employee.id"
          },
          {
            "$ref": "#/components/parameters/employee.employeeTypeId"
          },
          {
            "$ref": "#/components/parameters/employee.active"
          },
          {
            "$ref": "#/components/parameters/employee.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching employees.",
            "headers": {
              "Content-Range": {
                "description": "The rows returned and, when `Prefer: count=exact` was sent, the total — e.g. `0-24/1103`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/employee"
                  }
                }
              }
            }
          },
          "206": {
            "description": "A page of results, when the request asked for a range smaller than the result set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/employee"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createEmployee",
        "summary": "Create an employee",
        "description": "Insert an employee. A person with access to a company in Carbon, and the employee type that grants their permissions. `companyId` is taken from the API key and must not be sent. Send `Prefer: return=representation` to get the created row back instead of an empty body. An array body inserts several rows in one statement.",
        "tags": [
          "People"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          }
        ],
        "requestBody": {
          "description": "The employee to create, or an array of them.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/employee"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/employee"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The body is empty unless `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/employee"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The insert violated a unique or foreign-key constraint — most often a duplicate readable id, or a reference to a row in another company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateEmployee",
        "summary": "Update employees",
        "description": "Patch every row matching the query. A person with access to a company in Carbon, and the employee type that grants their permissions. A filter is REQUIRED: an unfiltered PATCH would rewrite every row the key can reach. Send `Prefer: return=representation` to get the updated rows back.",
        "tags": [
          "People"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/select"
          },
          {
            "$ref": "#/components/parameters/employee.id"
          },
          {
            "$ref": "#/components/parameters/employee.employeeTypeId"
          },
          {
            "$ref": "#/components/parameters/employee.active"
          },
          {
            "$ref": "#/components/parameters/employee.companyId"
          }
        ],
        "requestBody": {
          "description": "The columns to change. Omitted columns are left alone.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/employee"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/employee"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Updated. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteEmployee",
        "summary": "Delete employees",
        "description": "Delete every row matching the query. A person with access to a company in Carbon, and the employee type that grants their permissions. A filter is REQUIRED. Rows referenced by other records may be refused by a foreign-key constraint rather than cascading.",
        "tags": [
          "People"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/prefer"
          },
          {
            "$ref": "#/components/parameters/employee.id"
          },
          {
            "$ref": "#/components/parameters/employee.employeeTypeId"
          },
          {
            "$ref": "#/components/parameters/employee.active"
          },
          {
            "$ref": "#/components/parameters/employee.companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted rows, when `Prefer: return=representation` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/employee"
                  }
                }
              }
            }
          },
          "204": {
            "description": "Deleted. No body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The row is referenced by another record and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Carbon API key (`crbn_…`) sent as a bearer token. Create one in Settings → API Keys."
      },
      "carbonKey": {
        "type": "apiKey",
        "in": "header",
        "name": "carbon-key",
        "description": "The same API key sent in a dedicated header. Equivalent to `bearerAuth`; use whichever your client makes easier."
      }
    },
    "parameters": {
      "select": {
        "name": "select",
        "in": "query",
        "description": "Columns to return, comma separated — e.g. `id,readableId,name`. Related rows can be embedded by naming the relation: `select=id,salesOrderLine(id,itemId)`. Defaults to every column.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "id,readableId,name"
      },
      "order": {
        "name": "order",
        "in": "query",
        "description": "Sort order, comma separated — e.g. `createdAt.desc`, `name.asc.nullslast`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "createdAt.desc"
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum rows to return.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 100
        },
        "example": 50
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "description": "Rows to skip before returning results.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        },
        "example": 0
      },
      "prefer": {
        "name": "Prefer",
        "in": "header",
        "description": "PostgREST response preferences. `return=representation` returns the affected rows, `return=minimal` returns none, `count=exact` puts a total in `Content-Range`, `resolution=merge-duplicates` upserts.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "return=representation"
      },
      "item.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.itm_01hxy"
      },
      "item.readableId": {
        "name": "readableId",
        "in": "query",
        "description": "Filter on `readableId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "item.type": {
        "name": "type",
        "in": "query",
        "description": "Filter on `type`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Part`, `Material`, `Tool`, `Service`, `Consumable`, `Fixture`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Part"
      },
      "item.active": {
        "name": "active",
        "in": "query",
        "description": "Filter on `active`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "is.true"
      },
      "item.revisionStatus": {
        "name": "revisionStatus",
        "in": "query",
        "description": "Filter on `revisionStatus`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Design`, `Prototype`, `Production`, `Obsolete`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Design"
      },
      "item.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "part.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.itm_01hxy"
      },
      "part.approved": {
        "name": "approved",
        "in": "query",
        "description": "Filter on `approved`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "is.true"
      },
      "part.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "material.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.itm_01hxy"
      },
      "material.approved": {
        "name": "approved",
        "in": "query",
        "description": "Filter on `approved`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "is.true"
      },
      "material.materialSubstanceId": {
        "name": "materialSubstanceId",
        "in": "query",
        "description": "Filter on `materialSubstanceId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "material.materialFormId": {
        "name": "materialFormId",
        "in": "query",
        "description": "Filter on `materialFormId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "material.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "customer.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.cus_01hxy"
      },
      "customer.readableId": {
        "name": "readableId",
        "in": "query",
        "description": "Filter on `readableId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "customer.name": {
        "name": "name",
        "in": "query",
        "description": "Filter on `name`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "customer.customerTypeId": {
        "name": "customerTypeId",
        "in": "query",
        "description": "Filter on `customerTypeId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "customer.customerStatusId": {
        "name": "customerStatusId",
        "in": "query",
        "description": "Filter on `customerStatusId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "customer.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "supplier.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.sup_01hxy"
      },
      "supplier.readableId": {
        "name": "readableId",
        "in": "query",
        "description": "Filter on `readableId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "supplier.name": {
        "name": "name",
        "in": "query",
        "description": "Filter on `name`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "supplier.supplierTypeId": {
        "name": "supplierTypeId",
        "in": "query",
        "description": "Filter on `supplierTypeId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "supplier.supplierStatus": {
        "name": "supplierStatus",
        "in": "query",
        "description": "Filter on `supplierStatus`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Active`, `Inactive`, `Pending`, `Rejected`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Active"
      },
      "supplier.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrder.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.so_01hxy"
      },
      "salesOrder.salesOrderId": {
        "name": "salesOrderId",
        "in": "query",
        "description": "Filter on `salesOrderId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrder.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Draft`, `Needs Approval`, `Confirmed`, `In Progress`, `Completed`, `Invoiced`, `Cancelled`, `Closed`, `To Ship and Invoice`, `To Ship`, `To Invoice`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Draft"
      },
      "salesOrder.customerId": {
        "name": "customerId",
        "in": "query",
        "description": "Filter on `customerId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrder.orderDate": {
        "name": "orderDate",
        "in": "query",
        "description": "Filter on `orderDate`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrder.locationId": {
        "name": "locationId",
        "in": "query",
        "description": "Filter on `locationId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrder.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrderLine.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.sol_01hxy"
      },
      "salesOrderLine.salesOrderId": {
        "name": "salesOrderId",
        "in": "query",
        "description": "Filter on `salesOrderId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrderLine.itemId": {
        "name": "itemId",
        "in": "query",
        "description": "Filter on `itemId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "salesOrderLine.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Ordered`, `In Progress`, `Completed`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Ordered"
      },
      "salesOrderLine.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrder.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.po_01hxy"
      },
      "purchaseOrder.purchaseOrderId": {
        "name": "purchaseOrderId",
        "in": "query",
        "description": "Filter on `purchaseOrderId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrder.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Draft`, `To Review`, `Rejected`, `To Receive`, `To Receive and Invoice`, `To Invoice`, `Completed`, `Closed`, `Planned`, `Needs Approval`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Draft"
      },
      "purchaseOrder.supplierId": {
        "name": "supplierId",
        "in": "query",
        "description": "Filter on `supplierId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrder.orderDate": {
        "name": "orderDate",
        "in": "query",
        "description": "Filter on `orderDate`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrder.purchaseOrderType": {
        "name": "purchaseOrderType",
        "in": "query",
        "description": "Filter on `purchaseOrderType`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Purchase`, `Return`, `Outside Processing`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Purchase"
      },
      "purchaseOrder.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrderLine.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.pol_01hxy"
      },
      "purchaseOrderLine.purchaseOrderId": {
        "name": "purchaseOrderId",
        "in": "query",
        "description": "Filter on `purchaseOrderId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrderLine.itemId": {
        "name": "itemId",
        "in": "query",
        "description": "Filter on `itemId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrderLine.jobId": {
        "name": "jobId",
        "in": "query",
        "description": "Filter on `jobId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "purchaseOrderLine.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quote.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.quo_01hxy"
      },
      "quote.quoteId": {
        "name": "quoteId",
        "in": "query",
        "description": "Filter on `quoteId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quote.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Draft`, `Sent`, `Ordered`, `Partial`, `Lost`, `Cancelled`, `Expired`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Draft"
      },
      "quote.customerId": {
        "name": "customerId",
        "in": "query",
        "description": "Filter on `customerId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quote.expirationDate": {
        "name": "expirationDate",
        "in": "query",
        "description": "Filter on `expirationDate`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quote.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quoteLine.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.qln_01hxy"
      },
      "quoteLine.quoteId": {
        "name": "quoteId",
        "in": "query",
        "description": "Filter on `quoteId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quoteLine.itemId": {
        "name": "itemId",
        "in": "query",
        "description": "Filter on `itemId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "quoteLine.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Not Started`, `In Progress`, `Complete`, `No Quote`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Not Started"
      },
      "quoteLine.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.job_01hxy"
      },
      "job.jobId": {
        "name": "jobId",
        "in": "query",
        "description": "Filter on `jobId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.status": {
        "name": "status",
        "in": "query",
        "description": "Filter on `status`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`. One of: `Draft`, `Ready`, `In Progress`, `Paused`, `Completed`, `Cancelled`, `Overdue`, `Due Today`, `Planned`, `Closed`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.Draft"
      },
      "job.itemId": {
        "name": "itemId",
        "in": "query",
        "description": "Filter on `itemId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.locationId": {
        "name": "locationId",
        "in": "query",
        "description": "Filter on `locationId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.dueDate": {
        "name": "dueDate",
        "in": "query",
        "description": "Filter on `dueDate`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.customerId": {
        "name": "customerId",
        "in": "query",
        "description": "Filter on `customerId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "job.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "employee.id": {
        "name": "id",
        "in": "query",
        "description": "Filter on `id`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.usr_01hxy"
      },
      "employee.employeeTypeId": {
        "name": "employeeTypeId",
        "in": "query",
        "description": "Filter on `employeeTypeId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      },
      "employee.active": {
        "name": "active",
        "in": "query",
        "description": "Filter on `active`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "is.true"
      },
      "employee.companyId": {
        "name": "companyId",
        "in": "query",
        "description": "Filter on `companyId`. Takes a PostgREST operator prefix, e.g. `eq.`, `neq.`, `gt.`, `gte.`, `lt.`, `lte.`, `like.`, `ilike.`, `in.(a,b)`, `is.null`.",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eq.value"
      }
    },
    "schemas": {
      "item": {
        "type": "object",
        "required": [
          "id",
          "readableId",
          "name",
          "type",
          "replenishmentSystem",
          "itemTrackingType",
          "active",
          "createdBy",
          "createdAt",
          "sourcingType",
          "revisionStatus"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "readableId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "Part",
              "Material",
              "Tool",
              "Service",
              "Consumable",
              "Fixture"
            ]
          },
          "replenishmentSystem": {
            "type": "string",
            "enum": [
              "Buy",
              "Make",
              "Buy and Make"
            ]
          },
          "defaultMethodType": {
            "type": "string",
            "enum": [
              "Purchase to Order",
              "Pull from Inventory",
              "Make to Order"
            ]
          },
          "itemTrackingType": {
            "type": "string",
            "enum": [
              "Inventory",
              "Non-Inventory",
              "Serial",
              "Batch"
            ]
          },
          "unitOfMeasureCode": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "modelUploadId": {
            "type": "string",
            "description": "Note:"
          },
          "thumbnailPath": {
            "type": "string"
          },
          "notes": {
            "type": "object",
            "additionalProperties": true
          },
          "trackingMethod": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "readableIdWithRevision": {
            "type": "string"
          },
          "sourcingType": {
            "type": "string",
            "enum": [
              "Specified",
              "Drop Ship",
              "Ship from Inventory"
            ]
          },
          "mpn": {
            "type": "string"
          },
          "revisionStatus": {
            "type": "string",
            "enum": [
              "Design",
              "Prototype",
              "Production",
              "Obsolete"
            ]
          },
          "changeOrderId": {
            "type": "string",
            "description": "Note:"
          }
        }
      },
      "part": {
        "type": "object",
        "required": [
          "id",
          "approved",
          "companyId",
          "createdBy",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "approved": {
            "type": "boolean"
          },
          "approvedBy": {
            "type": "string",
            "description": "Note:"
          },
          "fromDate": {
            "type": "string",
            "format": "date"
          },
          "toDate": {
            "type": "string",
            "format": "date"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "material": {
        "type": "object",
        "required": [
          "id",
          "approved",
          "companyId",
          "createdBy",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "materialFormId": {
            "type": "string",
            "description": "Note:"
          },
          "materialSubstanceId": {
            "type": "string",
            "description": "Note:"
          },
          "approved": {
            "type": "boolean"
          },
          "approvedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dimensionId": {
            "type": "string",
            "description": "Note:"
          },
          "finishId": {
            "type": "string",
            "description": "Note:"
          },
          "gradeId": {
            "type": "string",
            "description": "Note:"
          },
          "materialTypeId": {
            "type": "string",
            "description": "Note:"
          }
        }
      },
      "customer": {
        "type": "object",
        "required": [
          "id",
          "name",
          "companyId",
          "createdAt",
          "taxPercent",
          "readableId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "name": {
            "type": "string"
          },
          "customerTypeId": {
            "type": "string",
            "description": "Note:"
          },
          "customerStatusId": {
            "type": "string",
            "description": "Note:"
          },
          "accountManagerId": {
            "type": "string",
            "description": "Note:"
          },
          "logo": {
            "type": "string"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Note:"
          },
          "phone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "taxPercent": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesContactId": {
            "type": "string",
            "description": "Note:"
          },
          "defaultCc": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "intercompanyCompanyId": {
            "type": "string",
            "description": "Note:"
          },
          "readableId": {
            "type": "string"
          }
        }
      },
      "supplier": {
        "type": "object",
        "required": [
          "id",
          "name",
          "companyId",
          "createdAt",
          "taxPercent",
          "readableId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "name": {
            "type": "string"
          },
          "supplierTypeId": {
            "type": "string",
            "description": "Note:"
          },
          "accountManagerId": {
            "type": "string",
            "description": "Note:"
          },
          "logo": {
            "type": "string"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Note:"
          },
          "phone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "taxPercent": {
            "type": "number"
          },
          "purchasingContactId": {
            "type": "string",
            "description": "Note:"
          },
          "defaultCc": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supplierStatus": {
            "type": "string",
            "enum": [
              "Active",
              "Inactive",
              "Pending",
              "Rejected"
            ]
          },
          "intercompanyCompanyId": {
            "type": "string",
            "description": "Note:"
          },
          "readableId": {
            "type": "string"
          }
        }
      },
      "salesOrder": {
        "type": "object",
        "required": [
          "id",
          "salesOrderId",
          "revisionId",
          "status",
          "currencyCode",
          "customerId",
          "companyId",
          "createdAt",
          "createdBy"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "salesOrderId": {
            "type": "string"
          },
          "revisionId": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "Needs Approval",
              "Confirmed",
              "In Progress",
              "Completed",
              "Invoiced",
              "Cancelled",
              "Closed",
              "To Ship and Invoice",
              "To Ship",
              "To Invoice"
            ]
          },
          "orderDate": {
            "type": "string",
            "format": "date"
          },
          "currencyCode": {
            "type": "string",
            "description": "Note:"
          },
          "customerId": {
            "type": "string"
          },
          "customerLocationId": {
            "type": "string",
            "description": "Note:"
          },
          "customerContactId": {
            "type": "string",
            "description": "Note:"
          },
          "customerReference": {
            "type": "string"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "closedAt": {
            "type": "string",
            "format": "date"
          },
          "closedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "locationId": {
            "type": "string",
            "description": "Note:"
          },
          "exchangeRate": {
            "type": "number"
          },
          "exchangeRateUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "salesPersonId": {
            "type": "string"
          },
          "sentCompleteDate": {
            "type": "string",
            "format": "date"
          },
          "opportunityId": {
            "type": "string",
            "description": "Note:"
          },
          "completedDate": {
            "type": "string",
            "format": "date-time"
          },
          "customerEngineeringContactId": {
            "type": "string",
            "description": "Note:"
          }
        }
      },
      "salesOrderLine": {
        "type": "object",
        "required": [
          "id",
          "salesOrderId",
          "salesOrderLineType",
          "sentComplete",
          "invoicedComplete",
          "companyId",
          "createdAt",
          "createdBy",
          "status",
          "addOnCost",
          "methodType",
          "shippingCost",
          "taxPercent",
          "nonTaxableAddOnCost",
          "sortOrder"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "salesOrderId": {
            "type": "string",
            "description": "Note:"
          },
          "salesOrderLineType": {
            "type": "string",
            "enum": [
              "Comment",
              "Part",
              "Material",
              "Tool",
              "Service",
              "Consumable",
              "Fixture",
              "Fixed Asset"
            ]
          },
          "itemId": {
            "type": "string",
            "description": "Note:"
          },
          "assetId": {
            "type": "string",
            "description": "Note:"
          },
          "description": {
            "type": "string"
          },
          "saleQuantity": {
            "type": "number"
          },
          "quantitySent": {
            "type": "number"
          },
          "quantityInvoiced": {
            "type": "number"
          },
          "unitPrice": {
            "type": "number"
          },
          "unitOfMeasureCode": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "storageUnitId": {
            "type": "string",
            "description": "Note:"
          },
          "setupPrice": {
            "type": "number"
          },
          "sentComplete": {
            "type": "boolean"
          },
          "invoicedComplete": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "status": {
            "type": "string",
            "enum": [
              "Ordered",
              "In Progress",
              "Completed"
            ]
          },
          "modelUploadId": {
            "type": "string"
          },
          "promisedDate": {
            "type": "string",
            "format": "date"
          },
          "addOnCost": {
            "type": "number"
          },
          "methodType": {
            "type": "string",
            "enum": [
              "Purchase to Order",
              "Pull from Inventory",
              "Make to Order"
            ]
          },
          "exchangeRate": {
            "type": "number"
          },
          "shippingCost": {
            "type": "number"
          },
          "taxPercent": {
            "type": "number"
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "quantityToSend": {
            "type": "number"
          },
          "quantityToInvoice": {
            "type": "number"
          },
          "sentDate": {
            "type": "string",
            "format": "date"
          },
          "accountId": {
            "type": "string",
            "description": "Note:"
          },
          "nonTaxableAddOnCost": {
            "type": "number"
          },
          "pricingRuleId": {
            "type": "string",
            "description": "Note:"
          },
          "priceTrace": {
            "type": "object",
            "additionalProperties": true
          },
          "sortOrder": {
            "type": "number"
          },
          "convertedAddOnCost": {
            "type": "number"
          },
          "convertedShippingCost": {
            "type": "number"
          },
          "convertedUnitPrice": {
            "type": "number"
          },
          "convertedNonTaxableAddOnCost": {
            "type": "number"
          }
        }
      },
      "purchaseOrder": {
        "type": "object",
        "required": [
          "id",
          "purchaseOrderId",
          "revisionId",
          "status",
          "supplierId",
          "companyId",
          "createdAt",
          "createdBy",
          "supplierInteractionId",
          "purchaseOrderType"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "revisionId": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "To Review",
              "Rejected",
              "To Receive",
              "To Receive and Invoice",
              "To Invoice",
              "Completed",
              "Closed",
              "Planned",
              "Needs Approval"
            ]
          },
          "orderDate": {
            "type": "string",
            "format": "date"
          },
          "supplierId": {
            "type": "string"
          },
          "supplierLocationId": {
            "type": "string",
            "description": "Note:"
          },
          "supplierContactId": {
            "type": "string",
            "description": "Note:"
          },
          "supplierReference": {
            "type": "string"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "closedAt": {
            "type": "string",
            "format": "date"
          },
          "closedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "currencyCode": {
            "type": "string",
            "description": "Note:"
          },
          "exchangeRate": {
            "type": "number"
          },
          "exchangeRateUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "supplierInteractionId": {
            "type": "string",
            "description": "Note:"
          },
          "purchaseOrderType": {
            "type": "string",
            "enum": [
              "Purchase",
              "Return",
              "Outside Processing"
            ]
          },
          "jobId": {
            "type": "string",
            "description": "Note:"
          },
          "jobReadableId": {
            "type": "string"
          }
        }
      },
      "purchaseOrderLine": {
        "type": "object",
        "required": [
          "id",
          "purchaseOrderId",
          "purchaseOrderLineType",
          "receivedComplete",
          "invoicedComplete",
          "companyId",
          "createdAt",
          "createdBy",
          "exchangeRate",
          "supplierShippingCost",
          "supplierTaxAmount",
          "sortOrder"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "purchaseOrderId": {
            "type": "string",
            "description": "Note:"
          },
          "purchaseOrderLineType": {
            "type": "string",
            "enum": [
              "Comment",
              "G/L Account",
              "Fixed Asset",
              "Part",
              "Material",
              "Tool",
              "Service",
              "Consumable",
              "Fixture"
            ]
          },
          "itemId": {
            "type": "string",
            "description": "Note:"
          },
          "assetId": {
            "type": "string",
            "description": "Note:"
          },
          "description": {
            "type": "string"
          },
          "purchaseQuantity": {
            "type": "number"
          },
          "quantityReceived": {
            "type": "number"
          },
          "quantityInvoiced": {
            "type": "number"
          },
          "supplierUnitPrice": {
            "type": "number"
          },
          "inventoryUnitOfMeasureCode": {
            "type": "string"
          },
          "purchaseUnitOfMeasureCode": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "storageUnitId": {
            "type": "string",
            "description": "Note:"
          },
          "setupPrice": {
            "type": "number"
          },
          "receivedComplete": {
            "type": "boolean"
          },
          "invoicedComplete": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "conversionFactor": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "exchangeRate": {
            "type": "number"
          },
          "supplierShippingCost": {
            "type": "number"
          },
          "modelUploadId": {
            "type": "string",
            "description": "Note:"
          },
          "supplierTaxAmount": {
            "type": "number"
          },
          "quantityToReceive": {
            "type": "number"
          },
          "quantityToInvoice": {
            "type": "number"
          },
          "supplierExtendedPrice": {
            "type": "number"
          },
          "taxPercent": {
            "type": "number"
          },
          "jobId": {
            "type": "string",
            "description": "Note:"
          },
          "jobOperationId": {
            "type": "string",
            "description": "Note:"
          },
          "quantityShipped": {
            "type": "number"
          },
          "promisedDate": {
            "type": "string",
            "format": "date"
          },
          "accountId": {
            "type": "string",
            "description": "Note:"
          },
          "requiredDate": {
            "type": "string",
            "format": "date"
          },
          "receivedDate": {
            "type": "string",
            "format": "date"
          },
          "costCenterId": {
            "type": "string",
            "description": "Note:"
          },
          "ownerId": {
            "type": "string",
            "description": "Note:"
          },
          "sortOrder": {
            "type": "number"
          },
          "supplierPartId": {
            "type": "string"
          },
          "unitPrice": {
            "type": "number"
          },
          "extendedPrice": {
            "type": "number"
          },
          "shippingCost": {
            "type": "number"
          },
          "taxAmount": {
            "type": "number"
          }
        }
      },
      "quote": {
        "type": "object",
        "required": [
          "id",
          "quoteId",
          "revisionId",
          "status",
          "customerId",
          "companyId",
          "createdAt",
          "createdBy"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "quoteId": {
            "type": "string"
          },
          "revisionId": {
            "type": "integer"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "expirationDate": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "Sent",
              "Ordered",
              "Partial",
              "Lost",
              "Cancelled",
              "Expired"
            ]
          },
          "salesPersonId": {
            "type": "string",
            "description": "Note:"
          },
          "estimatorId": {
            "type": "string",
            "description": "Note:"
          },
          "customerId": {
            "type": "string"
          },
          "customerLocationId": {
            "type": "string",
            "description": "Note:"
          },
          "customerContactId": {
            "type": "string",
            "description": "Note:"
          },
          "customerReference": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "description": "Note:"
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Note:"
          },
          "exchangeRate": {
            "type": "number"
          },
          "exchangeRateUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "externalLinkId": {
            "type": "string",
            "format": "uuid",
            "description": "Note:"
          },
          "digitalQuoteAcceptedBy": {
            "type": "string"
          },
          "digitalQuoteAcceptedByEmail": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "digitalQuoteRejectedBy": {
            "type": "string"
          },
          "digitalQuoteRejectedByEmail": {
            "type": "string"
          },
          "opportunityId": {
            "type": "string",
            "description": "Note:"
          },
          "completedDate": {
            "type": "string",
            "format": "date-time"
          },
          "customerEngineeringContactId": {
            "type": "string",
            "description": "Note:"
          }
        }
      },
      "quoteLine": {
        "type": "object",
        "required": [
          "id",
          "quoteId",
          "quoteRevisionId",
          "status",
          "itemId",
          "itemType",
          "description",
          "methodType",
          "companyId",
          "createdBy",
          "taxPercent",
          "unitPricePrecision",
          "sortOrder"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "quoteId": {
            "type": "string",
            "description": "Note:"
          },
          "quoteRevisionId": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "Not Started",
              "In Progress",
              "Complete",
              "No Quote"
            ]
          },
          "estimatorId": {
            "type": "string",
            "description": "Note:"
          },
          "itemId": {
            "type": "string",
            "description": "Note:"
          },
          "itemType": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "customerPartId": {
            "type": "string"
          },
          "customerPartRevision": {
            "type": "string"
          },
          "methodType": {
            "type": "string",
            "enum": [
              "Purchase to Order",
              "Pull from Inventory",
              "Make to Order"
            ]
          },
          "unitOfMeasureCode": {
            "type": "string"
          },
          "internalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "modelUploadId": {
            "type": "string",
            "description": "Note:"
          },
          "quantity": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "additionalCharges": {
            "type": "object",
            "additionalProperties": true
          },
          "locationId": {
            "type": "string",
            "description": "Note:"
          },
          "noQuoteReason": {
            "type": "string"
          },
          "taxPercent": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unitPricePrecision": {
            "type": "integer"
          },
          "externalNotes": {
            "type": "object",
            "additionalProperties": true
          },
          "configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "pricingRuleId": {
            "type": "string",
            "description": "Note:"
          },
          "priceTrace": {
            "type": "object",
            "additionalProperties": true
          },
          "sortOrder": {
            "type": "number"
          }
        }
      },
      "job": {
        "type": "object",
        "required": [
          "id",
          "jobId",
          "itemId",
          "unitOfMeasureCode",
          "locationId",
          "status",
          "deadlineType",
          "quantity",
          "scrapQuantity",
          "quantityComplete",
          "quantityShipped",
          "quantityReceivedToInventory",
          "companyId",
          "createdAt",
          "createdBy",
          "priority"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "jobId": {
            "type": "string"
          },
          "itemId": {
            "type": "string",
            "description": "Note:"
          },
          "unitOfMeasureCode": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "description": "Note:"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "Ready",
              "In Progress",
              "Paused",
              "Completed",
              "Cancelled",
              "Overdue",
              "Due Today",
              "Planned",
              "Closed"
            ]
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "deadlineType": {
            "type": "string",
            "enum": [
              "No Deadline",
              "ASAP",
              "Soft Deadline",
              "Hard Deadline"
            ]
          },
          "quantity": {
            "type": "number"
          },
          "scrapQuantity": {
            "type": "number"
          },
          "quantityComplete": {
            "type": "number"
          },
          "quantityShipped": {
            "type": "number"
          },
          "quantityReceivedToInventory": {
            "type": "number"
          },
          "salesOrderId": {
            "type": "string",
            "description": "Note:"
          },
          "salesOrderLineId": {
            "type": "string",
            "description": "Note:"
          },
          "quoteId": {
            "type": "string",
            "description": "Note:"
          },
          "quoteLineId": {
            "type": "string"
          },
          "modelUploadId": {
            "type": "string"
          },
          "notes": {
            "type": "object",
            "additionalProperties": true
          },
          "assignee": {
            "type": "string",
            "description": "Note:"
          },
          "customFields": {
            "type": "object",
            "additionalProperties": true
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Note:"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Note:"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "releasedDate": {
            "type": "string",
            "format": "date-time"
          },
          "completedDate": {
            "type": "string",
            "format": "date-time"
          },
          "estimatedTime": {
            "type": "number"
          },
          "actualTime": {
            "type": "number"
          },
          "secondsToComplete": {
            "type": "number"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "storageUnitId": {
            "type": "string",
            "description": "Note:"
          },
          "priority": {
            "type": "number"
          },
          "productionQuantity": {
            "type": "number"
          }
        }
      },
      "employee": {
        "type": "object",
        "required": [
          "id",
          "companyId",
          "employeeTypeId",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Note:"
          },
          "companyId": {
            "type": "string",
            "description": "Note:"
          },
          "employeeTypeId": {
            "type": "string",
            "description": "Note:"
          },
          "active": {
            "type": "boolean"
          },
          "pin": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "The error body every failed request returns.",
        "properties": {
          "message": {
            "type": "string",
            "description": "What went wrong."
          },
          "details": {
            "type": "string",
            "description": "The underlying database detail, when there is one."
          },
          "hint": {
            "type": "string",
            "description": "A suggested fix, when there is one."
          },
          "code": {
            "type": "string",
            "description": "The PostgreSQL or PostgREST error code."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request could not be parsed — usually a malformed filter, an unknown column in `select`, or a body that does not match the resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No API key, or a key that does not resolve — expired, deleted, or belonging to another company.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key resolved but its scopes do not permit this action on this resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The key exceeded its allowance of 60 requests per minute. `Retry-After` and the `X-RateLimit-*` headers say when to try again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
