One job.
A structured result.
Use a clear contract, inspect the outcome and keep control over what happens next.
Solve a basket.
Send one bounded basket. Receive a result tied to the exact input by SHA-256. The API has no billing, wallet connection, purchasing or external supplier calls.
Machine-readable schema Synthetic example
curl https://foxify.pro/api/basket/v1/basket/solve \
-H 'Content-Type: application/json' \
--data '{"problem":{"schema":"basket-problem/v1","prices_cents":[[900,800],[800,1200]],"shipping_cents":[400,700],"minimum_order_cents":[0,0],"max_suppliers":1,"budget_cents":2500}}'{
"problem": {
"schema": "basket-problem/v1",
"prices_cents": [[900, 800], [800, 1200]],
"shipping_cents": [400, 700],
"minimum_order_cents": [0, 0],
"max_suppliers": 1,
"budget_cents": 2500
}
}A successful HTTP response wraps the receipt under result. Read result.status before interpreting the assignment. An HTTP 200 alone does not mean a feasible plan exists.
{
"result": {
"status": "OPTIMAL",
"feasible": true,
"proof_complete": true,
"input_sha256": "…",
"supplier_for_item": [0, 0],
"total_cents": 2100,
"verification": { "valid": true, "errors": [] }
}
}Illustrative response shape; additional search and verification fields are returned. The omitted hash is computed from the full submitted problem.
Precisely what the input means.
One row is one indivisible item or unit. Columns are suppliers. Use one currency with two decimal places and express every amount as integer cents.
| FIELD | MEANING |
|---|---|
prices_cents | 1–16 rows, 1–6 supplier columns. Integer offers; null means unavailable. Zero is a real offer. |
shipping_cents | One cost per supplier, charged once only when that supplier is used. |
minimum_order_cents | Minimum merchandise subtotal at each used supplier, before shipping. |
max_suppliers | Maximum distinct suppliers in the completed basket. |
budget_cents | Ceiling for all selected items plus shipping. |
source | Optional caller description, up to 160 characters. Included in the input hash. |
Rows and both supplier vectors must have the same supplier count. Unknown fields, duplicate JSON keys, fractional or negative values and invalid dimensions are rejected. Request bodies are limited to 32 KiB.
The tool does not fetch stock or prices. Include relevant taxes and other item costs in your supplied figures. No currency conversion, checkout or supplier execution is performed.
Four states. Four meanings.
| STATUS | INTERPRETATION |
|---|---|
OPTIMAL | A checked feasible plan. The finite search completed and establishes the minimum cost under the supplied model. |
INFEASIBLE | The complete search found no assignment satisfying the supplied constraints. |
FEASIBLE_LIMIT | A checked feasible candidate, with the search limit reached. Optimality is unproved. |
UNKNOWN | The search limit was reached without a feasible candidate. This does not establish infeasibility. |
Search has a hard node cap and a best-effort clock target. A provider may hold the clock fixed during synchronous execution, so the clock target is not a hard runtime guarantee. Provider CPU limits apply separately. Do not retry an unchanged difficult problem indefinitely.
Errors are separate from results.
Malformed or invalid input returns 400; an oversized body returns 413; an unsupported media type returns 415. Internal failure returns 500 without a verified result. The hosted API may return 429 when a rate limit is reached or 503 when unavailable. Current request limits are approximate and apply per provider location: 30 requests per minute per client, with a shared 300-request-per-minute limit. These are request controls, not a billing ceiling. Check the structured error.code and correct invalid input before retrying.
Run the check yourself.
The checker independently recomputes the assignment cost and constraints using integer arithmetic. It also rejects a receipt bound to different input. It does not rerun the optimization search.
import { verifyBasket } from
'https://foxify.pro/basket-runtime/checker.mjs';
const check = await verifyBasket(problem, receipt);
if (!check.valid) {
throw new Error(check.errors.join(', '));
}Checker source Validation source
For a local Node.js run, download both modules into the same directory and import ./checker.mjs. Use a runtime with Web Crypto support. The source is dependency-free.
Or send {problem, receipt} to POST /api/basket/v1/basket/verify; the response wraps the check under verification. The browser workspace runs entirely on your device, while API requests send their input to the hosted service.
Authority & preflight.
FOXIFY also exposes authority previews and advisory action/payment preflights. These are separate services with their own scope and terms.
Public repository Authority Preview
Basket Repair preview has no payment path. Existing preflight prices and payment contracts do not authorize a basket charge.