Data Structure
List Companies
Retrieve a paginated list of companies.Available Filters
filter[name]- Filter by company namefilter[email]- Filter by company emailfilter[total_spent_min]- Filter by minimum total spent amountfilter[total_spent_max]- Filter by maximum total spent amountsort- Sort by field (e.g.,name,-created_at,-total_spent)include- Include related resources (e.g.,employees,documents,orders)per_page- Number of items per page (default: 15)
Create Company
Create a new company record.Update Company
Update an existing company’s information.Delete Company
Delete a company and all associated records.Relationships
- Site: Each company belongs to a site
- User: Each company belongs to a user who created it
- Employees: A company can have multiple employees
- Documents: A company can have multiple documents
- Orders: A company can have multiple orders
- Transactions: All transactions are associated with orders
Error Handling
- 401 Unauthenticated - Invalid or missing token
- 403 Unauthorized - Insufficient permissions
- 404 Not Found - Company does not exist
- 422 Validation Error - Invalid input data
Best Practices
- Always validate EIN format (XX-XXXXXXX)
- Use proper country codes (ISO 2-letter)
- Include complete address information
- Handle sensitive data (EIN) securely
- Monitor company spending limits
- Track order and transaction histo

