{"openapi": "3.1.0", "info": {"title": "TenetOS", "version": "0", "description": ""}, "paths": {"/auth/api-keys": {"get": {"operationId": "tenetos_api_http_api_keys", "summary": "Api Keys", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "List your company's API keys.", "tags": ["Account"], "x-role": "Admin"}, "post": {"operationId": "tenetos_api_http_new_api_key", "summary": "New Api Key", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Make an API key; the answer is the only place the key is shown.", "tags": ["Account"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewKey"}}}, "required": true}, "x-role": "Admin"}}, "/auth/api-keys/{key_id}": {"delete": {"operationId": "tenetos_api_http_remove_api_key", "summary": "Remove Api Key", "parameters": [{"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "Revoke an API key.", "tags": ["Account"], "x-role": "Admin"}}, "/auth/members": {"get": {"operationId": "tenetos_api_http_members", "summary": "Members", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "List your company's members.", "tags": ["Members"]}}, "/auth/addresses": {"get": {"operationId": "tenetos_api_http_addresses", "summary": "Addresses", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "List your company's addresses, default first.", "tags": ["Addresses"]}, "post": {"operationId": "tenetos_api_http_add_address", "summary": "Add Address", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "Add an address.", "tags": ["Addresses"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Address"}}}, "required": true}, "x-role": "Edit"}}, "/auth/addresses/{pk}/primary": {"put": {"operationId": "tenetos_api_http_set_primary", "summary": "Set Primary", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "Make an address the one orders ship to unless they name another.", "tags": ["Addresses"], "x-role": "Edit"}}, "/auth/addresses/{pk}": {"delete": {"operationId": "tenetos_api_http_remove_address", "summary": "Remove Address", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "Delete an address.", "tags": ["Addresses"], "x-role": "Edit"}}, "/sourcing/bom/template": {"get": {"operationId": "tenetos_api_http_bom_template", "summary": "Bom Template", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Download the BOM template.", "tags": ["BOM files"]}}, "/sourcing/bom/format": {"post": {"operationId": "tenetos_api_http_bom_format", "summary": "Bom Format", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Format"}}}}}, "description": "Check if a BOM matches the template.", "tags": ["BOM files"], "requestBody": {"required": true, "description": "The BOM file itself, as CSV", "content": {"text/csv": {"schema": {"type": "string", "format": "binary"}}}}}}, "/sourcing/bom/columns": {"post": {"operationId": "tenetos_api_http_bom_columns", "summary": "Bom Columns", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Mapping"}}}}}, "description": "Match a BOM's columns to the template.", "tags": ["BOM files"], "requestBody": {"required": true, "description": "The BOM file itself, as CSV", "content": {"text/csv": {"schema": {"type": "string", "format": "binary"}}}}, "x-role": "Edit"}}, "/sourcing/orders": {"post": {"operationId": "tenetos_api_http_create_order", "summary": "Create Order", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Create a complete draft order.", "tags": ["Orders"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewOrder"}}}, "required": true}, "x-role": "Edit"}, "get": {"operationId": "tenetos_api_http_orders", "summary": "Orders", "parameters": [{"in": "query", "name": "query", "schema": {"default": "", "maxLength": 200, "title": "Query", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "description": "Maximum results per page", "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false, "description": "Maximum results per page"}, {"in": "query", "name": "offset", "schema": {"default": 0, "description": "The previous response's next_offset, or zero to start", "minimum": 0, "title": "Offset", "type": "integer"}, "required": false, "description": "The previous response's next_offset, or zero to start"}, {"in": "query", "name": "direction", "schema": {"default": "desc", "enum": ["asc", "desc"], "title": "Direction", "type": "string"}, "required": false}, {"in": "query", "name": "status", "schema": {"items": {"description": "Where an order stands: a draft, paid, shipped once its sales order is completed.", "enum": ["draft", "paid", "shipped"], "title": "Status", "type": "string"}, "title": "Status", "type": "array"}, "required": false}, {"in": "query", "name": "kind", "schema": {"anyOf": [{"enum": ["boards", "parts only"], "type": "string"}, {"type": "null"}], "title": "Kind"}, "required": false}, {"in": "query", "name": "created_from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Created From"}, "required": false}, {"in": "query", "name": "created_to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Created To"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "created", "enum": ["created", "name", "status", "total", "number", "boards"], "title": "Sort", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Orders"}}}}}, "description": "Search all supported orders within the caller's company.", "tags": ["Orders"]}}, "/sourcing/orders/{number}": {"delete": {"operationId": "tenetos_api_http_delete_order", "summary": "Delete Order", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Delete an order that isn't in production.", "tags": ["Orders"], "x-role": "Admin"}, "put": {"operationId": "tenetos_api_http_set_order", "summary": "Set Order", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Save the complete reviewed edit under one lock.", "tags": ["Orders"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrderChanges"}}}, "required": true}, "x-role": "Edit"}, "get": {"operationId": "tenetos_api_http_get_order", "summary": "Get Order", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Get an order with its lines and totals.", "tags": ["Orders"]}}, "/sourcing/orders/{number}/files/{kind}": {"get": {"operationId": "tenetos_api_http_download", "summary": "Download", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "kind", "schema": {"enum": ["gerbers", "bom", "pnp"], "title": "Kind", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Download an owned order's uploaded file.", "tags": ["Orders"]}}, "/sourcing/orders/{number}/pay": {"post": {"operationId": "tenetos_api_http_pay", "summary": "Pay", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Order the draft at the total it shows, to be paid by invoice. Only a person signed in to the app can.\n\nA ready draft read with pricing true is having its prices asked for a quote, which it shows and pays as shown for 2 hours while it\nbuys the same; else prices are asked now. Prices totalling other than the total sent order nothing: 409 price_changed, with the\norder at its new total. A ship day later than the lead_days sent orders nothing either: 409 ship_day_changed, with the order at\nits new lead time.", "tags": ["Orders"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Payment"}}}, "required": true}, "x-role": "Edit"}}, "/sourcing/orders/{number}/line-options/{refs}": {"post": {"operationId": "tenetos_api_http_line_options", "summary": "Line Options", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "refs", "schema": {"title": "Refs", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Option"}, "title": "Response", "type": "array"}}}}}, "description": "List available packaging prices and received quantities for a declared selection.", "tags": ["Lines and BOM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LineRequest"}}}, "required": true}}}, "/sourcing/orders/{number}/lines/{refs}": {"put": {"operationId": "tenetos_api_http_set_line", "summary": "Set Line", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "refs", "schema": {"title": "Refs", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Pick an offer for a BOM line. On a parts-only order, qty_per_board is the pieces bought.", "tags": ["Lines and BOM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LineRequest"}}}, "required": true}, "x-role": "Edit"}, "delete": {"operationId": "tenetos_api_http_drop_line", "summary": "Drop Line", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "refs", "schema": {"title": "Refs", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}, "description": "Remove a line.", "tags": ["Lines and BOM"], "x-role": "Edit"}}, "/sourcing/orders/{number}/bom": {"put": {"operationId": "tenetos_api_http_set_bom", "summary": "Set Bom", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Upload a BOM, optionally streaming its progress as NDJSON: the rows and seconds likely left, each row as it is looked up, the BOM.", "tags": ["Lines and BOM"], "requestBody": {"required": true, "description": "The BOM file itself, as CSV", "content": {"text/csv": {"schema": {"type": "string", "format": "binary"}}}}, "x-role": "Edit"}, "get": {"operationId": "tenetos_api_http_get_bom", "summary": "Get Bom", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Bom"}}}}}, "description": "Get the BOM with offers and your stock.", "tags": ["Lines and BOM"]}}, "/sourcing/orders/{number}/bom/rows/{refs}": {"put": {"operationId": "tenetos_api_http_set_bom_row", "summary": "Set Bom Row", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "refs", "schema": {"title": "Refs", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Row"}}}}}, "description": "Edit a BOM row and search it again.", "tags": ["Lines and BOM"], "requestBody": {"content": {"application/json": {"schema": {"additionalProperties": {"type": "string"}, "title": "Cells", "type": "object"}}}, "required": true}, "x-role": "Edit"}}, "/sourcing/pcb/options": {"get": {"operationId": "tenetos_api_http_pcb_options", "summary": "Pcb Options", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List board manufacturing options.", "tags": ["Board"]}}, "/sourcing/orders/{number}/gerbers": {"put": {"operationId": "tenetos_api_http_set_gerbers", "summary": "Set Gerbers", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gerbers"}}}}}, "description": "Upload the Gerber ZIP as the body, with its name in X-Filename.", "tags": ["Board"], "requestBody": {"required": true, "description": "The Gerbers file itself, as ZIP", "content": {"application/zip": {"schema": {"type": "string", "format": "binary"}}}}, "x-role": "Edit"}}, "/sourcing/orders/{number}/render/{side}": {"get": {"operationId": "tenetos_api_http_render", "summary": "Render", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}, {"in": "path", "name": "side", "schema": {"enum": ["top", "bottom"], "title": "Side", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Read an owned order's board render.", "tags": ["Board"]}}, "/sourcing/orders/{number}/pnp": {"put": {"operationId": "tenetos_api_http_set_pnp", "summary": "Set Pnp", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Pnp"}}}}}, "description": "Upload the pick-and-place CSV as the body, with its name in X-Filename.", "tags": ["Board"], "requestBody": {"required": true, "description": "The Pick and place file itself, as CSV", "content": {"text/csv": {"schema": {"type": "string", "format": "binary"}}}}, "x-role": "Edit"}}, "/sourcing/orders/{number}/purchase": {"get": {"operationId": "tenetos_api_http_purchase", "summary": "Purchase", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": {"items": {"$ref": "#/components/schemas/Purchase"}, "type": "array"}, "title": "Response", "type": "object"}}}}}, "description": "List what to buy from each vendor.", "tags": ["Buying"]}}, "/sourcing/orders/{number}/tracking": {"get": {"operationId": "tenetos_api_http_tracking", "summary": "Tracking", "parameters": [{"in": "path", "name": "number", "schema": {"title": "Number", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/TenetShipping"}, "title": "Response", "type": "array"}}}}}, "description": "Track the order's parcels.", "tags": ["Buying"]}}, "/sourcing/stock": {"get": {"operationId": "tenetos_api_http_own_stock", "summary": "Own Stock", "parameters": [{"in": "query", "name": "query", "schema": {"default": "", "maxLength": 200, "title": "Query", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "description": "Maximum results per page", "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false, "description": "Maximum results per page"}, {"in": "query", "name": "offset", "schema": {"default": 0, "description": "The previous response's next_offset, or zero to start", "minimum": 0, "title": "Offset", "type": "integer"}, "required": false, "description": "The previous response's next_offset, or zero to start"}, {"in": "query", "name": "direction", "schema": {"default": "desc", "enum": ["asc", "desc"], "title": "Direction", "type": "string"}, "required": false}, {"in": "query", "name": "category", "schema": {"anyOf": [{"maxLength": 200, "type": "string"}, {"type": "null"}], "title": "Category"}, "required": false}, {"in": "query", "name": "manufacturer", "schema": {"anyOf": [{"maxLength": 200, "type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "pieces", "enum": ["name", "manufacturer", "package", "pieces", "category"], "title": "Sort", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Stock"}}}}}, "description": "Search available parts, with full category counts independent of the page.", "tags": ["Parts"]}}, "/sourcing/partners": {"get": {"operationId": "tenetos_api_http_partner_list", "summary": "Partner List", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List suppliers and their warehouse delivery statistics.", "tags": ["Parts"]}}}, "components": {"schemas": {"NewKey": {"description": "An API key to make: what it is for, and the role it acts with.", "properties": {"name": {"maxLength": 100, "pattern": "\\S", "title": "Name", "type": "string"}, "role": {"default": "Read", "enum": ["Read", "Edit", "Admin"], "title": "Role", "type": "string"}}, "required": ["name"], "title": "NewKey", "type": "object"}, "Address": {"additionalProperties": false, "description": "Where a carrier scan happened, as far as the carrier tells.", "properties": {"country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street"}, "postal_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Postal Code"}}, "title": "Address", "type": "object"}, "Format": {"description": "Missing required columns or the usable standard-format BOM.", "properties": {"missing": {"items": {"type": "string"}, "title": "Missing", "type": "array"}, "mapping": {"anyOf": [{"$ref": "#/components/schemas/Mapping"}, {"type": "null"}]}}, "required": ["missing"], "title": "Format", "type": "object"}, "Mapping": {"description": "Matched BOM columns and the file rewritten in standard format.", "properties": {"columns": {"additionalProperties": {"anyOf": [{"type": "string"}, {"type": "null"}]}, "title": "Columns", "type": "object"}, "csv": {"title": "Csv", "type": "string"}}, "required": ["columns", "csv"], "title": "Mapping", "type": "object"}, "Decision": {"description": "An unresolved order decision, optionally belonging to one BOM line.", "properties": {"code": {"title": "Code", "type": "string"}, "message": {"title": "Message", "type": "string"}, "refs": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refs"}}, "required": ["code", "message"], "title": "Decision", "type": "object"}, "Gerbers": {"description": "The board's Gerbers as uploaded: the file's name, when, the outline's size, the copper layers and the finest features.\n\nThe narrowest trace and smallest plated hole are None where the board has none, or its Gerbers came before they were measured.", "properties": {"name": {"title": "Name", "type": "string"}, "at": {"title": "At", "type": "string"}, "width_mm": {"title": "Width Mm", "type": "number"}, "height_mm": {"title": "Height Mm", "type": "number"}, "layers": {"title": "Layers", "type": "integer"}, "min_trace_mm": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Min Trace Mm"}, "smallest_drill_mm": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Smallest Drill Mm"}}, "required": ["name", "at", "width_mm", "height_mm", "layers"], "title": "Gerbers", "type": "object"}, "Incoming": {"additionalProperties": false, "description": "Delivery the vendor expects from the manufacturer.", "properties": {"date": {"format": "date", "title": "Date", "type": "string"}, "qty": {"minimum": 1, "title": "Qty", "type": "integer"}}, "required": ["date", "qty"], "title": "Incoming", "type": "object"}, "Line": {"description": "A priced source choice, including required and purchased quantities.", "properties": {"refs": {"title": "Refs", "type": "string"}, "mpn": {"title": "Mpn", "type": "string"}, "need": {"title": "Need", "type": "integer"}, "spares": {"title": "Spares", "type": "integer"}, "buy": {"title": "Buy", "type": "integer"}, "packaging": {"title": "Packaging", "type": "string"}, "unit_price": {"title": "Unit Price", "type": "number"}, "total": {"title": "Total", "type": "number"}, "offer": {"anyOf": [{"$ref": "#/components/schemas/TenetOffer"}, {"type": "null"}]}, "request": {"anyOf": [{"$ref": "#/components/schemas/LineRequest"}, {"type": "null"}]}, "warehouse": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warehouse"}, "business_days": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Business Days"}, "low_stock": {"default": false, "title": "Low Stock", "type": "boolean"}, "arrival_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Whole business days until kitted, rounded up.", "readOnly": true, "title": "Arrival Days"}, "source": {"description": "The chosen fulfillment source, independent of its packaging label.", "enum": ["buy", "consign", "stock"], "readOnly": true, "title": "Source", "type": "string"}}, "required": ["refs", "mpn", "need", "spares", "buy", "packaging", "unit_price", "total", "offer", "arrival_days", "source"], "title": "Line", "type": "object"}, "LineRequest": {"description": "A source choice; a vendor SKU identifies a bought part, with packaging required when several formats are available.", "properties": {"qty_per_board": {"minimum": 1, "title": "Qty Per Board", "type": "integer"}, "vendor": {"anyOf": [{"enum": ["Digi-Key", "Mouser", "Farnell", "LCSC"], "type": "string"}, {"enum": ["Consignment", "Stock"], "type": "string"}], "title": "Vendor"}, "mpn": {"default": "", "title": "Mpn", "type": "string"}, "manufacturer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "packaging": {"anyOf": [{"enum": ["Reel", "Ammo", "Re-reel", "Cut Tape", "Tray", "Tube", "Bulk", "Other"], "type": "string"}, {"const": "unknown", "type": "string"}, {"type": "null"}], "title": "Packaging"}, "sku": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sku"}}, "required": ["qty_per_board", "vendor"], "title": "LineRequest", "type": "object"}, "Order": {"description": "An order with the vendor orders Tenet placed for it, its board's options and files, and when its boards are due and shipped.", "properties": {"number": {"title": "Number", "type": "string"}, "name": {"title": "Name", "type": "string"}, "created": {"title": "Created", "type": "string"}, "status": {"$ref": "#/components/schemas/Status"}, "boards": {"title": "Boards", "type": "integer"}, "lines": {"items": {"$ref": "#/components/schemas/Line"}, "title": "Lines", "type": "array"}, "vendor_warehouses": {"additionalProperties": {"type": "string"}, "title": "Vendor Warehouses", "type": "object"}, "pcb_price": {"title": "Pcb Price", "type": "number"}, "assembly": {"title": "Assembly", "type": "number"}, "components": {"title": "Components", "type": "number"}, "shipping": {"additionalProperties": {"type": "number"}, "title": "Shipping", "type": "object"}, "consignment": {"title": "Consignment", "type": "number"}, "total": {"title": "Total", "type": "number"}, "vat_rate": {"default": 0.0, "title": "Vat Rate", "type": "number"}, "vat": {"default": 0.0, "title": "Vat", "type": "number"}, "currency": {"title": "Currency", "type": "string"}, "lead_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Lead Days"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "ship_to": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ship To"}, "steps": {"default": [], "items": {"type": "string"}, "title": "Steps", "type": "array"}, "separate_part_order": {"default": false, "title": "Separate Part Order", "type": "boolean"}, "vendor_orders": {"items": {"$ref": "#/components/schemas/VendorOrder"}, "title": "Vendor Orders", "type": "array"}, "pcb": {"$ref": "#/components/schemas/PcbOptions"}, "pcb_choices": {"additionalProperties": {"items": {}, "type": "array"}, "title": "Pcb Choices", "type": "object"}, "pcb_conflicts": {"items": {"type": "string"}, "title": "Pcb Conflicts", "type": "array"}, "pcb_implied": {"default": [], "items": {"type": "string"}, "title": "Pcb Implied", "type": "array"}, "pcb_facts": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Pcb Facts", "type": "array"}, "pcb_makers": {"items": {"type": "string"}, "title": "Pcb Makers", "type": "array"}, "pcb_vendor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pcb Vendor"}, "min_boards": {"default": 0, "title": "Min Boards", "type": "integer"}, "shipping_rates": {"additionalProperties": {"$ref": "#/components/schemas/ShippingRate"}, "default": {}, "title": "Shipping Rates", "type": "object"}, "pcb_prices": {"additionalProperties": {"anyOf": [{"type": "number"}, {"type": "null"}]}, "title": "Pcb Prices", "type": "object"}, "pcb_days": {"additionalProperties": {"anyOf": [{"type": "integer"}, {"type": "null"}]}, "default": {}, "title": "Pcb Days", "type": "object"}, "pcb_quoting": {"default": false, "title": "Pcb Quoting", "type": "boolean"}, "gerbers_to": {"default": [], "items": {"type": "string"}, "title": "Gerbers To", "type": "array"}, "pricing": {"default": false, "title": "Pricing", "type": "boolean"}, "gerbers": {"anyOf": [{"$ref": "#/components/schemas/Gerbers"}, {"type": "null"}]}, "pnp": {"anyOf": [{"$ref": "#/components/schemas/Pnp"}, {"type": "null"}]}, "sides": {"default": [], "items": {"enum": ["top", "bottom"], "type": "string"}, "title": "Sides", "type": "array"}, "due": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Due"}, "shipment": {"anyOf": [{"$ref": "#/components/schemas/Shipment"}, {"type": "null"}]}, "decisions": {"default": [], "items": {"$ref": "#/components/schemas/Decision"}, "title": "Decisions", "type": "array"}, "consign_to": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Consign To"}}, "required": ["number", "name", "created", "status", "boards", "lines", "vendor_warehouses", "pcb_price", "assembly", "components", "shipping", "consignment", "total", "currency", "lead_days", "vendor_orders", "pcb", "pcb_choices", "pcb_conflicts", "pcb_makers", "pcb_vendor", "pcb_prices", "gerbers", "pnp", "due", "shipment"], "title": "Order", "type": "object"}, "PcbOptions": {"additionalProperties": false, "description": "How the board is made: every option a customer sets, each one of its values in board_options.json; another option is refused.", "properties": {"material": {"default": "FR4-Standard TG 135-140", "enum": ["FR-4", "FR4-Standard TG 135-140", "FR-4 TG140", "FR-4 TG155", "FR-4 TG170"], "title": "Material", "type": "string"}, "thickness_mm": {"default": 1.6, "enum": [0.8, 1.0, 1.2, 1.6, 2.0], "title": "Thickness Mm", "type": "number"}, "mask": {"default": "Green", "enum": ["Green", "Purple", "Red", "Yellow", "Blue", "White", "Black"], "title": "Mask", "type": "string"}, "silkscreen": {"default": "White", "enum": ["White", "Black"], "title": "Silkscreen", "type": "string"}, "finish": {"default": "ENIG", "enum": ["HASL leaded", "HASL lead-free", "ENIG", "OSP", "Immersion tin"], "title": "Finish", "type": "string"}, "outer_copper_oz": {"default": 1, "enum": [1, 2], "title": "Outer Copper Oz", "type": "integer"}, "inner_copper_oz": {"default": 0.5, "enum": [0.5, 1, 2], "title": "Inner Copper Oz"}, "vias": {"default": "0.3mm/(0.4/0.45mm)", "enum": ["0.3mm/(0.4/0.45mm)", "0.25mm/(0.35/0.4mm)", "0.2/0.45mm\u2191", "0.2/0.4mm", "0.2mm/(0.3/0.35mm)", "0.15mm/(0.25/0.3mm)", "0.1mm/(0.2/0.25mm)"], "title": "Vias", "type": "string"}, "via_covering": {"default": "Tented", "enum": ["Tented", "Untented", "Plugged", "Epoxy Filled & Capped", "Copper paste Filled & Capped"], "title": "Via Covering", "type": "string"}, "marking": {"default": "Remove Mark", "enum": ["Remove Mark", "2D barcode"], "title": "Marking", "type": "string"}, "impedance_control": {"const": "None", "default": "None", "title": "Impedance Control", "type": "string"}, "ipc_class": {"const": "Class 2", "default": "Class 2", "title": "Ipc Class", "type": "string"}, "making_days": {"default": 1, "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12], "title": "Making Days", "type": "integer"}}, "title": "PcbOptions", "type": "object"}, "Pnp": {"description": "The board's pick-and-place file as uploaded: the file's name, when, and the board sides it places parts on.", "properties": {"name": {"title": "Name", "type": "string"}, "at": {"title": "At", "type": "string"}, "sides": {"items": {"enum": ["top", "bottom"], "type": "string"}, "title": "Sides", "type": "array"}}, "required": ["name", "at", "sides"], "title": "Pnp", "type": "object"}, "PriceBreak": {"additionalProperties": false, "description": "Unit price from `qty` pieces up.", "properties": {"qty": {"minimum": 1, "title": "Qty", "type": "integer"}, "unit_price": {"minimum": 0, "title": "Unit Price", "type": "number"}, "currency": {"pattern": "^[A-Z]{3}$", "title": "Currency", "type": "string"}}, "required": ["qty", "unit_price", "currency"], "title": "PriceBreak", "type": "object"}, "Shipment": {"description": "The boards on their way to the customer: the tracking number.", "properties": {"tracking_number": {"title": "Tracking Number", "type": "string"}}, "required": ["tracking_number"], "title": "Shipment", "type": "object"}, "ShippingRate": {"description": "An order's share of a shipment's fee, and the parts total it ships free from; None: never free.", "properties": {"fee": {"title": "Fee", "type": "number"}, "free_from": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Free From"}}, "required": ["fee", "free_from"], "title": "ShippingRate", "type": "object"}, "Status": {"description": "Where an order stands: a draft, paid, shipped once its sales order is completed.", "enum": ["draft", "paid", "shipped"], "title": "Status", "type": "string"}, "TenetOffer": {"additionalProperties": false, "description": "One vendor SKU of one component.\n\nA field the vendor doesn't give stays empty (`null`, `[]`, `{}`, status `unknown`), never guessed. Stock is never added up\nacross SKUs of one part: they share it.", "properties": {"vendor": {"description": "Vendor the listing is from, e.g. `Digi-Key`.", "title": "Vendor", "type": "string"}, "mpn": {"title": "Mpn", "type": "string"}, "manufacturer": {"title": "Manufacturer", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "detailed_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The vendor's long description where it has one beside the short, e.g. Digi-Key's.", "title": "Detailed Description"}, "category": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Component category, e.g. `Microcontrollers`.", "title": "Category"}, "package": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Package as the vendor writes it, e.g. `0201 (0603 Metric)`, `SOT-23`.", "title": "Package"}, "parameters": {"additionalProperties": {"type": "string"}, "default": {}, "description": "Parametric attributes, name to value.", "title": "Parameters", "type": "object"}, "status": {"default": "unknown", "enum": ["active", "new", "nrnd", "eol", "obsolete", "unknown"], "title": "Status", "type": "string"}, "normally_stocked": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "The vendor normally keeps it in stock.", "title": "Normally Stocked"}, "special_order": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Only available on special order.", "title": "Special Order"}, "other_packagings": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "description": "MPNs of the same part in other packaging.", "title": "Other Packagings"}, "rohs": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rohs"}, "reach": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reach"}, "msl": {"anyOf": [{"enum": ["1", "2", "2a", "3", "4", "5", "5a", "6"], "type": "string"}, {"type": "null"}], "description": "Moisture sensitivity level, JEDEC J-STD-020.", "title": "Msl"}, "eccn": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Export control class.", "title": "Eccn"}, "customs_code": {"additionalProperties": {"type": "string"}, "default": {}, "description": "Customs scheme to code.", "propertyNames": {"enum": ["TARIC", "EUCN", "USHTS", "CNHTS", "CAHTS", "JPHTS", "BRHTS", "KRHTS", "MXHTS"]}, "title": "Customs Code", "type": "object"}, "country_of_origin": {"anyOf": [{"pattern": "^[A-Z]{2}$", "type": "string"}, {"type": "null"}], "description": "ISO country code, e.g. `PH`.", "title": "Country Of Origin"}, "standard_package_qty": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "description": "Pieces per standard package.", "title": "Standard Package Qty"}, "sku": {"description": "The vendor's own part number.", "title": "Sku", "type": "string"}, "packaging": {"default": [], "description": "`Ammo`: tape folded in a box. `Bulk`: loose, bags, boxes. `Other`: not placeable (cable spools, kits, bottles).\n`[]`: the vendor didn't say.", "items": {"enum": ["Reel", "Ammo", "Re-reel", "Cut Tape", "Tray", "Tube", "Bulk", "Other"], "type": "string"}, "title": "Packaging", "type": "array"}, "stock": {"description": "The vendor's own in-stock figure.", "minimum": 0, "title": "Stock", "type": "integer"}, "stock_by_country": {"default": {}, "description": "Pieces in stock per country.", "patternProperties": {"^[A-Z]{2}$": {"minimum": 0, "type": "integer"}}, "title": "Stock By Country", "type": "object"}, "incoming": {"default": [], "items": {"$ref": "#/components/schemas/Incoming"}, "title": "Incoming", "type": "array"}, "lead_time_days": {"anyOf": [{"minimum": 0, "type": "integer"}, {"type": "null"}], "description": "Factory lead time.", "title": "Lead Time Days"}, "moq": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Moq"}, "order_multiple": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "description": "The order quantity must be a multiple of this.", "title": "Order Multiple"}, "price_breaks": {"default": [], "items": {"$ref": "#/components/schemas/PriceBreak"}, "title": "Price Breaks", "type": "array"}, "fees_or_tariffs": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Extra fees or tariffs apply.", "title": "Fees Or Tariffs"}, "product_url": {"anyOf": [{"format": "uri", "maxLength": 2083, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Product Url"}, "datasheet_url": {"anyOf": [{"format": "uri", "maxLength": 2083, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Datasheet Url"}, "image_url": {"anyOf": [{"format": "uri", "maxLength": 2083, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Image Url"}}, "required": ["vendor", "mpn", "manufacturer", "sku", "stock"], "title": "TenetOffer", "type": "object"}, "VendorOrder": {"description": "One vendor order Tenet placed for the order, as the customer sees it: only what is listed here is ever sent.", "properties": {"vendor": {"title": "Vendor", "type": "string"}, "placed_at": {"title": "Placed At", "type": "string"}}, "required": ["vendor", "placed_at"], "title": "VendorOrder", "type": "object"}, "NewOrder": {"additionalProperties": false, "description": "The declared initial state of a new draft.", "properties": {"kind": {"default": "boards", "enum": ["boards", "parts only"], "title": "Kind", "type": "string"}, "name": {"anyOf": [{"maxLength": 100, "minLength": 1, "pattern": "\\S", "type": "string"}, {"type": "null"}], "title": "Name"}, "boards": {"anyOf": [{"maximum": 100000, "minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Boards"}, "pcb": {"anyOf": [{"$ref": "#/components/schemas/PcbOptions"}, {"type": "null"}]}, "pcb_vendor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pcb Vendor"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "reorder_of": {"anyOf": [{"pattern": "^\\d+$", "type": "string"}, {"type": "null"}], "title": "Reorder Of"}}, "title": "NewOrder", "type": "object"}, "OrderSearch": {"additionalProperties": false, "description": "Order filters; creation dates include both endpoints.", "properties": {"query": {"default": "", "maxLength": 200, "title": "Query", "type": "string"}, "limit": {"default": 50, "description": "Maximum results per page", "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "description": "The previous response's next_offset, or zero to start", "minimum": 0, "title": "Offset", "type": "integer"}, "direction": {"default": "desc", "enum": ["asc", "desc"], "title": "Direction", "type": "string"}, "status": {"items": {"description": "Where an order stands: a draft, paid, shipped once its sales order is completed.", "enum": ["draft", "paid", "shipped"], "title": "Status", "type": "string"}, "title": "Status", "type": "array"}, "kind": {"anyOf": [{"enum": ["boards", "parts only"], "type": "string"}, {"type": "null"}], "title": "Kind"}, "created_from": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Created From"}, "created_to": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Created To"}, "sort": {"default": "created", "enum": ["created", "name", "status", "total", "number", "boards"], "title": "Sort", "type": "string"}}, "title": "OrderSearch", "type": "object"}, "OrderFound": {"description": "The backend's order facts needed to find and open a project.", "properties": {"number": {"title": "Number", "type": "string"}, "name": {"title": "Name", "type": "string"}, "created": {"title": "Created", "type": "string"}, "status": {"$ref": "#/components/schemas/Status"}, "separate_part_order": {"title": "Separate Part Order", "type": "boolean"}, "boards": {"title": "Boards", "type": "integer"}, "total": {"title": "Total", "type": "number"}, "vat_rate": {"title": "Vat Rate", "type": "number"}, "vat": {"title": "Vat", "type": "number"}, "currency": {"title": "Currency", "type": "string"}, "has_lines": {"title": "Has Lines", "type": "boolean"}, "picture": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Picture"}}, "required": ["number", "name", "created", "status", "separate_part_order", "boards", "total", "vat_rate", "vat", "currency", "has_lines", "picture"], "title": "OrderFound", "type": "object"}, "Orders": {"description": "One page of matching orders.", "properties": {"total_count": {"default": 0, "title": "Total Count", "type": "integer"}, "offset": {"title": "Offset", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "orders": {"items": {"$ref": "#/components/schemas/OrderFound"}, "title": "Orders", "type": "array"}, "next_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "The following page when more matches exist.", "readOnly": true, "title": "Next Offset"}, "previous_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "The preceding page, including recovery from an empty page.", "readOnly": true, "title": "Previous Offset"}, "page_number": {"description": "The one-based page number at this offset.", "readOnly": true, "title": "Page Number", "type": "integer"}}, "required": ["offset", "limit", "next_offset", "previous_offset", "page_number"], "title": "Orders", "type": "object"}, "OrderChanges": {"additionalProperties": false, "description": "One reviewed change to an order's name, quantity, board options and destination.", "properties": {"name": {"anyOf": [{"maxLength": 100, "minLength": 1, "pattern": "\\S", "type": "string"}, {"type": "null"}], "title": "Name"}, "boards": {"anyOf": [{"maximum": 100000, "minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Boards"}, "pcb": {"anyOf": [{"$ref": "#/components/schemas/PcbOptions"}, {"type": "null"}]}, "pcb_vendor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pcb Vendor"}, "sides": {"anyOf": [{"items": {"enum": ["top", "bottom"], "type": "string"}, "minItems": 1, "type": "array"}, {"type": "null"}], "title": "Sides"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}}, "title": "OrderChanges", "type": "object"}, "Payment": {"additionalProperties": false, "description": "The total and lead time the customer accepted, as the order showed them; no lead time where it showed none.", "properties": {"total": {"minimum": 0, "title": "Total", "type": "number"}, "vat": {"anyOf": [{"minimum": 0, "type": "number"}, {"type": "null"}], "title": "Vat"}, "lead_days": {"anyOf": [{"minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Lead Days"}}, "required": ["total"], "title": "Payment", "type": "object"}, "Option": {"description": "What one SKU costs for a BOM line in one packaging it ships in: the pieces bought and their total.", "properties": {"vendor": {"title": "Vendor", "type": "string"}, "sku": {"title": "Sku", "type": "string"}, "manufacturer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "packaging": {"title": "Packaging", "type": "string"}, "buy": {"title": "Buy", "type": "integer"}, "total": {"title": "Total", "type": "number"}, "difference": {"title": "Difference", "type": "number"}, "warehouse": {"title": "Warehouse", "type": "string"}, "business_days": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Business Days"}, "low_stock": {"default": false, "title": "Low Stock", "type": "boolean"}}, "required": ["vendor", "sku", "packaging", "buy", "total", "difference", "warehouse"], "title": "Option", "type": "object"}, "Bom": {"description": "Saved BOM rows and offers used to choose lines; quoting refreshes selected offers.", "properties": {"fetched_at": {"title": "Fetched At", "type": "string"}, "rows": {"items": {"$ref": "#/components/schemas/Row"}, "title": "Rows", "type": "array"}, "own": {"additionalProperties": {"items": {"$ref": "#/components/schemas/Own"}, "type": "array"}, "default": {}, "title": "Own", "type": "object"}, "prices": {"additionalProperties": {"items": {"$ref": "#/components/schemas/Option"}, "type": "array"}, "default": {}, "title": "Prices", "type": "object"}, "ranked": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "default": {}, "title": "Ranked", "type": "object"}}, "required": ["fetched_at", "rows"], "title": "Bom", "type": "object"}, "Own": {"description": "A part of the customer's own stock at Tenet that fills a BOM row: how it matches and the pieces free.", "properties": {"mpn": {"title": "Mpn", "type": "string"}, "manufacturer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "match": {"enum": ["Exact MPN", "Direct", "Upgrade"], "title": "Match", "type": "string"}, "pieces": {"title": "Pieces", "type": "integer"}}, "required": ["mpn", "manufacturer", "match", "pieces"], "title": "Own", "type": "object"}, "Part": {"description": "A part Digi-Key offers in place of a row's MPN, with every vendor's offers of it.", "properties": {"mpn": {"title": "Mpn", "type": "string"}, "manufacturer": {"title": "Manufacturer", "type": "string"}, "offers": {"default": [], "items": {"$ref": "#/components/schemas/TenetOffer"}, "title": "Offers", "type": "array"}, "fit": {"enum": ["Direct", "Upgrade"], "title": "Fit", "type": "string"}}, "required": ["mpn", "manufacturer", "fit"], "title": "Part", "type": "object"}, "Row": {"description": "One BOM row, its MPN and every vendor's offers of it.", "properties": {"refs": {"title": "Refs", "type": "string"}, "qty_per_board": {"title": "Qty Per Board", "type": "integer"}, "value": {"title": "Value", "type": "string"}, "mpn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mpn"}, "manufacturer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "offers": {"items": {"$ref": "#/components/schemas/TenetOffer"}, "title": "Offers", "type": "array"}, "errors": {"additionalProperties": {"type": "string"}, "title": "Errors", "type": "object"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "error_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Code"}, "cells": {"additionalProperties": {"type": "string"}, "default": {}, "title": "Cells", "type": "object"}, "candidates": {"default": [], "items": {"$ref": "#/components/schemas/Part"}, "title": "Candidates", "type": "array"}, "category": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Category"}, "tht": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Tht"}, "matches": {"additionalProperties": {"enum": ["Exact MPN", "Direct", "Upgrade"], "type": "string"}, "description": "Match category by vendor and SKU, with exact offers taking precedence.", "readOnly": true, "title": "Matches", "type": "object"}}, "required": ["refs", "qty_per_board", "value", "mpn", "manufacturer", "offers", "errors", "error", "matches"], "title": "Row", "type": "object"}, "Purchase": {"description": "One vendor cart row: what to order for one BOM line.", "properties": {"refs": {"title": "Refs", "type": "string"}, "sku": {"title": "Sku", "type": "string"}, "mpn": {"title": "Mpn", "type": "string"}, "manufacturer": {"title": "Manufacturer", "type": "string"}, "packaging": {"title": "Packaging", "type": "string"}, "qty": {"title": "Qty", "type": "integer"}, "order_qty": {"title": "Order Qty", "type": "integer"}}, "required": ["refs", "sku", "mpn", "manufacturer", "packaging", "qty", "order_qty"], "title": "Purchase", "type": "object"}, "Milestone": {"additionalProperties": false, "description": "A key step the parcel reached, and when (UTC).", "properties": {"stage": {"enum": ["label_created", "picked_up", "departed", "arrived", "ready_for_pickup", "out_for_delivery", "delivered", "returning", "returned"], "title": "Stage", "type": "string"}, "at": {"title": "At", "type": "string"}}, "required": ["stage", "at"], "title": "Milestone", "type": "object"}, "Scan": {"additionalProperties": false, "description": "One carrier scan: when (UTC), where, and the carrier's own words.", "properties": {"at": {"title": "At", "type": "string"}, "place": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Place"}, "address": {"anyOf": [{"$ref": "#/components/schemas/Address"}, {"type": "null"}]}, "text": {"title": "Text", "type": "string"}}, "required": ["at", "text"], "title": "Scan", "type": "object"}, "TenetShipping": {"additionalProperties": false, "description": "One parcel of a vendor order.\n\nA field the carrier doesn't give stays empty, never guessed. Times are ISO 8601 in UTC unless noted.", "properties": {"vendor": {"description": "Vendor the parcel comes from, e.g. `Digi-Key`.", "title": "Vendor", "type": "string"}, "carrier": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Carrier, e.g. `FedEx`.", "title": "Carrier"}, "status": {"description": "`pending`: no carrier scan yet. `delayed`: a failed delivery with a new date ahead.", "enum": ["pending", "in_transit", "out_for_delivery", "ready_for_pickup", "delivered", "delayed", "problem"], "title": "Status", "type": "string"}, "eta": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Estimated delivery, in the carrier's zone.", "title": "Eta"}, "milestones": {"default": [], "items": {"$ref": "#/components/schemas/Milestone"}, "title": "Milestones", "type": "array"}, "scans": {"default": [], "description": "Newest first.", "items": {"$ref": "#/components/schemas/Scan"}, "title": "Scans", "type": "array"}}, "required": ["vendor", "status"], "title": "TenetShipping", "type": "object"}, "StockSearch": {"additionalProperties": false, "description": "Filters and ordering for free pieces; an empty category means uncategorized.", "properties": {"query": {"default": "", "maxLength": 200, "title": "Query", "type": "string"}, "limit": {"default": 50, "description": "Maximum results per page", "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "description": "The previous response's next_offset, or zero to start", "minimum": 0, "title": "Offset", "type": "integer"}, "direction": {"default": "desc", "enum": ["asc", "desc"], "title": "Direction", "type": "string"}, "category": {"anyOf": [{"maxLength": 200, "type": "string"}, {"type": "null"}], "title": "Category"}, "manufacturer": {"anyOf": [{"maxLength": 200, "type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "sort": {"default": "pieces", "enum": ["name", "manufacturer", "package", "pieces", "category"], "title": "Sort", "type": "string"}}, "title": "StockSearch", "type": "object"}, "Category": {"description": "Whole-stock totals and search matches, independent of the selected category and page.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "pieces": {"title": "Pieces", "type": "number"}, "total_count": {"title": "Total Count", "type": "integer"}, "matching_count": {"title": "Matching Count", "type": "integer"}}, "required": ["name", "pieces", "total_count", "matching_count"], "title": "Category", "type": "object"}, "Stock": {"description": "Available stock with full category counts and manufacturer choices.", "properties": {"total_count": {"default": 0, "title": "Total Count", "type": "integer"}, "offset": {"title": "Offset", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "parts": {"items": {"$ref": "#/components/schemas/StockPart"}, "title": "Parts", "type": "array"}, "categories": {"items": {"$ref": "#/components/schemas/Category"}, "title": "Categories", "type": "array"}, "manufacturers": {"items": {"type": "string"}, "title": "Manufacturers", "type": "array"}, "next_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "The following page when more matches exist.", "readOnly": true, "title": "Next Offset"}, "previous_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "The preceding page, including recovery from an empty page.", "readOnly": true, "title": "Previous Offset"}, "page_number": {"description": "The one-based page number at this offset.", "readOnly": true, "title": "Page Number", "type": "integer"}}, "required": ["offset", "limit", "next_offset", "previous_offset", "page_number"], "title": "Stock", "type": "object"}, "StockPart": {"description": "A part's available pieces, excluding every reserved piece.", "properties": {"part": {"title": "Part", "type": "string"}, "name": {"title": "Name", "type": "string"}, "manufacturer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manufacturer"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "category": {"title": "Category", "type": "string"}, "package": {"title": "Package", "type": "string"}, "pieces": {"title": "Pieces", "type": "number"}, "parameters": {"additionalProperties": {"type": "string"}, "title": "Parameters", "type": "object"}}, "required": ["part", "name", "manufacturer", "description", "category", "package", "pieces", "parameters"], "title": "StockPart", "type": "object"}}}, "servers": [{"url": "/api/v0"}]}