Superwise

AI model monitoring platform

docs.superwise.ai ↗
Version
1.0
OpenAPI
3.0.0
Endpoints
29
Schemas
66
74
Quality
Updated
3 days ago
Ai ai monitoring ml-ops
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.sandbox-65ebc.chico.ai
http://api.sandbox-65ebc.chico.ai

Endpoints

Clear filters

Auth 1 endpoints

POST /v1/auth/token

Authenticate a client and get an access token

operationId: Auth_clientAuthenticate

Request Body

required

Request body

application/json
schema models.AuthRequest
Property Type Required
client_id string required
client_secret string required

Responses

200

Ok

400

Invalid request body

401

Invalid client credentials

404

Client not found

POST /v1/auth/token

Automlservice 4 endpoints

POST /v1/automl/lookalike
operationId: AutoMlService_createLookalikeRequest

Parameters

Name In Required Type Description
model_version query optional string

Model Version

module-id header optional string

Module ID

Request Body

required

Lookalike Request Body

application/json
schema models.AutoMLLookalikeCreateRequest
Property Type Required
engagement_type string required
run_description string optional
negative_label_users array optional
user_id string required
timestamp string optional
positive_label_users array required
user_id string required
timestamp string optional

Responses

200

Ok

POST /v1/automl/lookalike
POST /v1/automl/runs/{run_id}/generate_batch_scores
operationId: AutoMlService_rerunInferenceAndUpdateScores

Parameters

Name In Required Type Description
run_id path required string

Run ID

module-id header optional string

Module ID

Responses

200

Ok

POST /v1/automl/runs/{run_id}/generate_batch_scores
POST /v1/automl/runs/{run_id}/rescore
operationId: AutoMlService_rerunInference

Parameters

Name In Required Type Description
run_id path required string

Run ID

Responses

200

Ok

POST /v1/automl/runs/{run_id}/rescore
POST /v1/automl/runs/{run_id}/users
operationId: AutoMlService_excludeTrainingUsers

Parameters

Name In Required Type Description
run_id path required string

Run ID

page_number query optional integer

Page number, starting at 1

page_size query optional integer

Number of users scored in run per page. Between 1 and 10000. Defaults to 500

Request Body

required

Request Options

application/json
schema models.AutoMLRunUsersGetRequest
Property Type Required
allow_users array optional
user_id string required
block_users array optional
user_id string required
tag_filters array optional
tag_name string required
allowed_values array required
blocked_values array required

Responses

200

Ok

POST /v1/automl/runs/{run_id}/users

Personas 3 endpoints

POST /v1/persona

Creates a persona definition from a list of facet weights.

Personas enable you to define a weighted combination of interests, demographics, and financial behaviors
to create highly targeted audiences for specialized use cases.
They are defined using a list of facet weights, each containing a facet name and a weight.
To create a persona, you must provide at least one facet weight. Each facet weight must contain a valid facet name
and must be registered in the field with corresponding facet type. For example, if you want to create a persona with
a facet weight for the “Travel” interest facet, you must provide a facet weight with the name “Travel” with the facet
type “interest”, the facet weight must be defined in the interest_facets field.

operationId: Personas_createDefinition

Parameters

Name In Required Type Description
model_version query optional string

Model Version

Request Body

required

Persona Request Body

application/json
schema models.PersonaCreateRequest
Property Type Required
locations array optional
persona_name string required
company_facets array optional
name string required
weight number required
interest_facets array optional
name string required
weight number required
demographic_facets array optional
name string required
weight number required
pre_defined_personas array optional
name string required
weight number required

Responses

200

OK

400

Will return a 400 (Bad Request) error if no facets are provided, one or more of the facet names does not exist, or is a custom facet.

409

Will return a 409 (Conflict) error if a persona with the same name already exists.

POST /v1/persona
POST /v1/persona/{persona_id}/users

Returns a ranked list of users who match a persona definition.

Users are sorted by their persona score, with the highest scoring users appearing first. Results are paginated
by default, with 500 users per page. You can specify the page number and page size by passing the page_number
and page_size query parameters. (e.g. GET /persona/{persona_id}/users?page_number=2&page_size=100)

You can also specify the minimum persona score threshold that a user must meet to be included in the response.
If not specified, will default to the hyperplane suggested threshold for the given persona_id.

You can also use a blocklist to exclude specific users from the response.

operationId: Personas_getRankedUsers

Parameters

Name In Required Type Description
persona_id path required string

Persona ID

module-id header optional string

Module ID

page_number query optional integer

Page number, starting at 1

page_size query optional integer

Number of users scored in run per page, between 1 and 10000. Defaults to 500.

month query optional string

Reference month for persona scores in YYYY-MM format. Defaults to current month.

persona_score_threshold query optional number

Minimum user persona score threshold for user to be included in the response.

Request Body

required

Optional user filters

application/json
schema models.PostPersonaUsersRequest
Property Type Required
branch object required
allowed_values array required
blocked_values array required
cbo_code object optional
allowed_values array required
blocked_values array required
blocklist array required
job_title object optional
allowed_values array required
blocked_values array required
birth_date object optional
max_value string required
min_value string required
declared_monthly_income object optional
max_value number required
min_value number required

Responses

200

Ok

400

Will return a 400 (Bad Request) error if the provided module ID or month is invalid.

404

Will return a 404 (Not Found) error if the persona with provided persona_id does not exist.

POST /v1/persona/{persona_id}/users
POST /v1/batch/user/personas

Returns all personas associated with a user.

operationId: Personas_getFacetAttributes

Parameters

Name In Required Type Description
module-id header optional string

Module ID

month query optional string

Reference month for persona scores in YYYY-MM format.

persona_score_threshold query optional number

Minimum user persona score threshold to be included in the response.

Request Body

required

List of user IDs

application/json
schema models.BatchUserPersonasRequest
Property Type Required
user_ids array required

Responses

200

Ok

400

Will return a 400 (Bad Request) error if the provided module ID or month is invalid, or number of requested users exceed the maximum allowed (1000).

404

Will return a 404 (Not Found) error if any of the users with provided user_id does not exist.

POST /v1/batch/user/personas

Transactions 1 endpoints

POST /v1alpha1/transaction/categorize

Categorizes a list of transactions.

operationId: Transactions_categorizeList

Request Body

required

Object containing transactions to be categorized

application/json
schema models.CategorizeTransactionsRequest
Property Type Required
transactions array optional
amount number optional
bank_id string optional
user_id string optional
currency string optional
account_id string optional
description string optional
account_type string optional
location_city string optional
location_state string optional
transaction_id string optional
location_country string optional
transaction_flow string optional
transaction_datetime string optional
transaction_metadata object optional
mcc integer optional
account_balance number optional
location_latitude number optional
location_longitude number optional
transaction_status string optional
current_installment integer optional
transfer_sender_name string optional
number_of_installments integer optional
transfer_receiver_name string optional
transfer_payment_method string optional
transfer_reference_number string optional
transfer_sender_document_name string optional
transfer_receiver_document_name string optional
transfer_sender_document_number string optional
transfer_receiver_document_number string optional

Responses

200

OK

POST /v1alpha1/transaction/categorize

Schemas

