{"openapi":"3.1.0","info":{"title":"FastERP API","description":"Open integration access to the FastERP synthetic accounting workspace.\n\n**Access model:** reads are public. Selected writes are implemented but disabled unless the deployment configures `FASTSME_API_TOKEN`; write clients then send it as a bearer token.","contact":{"name":"FastSME","url":"https://fastsme.com/"},"license":{"name":"MIT"},"version":"1.0.0"},"servers":[{"url":"https://erp.fastsme.com/api","description":"Production"}],"paths":{"/":{"get":{"tags":["System"],"summary":"Api Index","operationId":"api_index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Api Index  Get"}}}}}}},"/v1/health":{"get":{"tags":["System"],"summary":"Api Health","operationId":"api_health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/accounts":{"get":{"tags":["Accounts"],"summary":"List accounts","description":"Chart-of-accounts records used by the general ledger.","operationId":"list_accounts","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{item_id}":{"get":{"tags":["Accounts"],"summary":"Get one accounts record","operationId":"get_accounts","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/customers":{"get":{"tags":["Customers"],"summary":"List customers","description":"Customer master data shared by sales orders and invoices.","operationId":"list_customers","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Customers"],"summary":"Create a customers record","description":"Implemented for token-authenticated integrations. Production writes remain disabled until FASTSME_API_TOKEN is configured.","operationId":"create_customers","security":[{"FastSME API token":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersResource"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service Unavailable"}}}},"/v1/customers/{item_id}":{"get":{"tags":["Customers"],"summary":"Get one customers record","operationId":"get_customers","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices":{"get":{"tags":["Invoices"],"summary":"List invoices","description":"Issued sales invoices and their payment status.","operationId":"list_invoices","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{item_id}":{"get":{"tags":["Invoices"],"summary":"Get one invoices record","operationId":"get_invoices","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/expenses":{"get":{"tags":["Expenses"],"summary":"List expenses","description":"Posted supplier expenses, tax, currency, and accounting dimensions.","operationId":"list_expenses","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/expenses/{item_id}":{"get":{"tags":["Expenses"],"summary":"Get one expenses record","operationId":"get_expenses","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List projects","description":"Projects used as reporting dimensions across the ledger.","operationId":"list_projects","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{item_id}":{"get":{"tags":["Projects"],"summary":"Get one projects record","operationId":"get_projects","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/items":{"get":{"tags":["Items"],"summary":"List items","description":"Company-scoped item master data available to commerce connectors.","operationId":"list_items","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text search","title":"Q"},"description":"Case-insensitive text search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsCollection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/items/{item_id}":{"get":{"tags":["Items"],"summary":"Get one items record","operationId":"get_items","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsResource"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/commerce/orders":{"post":{"tags":["Commerce integrations"],"summary":"Receive Commerce Order","description":"Stage a FastShop order exactly once for ERP mapping and reconciliation.","operationId":"receive_commerce_order_v1_commerce_orders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-FastERP-Company","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Fasterp-Company"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceOrder"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/profit-and-loss":{"get":{"tags":["Reports"],"summary":"Profit And Loss","description":"Return income, expenses, and net income for optional dimensions.","operationId":"profit_and_loss_v1_reports_profit_and_loss_get","parameters":[{"name":"business_unit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Business Unit Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/trial-balance":{"get":{"tags":["Reports"],"summary":"Trial Balance","description":"Return the current account balances and balance check.","operationId":"trial_balance_v1_reports_trial_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountsCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AccountsResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"AccountsCollection"},"AccountsResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"account_type":{"type":"string","title":"Account Type"},"normal_side":{"type":"string","title":"Normal Side"},"parent_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Account Id"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["company_id","code","name","account_type","normal_side","active","created_at","updated_at"],"title":"AccountsResource"},"CommerceOrder":{"properties":{"source":{"type":"string","maxLength":40,"pattern":"^[a-z0-9_-]+$","title":"Source"},"source_id":{"type":"string","maxLength":64,"minLength":1,"title":"Source Id"},"number":{"type":"string","maxLength":80,"minLength":1,"title":"Number"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"total_minor":{"type":"integer","minimum":0.0,"title":"Total Minor"},"payment_status":{"type":"string","maxLength":40,"title":"Payment Status"},"shipping_address":{"additionalProperties":true,"type":"object","title":"Shipping Address"},"lines":{"items":{"$ref":"#/components/schemas/CommerceOrderLine"},"type":"array","minItems":1,"title":"Lines"}},"type":"object","required":["source","source_id","number","email","currency","total_minor","payment_status","lines"],"title":"CommerceOrder"},"CommerceOrderLine":{"properties":{"sku":{"type":"string","maxLength":100,"minLength":1,"title":"Sku"},"description":{"type":"string","maxLength":240,"minLength":1,"title":"Description"},"variant":{"type":"string","maxLength":180,"title":"Variant","default":""},"quantity":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"unit_price_minor":{"type":"integer","minimum":0.0,"title":"Unit Price Minor"}},"type":"object","required":["sku","description","quantity","unit_price_minor"],"title":"CommerceOrderLine"},"CustomersCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomersResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"CustomersCollection"},"CustomersCreate":{"properties":{"name":{"type":"string","title":"Name"},"territory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Territory"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CustomersCreate"},"CustomersResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"type":"string","title":"Name"},"territory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Territory"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"active":{"type":"boolean","title":"Active"},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"partner_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Partner Id"}},"type":"object","required":["company_id","name","active","created_at","updated_at"],"title":"CustomersResource"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["code","message"],"title":"ErrorDetail","description":"Machine-readable API error."},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"Consistent error response envelope."},"ExpensesCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpensesResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"ExpensesCollection"},"ExpensesResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"type":"string","title":"Code"},"expense_date":{"type":"string","title":"Expense Date"},"supplier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supplier Id"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"net_amount":{"type":"number","title":"Net Amount"},"tax_amount":{"type":"number","title":"Tax Amount"},"total":{"type":"number","title":"Total"},"currency":{"type":"string","title":"Currency"},"exchange_rate":{"type":"number","title":"Exchange Rate"},"business_unit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Business Unit Id"},"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"document_state":{"type":"string","title":"Document State"},"revision":{"type":"integer","title":"Revision"},"row_version":{"type":"integer","title":"Row Version"},"posted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted At"},"posted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted By"},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled At"},"cancelled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled By"},"reversal_of_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reversal Of Id"}},"type":"object","required":["company_id","code","expense_date","category","net_amount","tax_amount","total","currency","exchange_rate","status","created_at","updated_at","document_state","revision","row_version"],"title":"ExpensesResource"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"product":{"type":"string","title":"Product"},"version":{"type":"string","title":"Version"},"writes_enabled":{"type":"boolean","title":"Writes Enabled"}},"type":"object","required":["status","product","version","writes_enabled"],"title":"HealthResponse","description":"API health response."},"InvoicesCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoicesResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"InvoicesCollection"},"InvoicesResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"type":"string","title":"Code"},"order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Id"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Id"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"currency":{"type":"string","title":"Currency"},"exchange_rate":{"type":"number","title":"Exchange Rate"},"net_total":{"type":"number","title":"Net Total"},"tax_total":{"type":"number","title":"Tax Total"},"total":{"type":"number","title":"Total"},"paid":{"type":"number","title":"Paid"},"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"document_state":{"type":"string","title":"Document State"},"revision":{"type":"integer","title":"Revision"},"row_version":{"type":"integer","title":"Row Version"},"submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted At"},"submitted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted By"},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved At"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"posted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted At"},"posted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted By"},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled At"},"cancelled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled By"},"amended_from_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amended From Id"},"reversal_of_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reversal Of Id"},"invoice_type":{"type":"string","title":"Invoice Type"},"return_against_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Return Against Id"},"payment_term_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Term Id"},"base_net_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Net Total"},"base_tax_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Tax Total"},"base_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Total"},"outstanding_amount":{"type":"number","title":"Outstanding Amount"}},"type":"object","required":["company_id","code","currency","exchange_rate","net_total","tax_total","total","paid","status","created_at","updated_at","document_state","revision","row_version","invoice_type","outstanding_amount"],"title":"InvoicesResource"},"ItemsCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ItemsResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"ItemsCollection"},"ItemsResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"item_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Group"},"uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uom"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"stock_qty":{"type":"number","title":"Stock Qty"},"reorder_level":{"type":"number","title":"Reorder Level"},"inventory_item":{"type":"boolean","title":"Inventory Item"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"stock_uom_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stock Uom Id"},"valuation_method":{"type":"string","title":"Valuation Method"},"standard_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Cost"},"tracks_serials":{"type":"boolean","title":"Tracks Serials"},"tracks_batches":{"type":"boolean","title":"Tracks Batches"},"tracks_expiry":{"type":"boolean","title":"Tracks Expiry"},"allow_negative_stock":{"type":"boolean","title":"Allow Negative Stock"}},"type":"object","required":["company_id","code","name","stock_qty","reorder_level","inventory_item","active","created_at","updated_at","valuation_method","tracks_serials","tracks_batches","tracks_expiry","allow_negative_stock"],"title":"ItemsResource"},"PaginationMeta":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["total","limit","offset"],"title":"PaginationMeta","description":"Offset pagination metadata."},"ProjectsCollection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProjectsResource"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","meta"],"title":"ProjectsCollection"},"ProjectsResource":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Id"},"business_unit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Business Unit Id"},"status":{"type":"string","title":"Status"},"budget":{"type":"number","title":"Budget"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["company_id","code","name","status","budget","created_at","updated_at"],"title":"ProjectsResource"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"FastSME API token":{"type":"http","description":"Selected writes require `Authorization: Bearer <token>`. Reads are public. Set FASTSME_API_TOKEN to enable writes.","scheme":"bearer"},"HTTPBearer":{"type":"http","scheme":"bearer"}}}}