Skip to main content
This guide explains how to work with business areas in Pretectum using the API. You will learn how to retrieve the business areas your application has access to and use them effectively in your data operations.

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
Each business area contains schemas (data structures) and datasets (collections of records) that further organize your data.

Why Business Areas Matter

Understanding your business areas is essential for:
  1. Scoped Searches: Filter search results to specific data categories
  2. Access Control: Different applications may have access to different business areas
  3. Data Organization: Understand the structure of your master data
  4. 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

Create an API Key

In the Pretectum app, go to Configuration → API Keys and create a key. It is shown once, at creation, so copy it then. See API Keys.
2

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:
Once you have the list of business areas, use the name 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

Business areas change infrequently. Cache the response locally and refresh periodically rather than fetching on every request:
Only show active business areas in user-facing interfaces:
Validate that the user has access to a business area before attempting to search:
When filtering searches, use the name field, not the businessAreaId:

Next Steps

API Reference

View the complete Business Areas API reference

Search Data Objects

Learn how to search within business areas

Authentication

Create and manage the keys that authenticate your calls

Search API Reference

Complete search API documentation