openapi: 3.0.3 info: title: Toro Horizon360 Crews Invoices API description: Toro Horizon360 is an all-in-one business management software for landscape contractors. The API provides endpoints for managing crews, schedules, jobs, customers, invoices, equipment, and payments for landscaping businesses. version: 1.0.0 contact: name: Toro Company url: https://horizon360.toro.com/ x-logo: url: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg servers: - url: https://api.horizon360.toro.com/v1 description: Horizon360 Production API security: - bearerAuth: [] tags: - name: Invoices description: Generate and manage customer invoices paths: /invoices: get: operationId: listInvoices summary: List Invoices description: Returns a paginated list of invoices. tags: - Invoices parameters: - name: status in: query schema: type: string enum: - draft - sent - paid - overdue - void - name: customerId in: query schema: type: string - name: page in: query schema: type: integer default: 1 - name: limit in: query schema: type: integer default: 25 responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/InvoiceList' post: operationId: createInvoice summary: Create Invoice description: Create a new invoice for a customer or job. tags: - Invoices requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoiceInput' responses: '201': description: Invoice created content: application/json: schema: $ref: '#/components/schemas/Invoice' /invoices/{invoiceId}: get: operationId: getInvoice summary: Get Invoice description: Retrieve a specific invoice by ID. tags: - Invoices parameters: - name: invoiceId in: path required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/Invoice' '404': $ref: '#/components/responses/NotFound' /invoices/{invoiceId}/send: post: operationId: sendInvoice summary: Send Invoice description: Send an invoice to the customer via email. tags: - Invoices parameters: - name: invoiceId in: path required: true schema: type: string responses: '200': description: Invoice sent successfully components: schemas: InvoiceList: type: object properties: data: type: array items: $ref: '#/components/schemas/Invoice' total: type: integer page: type: integer limit: type: integer LineItem: type: object properties: description: type: string quantity: type: number unitPrice: type: number format: float total: type: number format: float Invoice: type: object properties: id: type: string invoiceNumber: type: string customerId: type: string jobId: type: string status: type: string enum: - draft - sent - paid - overdue - void lineItems: type: array items: $ref: '#/components/schemas/LineItem' subtotal: type: number format: float tax: type: number format: float total: type: number format: float dueDate: type: string format: date createdAt: type: string format: date-time Error: type: object properties: code: type: string message: type: string InvoiceInput: type: object required: - customerId properties: customerId: type: string jobId: type: string lineItems: type: array items: $ref: '#/components/schemas/LineItem' dueDate: type: string format: date notes: type: string responses: NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT