{"openapi":"3.1.0","info":{"title":"v-ledge API","version":"1.0.0","description":"REST API for v-ledge workspaces. Authenticate with `Authorization: Bearer vlk_live_…` keys created under Company Settings → Developer. Every request is scoped to the key's organization."},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"vlk_live_…"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"LineItem":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"kind":{"type":"string","enum":["service","discount"]},"discountMode":{"type":"string","enum":["flat","percent"]},"taxRate":{"type":"number"}},"required":["description"]},"ClientsInput":{"type":"object","properties":{"clientType":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"companyName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"Clients":{"type":"object","description":"A client record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"InvoicesInput":{"type":"object","properties":{"invoiceNumber":{"type":"string"},"docType":{"type":"string"},"relatedInvoiceId":{"type":"string"},"clientId":{"type":"string"},"status":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"currency":{"type":"string"},"description":{"type":"string"},"notes":{"type":"string"},"subtotal":{"type":"number"},"discountAmount":{"type":"number"},"taxAmount":{"type":"number"},"taxRate":{"type":"number"},"taxRegion":{"type":"string"},"amount":{"type":"number"},"qrReference":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}}},"Invoices":{"type":"object","description":"A invoice record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"EstimatesInput":{"type":"object","properties":{"estimateNumber":{"type":"string"},"clientId":{"type":"string"},"status":{"type":"string"},"issueDate":{"type":"string","format":"date"},"expiryDate":{"type":"string","format":"date"},"currency":{"type":"string"},"description":{"type":"string"},"notes":{"type":"string"},"subtotal":{"type":"number"},"discountAmount":{"type":"number"},"taxAmount":{"type":"number"},"taxRate":{"type":"number"},"taxRegion":{"type":"string"},"amount":{"type":"number"},"ticketId":{"type":"string"},"ticketRef":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}}},"Estimates":{"type":"object","description":"A estimate record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"PaymentsInput":{"type":"object","properties":{"invoiceId":{"type":"string"},"clientId":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"paymentDate":{"type":"string","format":"date"},"method":{"type":"string"},"reference":{"type":"string"},"notes":{"type":"string"}}},"Payments":{"type":"object","description":"A payment record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"ExpensesInput":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"expenseDate":{"type":"string","format":"date"},"status":{"type":"string"},"vendor":{"type":"string"},"paymentMethod":{"type":"string"}}},"Expenses":{"type":"object","description":"A expense record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"SuppliersInput":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"vatNumber":{"type":"string"},"iban":{"type":"string"},"defaultCurrency":{"type":"string"},"paymentTermsDays":{"type":"number"},"isActive":{"type":"boolean"}}},"Suppliers":{"type":"object","description":"A supplier record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"ItemsInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"sku":{"type":"string"},"unitPrice":{"type":"number"},"unit":{"type":"string"},"category":{"type":"string"},"trackStock":{"type":"boolean"},"reorderPoint":{"type":"number"},"unitCost":{"type":"number"},"taxRate":{"type":"number"},"isActive":{"type":"boolean"}}},"Items":{"type":"object","description":"A item record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}},"Vendor-billsInput":{"type":"object","properties":{"billNumber":{"type":"string"},"docType":{"type":"string"},"relatedBillId":{"type":"string"},"supplierId":{"type":"string"},"supplierInvoiceNumber":{"type":"string"},"status":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"currency":{"type":"string"},"description":{"type":"string"},"notes":{"type":"string"},"subtotal":{"type":"number"},"discountAmount":{"type":"number"},"taxAmount":{"type":"number"},"taxRate":{"type":"number"},"taxRegion":{"type":"string"},"amount":{"type":"number"},"qrReference":{"type":"string"},"creditorIban":{"type":"string"},"expenseAccount":{"type":"string"},"costCenterId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}}},"Vendor-bills":{"type":"object","description":"A vendor-bill record. Includes `id` and `createdAt`.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"}}}}},"paths":{"/clients":{"get":{"tags":["clients"],"summary":"List clients","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"clientType","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Clients"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["clients"],"summary":"Create a client","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientsInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Clients"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clients/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["clients"],"summary":"Get a client","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Clients"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["clients"],"summary":"Update a client","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Clients"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["clients"],"summary":"Delete a client","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"get":{"tags":["invoices"],"summary":"List invoices","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"clientId","in":"query","required":false,"schema":{"type":"string"}},{"name":"docType","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoices"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["invoices"],"summary":"Create a invoice","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoices"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["invoices"],"summary":"Get a invoice","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoices"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["invoices"],"summary":"Update a invoice","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoices"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["invoices"],"summary":"Delete a invoice","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/pdf":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["invoices"],"summary":"Download a invoice as PDF","description":"Rendered in the organization's saved document design, incl. Swiss QR-bill where applicable.","responses":{"200":{"description":"PDF document","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estimates":{"get":{"tags":["estimates"],"summary":"List estimates","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"clientId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Estimates"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["estimates"],"summary":"Create a estimate","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimatesInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Estimates"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estimates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["estimates"],"summary":"Get a estimate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Estimates"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["estimates"],"summary":"Update a estimate","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimatesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Estimates"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["estimates"],"summary":"Delete a estimate","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estimates/{id}/pdf":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["estimates"],"summary":"Download a estimate as PDF","description":"Rendered in the organization's saved document design, incl. Swiss QR-bill where applicable.","responses":{"200":{"description":"PDF document","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments":{"get":{"tags":["payments"],"summary":"List payments","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"invoiceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"clientId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payments"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["payments"],"summary":"Create a payment","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Payments"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["payments"],"summary":"Get a payment","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Payments"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["payments"],"summary":"Update a payment","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Payments"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["payments"],"summary":"Delete a payment","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/expenses":{"get":{"tags":["expenses"],"summary":"List expenses","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Expenses"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["expenses"],"summary":"Create a expense","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expenses"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/expenses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["expenses"],"summary":"Get a expense","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expenses"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["expenses"],"summary":"Update a expense","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expenses"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["expenses"],"summary":"Delete a expense","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppliers":{"get":{"tags":["suppliers"],"summary":"List suppliers","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"isActive","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Suppliers"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["suppliers"],"summary":"Create a supplier","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppliersInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Suppliers"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppliers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["suppliers"],"summary":"Get a supplier","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Suppliers"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["suppliers"],"summary":"Update a supplier","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppliersInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Suppliers"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["suppliers"],"summary":"Delete a supplier","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/items":{"get":{"tags":["items"],"summary":"List items","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"isActive","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Items"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["items"],"summary":"Create a item","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Items"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/items/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["items"],"summary":"Get a item","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Items"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["items"],"summary":"Update a item","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Items"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["items"],"summary":"Delete a item","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor-bills":{"get":{"tags":["vendor-bills"],"summary":"List vendor-bills","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"supplierId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Vendor-bills"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["vendor-bills"],"summary":"Create a vendor-bill","description":"Requires the `write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor-billsInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Vendor-bills"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor-bills/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["vendor-bills"],"summary":"Get a vendor-bill","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Vendor-bills"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["vendor-bills"],"summary":"Update a vendor-bill","description":"Requires the `write` scope. Supplying `items` replaces all positions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor-billsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Vendor-bills"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["vendor-bills"],"summary":"Delete a vendor-bill","description":"Requires the `write` scope.","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}