Toptimize

[Beta] Add Quality Score

Use the /predictions endpoint to get contextual predictions of conversion and relevance metrics, which are personalized by user and context.In order to provide predictions, Topsort requires that events are also sent, as a source of information.

post/toptimize/v1/predictions

Request

  • Base URL: https://api.topsort.com
  • URL: https://api.topsort.com/toptimize/v1/predictions
  • Auth: HTTP bearer

Request body

opaqueUserIdstring required

The opaque user ID is an anonymized unique identifier that maps to the original user ID without revealing the original value. This identifier allows Topsort to correlate user activity between auctions and user interactions, independent of the user's logged-in status. For apps or sites where users might interact while logged out, we recommend generating a random identifier (UUIDv7) on the first load, storing it on local storage (cookie, local storage, etc), and letting it live for at least a year. Otherwise, if your users are always logged in for interactions, you may use a hash of your customer ID. Correct purchase attribution requires long-lived opaque user IDs consistent between auction and event requests.

objectType'listings' | 'banners' required

The type of object that is being reported on the interaction.

deviceType'desktop' | 'mobile'

The device the user is on.

productIdsstring[] required

Example request

{
  "metrics": {
    "ctr": true
  },
  "opaqueUserId": "u_9ske45",
  "productIds": [
    "p_PJbnN",
    "p_ojng4"
  ],
  "objectType": "listings"
}

Response

The prediction results. This will provide a numerical value for each combination of metric/product requested on the API call.

objectType'listings' | 'banners' required

The type of object that was predicted.

Example response

{
  "objectType": "listings",
  "predictions": [
    {
      "productId": "p_PJbnN",
      "ctr": 0.03,
      "cvr": 0.06
    },
    {
      "productId": "p_ojng4",
      "ctr": 0.056,
      "cvr": 0.091
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.