Inventory Connection Profile
The Inventory Connection Profile API allows you to manage and retrieve connection profiles used for integrating with external inventory systems. These profiles define authentication credentials, connection settings, and configuration parameters needed to connect BookStack with various inventory management platforms and databases.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Connection Profile endpoints provide access to connection profiles that enable BookStack to integrate with external inventory management systems. These profiles store essential connection information such as API endpoints, authentication credentials, database connection strings, and other configuration parameters required to synchronize inventory data.
Connection profiles are typically used to:
- Establish secure connections to third-party inventory systems
- Configure data synchronization settings between BookStack and external platforms
- Manage authentication credentials for inventory integrations
- Define connection parameters for different inventory data sources
These endpoints work together to provide both list and detailed views of available connection profiles, allowing administrators to review configured integrations and their settings. The list endpoint supports filtering and pagination for efficient browsing of multiple profiles, while the detail endpoint provides complete configuration information for specific profiles.
Understanding connection profiles is crucial for managing inventory integrations, as they serve as the bridge between BookStack and external inventory management systems, ensuring data flows securely and reliably between platforms.
Endpoints
GET /inventory_connection_profile/
Description: Retrieves a paginated list of inventory connection profiles with optional filtering capabilities. This endpoint is essential for discovering available inventory integrations and reviewing their basic configuration details.
Use Cases:
- Display all configured inventory integrations in an admin dashboard
- Filter connection profiles by name to find specific integrations
- Paginate through large numbers of connection profiles for management interfaces
- Audit existing inventory connections for security or compliance reviews
Full URL Example:
https://control.zequenze.com/api/v1/inventory_connection_profile/?name=warehouse&limit=20&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | query | No | Filter profiles by name (supports partial matching for easy discovery) |
| limit | integer | query | No | Number of results to return per page (default: 20, max: 100) |
| offset | integer | query | No | The initial index from which to return results for pagination |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_connection_profile/?name=warehouse&limit=10" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,
"next": "https://control.zequenze.com/api/v1/inventory_connection_profile/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": 1,
"name": "Warehouse Management System",
"profile_type": "rest_api",
"status": "active",
"last_sync": "2024-01-15T10:30:00Z",
"organization": "Main Warehouse",
"created_at": "2024-01-01T09:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": 2,
"name": "Legacy Inventory Database",
"profile_type": "database",
"status": "inactive",
"last_sync": "2024-01-10T14:22:00Z",
"organization": "Legacy Systems",
"created_at": "2023-12-15T16:45:00Z",
"updated_at": "2024-01-10T14:22:00Z"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of connection profiles |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions to access inventory profiles |
GET /inventory_connection_profile/{id}/
Description: Retrieves detailed information about a specific inventory connection profile, including full configuration details, authentication settings, and synchronization parameters. This endpoint provides comprehensive profile data needed for managing and troubleshooting inventory integrations.
Use Cases:
- View complete configuration details for a specific inventory integration
- Retrieve connection parameters for debugging synchronization issues
- Display profile settings in configuration management interfaces
- Audit specific connection profile configurations for security reviews
Full URL Example:
https://control.zequenze.com/api/v1/inventory_connection_profile/1/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | Unique identifier of the inventory connection profile to retrieve |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_connection_profile/1/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,
"name": "Warehouse Management System",
"description": "Primary connection to warehouse inventory management system",
"profile_type": "rest_api",
"status": "active",
"endpoint_url": "https://warehouse-api.company.com/v2",
"authentication_type": "api_key",
"connection_timeout": 30,
"retry_attempts": 3,
"sync_frequency": "hourly",
"last_sync": "2024-01-15T10:30:00Z",
"last_sync_status": "success",
"sync_record_count": 1247,
"organization": "Main Warehouse",
"created_by": "admin@company.com",
"created_at": "2024-01-01T09:00:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"configuration": {
"data_mapping": {
"item_id": "sku",
"quantity": "stock_count",
"location": "warehouse_section"
},
"filters": {
"active_items_only": true,
"exclude_categories": ["obsolete", "discontinued"]
}
},
"health_status": {
"connectivity": "healthy",
"authentication": "valid",
"last_error": null,
"error_count_24h": 0
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns detailed connection profile information |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions to access this profile |
| 404 | Not Found - Connection profile with specified ID does not exist |
Common Use Cases
Use Case 1: Admin Dashboard Integration List
Display all configured inventory connections in an administrative interface, showing their status and last synchronization times. Use the list endpoint with pagination to handle large numbers of profiles efficiently.
Use Case 2: Connection Profile Health Monitoring
Retrieve detailed information about specific profiles to monitor their health status, check for authentication issues, and review synchronization statistics for operational monitoring.
Use Case 3: Integration Configuration Review
Access complete configuration details for existing connection profiles when setting up similar integrations or troubleshooting synchronization problems with external inventory systems.
Use Case 4: Security Audit and Compliance
Filter and review all inventory connection profiles to ensure proper authentication methods are in use and that connection configurations meet security and compliance requirements.
Use Case 5: Troubleshooting Sync Issues
Examine detailed profile information including error logs, sync statistics, and configuration parameters to diagnose and resolve inventory data synchronization problems.
Best Practices
-
Pagination Management: When listing connection profiles, use appropriate limit values (10-50) to balance performance with usability, especially in environments with many configured integrations.
-
Error Handling: Always implement proper error handling for 404 responses when accessing specific profiles, as profiles may be deleted or access permissions may change.
-
Security Considerations: Treat connection profile data as sensitive information. The detailed endpoint may expose configuration parameters that could be used to compromise inventory integrations.
-
Caching Strategy: Cache connection profile data appropriately, but ensure cache invalidation aligns with the frequency of configuration changes in your environment.
-
Filtering Efficiency: Use the name filter parameter to reduce data transfer and improve response times when searching for specific connection profiles in large deployments.
-
Monitoring Integration: Regularly check the health_status and last_sync fields to proactively identify and address connectivity or synchronization issues before they impact inventory data accuracy.