Corrily LivePrice (1.1.4)

Download OpenAPI specification:Download

Corrily's LivePrice lets you to interact with Corrily's localization and dynamic pricing models to localize and optimize your prices in real-time.

Authentication

corrily_auth

Security Scheme Type API Key
Header parameter name: X-API-KEY

LivePrice

Get price

Authorizations:
Request Body schema: application/json

Takes a list of products and returns their prices to display to the user. By default, the user-location adjusted price denominated in their local currency is returned. If the LivePrice optimization engine is turned on, the returned prices are the results of experiments the engine runs to determine optimal prices.

user_id
string

Unique user identifier (required if ip is not specified)

ip
string

User IP address (required if country, user_id, or get_ip_from_request is not specified)

country
string

User two-letter country code (ISO 3166 alpha-2; required if ip is not specified)

ab
boolean

If set to true will enfore the ab flag. (If the ab flag is on the base price in the base currency, usually USD, will be returned.)

dev
boolean

Turn developement mode on/off. When set to false nothing will be stored by Corrily.

get_ip_from_request
boolean

For front-end calls, allows you to get the IP of the user from their request.

required
Array of objects (Product)

A list of product objects

Responses

Request samples

Content type
application/json
{
  • "user_id": "u_123",
  • "ip": "185.35.50.4",
  • "ab": false,
  • "country": "GB",
  • "dev": true,
  • "products": [
    ]
}

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Set traits

Authorizations:
Request Body schema: application/json

The /set_traits endpoint sets user-specific traits. Traits are key-value pairs that are either used as features during price optimization or to segment the user-base for analytics purposes. The subset of traits that are used as features is settable in Corrily's dashboard.

user_id
required
string

Unique user identifier

traits
required
object

A dictionary of user-specific traits. Any traits useful as features for training the price optimization model or for segmenting the user base can be entered as key-value pairs in the traits dictionary.

Responses

Request samples

Content type
application/json
{
  • "user_id": "user_001",
  • "traits": {
    }
}

Response samples

Content type
application/json
{
  • "status": "string"
}

Set KPIs

Authorizations:
Request Body schema: application/json

The /set_kpis endpoint is used to set product-level KPIs for individual users. These are aggregated up to form the KPI metrics shown on Corrily's dashboard.

user_id
required
string

Unique user identifier

product_id
required
string

Unique product identifier

status
string
Enum: "trialing" "active" "canceled" "transitioned"

The subscription status.

subscription_amount
number

The subscription amount.

revenue_received
number

An amount of revenue received.

revenue_refunded
number

An amount of revenue refunded.

Array of objects (KPI)

A list of KPI objects.

Responses

Request samples

Content type
application/json
{
  • "user_id": "user_001",
  • "product_id": "monthly_plan",
  • "status": "trialing",
  • "subscription_amount": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "string"
}