Skip to main content

Suggest Product Density

POST 

/api/manufacturing/products/:product/density/suggest

Ask the account's configured AI model for a density suggestion based on the product's name, SKU, brand, default supplier and purchase unit. Nothing is stored: the caller confirms the value through Update Product Density with source=ai_lookup (and may pass the suggestion back in suggestion so it is kept on the activity log). Suggestions are cached per account for 30 days on the product name + supplier, so repeating the call for the same ingredient returns the cached answer (cached: true) without spending quota. Uncached calls count against the per-user hourly AI quota configured for the account. Auth: requires Bearer token. Path param: product = product id.

Required scope: manufacturing:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Response fields: density_g_per_ml (suggested value at 20 °C, between 0.01 and 30), density_lb_per_gal and specific_gravity (the same value converted), confidence (high | medium | low — low means the model could not identify the substance or it has no meaningful density), basis (one line naming the assumed substance, grade, concentration and temperature), notes (caveats, or null), alternatives (up to 3 other grades or types, each with label and density_g_per_ml), cached, model.

Errors: 503 when AI look-up is off for the account or the active provider has no API key (ai_lookup_available=false on Get Product Density); 429 when the caller has used this hour's quota or the provider is rate-limiting — carries retry_after_seconds in the body and a Retry-After header; 502 when the provider request failed, authentication with the provider failed, or the answer did not pass validation (value out of range, unknown confidence, more than 3 alternatives); 504 when the provider timed out.

Request

Responses

OK

Response Headers
    Content-Type