How to start
A shopper connects their wearable on your site and sees products from your own catalogue that suit their recent readings, each with a reason. Four steps get you there.
They cover a full shopper journey. Everything else on this page can wait.
Sign in at the developer portal with a work email or Google, and tell us about your store.
We review each new account. Once it is approved you create your keys in the portal.
We check how your products map to our recommendation rules and sign off their safety details before any of them is recommended.
Day one
These nine calls, in this order, take a shopper from your product page to a shelf of picks. Steps 1 and 2 happen once. Steps 3 to 9 run for each shopper.
/partners/{id}/catalog/productsSends us your productsNothing. This runs before launch./partners/{id}/catalog/summaryTells you how many products are readyNothing. This is your own check./partners/{id}/storefront/sessionsStarts an anonymous shopperThey tap your "connect your wearable" entry point/partners/{id}/storefront/sessions/meSaves gender and age_range. Picks are always empty without both.Two short profile questions/partners/{id}/storefront/connectionsReturns the sign-in link for their deviceTheir wearable sign-in opens/partners/{id}/storefront/connections/flows/{flowId}Tells you when the sign-in has finished. Poll until connected.They finish signing in/partners/{id}/storefront/connections/{provider}/confirmRecords the connection and starts reading their data"Connected"/partners/{id}/storefront/sync/statusTells you when their data has arrivedA short "reading your data" wait/partners/{id}/storefront/recommendationsReturns their picks from your catalogueA shelf of products, each with a reasonHow every call works
Base URLhttps://api.humotron.com/api/v1Your keyCalls are made from your server with your secret key, sent as Authorization: Bearer hsk_...Your idYour partner id sits in the path, as /partners/{id}/...The shopperCalls made for a shopper also carry X-Humotron-Session, which you get when you start that shopperEvery response uses the same envelope.
A success
{
"status": "success",
"message": "Shopper session created",
"data": { }
}A failure
{
"status": "fail",
"message": "The shopper's session has ended or is unknown",
"error": "The shopper's session has ended or is unknown",
"code": "SESSION_INVALID"
}Branch on the HTTP status and code. The message text may change, and some errors carry no code.
The sample responses below show what is inside data, with the real field names and made-up values.
Send us your catalogue
We can only recommend products we have read. You send them in one shared format, and we score each one on how much label detail it carries.
1.1Send your productsDay one
/partners/{id}/catalog/productsSends products. With sync_type "full" it takes your whole catalogue in one request, up to 5,000 products.Day oneTypical request
{
"schema_version": "1",
"sync_type": "full",
"currency": "INR",
"products": [
{
"external_product_id": "MAG-400-60",
"title": "Magnesium Glycinate 400mg",
"status": "active",
"url": "https://www.example-store.com/products/magnesium-glycinate-400",
"vendor": "Example Labs",
"product_type": "Supplement",
"tags": ["sleep", "magnesium"],
"description": "<p>400mg elemental magnesium per serving (2 capsules). Consult your doctor if pregnant.</p>",
"images": [{ "url": "https://cdn.example-store.com/mag-400.jpg", "alt": "Magnesium Glycinate" }],
"variants": [
{ "external_variant_id": "MAG-400-60-V1", "price": "899", "in_stock": true, "options": { "Size": "60 Capsules" } }
],
"attributes": [{ "key": "ingredients", "type": "text", "value": "Magnesium bisglycinate" }],
"source_updated_at": "2026-11-20T12:00:00Z"
}
]
}Typical response
{
"sync_id": "sync_9f3c2a71",
"sync_type": "full",
"status": "completed",
"counts": {
"received": 1240,
"created": 1236,
"updated": 0,
"unchanged": 0,
"out_of_order": 0,
"rejected": 4,
"removed": 0
},
"errors": [
{
"external_product_id": "WHEY-2KG",
"title": "Whey Protein 2kg",
"errors": [{ "field": "url", "message": "is required for an active product" }]
}
],
"errors_truncated": false,
"warnings": []
}The call answers 200 even when some products are rejected. errors names each rejected product and the field to fix, so you can show a short "4 products need attention" list to your catalogue team.
Each product you send replaces the whole stored product. Always send the complete product. Anything you leave out, such as the description, tags or images, is erased.
A full sync also removes products you leave out. If it would remove more than half of your catalogue, and at least 10 products, it is refused with MASS_REMOVAL_BLOCKED. Send it again with ?confirm_removal=true if that is right.
Each product needs an id, a title, a status, a price and a stock signal. An active product also needs an https url.
1.2Send a very large catalogueLater
Above 5,000 products, send batches of up to 250 inside a sync session.
/partners/{id}/catalog/sync-sessionsOpens a session and returns a sync_id/partners/{id}/catalog/productsSends each batch with that sync_id/partners/{id}/catalog/sync-sessions/{sync_id}Shows progress and counts so far/partners/{id}/catalog/sync-sessions/{sync_id}/completeCloses the session and removes products you no longer sell/partners/{id}/catalog/sync-sessions/{sync_id}/abortCancels the session. Nothing is removed.1.3Keep the catalogue in stepLater
/partners/{id}/catalog/productsSends only the products that changed, without sync_type, up to 250 at a time. Use it for price and stock updates./partners/{id}/catalog/products/{external_product_id}Removes one productSend the complete product even when only the price or stock changed. Anything you leave out is erased. Products you do not send are left as they are.
1.4Add label detail we could not findLater
/partners/{id}/catalog/products/{external_product_id}/merchantAdds ingredients, dose, form, use and cautions for a product, or excludes it from recommendationsTypical request
{
"detail": {
"ingredients": "Magnesium bisglycinate",
"dose": "400mg per 2 capsules",
"form": "Capsule",
"use": "Sleep and muscle recovery",
"cautions": "Consult a doctor if pregnant"
},
"excluded": false
}detail is replaced as a whole. Send all five parts each time, or the ones you leave out are cleared.
See what is ready
These calls tell you which of your products can be recommended and which need more detail. They are the data behind a simple catalogue health screen for your team.
2.1Check the catalogue at a glanceDay one
/partners/{id}/catalog/summaryCounts of products in each readiness bandDay oneTypical response
{
"total": 1236,
"supplements": 940,
"ready": 702,
"green": 511,
"amber": 191,
"red": 226,
"excluded": 12,
"not_applicable": 296,
"unscored": 0,
"recommendable": 688,
"last_synced_at": "2026-11-26T08:14:02.000Z"
}greenFull label detail. Ready.amberEnough detail to recommend. Ready.redMissing something critical such as ingredients or dose. Fix with call 1.4.excludedYou chose to keep it outnot_applicableNot a supplement, so not recommended today2.2Look at individual productsLater
/partners/{id}/catalog/productsLists products, weakest first. filter is all, ready, needs_ingredients, held_back or not_supplements./partners/{id}/catalog/products/{external_product_id}One product with its readiness score and what is missing2.3See what each product matched toLater
/partners/{id}/catalog/matchesFor each product, whether it is matched to our recommendation rulesTypical response
[
{
"external_product_id": "MAG-400-60",
"state": "matched",
"matches": [
{ "humotron_product_id": "PM-0412", "name": "Magnesium glycinate 400mg", "match_score": 91 }
],
"rule_count": 14
},
{
"external_product_id": "ASH-600-90",
"state": "in_review",
"matches": [],
"rule_count": 0
}
]state is matched, in_review, no_match, queued or not_ready. rule_count is the number of shopper patterns that can now lead to this product.
Start a shopper and connect their wearable
A shopper is anonymous to us. You start a session, they sign in to their device, and we read their recent data. One shopper connects one device per session.
3.1Start the shopperDay one
/partners/{id}/storefront/sessionsCreates the shopper and returns their session tokenDay oneTypical response
{
"anon_session": "F1hGjTWY-yxfTKDB2hUpcpdtMI7K74YiW13RBImtLi8",
"expires_at": "2026-11-26T10:45:00.000Z"
}Keep anon_session on your server and send it as X-Humotron-Session on every later call for this shopper.
The session lasts 30 minutes until a device connects. Starting a connection renews it.
3.2Ask a few profile questionsDay one
gender and age_range are needed before picks can be made. Without both, recommendations answer with no picks and PROFILE_INCOMPLETE. Goals and the rest sharpen the picks.
/partners/{id}/storefront/profile-optionsThe choices to offer/partners/{id}/storefront/sessions/meSaves the shopper's answersDay oneTypical request to sessions/me
{
"gender": "Female",
"age_range": "36-55",
"height": "168 cm",
"weight": "64 kg",
"health_goals": ["Improve sleep"]
}Typical response from profile-options
{
"genders": ["Female", "Male", "Other"],
"age_ranges": ["18-35", "36-55", "55+"],
"health_goals": ["Build muscle", "Improve sleep", "Manage stress", "More energy"]
}Use the values from profile-options, and build the goal picker from its list. A goal we do not know matches nothing.
3.3Connect the deviceDay one
/partners/{id}/storefront/connectionsReturns the sign-in link for the chosen deviceDay one/partners/{id}/storefront/connections/flows/{flowId}Tells you whether the sign-in has finished. Poll it every couple of seconds while the sign-in is open.Day one/partners/{id}/storefront/connections/{provider}/confirmRecords the connection and starts reading the shopper's dataDay oneTypical request to connections
{
"provider": "oura",
"return_url": "https://www.example-store.com/products/magnesium-glycinate-400",
"mode": "popup"
}Typical response from connections
{
"provider": "oura",
"provider_type": "openwearables",
"authorizationUrl": "https://cloud.ouraring.com/oauth/authorize?...",
"flow_id": "k3Jd9sL2mQp7xVb1TnR4yWc8",
"expires_at": "2026-11-26T10:45:00.000Z"
}Typical response from flows/{flowId}
{ "status": "connected", "provider": "oura", "reason": null }Typical response from confirm
{
"connected": true,
"provider": "oura",
"session_ends_at": "2026-11-26T11:20:00.000Z",
"sync": {
"days": 180,
"queued": [{ "provider": "oura", "provider_type": "openwearables" }],
"skipped": []
}
}Open authorizationUrl in a popup, or send the whole page there with mode "redirect". In redirect mode the shopper lands back on return_url with ?humotron=connected&humotron_provider=oura, or ?humotron=failed&humotron_reason=... The return_url must be https and on one of the sites on your account.
Provider names you can send are oura, whoop, fitbit, google_health, polar, strava, suunto, withings, ultrahuman and apple_health. fitbit is returned as google_health. We confirm which are switched on for your account.
In popup mode, always poll the flow. Some providers block the message the popup sends back to your page. A 400 from confirm can mean the provider has not caught up yet, so try again after a couple of seconds.
A flow status is pending, connected, failed or expired. session_ends_at is one hour after the device connects, so you can show the shopper how long their picks stay available.
3.4Wait for their dataDay one
/partners/{id}/storefront/sync/statusTells you when the shopper's data has arrivedDay oneTypical response
{
"isSyncing": false,
"devices": [
{
"provider": "oura",
"providerName": "Oura",
"provider_type": "openwearables",
"historicalSync": true,
"isSyncing": false
}
]
}Poll every few seconds and show a "reading your data" state. Ask for picks once isSyncing is false and historicalSync is true for the device. isSyncing alone is not enough: it can be false before the read has begun, and is always false for Fitbit.
Data can still take a moment after that. If picks answer NO_DEVICE_DATA or INSUFFICIENT_DATA, wait a few seconds and ask again, up to a limit you choose.
Show the shopper their picks
One call returns ranked products from your catalogue, with everything needed to draw a product card and explain why it was chosen.
4.1Get the picksDay one
/partners/{id}/storefront/recommendationsReturns up to 12 picks for this shopper. The default is 4.Day oneTypical request
{
"limit": 4,
"candidates": [
{ "external_product_id": "MAG-400-60" },
{ "external_product_id": "ASH-600-90" }
]
}Typical response
{
"connected": true,
"provider": "Oura",
"window_days": 90,
"picks": [
{
"external_product_id": "MAG-400-60",
"variant_id": "MAG-400-60-V1",
"title": "Magnesium Glycinate 400mg",
"subtitle": "Capsules · 60",
"handle": "magnesium-glycinate-400",
"url": "https://www.example-store.com/products/magnesium-glycinate-400",
"image": "https://cdn.example-store.com/mag-400.jpg",
"price": "899",
"compare_at_price": "1099",
"currency": "INR",
"match": "strong",
"match_score": 88,
"metric": {
"label": "Deep sleep",
"value": "48",
"unit": "min",
"direction": "down",
"tone": "bad",
"baseline": "62 min"
},
"reason": "Your deep sleep has averaged 48 min this week, below your usual 62 min.",
"why": {
"this": "Magnesium glycinate is a well-absorbed form often taken in the evening.",
"you": "Your deep sleep has averaged 48 min this week, below your usual 62 min.",
"now": "The dip has held for several nights in a row."
}
}
]
}candidates is optional. Send it to limit picks to a set you choose, such as one category page or the products in a campaign. Leave it out and any approved product can be picked. An empty list allows none.
What each part is for on your page
title, subtitle, image, price, compare_at_price, currency, urlThe product card, drawn in your own componentsvariant_idThe exact item to add to the cartmatch, match_scoreA "Strong match" or "Good match" badge. Strong is a score of 85 or more.metricA small reading box with this week's value against the shopper's own baselinereasonOne line under the card that says why this product was pickedwhy.this, why.you, why.nowA longer "why this, why you, why now" panel when the shopper asks for moreprovider, window_daysA line such as "From your last 90 days of Oura data"4.2When there is nothing to showLater
The call still answers 200. picks is empty and issue says why, so you can show the right message.
Typical empty response
{
"connected": true,
"provider": null,
"window_days": 90,
"picks": [],
"issue": {
"code": "NO_MERCHANT_PRODUCTS",
"message": "No product in this store matches the shopper's pattern yet."
}
}What to show for each issue code
PROFILE_INCOMPLETE, PROFILE_MISSINGGender or age range is missing. Ask for both.NO_DEVICE_CONNECTEDNo device on this session. Show the connect step again.NO_DEVICE_DATA, INSUFFICIENT_DATAThere are not enough recent readings yet. Say you need a little more data.DEVICE_SOURCE_UNAVAILABLEWe could not reach the device data. Ask them to try again in a few minutes.UNSUPPORTED_DEVICE, METRICS_NOT_TRACKEDSay you cannot read this device's data yet.NO_RECOMMENDATION_MATCHTheir readings do not call for anything. Say nothing stands out right now.NO_RECOMMENDATION_CONTENTA pattern matched but has nothing to show yet. Use the same message.NO_MERCHANT_PRODUCTSA pattern matched, but no approved product of yours fits. Show your usual bestsellers.Shopper privacy
A shopper's session ends one hour after their device connects and is never extended. After that we disconnect the device and delete the shopper on our side. They can also delete everything at once.
5.1Show and delete what we holdLater
/partners/{id}/storefront/sessions/meShows what we hold for this shopper and when their session ends/partners/{id}/storefront/sessions/meDeletes the shopper's data now and disconnects their deviceTypical response from GET sessions/me
{
"anon_id": "anon-3496",
"profile": {
"gender": "Female",
"age_range": "36-55",
"height": "168 cm",
"weight": "64 kg",
"health_goals": ["Improve sleep"]
},
"connected_providers": ["oura"],
"connected_at": "2026-11-26T10:20:00.000Z",
"expires_at": "2026-11-26T11:20:00.000Z"
}Typical response from DELETE sessions/me
{ "deleted": true }This is the data behind a "what Humotron holds about you" panel with a delete button.
After the session ends or is deleted, every shopper call answers 410 SESSION_INVALID. Start a new session if the shopper comes back.
Errors
These are the ones worth handling first. Swagger lists every error for each call.
no codeYour secret key is missing or wrongCheck the Authorization headerno codeThe partner id in the path is not yours, or your account is suspended or not approvedCheck the id, or talk to usPARTNER_NOT_ACTIVEYour account is disconnectedTalk to us to reconnect itSESSION_INVALIDThe shopper's session has ended or is unknownStart a new sessionRETURN_URL_NOT_ALLOWEDreturn_url is not on a site on your accountTalk to us to add the siteALREADY_CONNECTEDThis shopper already has a device connectedGo straight to picksFLOW_NOT_FOUNDThe connection attempt is not this shopper'sStart the connection againPRODUCT_NOT_FOUNDWe do not hold that productCheck the external_product_idSYNC_ALREADY_OPENA sync session is already openFinish or abort the open sessionEMPTY_SYNCThe sync held no valid productFix the rejected products and send it againMASS_REMOVAL_BLOCKEDThe sync would remove more than half of your catalogueSend it again with confirm_removal=true if that is rightFULL_SYNC_TOO_LARGEMore than 5,000 products in one full syncUse a sync sessionCATALOG_RATE_LIMITEDToo many catalogue writesWait the seconds in Retry-AfterLimits
Apps and SDK
The API on this page is what everything else is built on. Use it directly, or use an app that calls it for you.
Data and privacy
What your security reviewer will ask, answered plainly.
A data processing agreement and an architecture note are available on request. Talk to us.