openapi: 3.0.3 info: title: Toro Horizon360 Crews Customers 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: Customers description: Manage customer accounts and contacts paths: /customers: get: operationId: listCustomers summary: List Customers description: Returns a paginated list of all customers for the account. tags: - Customers parameters: - name: page in: query schema: type: integer default: 1 description: Page number for pagination - name: limit in: query schema: type: integer default: 25 maximum: 100 description: Number of records per page - name: search in: query schema: type: string description: Search customers by name, email, or phone responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomerList' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createCustomer summary: Create Customer description: Create a new customer record. tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerInput' responses: '201': description: Customer created content: application/json: schema: $ref: '#/components/schemas/Customer' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /customers/{customerId}: get: operationId: getCustomer summary: Get Customer description: Retrieve a specific customer by ID. tags: - Customers parameters: - name: customerId in: path required: true schema: type: string description: Unique customer identifier responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/Customer' '404': $ref: '#/components/responses/NotFound' put: operationId: updateCustomer summary: Update Customer description: Update an existing customer record. tags: - Customers parameters: - name: customerId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerInput' responses: '200': description: Customer updated content: application/json: schema: $ref: '#/components/schemas/Customer' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteCustomer summary: Delete Customer description: Delete a customer record. tags: - Customers parameters: - name: customerId in: path required: true schema: type: string responses: '204': description: Customer deleted '404': $ref: '#/components/responses/NotFound' components: schemas: Customer: type: object properties: id: type: string name: type: string email: type: string format: email phone: type: string address: $ref: '#/components/schemas/Address' notes: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time Address: type: object properties: street: type: string city: type: string state: type: string zip: type: string country: type: string Error: type: object properties: code: type: string message: type: string CustomerInput: type: object required: - name properties: name: type: string email: type: string format: email phone: type: string address: $ref: '#/components/schemas/Address' notes: type: string CustomerList: type: object properties: data: type: array items: $ref: '#/components/schemas/Customer' total: type: integer page: type: integer limit: type: integer responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT