spartera/api-sdk

Auto-generated API documentation for REST services of the Spartera platform

Maintainers

Package info

github.com/spartera-com/spartera-php-sdk

Homepage

pkg:composer/spartera/api-sdk

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.80 2026-04-17 17:13 UTC

This package is auto-updated.

Last update: 2026-04-17 17:15:23 UTC


README

Auto-generated API documentation for REST services of the Spartera platform

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/SparteraApiSdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: ApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\APIKeysApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$company_id = 'company_id_example'; // string | Unique identifier for the Company
$api_keys_input = new \OpenAPI\Client\Model\ApiKeysInput(); // \OpenAPI\Client\Model\ApiKeysInput
$page = 1; // int | Page number for pagination
$limit = 20; // int | Number of items per page
$sort_by = 'sort_by_example'; // string | Field to sort by
$sort_order = 'desc'; // string | Sort order (ascending or descending)
$search = 'search_example'; // string | Search term to filter results

try {
    $result = $apiInstance->createApiKeys($company_id, $api_keys_input, $page, $limit, $sort_by, $sort_order, $search);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling APIKeysApi->createApiKeys: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.spartera.com

Class Method HTTP request Description
APIKeysApi createApiKeys POST /companies/{company_id}/api-keys Create single API key. Returns the actual sk_ key (only time it's exposed) and api_key_id for future operations.
APIKeysApi createApiKeysApiKeysRevoke POST /companies/{company_id}/api-keys/{api_key_id}/revoke Explicitly revoke an API key with reason tracking. This is different from delete as it includes revocation metadata.
APIKeysApi deleteApiKeys DELETE /companies/{company_id}/api-keys/{api_key_id} Delete (deactivate) single API key by api_key_id. Uses the api_key_id returned during creation for clean identification. Fixed to use correct primary key lookup.
APIKeysApi getApiKeysById GET /companies/{company_id}/api-keys/{api_key_id} Get single API key by ID. Returns masked API key for security (sk_****1234).
APIKeysApi getApiKeysByIdApiKeysStats GET /companies/{company_id}/api-keys/{api_key_id}/stats Get usage statistics for a specific API key. Returns usage count, last used date, failed attempts, etc.
APIKeysApi listApiKeys GET /companies/{company_id}/api-keys Get all API keys for a company. Returns masked API keys for security (sk_****1234).
APIKeysApi updateApiKeys PATCH /companies/{company_id}/api-keys/{api_key_id} Update an existing API key by ID. Can update metadata like name, expiration, rate limits, etc. Cannot update the actual key value (for security).
AlertsApi createAlerts POST /companies/{company_id}/users/{user_id}/alerts POST /companies/{company_id}/users/{user_id}/alerts
AlertsApi deleteAlerts DELETE /companies/{company_id}/users/{user_id}/alerts/{alert_id} Delete single alert by ID
AlertsApi getAlertsById GET /companies/{company_id}/users/{user_id}/alerts Get a list of all alerts for a specific user
AlertsApi getAlertsByIdAssetAll GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id}/all Get all alerts for a specific asset
AlertsApi getAlertsByIdUsers GET /companies/{company_id}/users/{user_id}/alerts/{alert_id} Get single alert by ID
AlertsApi getAlertsByIdUsersAsset GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id} Get all alerts for a specific asset (by user)
AlertsApi updateAlerts PATCH /companies/{company_id}/users/{user_id}/alerts/{alert_id} Update an existing alert by ID
AssetPriceHistoryApi createAssetPriceHistory POST /companies/{company_id}/assets/{asset_id}/prices Create a new price history record for an asset
AssetPriceHistoryApi createAssetPriceHistoryPricesCalculateCredits POST /companies/{company_id}/assets/{asset_id}/prices/calculate_credits Calculate the credit equivalent for a given USD price without saving
AssetPriceHistoryApi createAssetPriceHistoryPricesDiscount POST /companies/{company_id}/assets/{asset_id}/prices/discount POST /companies/{company_id}/assets/{asset_id}/prices/discount
AssetPriceHistoryApi deleteAssetPriceHistory DELETE /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Delete single price history record by ID
AssetPriceHistoryApi getAssetPriceHistoryById GET /companies/{company_id}/assets/{asset_id}/prices Get all price history records for a specific asset
AssetPriceHistoryApi getAssetPriceHistoryByIdAssetsPrices GET /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Get single price history record by ID
AssetPriceHistoryApi getAssetPriceHistoryByIdPricesActive GET /companies/{company_id}/assets/{asset_id}/prices/active Get the currently active price for an asset
AssetPriceHistoryApi updateAssetPriceHistory PATCH /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Update an existing price history record by ID
AssetUsecasesApi getAssetUsecasesById GET /asset_usecases/{auc_id} Get single asset use case by ID
AssetUsecasesApi listAssetUsecases GET /asset_usecases Get a list of all asset use cases
AssetsApi createAssets POST /companies/{company_id}/assets Create a new asset
AssetsApi createAssetsAnalyze POST /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi createAssetsScanColumn POST /companies/{company_id}/assets/{asset_id}/scan_column Scan a column in the asset's table to retrieve distinct values Request Body: column (str): Column name to scan limit (int, optional): Maximum distinct values to return (default 1000, max 5000) Returns: Flask Response with scan results
AssetsApi createAssetsTest POST /companies/{company_id}/assets/{asset_id}/test POST /companies/{company_id}/assets/{asset_id}/test
AssetsApi deleteAssets DELETE /companies/{company_id}/assets/{asset_id} Delete single asset by ID
AssetsApi getAssetsById GET /companies/{company_id}/assets/{asset_id} Get single asset by ID
AssetsApi getAssetsById2 GET /companies/{company_id}/assets/{asset_id}/statistics Get statistics for a specific asset (public endpoint)
AssetsApi getAssetsByIdAnalyze GET /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi getAssetsByIdInfoschema GET /companies/{company_id}/assets/{asset_id}/infoschema Get the information schema for a specific asset's table
AssetsApi getAssetsByIdInfoschemaSave GET /companies/{company_id}/assets/{asset_id}/infoschema/save Retrieve and save an asset's information schema
AssetsApi getAssetsByIdPredictedPrice GET /companies/{company_id}/assets/{asset_id}/predicted_price Get AI-predicted pricing for a specific asset
AssetsApi getAssetsByIdStatistics GET /companies/{company_id}/assets/statistics Get statistics for all assets the user has access to
AssetsApi getAssetsByIdTest GET /companies/{company_id}/assets/{asset_id}/test GET /companies/{company_id}/assets/{asset_id}/test
AssetsApi listAssets GET /companies/{company_id}/assets Get all assets for a specific company
AssetsApi listAssetsSearch GET /companies/{company_id}/assets/search Search and filter assets with advanced options Query Parameters: q: Search query string category: Filter by category sport: Filter by sport tag sort_by: Sort field (name
AssetsApi updateAssets PATCH /companies/{company_id}/assets/{asset_id} Update an existing asset by ID
CloudProvidersApi getCloudProvidersById GET /cloud-providers/{provider_id} Get single cloud provider by ID
CloudProvidersApi listCloudProviders GET /cloud-providers Get a list of all cloud providers
CompaniesApi getCompaniesById GET /companies/{company_id} Get details of the requestor's own company
CompaniesApi listCompanies GET /companies/{company_id}/requests/plan Get the total number of requests allocated in the company's current subscription plan.
CompaniesApi listCompaniesAnalyticsAssets GET /companies/{company_id}/analytics/assets Get asset performance analytics. Query params: start_date, end_date, limit, sort_by, include
CompaniesApi listCompaniesAnalyticsCustomers GET /companies/{company_id}/analytics/customers Get customer analytics including growth and segmentation. Query params: start_date, end_date, group_by, segment_by
CompaniesApi listCompaniesAnalyticsDashboard GET /companies/{company_id}/analytics/dashboard Get comprehensive dashboard analytics for seller dashboard. Query params: start_date, end_date, period (day/week/month/quarter)
CompaniesApi listCompaniesAnalyticsMetrics GET /companies/{company_id}/analytics/metrics Get summary metrics (counts only). No date params needed — returns all-time totals. Performance: < 0.1s
CompaniesApi listCompaniesAnalyticsSales GET /companies/{company_id}/analytics/sales Get sales over time analytics. Query params: start_date, end_date, group_by (day/week/month/quarter), metrics
CompaniesApi listCompaniesObjects GET /companies/{company_id}/objects Get all objects (connections, assets) of a single company
CompaniesApi listCompaniesRequestsUsage GET /companies/{company_id}/requests/usage Get company request usage data for a specific month.
CompaniesApi updateCompanies PATCH /companies/{company_id} Update an existing company by ID
ConnectionsApi createConnections POST /companies/{company_id}/connections Create a new connection by ID
ConnectionsApi deleteConnections DELETE /companies/{company_id}/connections/{connection_id} Delete single connection by ID
ConnectionsApi getConnectionsById GET /companies/{company_id}/connections/{connection_id} Get single connection by ID
ConnectionsApi getConnectionsById2 GET /companies/{company_id}/connections/{connection_id}/test Test the specified connection
ConnectionsApi getConnectionsByIdInfoschema GET /companies/{company_id}/connections/{connection_id}/infoschema Retrieve the information schema for the specified connection
ConnectionsApi listConnections GET /companies/{company_id}/connections Get all connections for a specific company
ConnectionsApi updateConnections PATCH /companies/{company_id}/connections/{connection_id} Update an existing connection by ID
EndpointsApi createEndpoints POST /companies/{company_id}/endpoints Create a new endpoint
EndpointsApi createEndpointsKeys POST /companies/{company_id}/endpoints/{endpoint_id}/keys POST /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi deleteEndpoints DELETE /companies/{company_id}/endpoints/{endpoint_id} Delete single endpoint by ID
EndpointsApi deleteEndpointsKeys DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id} DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id}
EndpointsApi getEndpointsById GET /companies/{company_id}/endpoints/{endpoint_id} Get single endpoint by ID
EndpointsApi getEndpointsByIdAvailableEndpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints
EndpointsApi getEndpointsByIdConnectionsDescribe GET /companies/{company_id}/endpoints/../connections/{connection_id}/describe Get schema information for a connection Query parameters: include_fields: Whether to include field information (default: true) schemas: Optional comma-separated schemas to include tables: Optional comma-separated tables to include
EndpointsApi getEndpointsByIdExecute GET /companies/{company_id}/endpoints/{endpoint_id}/execute Execute an endpoint with pagination support. Customer-facing route that returns paginated data. Query params: ?start=0&limit=100
EndpointsApi getEndpointsByIdKeys GET /companies/{company_id}/endpoints/{endpoint_id}/keys GET /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi getEndpointsByIdStats GET /companies/{company_id}/endpoints/{endpoint_id}/stats Get usage statistics for an endpoint Query parameters: days: Number of days to analyze (default: 30)
EndpointsApi getEndpointsByIdTest GET /companies/{company_id}/endpoints/{endpoint_id}/test Test an endpoint with sample data Request body (optional): limit: Number of sample rows to return (default: 10)
EndpointsApi getEndpointsByIdUrl GET /companies/{company_id}/endpoints/{endpoint_id}/url GET /companies/{company_id}/endpoints/{endpoint_id}/url
EndpointsApi listEndpoints GET /companies/{company_id}/endpoints Get all endpoints for a specific company with pagination, filtering, and sorting
EndpointsApi updateEndpoints PATCH /companies/{company_id}/endpoints/{endpoint_id} Update an existing endpoint by ID
FavoritesApi createFavorites POST /companies/{company_id}/users/{user_id}/favorites POST /companies/{company_id}/users/{user_id}/favorites
FavoritesApi deleteFavorites DELETE /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Delete single favorite by ID (unfavorite an asset)
FavoritesApi getFavoritesById GET /companies/{company_id}/users/{user_id}/favorites Get a list of all favorites for a specific user
FavoritesApi getFavoritesByIdUsers GET /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Get single favorite by ID
FavoritesApi getFavoritesByIdUsersCategory GET /companies/{company_id}/users/{user_id}/favorites/category/{category} Get all favorites for the specified user in a specific category
FavoritesApi getFavoritesByIdUsersCheck GET /companies/{company_id}/users/{user_id}/favorites/check/{asset_id} Check if the specified user has favorited a specific asset
FavoritesApi getFavoritesByIdUsersUncategorized GET /companies/{company_id}/users/{user_id}/favorites/uncategorized Get all favorites for the specified user that don't have a category
FavoritesApi updateFavorites PATCH /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Update an existing favorite by ID
IndustriesApi getIndustriesById GET /industries/{industry_id} Get single industry by ID
IndustriesApi listIndustries GET /industries Get a list of all industries
IndustriesApi listIndustriesActive GET /industries/active Get a list of industries that have active marketplace products
JobFunctionsApi getJobFunctionsById GET /job-functions/{function_id} Get single job function by ID
JobFunctionsApi listJobFunctions GET /job-functions Get a list of all job functions
PostgenIntegrationsApi createPostgenIntegrations POST /companies/{company_id}/postgen_integrations POST /companies/{company_id}/postgen_integrations
PostgenIntegrationsApi createPostgenIntegrationsTest POST /companies/{company_id}/postgen_integrations/test POST /companies/{company_id}/postgen_integrations/test
PostgenIntegrationsApi deletePostgenIntegrations DELETE /companies/{company_id}/postgen_integrations/{integration_id} Delete single integration by ID. Also deletes credentials from GCP Secret Manager.
PostgenIntegrationsApi getPostgenIntegrationsById GET /companies/{company_id}/postgen_integrations/{integration_id} Get single integration by ID.
PostgenIntegrationsApi listPostgenIntegrations GET /companies/{company_id}/postgen_integrations Get a list of all postgen integrations for the company. All company users can view integrations.
PostgenIntegrationsApi updatePostgenIntegrations PATCH /companies/{company_id}/postgen_integrations/{integration_id} Update an existing integration by ID. Can update credentials, is_active status, etc.
PostsApi createPosts POST /companies/{company_id}/posts POST /companies/{company_id}/posts
PostsApi createPosts2 POST /companies/{company_id}/posts/{post_id}/publish/{integration_id} Publish a post to an external platform via an integration. Args: post_id: ID of the post to publish integration_id: ID of the integration to use (from postgen_integrations) Returns: Publication record with external_url and external_post_id
PostsApi createPostsPublish POST /companies/{company_id}/posts/{post_id}/publish Publish a post (make it publicly visible).
PostsApi createPostsUnpublish POST /companies/{company_id}/posts/{post_id}/unpublish Unpublish a post (make it private/draft again).
PostsApi createPostsView POST /companies/{company_id}/posts/{post_id}/view Increment view count for a post. Public endpoint (no authentication required).
PostsApi deletePosts DELETE /companies/{company_id}/posts/{post_id} Delete single post by ID.
PostsApi getPostsById GET /companies/{company_id}/posts/{post_id} Get single post by ID.
PostsApi getPostsByIdPublications GET /companies/{company_id}/posts/{post_id}/publications Get all publications for a post. Shows where this post has been published to external platforms. Returns: Array of publication records with platform, URL, status
PostsApi listPosts GET /companies/{company_id}/posts Get a list of all posts for the user's company. Supports filtering, sorting, pagination.
PostsApi listPostsSummary GET /companies/{company_id}/posts/summary GET /companies/{company_id}/posts/summary
PostsApi updatePosts PATCH /companies/{company_id}/posts/{post_id} Update an existing post by ID. Note: last_edited_at is automatically updated.
StorageEnginesApi getStorageEnginesById GET /cloud-providers/{provider_id}/storage-engines/{engine_id} Get single storage engine by ID
StorageEnginesApi listStorageEngines GET /cloud-providers/{provider_id}/storage-engines Get a list of all storage engines
UsersApi createUsers POST /companies/{company_id}/users Create a new user
UsersApi createUsersGoogleOauth POST /companies/{company_id}/users/google-oauth POST /companies/{company_id}/users/google-oauth
UsersApi createUsersLogout POST /companies/{company_id}/users/logout Logout current user by revoking their sessions
UsersApi deleteUsers DELETE /companies/{company_id}/users/{user_id} Delete single user by ID
UsersApi getUsersById GET /companies/{company_id}/users/{user_id} Get single user by ID
UsersApi listUsers GET /companies/{company_id}/users Get a list of all users in a company
UsersApi listUsersMe GET /me Get current authenticated user's profile.
UsersApi updateUsers PATCH /companies/{company_id}/users/{user_id} Update an existing user by ID

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

support@spartera.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.25.0
    • Generator version: 7.21.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen