TUBR Predictions API

TUBR Predictions API

Retrieve sales predictions for your business outlets.

https://api.prod.tubr.live

🔒 Authentication — Bearer Token

All requests must include a valid API token in the Authorization header. Tokens are prefixed with tbt: and issued by the TUBR team.

Authorization: Bearer tbt:your-api-token
GET /pulse/prediction/

Returns prediction data for a given outlet over a specified time range. Predictions are returned as a time series of data points, each containing the predicted value with upper and lower confidence bounds. All datetime parameters must be in ISO 8601 UTC format. All timestamps in the response are also returned in ISO 8601 UTC format.

Query Parameters
Name Type Description
outlet_code required string
Unique code identifying the outlet.
Example: OUTLET001
start_datetime required string
date-time
Start of the prediction window in ISO 8601 UTC format.
Example: 2026-03-01T00%3A00%3A00Z
end_datetime required string
date-time
End of the prediction window in ISO 8601 UTC format (exclusive).
Example: 2026-03-08T00%3A00%3A00Z
resolution required string
Time resolution for the prediction data.
hourly daily
feed_type string
The type of prediction feed to retrieve. If not provided, predictions for all feed types will be returned.
total_sales number_of_transaction product_quantity
Responses
200 Predictions retrieved successfully
Response Schema
Field Type Description
outlet_code string The outlet code from the request.
resolution string The resolution from the request (hourly or daily).
predictions object Prediction data keyed by feed type. Each key is a feed type string (e.g. total_sales), and the value is an array of time-series data points.
{feed_type} array Array of prediction data points for this feed type, sorted chronologically. Possible keys: total_sales, number_of_transaction, product_quantity.
timestamp string
date-time
ISO 8601 datetime for this data point, in UTC.
value number The predicted value.
lower_bound number Lower confidence bound of the prediction.
upper_bound number Upper confidence bound of the prediction.
Example
{
  "outlet_code": "OUTLET001",
  "resolution": "daily",
  "predictions": {
    "total_sales": [
      {
        "timestamp": "2026-03-01T00:00:00Z",
        "value": 1250.75,
        "lower_bound": 1100.50,
        "upper_bound": 1400.00
      },
      {
        "timestamp": "2026-03-02T00:00:00Z",
        "value": 1340.20,
        "lower_bound": 1180.00,
        "upper_bound": 1500.40
      },
      {
        "timestamp": "2026-03-03T00:00:00Z",
        "value": 980.00,
        "lower_bound": 860.25,
        "upper_bound": 1099.75
      }
    ],
    "number_of_transaction": [
      {
        "timestamp": "2026-03-01T00:00:00Z",
        "value": 85,
        "lower_bound": 72,
        "upper_bound": 98
      },
      {
        "timestamp": "2026-03-02T00:00:00Z",
        "value": 92,
        "lower_bound": 78,
        "upper_bound": 106
      },
      {
        "timestamp": "2026-03-03T00:00:00Z",
        "value": 64,
        "lower_bound": 52,
        "upper_bound": 76
      }
    ],
    "product_quantity": [
      {
        "timestamp": "2026-03-01T00:00:00Z",
        "value": 320,
        "lower_bound": 280,
        "upper_bound": 360
      },
      {
        "timestamp": "2026-03-02T00:00:00Z",
        "value": 345,
        "lower_bound": 300,
        "upper_bound": 390
      },
      {
        "timestamp": "2026-03-03T00:00:00Z",
        "value": 240,
        "lower_bound": 205,
        "upper_bound": 275
      }
    ]
  }
}
400 Bad request — missing or invalid query parameters
{
  "error": "Missing required parameter: outlet_code"
}
{
  "error": "start_datetime must be in ISO 8601 format"
}
{
  "error": "start_datetime cannot be after end_datetime"
}
401 Unauthorised
403 Forbidden
404 Resource not found
405 Method not allowed
500 Internal server error
{
  "error": "An unexpected error occurred"
}
Example Request
cURLcurl -X GET \
  "https://api.prod.tubr.live/pulse/prediction/?outlet_code=OUTLET001&start_datetime=2026-03-01T00%3A00%3A00Z&end_datetime=2026-03-08T00%3A00%3A00Z&resolution=daily" \
  -H "Authorization: Bearer tbt:your-api-token"
TUBR Predictive Analytics Platform — For support, contact support@gettubr.com