PostImportFetchEstimateResponse
`POST /api/portfolio/post-import-fetch` — M1-1 Phase 1 quota gate. Plan: docs/board/audit/2026-05-28_CHAOS_m1_post_import_quota_gate_scoping.md OWNER ratifications baked in: see services/post_import_fetch.py module docstring. Phase 1 returns ONLY the estimate + the gate decision — no AI call, no credit decrement, no SSE stream (that's Phase 2). The FE renders a confirm dialog from this response and POSTs the same payload to the Phase 2 commit route once shipped. Required fields (typed-client wire contract — FE deref's without null-check): - estimated_credits_low: charge-after-success lower bound. - estimated_credits_high: low + 50% retry headroom (Q5). - tickers_validated: server-side cleaned/deduped/capped list. - idempotency_key: echoed back so Phase 2 can collapse retries. Optional fields cover the rejection branches — only ONE of `trial_locked` / `insufficient` / `monthly_cap_exceeded` / `too_many_tickers` is set per call. The FE branches on whichever is truthy and renders the matching upsell / error copy.
Properties
| Name | Type | Description |
|---|---|---|
| estimated_credits_low | integer | Lower-bound credit charge (1 credit per validated ticker on success). FE renders this as 'will cost N credits'. |
| estimated_credits_high | integer | Upper-bound credit charge — low + 50% retry headroom (per OWNER Q5 ratification 2026-05-28). FE renders this as 'up to N if retries needed'. |
| tickers_validated | array | Server-validated, deduped, and capped ticker list. May be empty on rejection branches. |
| idempotency_key | string | Echo of the client-supplied UUID, threaded through to Phase 2 for collapse-on-retry. |
| trial_locked | object | True on the plus_trial + AI-action branch (402). Per OWNER Q3 ratification 2026-05-28: trials may not consume AI features. |
| insufficient | object | True when credit_balance < estimated_credits_low (402). Inline upsell branch. |
| monthly_cap_exceeded | object | True when MTD post-import spend + low > 80% of TIER_BUNDLED_CREDITS (402). Per OWNER Q8 ratification 2026-05-28. |
| too_many_tickers | object | True when deduped ticker count > POST_IMPORT_MAX_TICKERS_PER_CALL (422). Per OWNER Q1 ratification 2026-05-28: global 25-ticker cap. |
| balance | object | Current credit balance — surfaced on the insufficient + OK branches. |
| needed | object | Credits needed to clear the lower bound — surfaced on the insufficient branch. |
| monthly_cap | object | The 80% hard cap on MTD post-import AI spend — surfaced on the monthly_cap_exceeded branch. |
| monthly_spend_to_date | object | MTD post-import-AI credit spend — surfaced on the monthly_cap_exceeded branch. |
| max_tickers_per_call | object | The per-call ticker cap — surfaced on the too_many_tickers branch (gives FE the exact value for the error copy). |
| submitted_count | object | Number of unique tickers the client submitted — surfaced on the too_many_tickers branch. |
| upgrade_url | object | Plan upsell URL — surfaced on the trial_locked / insufficient / monthly_cap_exceeded branches. |
| message | object | Human-readable copy for the active branch. Placeholder pending VOICE+DESIGN co-pass before user-visible launch. |
| decision | object | Machine-readable decision code ('ok', 'trial_locked', 'insufficient_credits', 'monthly_cap_exceeded', 'too_many_tickers', 'bad_request'). Mirrors HTTP status. |
| action | object | Echoed action type ('news' or 'research') on the OK branch. |
| model | object | AI model identifier the Phase 2 fetch will use — surfaced on the OK branch so the FE can show a 'powered by' chip if desired. |
| max_tokens | object | Per-ticker output-token cap the Phase 2 fetch will apply — surfaced on the OK branch. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/oxfordledge-com/json-schema/oxfordledge-com-post-import-fetch-estimate-response-schema.json",
"title": "PostImportFetchEstimateResponse",
"description": "`POST /api/portfolio/post-import-fetch` — M1-1 Phase 1 quota gate.\n\nPlan: docs/board/audit/2026-05-28_CHAOS_m1_post_import_quota_gate_scoping.md\nOWNER ratifications baked in: see services/post_import_fetch.py\nmodule docstring.\n\nPhase 1 returns ONLY the estimate + the gate decision — no AI call,\nno credit decrement, no SSE stream (that's Phase 2). The FE renders\na confirm dialog from this response and POSTs the same payload to\nthe Phase 2 commit route once shipped.\n\nRequired fields (typed-client wire contract — FE deref's without\nnull-check):\n - estimated_credits_low: charge-after-success lower bound.\n - estimated_credits_high: low + 50% retry headroom (Q5).\n - tickers_validated: server-side cleaned/deduped/capped list.\n - idempotency_key: echoed back so Phase 2 can collapse retries.\n\nOptional fields cover the rejection branches — only ONE of\n`trial_locked` / `insufficient` / `monthly_cap_exceeded` /\n`too_many_tickers` is set per call. The FE branches on whichever\nis truthy and renders the matching upsell / error copy.",
"x-generated": "2026-11-20",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/_original/oxfordledge-com-api-openapi.yml#/components/schemas/PostImportFetchEstimateResponse",
"properties": {
"estimated_credits_low": {
"type": "integer",
"title": "Estimated Credits Low",
"description": "Lower-bound credit charge (1 credit per validated ticker on success). FE renders this as 'will cost N credits'."
},
"estimated_credits_high": {
"type": "integer",
"title": "Estimated Credits High",
"description": "Upper-bound credit charge — low + 50% retry headroom (per OWNER Q5 ratification 2026-05-28). FE renders this as 'up to N if retries needed'."
},
"tickers_validated": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tickers Validated",
"description": "Server-validated, deduped, and capped ticker list. May be empty on rejection branches."
},
"idempotency_key": {
"type": "string",
"title": "Idempotency Key",
"description": "Echo of the client-supplied UUID, threaded through to Phase 2 for collapse-on-retry."
},
"trial_locked": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Trial Locked",
"description": "True on the plus_trial + AI-action branch (402). Per OWNER Q3 ratification 2026-05-28: trials may not consume AI features."
},
"insufficient": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Insufficient",
"description": "True when credit_balance < estimated_credits_low (402). Inline upsell branch."
},
"monthly_cap_exceeded": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Monthly Cap Exceeded",
"description": "True when MTD post-import spend + low > 80% of TIER_BUNDLED_CREDITS (402). Per OWNER Q8 ratification 2026-05-28."
},
"too_many_tickers": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Too Many Tickers",
"description": "True when deduped ticker count > POST_IMPORT_MAX_TICKERS_PER_CALL (422). Per OWNER Q1 ratification 2026-05-28: global 25-ticker cap."
},
"balance": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Balance",
"description": "Current credit balance — surfaced on the insufficient + OK branches."
},
"needed": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Needed",
"description": "Credits needed to clear the lower bound — surfaced on the insufficient branch."
},
"monthly_cap": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Monthly Cap",
"description": "The 80% hard cap on MTD post-import AI spend — surfaced on the monthly_cap_exceeded branch."
},
"monthly_spend_to_date": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Monthly Spend To Date",
"description": "MTD post-import-AI credit spend — surfaced on the monthly_cap_exceeded branch."
},
"max_tickers_per_call": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Max Tickers Per Call",
"description": "The per-call ticker cap — surfaced on the too_many_tickers branch (gives FE the exact value for the error copy)."
},
"submitted_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Submitted Count",
"description": "Number of unique tickers the client submitted — surfaced on the too_many_tickers branch."
},
"upgrade_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Upgrade Url",
"description": "Plan upsell URL — surfaced on the trial_locked / insufficient / monthly_cap_exceeded branches."
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Message",
"description": "Human-readable copy for the active branch. Placeholder pending VOICE+DESIGN co-pass before user-visible launch."
},
"decision": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Decision",
"description": "Machine-readable decision code ('ok', 'trial_locked', 'insufficient_credits', 'monthly_cap_exceeded', 'too_many_tickers', 'bad_request'). Mirrors HTTP status."
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Action",
"description": "Echoed action type ('news' or 'research') on the OK branch."
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Model",
"description": "AI model identifier the Phase 2 fetch will use — surfaced on the OK branch so the FE can show a 'powered by' chip if desired."
},
"max_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Max Tokens",
"description": "Per-ticker output-token cap the Phase 2 fetch will apply — surfaced on the OK branch."
}
},
"additionalProperties": true,
"type": "object",
"required": [
"estimated_credits_low",
"estimated_credits_high",
"tickers_validated",
"idempotency_key"
]
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/oxfordledge-com-post-import-fetch-estimate-response"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.