Skip to main content
POST
Create recommendation

Authorizations

Authorization
string
header
required

Your partner API key: kp_live_… in production, kp_test_… on the sandbox retailer.

Headers

Kleep-Retailer
string<uuid>
required

The retailer's Kleep public_id. Every call is scoped to one retailer.

Body

application/json
product_id
string
required

The retailer's product ID, as in its catalog.

Example:

"JEAN-0142"

shopper
object
required

Who the recommendation is for. Send a profile_id you stored, or the measurements collected in the conversation, or both (the measurements then update the profile).

fit_preference
enum<string>
default:regular

Only when the shopper says how they like to wear it.

Available options:
fitted,
regular,
loose
locale
string
default:en

BCP 47 language tag for summary, prompts and size labels.

Example:

"fr-FR"

market
string

ISO 3166-1 alpha-2 country of the shopper. Selects the market's size labels.

Example:

"FR"

conversation_id
string

Your conversation or ticket ID. Lets Kleep attribute later orders to the chat.

Example:

"conv_5521"

Response

The recommendation.

recommendation_id
string
required

Identifies this recommendation, for feedback and attribution.

profile_id
string
required

The shopper's Kleep profile. Store it with your conversation or customer record and send it next time instead of asking again.

product_id
string
required
size
object
required
summary
string
required

The recommendation as one or two ready-to-say sentences, in the requested locale.

alternatives
object[]

Neighbouring sizes that can also fit, at most one smaller and one larger.

fit
object[]

How the recommended size fits, per body zone of the product's size chart.

product_fit
object | null

How the product fits compared to its size chart, from Kleep's purchase and return data. null when there isn't enough data.