string AutoMlServiceGetRunStatusResponse
{
  "type": "string"
}
string AutoMlServiceGetStatusBatchScoresResponse
{
  "type": "string"
}
array EnrichedTransactionsGetUserCashflowStatisticsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/models.AccountCashflowOverview"
  }
}
string HealthCheckStatusResponse
{
  "type": "string"
}
string PersonasDeleteCustomPersonaResponse
{
  "type": "string"
}
array PersonasGetFacetAttributesResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/models.UserPersonasResponse"
  }
}
string StatisticsGetLatestMonthDataResponse
{
  "type": "string"
}
object api.ErrResponse
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    }
  }
}
object models.AccountCashflowOverview
{
  "type": "object",
  "required": [
    "account_type",
    "inflow_amount",
    "net_cashflow_amount",
    "outflow_amount"
  ],
  "properties": {
    "account_type": {
      "type": "string",
      "description": "Account type"
    },
    "inflow_amount": {
      "type": "number",
      "description": "Inflow amount on the given window"
    },
    "outflow_amount": {
      "type": "number",
      "description": "Outflow amount on the given window"
    },
    "net_cashflow_amount": {
      "type": "number",
      "description": "Net cashflow amount on the given window"
    }
  },
  "description": "Cashflow details for a given account of a given user"
}
object models.AuthRequest
{
  "type": "object",
  "required": [
    "client_id",
    "client_secret"
  ],
  "properties": {
    "client_id": {
      "type": "string",
      "example": "4681f83e-a4e9-11ee-a506-0242ac120002"
    },
    "client_secret": {
      "type": "string",
      "example": "W5qNTpWIT81r5qE3wHrtwXBujKdmGAvx"
    }
  }
}
object models.AuthResponse
{
  "type": "object",
  "properties": {
    "api_key": {
      "type": "string",
      "example": "v2.local.V0bmLbcYzFAs4w0VLqdV-XBssuwRPIflBf94lhrUHu3Lcg18Qiwb4fPgqIc9pLqvhDYPQhTDho5sBCWV_ZwwJ4sKYEc0g5GKEn9BUA8d-KnIbHnLyYKuqMDZflzQSCUdhwnFAcDqAlIqqpENdDVf01IL4wyhyC2F3CLqLVnwWCCFLonLjwpi7eNztZJ4REYPellWBDq3jL-2td4fQmcUvhGXz0T7GBlg9jGtOrs47sbUWS_QHgd1esEjgYm823OdTAk5yjuWD7CKF8P7bqg66A.bnVsbA"
    }
  }
}
object models.AutoMLBatchScoresCreateResponse
{
  "type": "object",
  "required": [
    "path"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "Path where parquet file with the batch scores will be written"
    }
  }
}
object models.AutoMLLookalikeCreateRequest
{
  "type": "object",
  "required": [
    "engagement_type",
    "positive_label_users"
  ],
  "properties": {
    "engagement_type": {
      "type": "string",
      "description": "Intended use case of this product, between MULTI_ENGAGE and SINGLE_ENGAGE"
    },
    "run_description": {
      "type": "string",
      "description": "Custom run description to attach to run"
    },
    "negative_label_users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.LookalikeLabel"
      },
      "description": "List of negative users in lookalike model. Model will be trained to identify users dissimilar to these users. If None, negative users will be generated from data. List length must be either 0 or greater than 10."
    },
    "positive_label_users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.LookalikeLabel"
      },
      "description": "List of positive users in lookalike model. Model will be trained to identify users similar to these users. This list must contain at least ten elements."
    }
  }
}
object models.AutoMLLookalikeCreateResponse
{
  "type": "object",
  "required": [
    "input_label_summary",
    "run_id"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "description": "RunID is the unique identifier for the AutoML run"
    },
    "run_description": {
      "type": "string",
      "description": "Description of the run"
    },
    "input_label_summary": {
      "$ref": "#/components/schemas/models.InputLabelSummary"
    }
  },
  "x-konfig-properties": {
    "input_label_summary": {
      "description": "Analysis of input labels detailing amounts of labels given, amounts of labels detected, monthly breakdowns of positive rates and counts, and a breakdown of weights by label value."
    }
  }
}
object models.AutoMLRunGetIdResponse
{
  "type": "object",
  "required": [
    "run_description",
    "run_id",
    "status",
    "timestamp"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "description": "RunID is the unique identifier for the AutoML run"
    },
    "status": {
      "type": "string",
      "description": "RunStatus is the status of the AutoML training run"
    },
    "timestamp": {
      "type": "string",
      "description": "Timestamp is the time when the training run began"
    },
    "run_metrics": {
      "$ref": "#/components/schemas/models.AutoMLRunMetrics"
    },
    "engagement_type": {
      "type": "string",
      "description": "Engagement type of this product run"
    },
    "run_description": {
      "type": "string",
      "description": "RunDescription is the description of the AutoML training run"
    },
    "input_label_summary": {
      "$ref": "#/components/schemas/models.InputLabelSummary"
    },
    "number_of_train_users": {
      "type": "integer",
      "description": "NumberOfTrainUsers is the number of users in model training"
    },
    "number_of_inference_users": {
      "type": "integer",
      "description": "NumberOfInferenceUsers is the number of users in model inference"
    }
  },
  "x-konfig-properties": {
    "run_metrics": {
      "description": "RunMetrics is the metrics of the AutoML training run"
    },
    "input_label_summary": {
      "description": "Analysis of input labels detailing amounts of labels given, amounts of labels detected, monthly breakdowns of positive rates and counts, and a breakdown of weights by label value."
    }
  }
}
object models.AutoMLRunMetrics
{
  "type": "object",
  "properties": {
    "test_ks": {
      "type": "number",
      "description": "KS of the test set"
    },
    "test_auc": {
      "type": "number",
      "description": "AUC of the test set"
    },
    "train_ks": {
      "type": "number",
      "description": "KS of the training set"
    },
    "train_auc": {
      "type": "number",
      "description": "AUC of the training set"
    },
    "label_positive_rate": {
      "type": "number",
      "description": "The percentage of users with positive label in the test set."
    },
    "positive_rate_by_decile": {
      "type": "object",
      "description": "The percentage of positive examples (examples with a positive label) in each of the ten equally-sized groups (deciles) of the test data when this data is sorted based on the model's predicted scores.",
      "additionalProperties": {
        "type": "number"
      }
    },
    "cumulative_positive_rate": {
      "type": "object",
      "description": "Cumulative positive rates at various thresholds, including ascending (lower to higher thresholds) and descending (higher to lower thresholds). It indicates how the proportion of positive instances within the total instances changes as the classification threshold is adjusted.",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "number"
        }
      }
    }
  }
}
object models.AutoMLRunSummary
{
  "type": "object",
  "required": [
    "run_description",
    "run_id",
    "status",
    "timestamp"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "description": "RunID is the unique identifier for the AutoML run"
    },
    "status": {
      "type": "string",
      "description": "RunStatus is the status of the AutoML training run"
    },
    "timestamp": {
      "type": "string",
      "description": "Timestamp is the time when the training run began"
    },
    "run_metrics": {
      "$ref": "#/components/schemas/models.AutoMLRunMetrics"
    },
    "engagement_type": {
      "type": "string",
      "description": "Engagement type of this product run"
    },
    "run_description": {
      "type": "string",
      "description": "RunDescription is the description of the AutoML training run"
    },
    "input_label_summary": {
      "$ref": "#/components/schemas/models.InputLabelSummary"
    },
    "number_of_train_users": {
      "type": "integer",
      "description": "NumberOfTrainUsers is the number of users in model training"
    },
    "number_of_inference_users": {
      "type": "integer",
      "description": "NumberOfInferenceUsers is the number of users in model inference"
    }
  },
  "x-konfig-properties": {
    "run_metrics": {
      "description": "RunMetrics is the metrics of the AutoML training run"
    },
    "input_label_summary": {
      "description": "Analysis of input labels detailing amounts of labels given, amounts of labels detected, monthly breakdowns of positive rates and counts, and a breakdown of weights by label value."
    }
  }
}
object models.AutoMLRunUsersGetRequest
{
  "type": "object",
  "properties": {
    "allow_users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.UserMetadata"
      },
      "description": "List of users to return user scores for"
    },
    "block_users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.UserMetadata"
      },
      "description": "List of users to omit from returned user scores"
    },
    "tag_filters": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.TagCategoricalAttributeFilter"
      },
      "description": "Categorical Filters on pf_type metadata"
    }
  }
}
object models.AutoMLRunUsersGetResponse
{
  "type": "object",
  "required": [
    "user_scores"
  ],
  "properties": {
    "user_scores": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.UserScore"
      },
      "description": "List of user scores"
    },
    "last_scored_date": {
      "type": "string",
      "description": "Date string of last inference in `YYYY-MM-DD hh:mm:ss` format"
    }
  }
}
object models.AutoMLRunsGetResponse
{
  "type": "object",
  "required": [
    "runs"
  ],
  "properties": {
    "runs": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.AutoMLRunSummary"
      },
      "description": "List of AutoML run summaries"
    }
  }
}
object models.AutoMLUsersGetResponse
{
  "type": "object",
  "required": [
    "user_list"
  ],
  "properties": {
    "user_list": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.UserMetadata"
      },
      "description": "List of users' metadata"
    }
  }
}
object models.BatchUserPersonasRequest
{
  "type": "object",
  "required": [
    "user_ids"
  ],
  "properties": {
    "user_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "All user ids we want to fetch personas for"
    }
  }
}
object models.CashflowWindowStatistics
{
  "type": "object",
  "properties": {
    "window_end": {
      "type": "string",
      "description": "End time of the given window"
    },
    "window_start": {
      "type": "string",
      "description": "Start time of the given window"
    },
    "inflow_amount": {
      "type": "number",
      "description": "Inflow amount on the given window"
    },
    "outflow_amount": {
      "type": "number",
      "description": "Outflow amount on the given window"
    }
  },
  "description": "Inflow and outflow for a given user in a given time window"
}
object models.CategoricalAttributeFilter
{
  "type": "object",
  "required": [
    "allowed_values",
    "blocked_values"
  ],
  "properties": {
    "allowed_values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "['0002']"
      ],
      "description": "Allowed values"
    },
    "blocked_values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Blocked values"
    }
  }
}
object models.CategorizeTransactionsRequest
{
  "type": "object",
  "properties": {
    "transactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.Transaction"
      },
      "description": "List of transactions to be categorized"
    }
  }
}
object models.CategorizeTransactionsResponse
{
  "type": "object",
  "properties": {
    "categorized_transactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.TransactionCategory"
      },
      "description": "Categorized transactions"
    }
  }
}
object models.CategoryCashflow
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-friendly category name"
    },
    "amount": {
      "type": "number",
      "description": "Aggregate amount for the given category"
    },
    "percentage": {
      "type": "number",
      "description": "Absolute amount flow for the category"
    },
    "taxonomy_path": {
      "type": "string",
      "description": "Human-friendly category taxonomy path"
    }
  },
  "description": "Amount percentage for a given category, related to either the total inflow or outflow"
}
object models.CategoryMetadata
{
  "type": "object",
  "properties": {
    "score": {
      "type": "string",
      "description": "A float between 0 and 1 representing a confidence on the predicted category. The higher the number, the greater the confidence."
    },
    "category": {
      "type": "string",
      "description": "The category of the transaction represented by a unique identifier in the Hyperplane's Taxonomy."
    }
  }
}
object models.ClientResponse
{
  "type": "object",
  "properties": {
    "is_disabled": {
      "type": "boolean",
      "example": false
    },
    "access_key_id": {
      "type": "string",
      "example": "823e064a-4cb7-11ee-be56-0242ac120002"
    }
  }
}
object models.FacetWeightObject
{
  "type": "object",
  "required": [
    "name",
    "weight"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "international_traveler",
      "description": "Name of the facet"
    },
    "weight": {
      "type": "number",
      "example": 0.5,
      "description": "Weight of the facet"
    }
  }
}
object models.InputLabelSummary
{
  "type": "object",
  "required": [
    "num_input_labels",
    "num_input_users",
    "num_matched_labels",
    "num_training_users"
  ],
  "properties": {
    "monthly_counts": {
      "type": "object",
      "description": "For each month (shown in YYYY-MM format), the number of labels given.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "num_input_users": {
      "type": "integer",
      "description": "Number of distinct users that were provided by the user"
    },
    "num_input_labels": {
      "type": "integer",
      "description": "Number of labels that were provided by the user."
    },
    "num_matched_labels": {
      "type": "integer",
      "description": "Number of data rows that will be used in training"
    },
    "num_training_users": {
      "type": "integer",
      "description": "Number of distinct users that will be used in training"
    },
    "label_weight_counts": {
      "type": "object",
      "description": "Counts of given labels, broken down by label and weight. The keys are stringified pairs of (label_value, weight_value).",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "monthly_positive_rates": {
      "type": "object",
      "description": "For each month (shown in YYYY-MM format), what is the rate of positive labels given.",
      "additionalProperties": {
        "type": "number"
      }
    }
  }
}
object models.ListPersonasResponse
{
  "type": "object",
  "required": [
    "personas"
  ],
  "properties": {
    "personas": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.PersonaCreateResponse"
      }
    }
  },
  "description": "Response of users linked to a given persona"
}
object models.Location
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "City name"
    },
    "type": {
      "type": "string",
      "description": "Type of location (e.g., personal, home, business, ...)"
    },
    "state": {
      "type": "string",
      "description": "State name"
    },
    "country": {
      "type": "string",
      "description": "Country name"
    },
    "latitude": {
      "type": "number",
      "description": "Location latitude"
    },
    "city_code": {
      "type": "string",
      "description": "IBGE city code"
    },
    "longitude": {
      "type": "number",
      "description": "Location longitude"
    },
    "postal_code": {
      "type": "string",
      "description": "Postal code (i.e., CEP, e.g., '22620-171')"
    },
    "full_address": {
      "type": "string",
      "description": "Full address (e.g., Av. Lúcio Costa 1234, Copacabana, Rio de Janeiro, Brasil)"
    },
    "primary_address": {
      "type": "string",
      "description": "Primary address (e.g., Av. Lúcio Costa, 1234)"
    }
  },
  "description": "Location where the transaction happened"
}
object models.LookalikeLabel
{
  "type": "object",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "string",
      "description": "UserID is the unique identifier for the user"
    },
    "timestamp": {
      "type": "string",
      "description": "Timestamp to filter the features available to the model. Should reflect when the model is called: email sent date, loan initialized date, etc. If None, all user features will be used"
    }
  }
}
object models.MerchantInfo
{
  "type": "object",
  "properties": {
    "cnae": {
      "type": "string",
      "description": "Merchant CNAE"
    },
    "cnpj": {
      "type": "string",
      "description": "Merchant CNPJ"
    },
    "name": {
      "type": "string",
      "description": "Merchant name"
    },
    "category": {
      "type": "string",
      "description": "Merchant category"
    },
    "business_name": {
      "type": "string",
      "description": "Merchant business name"
    }
  },
  "description": "Inferred merchant info after transaction enrichment"
}
object models.NumericalAttributeFilter
{
  "type": "object",
  "required": [
    "max_value",
    "min_value"
  ],
  "properties": {
    "max_value": {
      "type": "number",
      "example": 100000,
      "description": "Max attribute value"
    },
    "min_value": {
      "type": "number",
      "example": 0,
      "description": "Min attribute value"
    }
  },
  "description": "Definition of a filter on an attribute of numerical type."
}
object models.PaginationMetadata
{
  "type": "object",
  "required": [
    "next_page",
    "page_size"
  ],
  "properties": {
    "next_page": {
      "type": "integer",
      "example": 2,
      "description": "Next page number"
    },
    "page_size": {
      "type": "integer",
      "example": 100,
      "description": "Number of elements per page"
    }
  }
}
object models.PercentileScore
{
  "type": "object",
  "properties": {
    "score": {
      "type": "number",
      "example": 0.5,
      "description": "Score calculated for the given percentile"
    },
    "percentile": {
      "type": "number",
      "example": 0.1,
      "description": "Percentile for which the score is being fetched"
    }
  },
  "description": "Percentile and associated score."
}
object models.PersonaCreateRequest
{
  "type": "object",
  "required": [
    "persona_name"
  ],
  "properties": {
    "locations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional list of zip codes or city ids to filter users by. If left empty, no location-based filtering is done."
    },
    "persona_name": {
      "type": "string",
      "example": "Young Professional",
      "description": "A name for describing this persona. Used for easy human-friendly identification."
    },
    "company_facets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.FacetWeightObject"
      },
      "description": "Optional list of behavioral facet component objects. Each object outlines how a user's likelihood\nto consume from a particular company's products and how much it contributes to the persona definition. If left\nempty, no company-based scoring is done. Company facets can be found by listing personas of facet type\n'company'. Facet name must be a valid company facet in the persona taxonomy."
    },
    "interest_facets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.FacetWeightObject"
      },
      "description": "Optional list of interest facet component objects. Each object represents how much an interest\nweighs in the persona. If left empty, no interest-based scoring is done. Interests can be found\nby listing personas of facet type 'interest'. Facet name must be a valid interest in the persona taxonomy."
    },
    "demographic_facets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.FacetWeightObject"
      },
      "description": "Optional list of interest facet component objects. Defines how much each demographic attribute\n(location, affluence, household composition, etc.)  weighs in the persona. If left empty, no demographic-based\nscoring is done. Demographic facets can be found by listing personas of facet type 'demographic'. Facet name\nmust be a valid demographic facet in the persona taxonomy."
    },
    "pre_defined_personas": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.FacetWeightObject"
      },
      "description": "Optional list of pre-defined persona facet component objects. Each object outlines how a pre-defined\npersona ('Car Owners' or 'International Travelers') contributes to the persona definition. If left\nempty, no predefined personas are incorporated into the persona definition. Pre-defined personas have\nbeen optimized for financial use cases and have been validated at scale. They can be found by listing\npersonas of facet type 'pre_defined_persona'. Facet name must be a valid pre-defined persona facet in\nthe persona taxonomy."
    }
  },
  "description": "Defines a persona. Stores various weighted facets including their interests, demographics, location, company affinity, as well as predefined personas."
}
object models.PersonaCreateResponse
{
  "type": "object",
  "required": [
    "creation_datetime",
    "persona_id",
    "persona_name"
  ],
  "properties": {
    "persona_id": {
      "type": "string",
      "example": "1",
      "description": "Unique identifier for the persona"
    },
    "persona_name": {
      "type": "string",
      "example": "Young Professional",
      "description": "Name of the persona"
    },
    "creation_datetime": {
      "type": "string",
      "example": "2020-01-01T00:00:00",
      "description": "Creation datetime of persona"
    }
  }
}
object models.PersonaDetailsResponse
{
  "type": "object",
  "required": [
    "creation_datetime",
    "definition",
    "persona_id",
    "persona_score_statistics"
  ],
  "properties": {
    "definition": {
      "$ref": "#/components/schemas/models.PersonaCreateRequest"
    },
    "persona_id": {
      "type": "string",
      "example": "1",
      "description": "Unique identifier for the persona"
    },
    "creation_datetime": {
      "type": "string",
      "example": "2020-01-01T00:00:00",
      "description": "Creation datetime of persona"
    },
    "persona_score_statistics": {
      "$ref": "#/components/schemas/models.PersonaScoreStatistics"
    }
  },
  "x-konfig-properties": {
    "definition": {
      "description": "The persona definition used to create this persona"
    },
    "persona_score_statistics": {
      "description": "Statistical attributes about the persona score distribution"
    }
  }
}
object models.PersonaScorePercentiles
{
  "type": "object",
  "properties": {
    "percentile_10": {
      "type": "number",
      "example": 0.1
    },
    "percentile_20": {
      "type": "number",
      "example": 0.2
    },
    "percentile_30": {
      "type": "number",
      "example": 0.3
    },
    "percentile_40": {
      "type": "number",
      "example": 0.4
    },
    "percentile_50": {
      "type": "number",
      "example": 0.5
    },
    "percentile_60": {
      "type": "number",
      "example": 0.6
    },
    "percentile_70": {
      "type": "number",
      "example": 0.7
    },
    "percentile_80": {
      "type": "number",
      "example": 0.8
    },
    "percentile_90": {
      "type": "number",
      "example": 0.9
    }
  },
  "description": "Percentile scores for users scored for a particular persona."
}
object models.PersonaScoreStatistics
{
  "type": "object",
  "required": [
    "maximum_user_score",
    "minimum_user_score",
    "persona_score_threshold",
    "score_average",
    "score_percentiles",
    "score_standard_deviation",
    "total_users_above_threshold",
    "total_users_with_non_zero_score"
  ],
  "properties": {
    "score_average": {
      "type": "number",
      "example": 0.5,
      "description": "Average score over all scored users in this persona"
    },
    "score_percentiles": {
      "$ref": "#/components/schemas/models.PersonaScorePercentiles"
    },
    "maximum_user_score": {
      "type": "number",
      "example": 0.5,
      "description": "Highest persona score assigned to a user for this persona"
    },
    "minimum_user_score": {
      "type": "number",
      "example": 0.5,
      "description": "Lowest persona score assigned to a user for this persona"
    },
    "persona_score_threshold": {
      "type": "number",
      "example": 0.5,
      "description": "Score threshold used to determine whether a user belongs to this persona"
    },
    "score_standard_deviation": {
      "type": "number",
      "example": 0.5,
      "description": "Standard deviation over all scored users in this persona"
    },
    "total_users_above_threshold": {
      "type": "integer",
      "example": 1000,
      "description": "Total number of users who meet or exceed the score threshold to be considered part of this persona."
    },
    "total_users_with_non_zero_score": {
      "type": "integer",
      "example": 1000,
      "description": "Total number of users who have received a score for this persona."
    }
  },
  "description": "Statistical attributes about the score distribution for a particular persona.",
  "x-konfig-properties": {
    "score_percentiles": {
      "description": "Percentile distribution of scores for users who have been assigned a score for this persona"
    }
  }
}
object models.PersonaUser
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "1",
      "description": "Unique identifier for the user"
    },
    "score": {
      "type": "number",
      "example": 0.5,
      "description": "Relevance score of user in this persona. In range `[0,1]`"
    }
  },
  "description": "User associated with a given persona"
}
object models.PersonaUsersResponse
{
  "type": "object",
  "required": [
    "users"
  ],
  "properties": {
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.PersonaUser"
      },
      "description": "Top users belonging to this persona"
    }
  },
  "description": "Response of users linked to a given persona"
}
object models.PostPersonaUsersRequest
{
  "type": "object",
  "required": [
    "blocklist",
    "branch"
  ],
  "properties": {
    "branch": {
      "$ref": "#/components/schemas/models.CategoricalAttributeFilter"
    },
    "cbo_code": {
      "$ref": "#/components/schemas/models.CategoricalAttributeFilter"
    },
    "blocklist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "['1234']"
      ],
      "description": "List of user ids to not be included in the response"
    },
    "job_title": {
      "$ref": "#/components/schemas/models.CategoricalAttributeFilter"
    },
    "birth_date": {
      "$ref": "#/components/schemas/models.TimestampAttributeFilter"
    },
    "declared_monthly_income": {
      "$ref": "#/components/schemas/models.NumericalAttributeFilter"
    }
  },
  "description": "Extra information for filtering users",
  "x-konfig-properties": {
    "branch": {
      "description": "Filter branch based on a list of allowed values"
    },
    "cbo_code": {
      "description": "Filter cbo code based on a list of allowed values"
    },
    "job_title": {
      "description": "Filter job title based on a list of allowed values"
    },
    "birth_date": {
      "description": "Filter birth date based on a date range"
    },
    "declared_monthly_income": {
      "description": "Filter declared monthly income based on a numeric range"
    }
  }
}
object models.TagCategoricalAttributeFilter
{
  "type": "object",
  "required": [
    "allowed_values",
    "blocked_values",
    "tag_name"
  ],
  "properties": {
    "tag_name": {
      "type": "string",
      "description": "Tag name"
    },
    "allowed_values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "['0002']"
      ],
      "description": "Allowed values"
    },
    "blocked_values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Blocked values"
    }
  }
}
object models.TimestampAttributeFilter
{
  "type": "object",
  "required": [
    "max_value",
    "min_value"
  ],
  "properties": {
    "max_value": {
      "type": "string",
      "example": "2020-01-01T00:00:00",
      "description": "Max attribute value"
    },
    "min_value": {
      "type": "string",
      "example": "2000-01-01T00:00:00",
      "description": "Min attribute value"
    }
  },
  "description": "Definition of a filter on an attribute of timestamp type."
}
object models.TopLevelCategoryCashflow
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-friendly category name"
    },
    "amount": {
      "type": "number",
      "description": "Aggregate amount for the given category"
    },
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/models.CategoryCashflow"
      },
      "description": "Detailed predicted categories under the top-level"
    },
    "percentage": {
      "type": "number",
      "description": "Absolute amount flow for the category"
    }
  },
  "description": "Amount percentage for a given top level category. As well as subcategories division"
}
object models.Transaction
{
  "type": "object",
  "properties": {
    "amount": {
      "type": "number",
      "description": "The monetary value of a transaction. This is always a positive value."
    },
    "bank_id": {
      "type": "string",
      "description": "The name of the bank that is originating the transaction. For credit cards, this is the issuing bank."
    },
    "user_id": {
      "type": "string",
      "description": "A unique identifier for the user within the bank or institution."
    },
    "currency": {
      "type": "string",
      "description": "Currency enum based on ISO 4217. Eg: BRL, USD, MXN."
    },
    "account_id": {
      "type": "string",
      "description": "A unique identifier for the account within the bank or institution."
    },
    "description": {
      "type": "string",
      "description": "The raw text description of the transaction (do not clean or transform this).\nIt usually includes some information about the payment method, processor,\nmerchant, and in cases of transfer might include CNPJ or other reference numbers.\nSome examples:\n   - Pag*Mariaivaneidede\n   - Ifd*Puro Acai Beira Ma\n   - TED BCO 1 AGE 4598  CTA 291412  - RETIRADA EM C/C"
    },
    "account_type": {
      "type": "string",
      "description": "One of the following: checking, saving, credit card or investment."
    },
    "location_city": {
      "type": "string",
      "description": "The city in which the transaction happened. e.g. São Paulo, Mexico City, San Francisco."
    },
    "location_state": {
      "type": "string",
      "description": "The state in which the transaction happened. Eg: SP, CA."
    },
    "transaction_id": {
      "type": "string",
      "description": "A unique identifier for each transaction to identify the transaction within your bank or institution."
    },
    "location_country": {
      "type": "string",
      "description": "The country in which the transaction happened in ISO 3166-1 alpha-3 format. e.g. BRA (for transaction in Brazil), ESP (for transaction in Spain)."
    },
    "transaction_flow": {
      "type": "string",
      "description": "One of the following options: outflow (for spending) or inflow (for earning)."
    },
    "transaction_datetime": {
      "type": "string",
      "description": "Time when the transaction was performed."
    },
    "transaction_metadata": {
      "$ref": "#/components/schemas/models.TransactionMetadata"
    }
  },
  "x-konfig-properties": {
    "transaction_metadata": {
      "description": "A map used to store additional context about a transaction that might be useful for cleaning and understanding."
    }
  }
}