API Scoping & Access Control
Data Access and API Scoping
All API integrations in Ottimate operate through OAuth applications tied to a specific API User. Understanding how data access is scoped is critical for integrations, especially in multi-company accounts.
OAuth Apps and API Users
When you integrate with Ottimate:
- OAuth App - Your integration application authenticates using Client ID and Client Secret
- API User - Every OAuth app operates on behalf of an API User provisioned by Ottimate
- Access Scope - The API User determines what data your integration can access
Access Scoping Levels
API Users can be scoped at three levels:
Examples:
Account-Scoped API User:
Company-Scoped API User (Company 123 only):
Location-Scoped API User (Location 456 only):
Resource Scoping in API Calls
Every API request that creates or retrieves data must specify the appropriate company and/or location scope.
Company Scoping
Most API endpoints require ottimate_company_id to specify which company’s data you’re working with.
Examples:
Location Scoping
Invoices must be assigned to a specific location. Other resources (vendors, dimensions) are company-level and shared across all locations.
Examples:
Common Error: Attempting to create an invoice with an ottimate_location_id that doesn’t belong to the specified ottimate_company_id will result in a validation error.
Finding the Right IDs
To determine which company and location IDs to use:
Step 1: List all companies
Step 2: List all locations
Step 3: Match to your business logic
When creating an invoice, determine which company and location it belongs to based on your business rules (e.g., which ERP it came from, which site received the goods).

