Skip to content

API Reference

APIs for managing Hubble configurations programmatically.

The Hubble API provides programmatic access to manage various configurations and features for your integration. These APIs enable you to customize your Hubble implementation dynamically without requiring manual intervention from the Hubble team.

Available APIs

Cohort Configuration API

Create and manage customer cohorts with custom brand-specific discount configurations. Control discount percentages for different brands within your cohorts to tailor pricing strategies for different customer segments.

Discount Management API

Manage custom brand discount configurations and override default discounts. Retrieve current configurations, update specific brand discounts, and reset customizations programmatically.

Coupon API

Create, manage, and track promotional coupons for your products. Control discount types, usage limits, product eligibility, and user targeting with flexible coupon configurations.

Getting Started

All APIs require authentication using Bearer token authorization. You must first obtain an access token using the Login API before making requests to other APIs.

Base URLs

EnvironmentBase URL
Staginghttps://api.dev.myhubble.money
Productionhttps://api.myhubble.money

Authentication

Step 1: Obtain Access Token

Use the Login API to obtain a Bearer token for authentication.

Endpoint: POST /v1/partners/auth/login

Request Body:

{
"clientId": "string",
"clientSecret": "string"
}

Response:

Status Code: 200 OK - Login successful

{
"token": "string",
"expiresInSecs": "validity in seconds"
}

Error Responses:

  • Status 401: Unauthorized - incorrect clientId or clientSecret
  • Status 400: Bad request - missing required fields

Example Request:

Terminal window
curl -X POST 'https://api.myhubble.money/v1/partners/auth/login' \
-H 'Content-Type: application/json' \
-d '{
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}'

Step 2: Use Access Token

Include the obtained access token in the Authorization header of all subsequent API requests:

Terminal window
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

Important Notes:

  • Access tokens have a limited validity period (specified in expiresInSecs)
  • You must obtain a new token once the current token expires
  • Keep your clientId and clientSecret secure and never expose them in client-side code

Support

For client credentials, technical assistance, or questions about API capabilities, please contact your Hubble integration team.