Developers · API

The whole API, open to read.

Every call you make from your server is here, grouped by the job it does, with a typical response for each. Create a login when you want keys.

Open SwaggerCreate a login
REST and JSON//Called from your server//No card to sign up

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.

1
Read the nine calls under Day one.

They cover a full shopper journey. Everything else on this page can wait.

2
Create a login.

Sign in at the developer portal with a work email or Google, and tell us about your store.

3
Collect your keys.

We review each new account. Once it is approved you create your keys in the portal.

4
Send your catalogue.

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.

StepCallWhat it doesWhat the shopper sees
1PUT/partners/{id}/catalog/productsSends us your productsNothing. This runs before launch.
2GET/partners/{id}/catalog/summaryTells you how many products are readyNothing. This is your own check.
3POST/partners/{id}/storefront/sessionsStarts an anonymous shopperThey tap your "connect your wearable" entry point
4PATCH/partners/{id}/storefront/sessions/meSaves gender and age_range. Picks are always empty without both.Two short profile questions
5POST/partners/{id}/storefront/connectionsReturns the sign-in link for their deviceTheir wearable sign-in opens
6GET/partners/{id}/storefront/connections/flows/{flowId}Tells you when the sign-in has finished. Poll until connected.They finish signing in
7POST/partners/{id}/storefront/connections/{provider}/confirmRecords the connection and starts reading their data"Connected"
8GET/partners/{id}/storefront/sync/statusTells you when their data has arrivedA short "reading your data" wait
9POST/partners/{id}/storefront/recommendationsReturns their picks from your catalogueA shelf of products, each with a reason

How every call works

Base URLhttps://api.humotron.com/api/v1
Your 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 shopper

Every 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.

1

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

PUT/partners/{id}/catalog/productsSends products. With sync_type "full" it takes your whole catalogue in one request, up to 5,000 products.Day one
Typical 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.

POST/partners/{id}/catalog/sync-sessionsOpens a session and returns a sync_id
PUT/partners/{id}/catalog/productsSends each batch with that sync_id
GET/partners/{id}/catalog/sync-sessions/{sync_id}Shows progress and counts so far
POST/partners/{id}/catalog/sync-sessions/{sync_id}/completeCloses the session and removes products you no longer sell
POST/partners/{id}/catalog/sync-sessions/{sync_id}/abortCancels the session. Nothing is removed.

1.3Keep the catalogue in stepLater

PUT/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.
DELETE/partners/{id}/catalog/products/{external_product_id}Removes one product

Send 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

PATCH/partners/{id}/catalog/products/{external_product_id}/merchantAdds ingredients, dose, form, use and cautions for a product, or excludes it from recommendations
Typical 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.

2

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

GET/partners/{id}/catalog/summaryCounts of products in each readiness bandDay one
Typical 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 out
not_applicableNot a supplement, so not recommended today

2.2Look at individual productsLater

GET/partners/{id}/catalog/productsLists products, weakest first. filter is all, ready, needs_ingredients, held_back or not_supplements.
GET/partners/{id}/catalog/products/{external_product_id}One product with its readiness score and what is missing

2.3See what each product matched toLater

GET/partners/{id}/catalog/matchesFor each product, whether it is matched to our recommendation rules
Typical 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.

3

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

POST/partners/{id}/storefront/sessionsCreates the shopper and returns their session tokenDay one
Typical 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.

GET/partners/{id}/storefront/profile-optionsThe choices to offer
PATCH/partners/{id}/storefront/sessions/meSaves the shopper's answersDay one
Typical 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

POST/partners/{id}/storefront/connectionsReturns the sign-in link for the chosen deviceDay one
GET/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
POST/partners/{id}/storefront/connections/{provider}/confirmRecords the connection and starts reading the shopper's dataDay one
Typical 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

GET/partners/{id}/storefront/sync/statusTells you when the shopper's data has arrivedDay one
Typical 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.

4

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

POST/partners/{id}/storefront/recommendationsReturns up to 12 picks for this shopper. The default is 4.Day one
Typical 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 components
variant_idThe exact item to add to the cart
match, 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 baseline
reasonOne line under the card that says why this product was picked
why.this, why.you, why.nowA longer "why this, why you, why now" panel when the shopper asks for more
provider, 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.
5

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

GET/partners/{id}/storefront/sessions/meShows what we hold for this shopper and when their session ends
DELETE/partners/{id}/storefront/sessions/meDeletes the shopper's data now and disconnects their device
Typical 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.

401no codeYour secret key is missing or wrongCheck the Authorization header
403no codeThe partner id in the path is not yours, or your account is suspended or not approvedCheck the id, or talk to us
409PARTNER_NOT_ACTIVEYour account is disconnectedTalk to us to reconnect it
410SESSION_INVALIDThe shopper's session has ended or is unknownStart a new session
400RETURN_URL_NOT_ALLOWEDreturn_url is not on a site on your accountTalk to us to add the site
409ALREADY_CONNECTEDThis shopper already has a device connectedGo straight to picks
404FLOW_NOT_FOUNDThe connection attempt is not this shopper'sStart the connection again
404PRODUCT_NOT_FOUNDWe do not hold that productCheck the external_product_id
409SYNC_ALREADY_OPENA sync session is already openFinish or abort the open session
409EMPTY_SYNCThe sync held no valid productFix the rejected products and send it again
409MASS_REMOVAL_BLOCKEDThe sync would remove more than half of your catalogueSend it again with confirm_removal=true if that is right
413FULL_SYNC_TOO_LARGEMore than 5,000 products in one full syncUse a sync session
429CATALOG_RATE_LIMITEDToo many catalogue writesWait the seconds in Retry-After

Limits

Products in one full sync request5,000
Products in one batch request250
Catalogue writes per partner120 a minute
Variants per product100
Images per product20
Attributes per product200
Picks per recommendations call12 (default 4)
Candidates per recommendations call5,000
Time to finish a device sign-in30 minutes
Shopper session before a device connects30 minutes, renewed when a connection starts
Shopper session after a device connects60 minutes, never extended
Devices per shopper session1

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.

REST APIAvailable now. Any language that can make an HTTPS request.
Shopify appLive on the Shopify App Store. It syncs your catalogue and adds the connect bar to your store without code.
WooCommerce appPlanned. Tell us if you need it and we will let you know when it is ready.
SDKLaunching January 2027. Until then the calls are plain REST and the samples on this page are complete. See what the SDK will cover.

Data and privacy

What your security reviewer will ask, answered plainly.

Who the shopper isAnonymous to us. We never receive a name, an email or an order history.
What reaches youThe picks, and for each one the single reading and reason that explain it. Raw device data stays with us.
How long we keep itA shopper session ends one hour after the device connects. We then disconnect the device and delete the shopper.
Deleting soonerOne call deletes everything we hold for a shopper straight away.
Your keysThe secret key is shown to you once. You can replace it at any time.

A data processing agreement and an architecture note are available on request. Talk to us.

— START —

Create a login when you are ready.

Sign in with a work email or Google. We review each account before keys are issued.