{ "openapi": "3.0.3", "info": { "title": "Acrual API", "description": "Acrual is powerful business management software for your manufacturing or construction business. Acrual helps you win more work and simplify your business.", "version": "1.0", "contact": { "email": "info@acrual.com" }, "x-jentic-source-url": "https://developer.acrual.com/" }, "servers": [ { "url": "https://api.acrual.com", "description": "Production server" } ], "paths": { "/v1.0/clients/{id}": { "get": { "operationId": "getClient", "summary": "Get client by ID", "description": "Retrieve a single client by ID", "tags": [ "Clients" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Client ID" } ], "responses": { "200": { "description": "Client details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Client" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/clients": { "get": { "operationId": "listClients", "summary": "List all clients", "description": "Retrieve a list of all clients", "tags": [ "Clients" ], "responses": { "200": { "description": "List of clients", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Client" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/employees": { "get": { "operationId": "listEmployees", "summary": "List all employees", "description": "Retrieve a list of all employees", "tags": [ "Employees" ], "responses": { "200": { "description": "List of employees", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Employee" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/hooks": { "post": { "operationId": "createWebhook", "summary": "Create webhook subscription", "description": "Create a new webhook subscription", "tags": [ "Hooks" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhook" } } } }, "responses": { "200": { "description": "Webhook created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "operationId": "listWebhooks", "summary": "List webhook subscriptions", "description": "Retrieve all webhook subscriptions", "tags": [ "Hooks" ], "responses": { "200": { "description": "List of webhooks", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/hooks/{id}": { "get": { "operationId": "getWebhook", "summary": "Get webhook subscription", "description": "Retrieve a specific webhook subscription", "tags": [ "Hooks" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Webhook ID" } ], "responses": { "200": { "description": "Webhook details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "operationId": "deleteWebhook", "summary": "Delete webhook subscription", "description": "Remove a webhook subscription", "tags": [ "Hooks" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Webhook ID" } ], "responses": { "200": { "description": "Webhook deleted successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/integrations/{integrationKey}/initiate": { "post": { "operationId": "initiateIntegration", "summary": "Start integration connection", "description": "Initiate a connection to a third-party integration", "tags": [ "Integrations" ], "parameters": [ { "name": "integrationKey", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Integration key" } ], "responses": { "200": { "description": "Integration initiated" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/integrations/{integrationKey}/complete": { "post": { "operationId": "completeIntegration", "summary": "Complete integration connection", "description": "Complete the connection to a third-party integration", "tags": [ "Integrations" ], "parameters": [ { "name": "integrationKey", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Integration key" } ], "responses": { "200": { "description": "Integration completed" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/integrations/{integrationKey}/data/{dataKey}": { "get": { "operationId": "getIntegrationData", "summary": "Get integration data", "description": "Fetch data from a connected integration", "tags": [ "Integrations" ], "parameters": [ { "name": "integrationKey", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Integration key" }, { "name": "dataKey", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Data key" } ], "responses": { "200": { "description": "Integration data" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/integrations/{integrationKey}/unlink": { "post": { "operationId": "unlinkIntegration", "summary": "Disconnect integration", "description": "Disconnect from a third-party integration", "tags": [ "Integrations" ], "parameters": [ { "name": "integrationKey", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Integration key" } ], "responses": { "200": { "description": "Integration disconnected" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/invoices": { "post": { "operationId": "createInvoice", "summary": "Create invoice", "description": "Create a new invoice", "tags": [ "Invoices" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoice" } } } }, "responses": { "200": { "description": "Invoice created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "operationId": "listInvoices", "summary": "List invoices", "description": "Retrieve all invoices", "tags": [ "Invoices" ], "responses": { "200": { "description": "List of invoices", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/invoices/{id}": { "get": { "operationId": "getInvoice", "summary": "Get invoice", "description": "Retrieve a specific invoice", "tags": [ "Invoices" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Invoice ID" } ], "responses": { "200": { "description": "Invoice details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "post": { "operationId": "updateInvoice", "summary": "Update invoice", "description": "Update an existing invoice", "tags": [ "Invoices" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Invoice ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoice" } } } }, "responses": { "200": { "description": "Invoice updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs": { "get": { "operationId": "listJobs", "summary": "List jobs", "description": "Retrieve all jobs", "tags": [ "Jobs" ], "responses": { "200": { "description": "List of jobs", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Job" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}": { "get": { "operationId": "getJob", "summary": "Get job", "description": "Retrieve a specific job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "Job details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files": { "get": { "operationId": "listJobFiles", "summary": "List job files", "description": "Retrieve all files for a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "List of files", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "operationId": "deleteJobFile", "summary": "Delete job file", "description": "Delete a file or folder from a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "File deleted successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files/folder": { "post": { "operationId": "createJobFolder", "summary": "Create job folder", "description": "Create a new folder in a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" } } } } } }, "responses": { "200": { "description": "Folder created" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files/upload": { "post": { "operationId": "requestJobFileUpload", "summary": "Request file upload", "description": "Request an upload URL for a file", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "Upload URL provided" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files/{uploadId}": { "get": { "operationId": "checkJobFileUploadStatus", "summary": "Check upload status", "description": "Check the status of a file upload", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" }, { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Upload ID" } ], "responses": { "200": { "description": "Upload status" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files/preview": { "get": { "operationId": "downloadJobFile", "summary": "Download file", "description": "Download a file from a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "File content" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/files/move": { "post": { "operationId": "moveJobFile", "summary": "Move file or folder", "description": "Move a file or folder within a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "File moved successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/jobs/{id}/invoiced": { "get": { "operationId": "getJobInvoicedAmounts", "summary": "Get invoiced amounts", "description": "Retrieve the invoiced amounts for a job", "tags": [ "Jobs" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Job ID" } ], "responses": { "200": { "description": "Invoiced amounts" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/purchase-orders": { "get": { "operationId": "listPurchaseOrders", "summary": "List purchase orders", "description": "Retrieve all purchase orders", "tags": [ "Purchase Orders" ], "responses": { "200": { "description": "List of purchase orders", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrder" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/purchase-orders/{id}": { "get": { "operationId": "getPurchaseOrder", "summary": "Get purchase order", "description": "Retrieve a specific purchase order", "tags": [ "Purchase Orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Purchase order ID" } ], "responses": { "200": { "description": "Purchase order details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrder" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes": { "get": { "operationId": "listQuotes", "summary": "List quotes", "description": "Retrieve all quotes", "tags": [ "Quotes" ], "responses": { "200": { "description": "List of quotes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Quote" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}": { "get": { "operationId": "getQuote", "summary": "Get quote", "description": "Retrieve a specific quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "Quote details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Quote" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/items": { "get": { "operationId": "listQuoteItems", "summary": "List quote items", "description": "Retrieve all items for a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "List of quote items" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/revisions": { "get": { "operationId": "listQuoteRevisions", "summary": "List quote revisions", "description": "Retrieve all revisions for a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "List of revisions" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files": { "get": { "operationId": "listQuoteFiles", "summary": "List quote files", "description": "Retrieve all files for a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "List of files" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "operationId": "deleteQuoteFile", "summary": "Delete quote file", "description": "Delete a file or folder from a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "File deleted successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files/folder": { "post": { "operationId": "createQuoteFolder", "summary": "Create quote folder", "description": "Create a new folder in a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" } } } } } }, "responses": { "200": { "description": "Folder created" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files/upload": { "post": { "operationId": "requestQuoteFileUpload", "summary": "Request file upload", "description": "Request an upload URL for a file", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "Upload URL provided" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files/{uploadId}": { "get": { "operationId": "checkQuoteFileUploadStatus", "summary": "Check upload status", "description": "Check the status of a file upload", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" }, { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Upload ID" } ], "responses": { "200": { "description": "Upload status" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files/preview": { "get": { "operationId": "downloadQuoteFile", "summary": "Download file", "description": "Download a file from a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "File content" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/quotes/{id}/files/move": { "post": { "operationId": "moveQuoteFile", "summary": "Move file or folder", "description": "Move a file or folder within a quote", "tags": [ "Quotes" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Quote ID" } ], "responses": { "200": { "description": "File moved successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/suppliers": { "get": { "operationId": "listSuppliers", "summary": "List suppliers", "description": "Retrieve all suppliers", "tags": [ "Suppliers" ], "responses": { "200": { "description": "List of suppliers", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Supplier" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/suppliers/{id}": { "get": { "operationId": "getSupplier", "summary": "Get supplier", "description": "Retrieve a specific supplier", "tags": [ "Suppliers" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Supplier ID" } ], "responses": { "200": { "description": "Supplier details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Supplier" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/time-entries": { "post": { "operationId": "createTimeEntry", "summary": "Create time entry", "description": "Create a new time entry", "tags": [ "Time Entries" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTimeEntry" } } } }, "responses": { "200": { "description": "Time entry created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimeEntry" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "operationId": "listTimeEntries", "summary": "List time entries", "description": "Retrieve all time entries", "tags": [ "Time Entries" ], "responses": { "200": { "description": "List of time entries", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TimeEntry" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] }, "put": { "operationId": "batchUpdateTimeEntries", "summary": "Batch update time entries", "description": "Update multiple time entries at once", "tags": [ "Time Entries" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateTimeEntry" } } } } }, "responses": { "200": { "description": "Time entries updated" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/time-entries/{id}": { "post": { "operationId": "updateTimeEntry", "summary": "Update time entry", "description": "Update a specific time entry", "tags": [ "Time Entries" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Time entry ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTimeEntry" } } } }, "responses": { "200": { "description": "Time entry updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimeEntry" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/variations": { "get": { "operationId": "listVariations", "summary": "List variations", "description": "Retrieve all variations", "tags": [ "Variations" ], "responses": { "200": { "description": "List of variations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Variation" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } }, "/v1.0/variations/{id}": { "get": { "operationId": "getVariation", "summary": "Get variation", "description": "Retrieve a specific variation", "tags": [ "Variations" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Variation ID" } ], "responses": { "200": { "description": "Variation details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Variation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" } }, "security": [ { "BearerAuth": [] } ] } } }, "components": { "schemas": { "Client": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" } } }, "Employee": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" } } }, "Webhook": { "type": "object", "properties": { "id": { "type": "string" }, "url": { "type": "string" }, "events": { "type": "array", "items": { "type": "string" } } } }, "CreateWebhook": { "type": "object", "required": [ "url", "events" ], "properties": { "url": { "type": "string" }, "events": { "type": "array", "items": { "type": "string" } } } }, "Invoice": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "amount": { "type": "number" }, "status": { "type": "string" } } }, "CreateInvoice": { "type": "object", "required": [ "clientId", "items" ], "properties": { "clientId": { "type": "string" }, "items": { "type": "array", "items": { "type": "object" } } } }, "UpdateInvoice": { "type": "object", "properties": { "status": { "type": "string" }, "items": { "type": "array", "items": { "type": "object" } } } }, "Job": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" } } }, "PurchaseOrder": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "amount": { "type": "number" } } }, "Quote": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "amount": { "type": "number" } } }, "Supplier": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" } } }, "TimeEntry": { "type": "object", "properties": { "id": { "type": "string" }, "employeeId": { "type": "string" }, "jobId": { "type": "string" }, "hours": { "type": "number" }, "date": { "type": "string", "format": "date" } } }, "CreateTimeEntry": { "type": "object", "required": [ "employeeId", "jobId", "hours", "date" ], "properties": { "employeeId": { "type": "string" }, "jobId": { "type": "string" }, "hours": { "type": "number" }, "date": { "type": "string", "format": "date" } } }, "UpdateTimeEntry": { "type": "object", "properties": { "hours": { "type": "number" }, "date": { "type": "string", "format": "date" } } }, "Variation": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "amount": { "type": "number" } } }, "Error": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } } } }, "responses": { "BadRequest": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Unauthorized": { "description": "Unauthorized - Invalid or missing API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Bearer token authentication" } } }, "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Clients", "description": "Client management" }, { "name": "Employees", "description": "Employee management" }, { "name": "Hooks", "description": "Webhook subscriptions" }, { "name": "Integrations", "description": "Third-party integrations" }, { "name": "Invoices", "description": "Invoice management" }, { "name": "Jobs", "description": "Job management and file operations" }, { "name": "Purchase Orders", "description": "Purchase order management" }, { "name": "Quotes", "description": "Quote management" }, { "name": "Suppliers", "description": "Supplier management" }, { "name": "Time Entries", "description": "Time tracking" }, { "name": "Variations", "description": "Variation management" } ] }