What is this application worth?
const url = 'https://stitch-collector-dev.magic-blocks.workers.dev/v1/score';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"loan_amount":250000,"property_value":357143,"credit_range":"Above 740","loan_purpose":"Refi - CO","product_grouping":"DSCR"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://stitch-collector-dev.magic-blocks.workers.dev/v1/score \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "loan_amount": 250000, "property_value": 357143, "credit_range": "Above 740", "loan_purpose": "Refi - CO", "product_grouping": "DSCR" }'For whoever holds the application’s figures at the point its sections are complete — today, most likely the application’s own backend. Same body and answer as the EV Worker’s /score, in dollars and in cents. Logs nothing: a score without a loan is a what-if; the predictions that count are the ones written against loans through /v1/conversion. Do not call it again with updated figures — the value is corrected afterwards only by Stitch’s own restatements.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”The five fields the borrower entered, as typed. Unknown labels do not fail the request: the field falls back to its reference level and a warning is returned.
object
Dollars. The only field whose absence is a 400.
Dollars, as the applicant typed it (purchase price for purchases). The round-number signal lives here, so never send a value derived from a ratio.
The pulled score, when present; the FICO model is then used.
Purchase, Refi - CO, Refi - RT; aliases accepted (cash-out refinance, rate/term).
DSCR, Conv, Bank Stmt/Non-QM, Govt/Jumbo/Other; aliases accepted (conventional, bank statement, FHA).
Accepted; not used by the shipped models.
Responses
Section titled “ Responses ”The prediction.
The same answer the EV Worker gave, in dollars and in cents. Report conversion_value as the value of the application conversion you report to Google.
object
Expected value in dollars: p_close × rev_if_close, after calibration.
What to report to the ad platform. Equal to ev.
The model file’s name and version.
object
object
Whether every recommended field was present.
Example
{ "model_used": "credit_range", "calibration": { "auto_source": "off" }}Malformed JSON or a payload missing what the endpoint needs. The body says which.
object
What was wrong, in a sentence. A 401 carries unauthorized and nothing more.
Example generated
{ "error": "example"}No key, or a key the collector does not know. Nothing was written.
object
What was wrong, in a sentence. A 401 carries unauthorized and nothing more.
Example
{ "error": "unauthorized"}Only the method shown is served.