Overview
Business areas are the top-level organizational units in Pretectum that categorize your master data. They provide a logical structure for organizing different types of data within your organization:- Customer: Customer records, contacts, and related data
- Product: Product catalog, inventory, and specifications
- Supplier: Vendor and supplier information
- Employee: Human resources and personnel data
Why Business Areas Matter
Understanding your business areas is essential for:- Scoped Searches: Filter search results to specific data categories
- Access Control: Different applications may have access to different business areas
- Data Organization: Understand the structure of your master data
- Performance: Searching within a specific business area is faster than searching across all data
Before You Begin
To use the Business Areas API, you need:1
Get API Credentials
Obtain your
client_id and client_secret from your Pretectum tenant administrator.2
Obtain Access Token
Exchange your credentials for an access token using the authentication endpoint.
3
Verify Permissions
Ensure your application client has been granted access to the business areas permission.
Retrieving Business Areas
Use the List Business Areas endpoint to get all business areas your application can access.Basic Request
Understanding the Response
The API returns an array of business area objects:| Field | Description |
|---|---|
businessAreaId | Unique identifier for the business area |
name | Display name used for filtering in search operations |
description | Explanation of the business area’s purpose |
active | Whether the business area is currently active |
createdBy | User who created the business area |
updatedBy | User who last modified the business area |
createdDate | When the business area was created |
updatedDate | When the business area was last modified |
version | Version number for tracking changes |
Using Business Areas for Search
Once you have the list of business areas, use thename field to filter your data object searches.
Searching Within a Business Area
Complete Client Implementation
Here is a complete implementation that handles authentication, business area retrieval, and searching:Building a Business Area Selector
Create a user interface component that lets users select a business area for filtering:Error Handling
Handle common errors when working with business areas:Best Practices
Cache Business Areas
Cache Business Areas
Business areas change infrequently. Cache the response locally and refresh periodically rather than fetching on every request:
Filter by Active Status
Filter by Active Status
Only show active business areas in user-facing interfaces:
Validate Before Search
Validate Before Search
Validate that the user has access to a business area before attempting to search:
Use Names, Not IDs
Use Names, Not IDs
When filtering searches, use the
name field, not the businessAreaId: