Forget part of the profile

post/v1/shoppers/me/forget

Takes something back: a note or a liked style by its id from the profile, every size kept for a brand, or all their body measurements. Send one or several in a call.

To take back a single reaction rather than a whole style, record an undo signal.

Public keyapi.v1.shoppersDemo key OK

Headers

1
X-Shopper-Tokenstringrequired

The shopper's profile token, from auth/start, auth/verify or any call that made a profile.

Request body

application/jsonrequired
noteIdstring

A note's id.

styleIdstring

A liked style's id, from profile.styles.

sizeBrandstring

A brand exactly as it is kept in profile.sizes. Every size kept for it is forgotten.

bodyboolean

true forgets every body measurement and the fit preference.

Response

200Forgotten. The profile as it now is.
ShopperProfilerequired

A profile in words. Never the vectors behind it.

savedbooleanrequired

true once the shopper confirmed an email: the profile is theirs, lasts until they delete it, and works at every store that runs Stylor.

emailstringnullablerequired

The confirmed email. Null on an anonymous profile.

array<object>required

Styles learnt from their reactions, strongest first. At most four per slot.

array<object>required

Kinds of whole look they liked, strongest first.

array<object>required

Styles they passed on often enough to say.

likesarray<string>required

Labels they clearly lean toward, read from their reactions, never said by them ("colour: black"). At most 8.

avoidsarray<string>required

Labels they clearly lean away from. At most 8.

array<object>required

What they told you, kept with remember.

array<ShopperKeptSize>required

Sizes they wear, by brand or store.

ShopperBody | nullrequired

Their body measurements in centimetres, and how they like things to fit. Null when none are kept.

signalsintegerrequired

Reactions learnt from.

Errors

26

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

400
Request body must be valid JSON.

A body was sent and could not be parsed as JSON.

400
Request body must be a JSON object.

A body was sent and parsed to something other than a JSON object.

401
Send the shopper's token in x-shopper-token, or start a profile (auth/start).

No X-Shopper-Token was sent.

401
That shopper token is not valid here. Start a profile or sign in again.

X-Shopper-Token was sent but cannot be opened with this key.

403
Shopper profiles are switched off for this organization.

The organization turned shopper profiles off.

404
No such profile.

The profile was deleted during the call.

422
Nothing to forget.

None of noteId, styleId, sizeBrand was sent, and body is not true.

curl -X POST "https://stylor.ai/api/v1/shoppers/me/forget" \
  -H "Authorization: Bearer $STYLOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "noteId": "a1b2c3d4"
}'
Response · 200
{
  "profile": {
    "saved": false,
    "email": null,
    "styles": [],
    "outfits": [],
    "avoidStyles": [],
    "likes": [],
    "avoids": [],
    "notes": [],
    "sizes": [],
    "body": null,
    "signals": 0
  }
}