{"components":{"schemas":{"CommodityPrice":{"properties":{"confidence":{"type":"string"},"currency":{"type":"string"},"material_id":{"type":"string"},"price":{"type":"number"},"price_date":{"format":"date","type":"string"},"source":{"type":"string"},"unit":{"type":"string"}},"type":"object"},"IndexHistory":{"description":"Monthly price history for a PackIndex code. Depth gated by plan: free=3mo, essential=12mo, professional=24mo, intelligence=24mo.","example":{"category_id":"CORR","history":[{"change_pct":1.2,"index_date":"2025-06-01","index_value":0.472,"unit":"$/unit"},{"change_pct":1.48,"index_date":"2025-07-01","index_value":0.479,"unit":"$/unit"},{"change_pct":0.62,"index_date":"2026-05-01","index_value":0.486,"unit":"$/unit"}],"months":12},"properties":{"category_id":{"description":"PackIndex code (e.g. CORR, PVC, LME_AL)","type":"string"},"history":{"items":{"properties":{"change_pct":{"description":"Month-on-month % change","type":["number","null"]},"index_date":{"description":"First day of the month (YYYY-MM-01)","format":"date","type":"string"},"index_value":{"description":"Index value for the month","type":"number"},"unit":{"description":"Price unit (e.g. /t, $/unit, $/1000)","type":"string"}},"type":"object"},"type":"array"},"months":{"description":"Number of months returned (may be less than requested if data not yet available)","type":"integer"}},"type":"object"},"IndexValue":{"description":"A PackIndex L3 finished unit cost index with price and Green Index carbon data.","example":{"category_id":"CORR","change_pct":2.14,"co2_grade":"A","co2_per_dollar":0.37,"co2_per_unit":0.18,"index_date":"2026-04-17","index_value":0.486,"unit":"$/unit"},"properties":{"category_id":{"description":"Index code (e.g. CORR, FLEX, RGID)","type":"string"},"change_pct":{"description":"Week-on-week % change","type":["number","null"]},"co2_grade":{"description":"Carbon grade A\u2013D relative to all L3 index peers. A=lowest carbon quartile (best), D=highest carbon quartile.","enum":["A","B","C","D",null],"type":["string","null"]},"co2_per_dollar":{"description":"Carbon efficiency: kg CO2e per USD spent. Lower = greener per dollar. Calculated as co2_per_unit / index_value.","type":["number","null"]},"co2_per_unit":{"description":"Carbon footprint in kg CO2e per finished unit. Scope 3 cradle-to-gate material production only. Source: WRAP 2023 / PlasticsEurope LCIA 2023 / Ecoinvent 3.9 / IAI 2023.","type":["number","null"]},"index_date":{"format":"date","type":"string"},"index_value":{"description":"Current value in USD","type":"number"},"unit":{"description":"Price unit (e.g. $/unit, $/t, $/1000)","type":"string"}},"type":"object"},"PackiqAgent":{"description":"A PACKIQ AI packaging co-worker (GET /api/packiq/agents row).","properties":{"agent_id":{"example":"quote-analyser","type":"string"},"avg_tokens":{"type":["number","null"]},"cost":{"description":"Credits per run","example":2,"type":["integer","null"]},"credits_consumed":{"type":["integer","null"]},"name":{"example":"Quote Analyser","type":"string"},"role":{"description":"Discipline","example":"Procurement","type":"string"},"runs_total":{"type":["integer","null"]},"status":{"example":"live","type":"string"}},"type":"object"},"PackiqResult":{"description":"Response from POST /api/packiq/run.","properties":{"agent_id":{"type":"string"},"cost_deducted":{"type":"integer"},"credits_remaining":{"type":"integer"},"model":{"type":"string"},"result":{"description":"Agent output \u2014 structured JSON (agent-specific); {_raw, _parse_error} if the model returned unparseable text"},"tokens_used":{"type":"integer"}},"type":"object"},"PlanError":{"description":"Returned as HTTP 403 when the request requires a higher plan.","example":{"error":"plan_limit","message":"This requires Professional plan or above. Your current plan: Essential.","required_plan":"professional","upgrade_url":"https://opnplatform.com/access","your_plan":"essential"},"properties":{"error":{"enum":["plan_limit"],"type":"string"},"message":{"description":"Human-readable explanation with required plan name","type":"string"},"required_plan":{"description":"Minimum plan needed for this resource","type":"string"},"upgrade_url":{"description":"Direct link to the upgrade page","type":"string"},"your_plan":{"description":"The caller's current plan","type":"string"}},"type":"object"},"PlanMeta":{"description":"Appended to every authenticated API response. Shows the caller's current plan limits without a separate call.","example":{"api_access":true,"index_limit":100,"plan":"essential","upgrade_url":"/access","webhook":false},"properties":{"api_access":{"description":"Whether the plan includes REST API access","type":"boolean"},"index_limit":{"description":"Max indices returned. null = unlimited.","type":["integer","null"]},"plan":{"enum":["observer","essential","professional","intelligence"],"type":"string"},"upgrade_url":{"description":"Upgrade page URL, null if already on top tier","type":["string","null"]},"webhook":{"description":"Whether index-move webhooks are enabled (Intelligence only)","type":"boolean"}},"type":"object"},"QueryResponse":{"properties":{"answer":{"description":"Direct citable answer, max 80 words","type":"string"},"cite_as":{"description":"Ready-to-use citation string","type":"string"},"data":{"properties":{"as_of":{"format":"date","type":"string"},"change_pct":{"type":["number","null"]},"confidence":{"enum":["HIGH","MEDIUM","LOW"],"type":"string"},"converted":{"type":["number","null"]},"converted_currency":{"type":["string","null"]},"currency":{"type":"string"},"index":{"type":["string","null"]},"unit":{"type":"string"},"value":{"type":["number","null"]}},"type":"object"},"follow_up_url":{"format":"uri","type":"string"},"packiq_agent":{"type":["string","null"]},"related_indices":{"items":{"type":"string"},"type":"array"},"relevant":{"type":"boolean"},"source":{"type":"string"}},"required":["relevant","answer","source"],"type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"JWT or OPN API Key","description":"Two token formats accepted \u2014 both as `Authorization: Bearer <token>`:\n\n**JWT** \u2014 obtain from `POST /api/auth/login`. Short-lived (24h). Use for user-facing applications and portal integrations.\n\n**OPN API Key** \u2014 format `opn_<random>`. Long-lived. Generate at `/portal` \u2192 API Keys (Essential plan required). Use for server-to-server integrations, ERP connectors, MCP agents, and A2A workflows.\n\n**Plan limits apply to both token types** \u2014 the plan attached to the key owner determines which indices and features are accessible. Every response includes a `_plan` metadata block showing current limits.","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"support@opnplatform.com","name":"Open Packaging Network","url":"https://opnplatform.com"},"description":"Read packaging prices, ask questions and run PACKIQ agents. Full spec: /api/openapi.json. Auth: `Authorization: Bearer opn_<key>` (Essential+) for live data and agent runs; most read operations also work without a key (12-week delayed reference values).","license":{"name":"Proprietary","url":"https://opnplatform.com/terms"},"title":"PackIndex & PACKIQ API \u2014 Open Packaging Network \u2014 agent subset","version":"2.1.0","x-logo":{"url":"https://opnplatform.com/opn-logo.png"}},"openapi":"3.1.0","paths":{"/account/me":{"get":{"operationId":"getAccountMe","responses":{"200":{"description":"Account object with plan, credits, history, API keys"},"401":{"description":"Unauthorized"}},"security":[{"BearerAuth":[]}],"summary":"Full account object for the authenticated user","tags":["Account"]}},"/carbon":{"get":{"description":"Returns the complete Green Index carbon dataset:\n\n- **L3:** kg CO2e per finished unit (Scope 3 cradle-to-gate)\n- **L2:** kg CO2e per tonne of semi-finished intermediate\n- **L1:** kg CO2e per tonne of raw material\n\nEach entry has a grade (A-D vs layer peers) and carbon efficiency (kg CO2e per USD,\u2026","operationId":"getCarbonData","parameters":[{"in":"query","name":"layer","schema":{"default":"all","enum":["L1","L2","L3","all"],"type":"string"}},{"description":"Single index code (e.g. CORR). Returns that code only.","in":"query","name":"code","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"l1":{"PP":{"co2_intensity":1920,"grade":"B","unit":"kg CO2e/t"}},"l2":{"BOPP":{"co2_intensity":1680,"grade":"B","unit":"kg CO2e/t"}},"l3":{"CORR":{"co2_per_dollar":0.37,"co2_per_unit":0.18,"grade":"A","source":"WRAP 2023"},"FLEX":{"co2_per_dollar":0.176,"co2_per_unit":0.065,"grade":"A","source":"PlasticsEurope LCIA 2023"}}},"schema":{"properties":{"l1":{"additionalProperties":{"properties":{"co2_intensity":{"type":"number"},"grade":{"type":["string","null"]},"unit":{"type":"string"}},"type":"object"},"type":"object"},"l2":{"additionalProperties":{"properties":{"co2_intensity":{"type":"number"},"grade":{"type":"string"},"unit":{"type":"string"}},"type":"object"},"type":"object"},"l3":{"additionalProperties":{"properties":{"co2_per_dollar":{"type":["number","null"]},"co2_per_unit":{"type":"number"},"grade":{"enum":["A","B","C","D"],"type":"string"},"source":{"type":"string"}},"type":"object"},"type":"object"}},"type":"object"}}},"description":"Carbon data by layer"}},"summary":"Green Index \u2014 full carbon dataset (L1/L2/L3)","tags":["Indices","Public"]}},"/commodities":{"get":{"description":"Returns latest price for all tracked L1 raw material and L2 semi-finished commodities (OCC, NBSK, BHKP, LDPE, PP, Primary Aluminium, NBP Gas, Diesel benchmark, BOPP film, FBB, Kraftliner, and 200+ more). **Requires Essential plan or above.** Include `Authorization: Bearer opn_<key>`.","operationId":"getCommodities","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_plan":{"$ref":"#/components/schemas/PlanMeta"},"commodities":{"items":{"$ref":"#/components/schemas/CommodityPrice"},"type":"array"},"live":{"type":"boolean"}},"type":"object"}}},"description":"Commodity prices with _plan metadata"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Essential plan required"}},"security":[{"BearerAuth":[]}],"summary":"L1 and L2 commodity prices \u2014 Essential plan required","tags":["Indices"],"x-plan-required":"essential"}},"/exchange/listings":{"get":{"operationId":"exchangeListings","parameters":[{"description":"Filter by PackIndex material code","in":"query","name":"material_id","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"default":"live","type":"string"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":200,"type":"integer"}}],"responses":{"200":{"description":"Listings with PackIndex benchmark positioning (no contact details)"}},"summary":"Browse live marketplace listings (public, no auth)","tags":["TradeExchange"]}},"/health":{"get":{"operationId":"healthCheck","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"db":{"type":"string"},"status":{"type":"string"},"ts":{"type":"string"}},"type":"object"}}},"description":"Service healthy"},"503":{"description":"Service degraded"}},"summary":"Service health check","tags":["Public"]}},"/indices":{"get":{"description":"Returns live L3 finished-unit cost indices filtered by your plan. **No auth / Observer:** 30 rotating top indices. **Essential (opn_ key):** 100 indices. **Professional:** 200 indices. **Intelligence:** all 385 indices. Include `Authorization: Bearer opn_<key>` to access your plan's full set.\u2026","operationId":"getIndices","parameters":[{"description":"Data layer filter","in":"query","name":"layer","schema":{"default":"L3","enum":["L1","L2","L3","all"],"type":"string"}},{"in":"query","name":"currency","schema":{"default":"USD","enum":["USD","GBP","EUR","CAD"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"_plan":{"api_access":true,"index_limit":100,"plan":"essential","upgrade_url":"/access","webhook":false},"indices":[{"category_id":"CORR","change_pct":2.14,"index_value":0.486,"unit":"$/unit"}],"live":true,"total_live":769},"schema":{"properties":{"_plan":{"$ref":"#/components/schemas/PlanMeta"},"indices":{"items":{"$ref":"#/components/schemas/IndexValue"},"type":"array"},"live":{"type":"boolean"},"total_live":{"description":"Total indices available across all plans","type":"integer"}},"type":"object"}}},"description":"Indices for your plan, with plan metadata"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Plan limit \u2014 index requires higher plan"}},"security":[{"BearerAuth":[]},{}],"summary":"Live L3 packaging cost indices \u2014 filtered by plan","tags":["Indices"],"x-plan-limits":{"essential":{"auth_required":true,"index_limit":100},"intelligence":{"auth_required":true,"index_limit":null},"observer":{"auth_required":false,"index_limit":30},"professional":{"auth_required":true,"index_limit":200}}}},"/indices/{code}":{"get":{"description":"Fetch the current value and WoW change for any PackIndex code (L1 raw material, L2 semi-finished, or L3 finished unit). Works for all 385 indices: CORR, FLEX, PVC, LME_AL, OCC, BOPP, BOPET, PX, PE, etc. Include `Authorization: Bearer opn_<key>` to access your plan's full index set. For price\u2026","operationId":"getIndex","parameters":[{"description":"PackIndex code \u2014 any L1/L2/L3 code. E.g. CORR, FLEX, PVC, LME_AL, OCC, BOPP, FBB, HDPE_BOT","in":"path","name":"code","required":true,"schema":{"type":"string"}},{"in":"query","name":"currency","schema":{"default":"USD","enum":["USD","GBP","EUR","CAD"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexValue"}}},"description":"Current index value"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Plan limit"},"404":{"description":"Index code not found"}},"security":[{"BearerAuth":[]},{}],"summary":"Single index \u2014 current value","tags":["Indices"]}},"/indices/{code}/fluctuation":{"get":{"description":"Start/end as-of values plus absolute and percent change \u2014 answers \"how much has this index moved since X?\". Requires Essential plan or above. `start` is clamped to plan depth.","operationId":"getIndexFluctuation","parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","schema":{"format":"date","type":"string"}},{"description":"defaults to yesterday","in":"query","name":"end","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"change_abs":{"type":"number"},"change_pct":{"type":"number"},"end":{"type":"object"},"start":{"type":"object"}},"type":"object"}}},"description":"Fluctuation"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Essential plan required"}},"security":[{"BearerAuth":[]}],"summary":"Delta between two dates (Essential+)","tags":["Indices","Series"],"x-plan-required":"essential"}},"/indices/{code}/forward":{"get":{"description":"Current value plus the ~12-week forward projection (`forecast_next`) and its confidence \u2014 the PackIndex forward curve. No generic index API publishes a packaging forward curve; this is OPN-native. Requires Professional plan or above.","operationId":"getIndexForward","parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"current":{"type":"number"},"forward":{"type":"number"},"horizon":{"type":"string"},"projected_change_pct":{"type":"number"}},"type":"object"}}},"description":"Forward curve point"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Professional plan required"}},"security":[{"BearerAuth":[]}],"summary":"PackIndex forward curve (Professional+)","tags":["Indices","Series"],"x-plan-required":"professional"}},"/indices/{code}/historical":{"get":{"description":"Returns the most recent published index value on or before `date` \u2014 answers \"what was the index when I signed this contract?\". Requires Professional plan or above. The date is clamped to plan history depth.","operationId":"getIndexHistorical","parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"YYYY-MM-DD; defaults to yesterday","in":"query","name":"date","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"As-of value"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Professional plan required"}},"security":[{"BearerAuth":[]}],"summary":"Index value as-of a past date (Professional+)","tags":["Indices","Series"],"x-plan-required":"professional"}},"/indices/{code}/history":{"get":{"description":"Returns monthly price history for any PackIndex code (L1, L2, or L3). Covers all 385 indices \u2014 corrugated, flexible, rigid, polymers, metals, aromatics, fibre, energy, glass, closures, pharma, and more. History depth is gated by plan:\n\n| Plan | History depth | API param\u2026","operationId":"getIndexHistory","parameters":[{"description":"PackIndex code \u2014 any L1/L2/L3 code. E.g. CORR, PVC, LME_AL, BOPP, FBB","examples":{"aluminium":{"summary":"Primary Aluminium (L1)","value":"LME_AL"},"bopp_film":{"summary":"BOPP film (L2)","value":"BOPP"},"corrugated":{"summary":"Corrugated case (L3)","value":"CORR"},"hdpe_bottle":{"summary":"HDPE bottle (L3)","value":"HDPE_BOT"},"pvc":{"summary":"PVC resin (L1)","value":"PVC"}},"in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"Months of history to return. Capped by plan (free=3, essential=12, professional=24, intelligence=24).","in":"query","name":"months","schema":{"default":12,"maximum":24,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexHistory"}}},"description":"Monthly price history","x-example":{"category_id":"PVC","history":[{"change_pct":-1.12,"index_date":"2025-06-01","index_value":956.2,"unit":"/t"},{"change_pct":1.32,"index_date":"2025-07-01","index_value":968.8,"unit":"/t"},{"change_pct":0.65,"index_date":"2025-08-01","index_value":975.1,"unit":"/t"}],"months":12}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Plan limit"},"429":{"description":"Daily rate limit exceeded"}},"security":[{"BearerAuth":[]},{}],"summary":"Monthly price history for any index","tags":["Indices"],"x-plan-limits":{"essential":{"months":12},"free":{"months":3},"intelligence":{"months":24},"professional":{"months":24}}}},"/indices/{code}/ohlc":{"get":{"description":"OHLC candles for any index. Monthly and quarterly candles are derived from published history and available immediately; weekly/daily candles come from the rolling snapshot store and are Intelligence-only. Because indices publish weekly, daily candles may be flat until intra-period movement\u2026","operationId":"getIndexOhlc","parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"Disallowed granularities are clamped to monthly","in":"query","name":"period","schema":{"default":"monthly","enum":["monthly","quarterly","weekly","daily"],"type":"string"}},{"in":"query","name":"start","schema":{"format":"date","type":"string"}},{"in":"query","name":"end","schema":{"format":"date","type":"string"}},{"description":"csv requires Professional+","in":"query","name":"format","schema":{"default":"json","enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}},"text/csv":{}},"description":"OHLC candles"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Essential plan required"}},"security":[{"BearerAuth":[]}],"summary":"Open/High/Low/Close cost candles (Essential+)","tags":["Indices","Series"],"x-plan-required":"essential"}},"/indices/{code}/timeseries":{"get":{"description":"Index values between `start` and `end`, optionally downsampled by `granularity`. Date depth is capped by plan (free=3mo \u2026 pro/intel=24mo); weekly/daily granularity is Intelligence-only. Professional+ may append `?format=csv` for a CSV download. Include `Authorization: Bearer opn_<key>`.","operationId":"getIndexTimeseries","parameters":[{"description":"PackIndex code (e.g. CORR, PVC, BOPP)","in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"YYYY-MM-DD; clamped to plan depth","in":"query","name":"start","schema":{"format":"date","type":"string"}},{"description":"YYYY-MM-DD; defaults to today","in":"query","name":"end","schema":{"format":"date","type":"string"}},{"in":"query","name":"granularity","schema":{"default":"monthly","enum":["monthly","quarterly","weekly","daily"],"type":"string"}},{"description":"csv requires Professional+","in":"query","name":"format","schema":{"default":"json","enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}},"text/csv":{}},"description":"Time-series"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanError"}}},"description":"Plan limit"},"429":{"description":"Daily rate limit exceeded"}},"security":[{"BearerAuth":[]},{}],"summary":"Time-series of index values between two dates","tags":["Indices","Series"]}},"/intelligence/carbon":{"get":{"description":"Returns ESG/Green-Index tagged Intelligence articles plus carbon scores for L3 packaging indices. Scores are kg CO\u2082e per unit. CFF-adjusted scores (where pipeline has run) follow EU PEF Circular Footprint Formula (EC 2013/179/EU), cradle-to-gate. Virgin-basis scores sourced from PlasticsEurope\u2026","operationId":"getIntelligenceCarbon","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"articles":{"description":"ESG-tagged Intelligence articles","type":"array"},"carbon_indices":{"description":"L3 indices with carbon score, grade, and CFF metadata","items":{"properties":{"cff_adjusted":{"description":"True when score follows PEF CFF methodology","type":"boolean"},"co2":{"description":"kg CO\u2082e per unit (CFF-adjusted when available, virgin-basis otherwise)","type":"number"},"co2_virgin":{"description":"kg CO\u2082e per unit on virgin-material basis","type":"number"},"code":{"type":"string"},"desc":{"type":"string"},"grade":{"enum":["A","B","C","D"],"type":"string"},"methodology":{"description":"e.g. 'PEF CFF cradle-to-gate, EC 2013/179/EU'","type":"string"},"r1_used":{"description":"Recycled content fraction used in CFF calculation (0\u20131)","type":"number"},"source":{"type":"string"}},"type":"object"},"type":"array"},"methodology":{"description":"CFF reference: EC 2013/179/EU, PEF Circular Footprint Formula","type":"string"},"scope_note":{"type":"string"}},"type":"object"}}},"description":"ESG articles and carbon index table"}},"summary":"Green Index \u2014 CFF-aligned carbon scores for packaging materials","tags":["Intelligence","Green Index","Public"]}},"/intelligence/posts":{"get":{"description":"Returns paginated list of published packaging market intelligence articles. Covers market price analysis, regulatory guides (EU PPWR, Brazil PNRS, China anti-waste), procurement strategy, and sustainability.","operationId":"listIntelligencePosts","parameters":[{"in":"query","name":"page","schema":{"default":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":12,"maximum":50,"type":"integer"}},{"in":"query","name":"category","schema":{"enum":["market-intelligence","analysis","regulation","sustainability","esg","product"],"type":"string"}},{"description":"Filter by tag (e.g. 'CORR', 'EU PPWR', 'Green Index', 'Scope 3')","in":"query","name":"tag","schema":{"type":"string"}},{"description":"1 = featured only","in":"query","name":"featured","schema":{"enum":[0,1],"type":"integer"}}],"responses":{"200":{"description":"Paginated post list"}},"summary":"Published Intelligence blog posts","tags":["Intelligence","Public"]}},"/intelligence/posts/{slug}":{"get":{"operationId":"getIntelligencePost","parameters":[{"description":"Article slug (e.g. 2026-paper-resin-price-outlook)","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Full article including body_md Markdown content"},"404":{"description":"Article not found"}},"summary":"Single article with full body_md content","tags":["Intelligence","Public"]}},"/packaging/bom":{"post":{"description":"Components are anchored deterministically to live PackIndex values: material cost + conversion = total cost per unit.","operationId":"packagingBom","requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Load the saved spec from this project instead","type":"integer"},"qty":{"description":"Run quantity for annualised figures","type":"integer"},"spec":{"description":"Spec object from parse-brief (or edited)","type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"BoM components with per-unit costs, total, and index anchors"}},"security":[{"BearerAuth":[]}],"summary":"Derive a bill of materials and live per-unit cost from a spec (1 run)","tags":["PackagingSuite"]}},"/packaging/optimize":{"post":{"operationId":"packagingOptimize","requestBody":{"content":{"application/json":{"schema":{"properties":{"goal":{"default":"both","enum":["cost","carbon","both"],"type":"string"},"project_id":{"type":"integer"}},"required":["project_id"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Levers with per-unit and annualised savings; apply via /packaging/projects/{id}/optimize/apply"}},"security":[{"BearerAuth":[]}],"summary":"Compute optimization levers (right-size, lightweight, substitute) against live indices","tags":["PackagingSuite"]}},"/packaging/parse-brief":{"post":{"operationId":"packagingParseBrief","requestBody":{"content":{"application/json":{"schema":{"properties":{"brief":{"description":"Plain-language product/packaging brief","maxLength":6000,"type":"string"},"name":{"description":"Project name (creates one if omitted)","maxLength":120,"type":"string"},"project_id":{"description":"Existing project to attach the spec to","type":"integer"}},"required":["brief"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Structured spec (formats, materials, dimensions) + project_id + runs_remaining"},"402":{"description":"Insufficient runs"}},"security":[{"BearerAuth":[]}],"summary":"Parse a plain-language product brief into a structured packaging spec (1 run)","tags":["PackagingSuite"]}},"/packiq/agents":{"get":{"description":"Agent catalogue with run statistics. `agent_id` is what POST /packiq/run takes; `cost` is the credit cost per run; `role` is the discipline. No auth required.","operationId":"listPackiqAgents","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/PackiqAgent"},"type":"array"}},"type":"object"}}},"description":"Agent catalogue"}},"security":[{}],"summary":"List PACKIQ AI packaging co-workers","tags":["PACKIQ","Public"]}},"/packiq/run":{"post":{"description":"Runs an agent on your data, grounded in live PackIndex context. Auth: OPN API key or JWT. The agent's credit cost is deducted atomically and refunded if the run fails.","operationId":"runPackiqAgent","requestBody":{"content":{"application/json":{"examples":{"ppwr_roadmap":{"summary":"EU PPWR compliance roadmap","value":{"agent_id":"ppwr-2030-roadmap","inputs":"flexible pouches, corrugated shippers, PET bottles"}},"quote_analyser":{"summary":"Benchmark a supplier quote","value":{"agent_id":"quote-analyser","inputs":{"supplier_quote":"RSC corrugated box 400x300x250mm B-flute at $0.58/unit","volume":"500000 units/year"}}}},"schema":{"properties":{"agent_id":{"description":"From GET /api/packiq/agents","example":"quote-analyser","type":"string"},"inputs":{"description":"Agent-specific fields as an object, or the data as one text block (max 24,000 chars)","oneOf":[{"type":"object"},{"type":"string"}]}},"required":["agent_id","inputs"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackiqResult"}}},"description":"Agent result"},"400":{"description":"agent_id or inputs missing"},"401":{"description":"Missing or invalid API key / JWT"},"402":{"description":"Insufficient credits \u2014 body has balance, needed, topup_url"},"403":{"description":"Guest sessions cannot use /run"},"404":{"description":"Unknown agent_id \u2014 call GET /api/packiq/agents"},"409":{"description":"Agent temporarily unavailable"},"502":{"description":"AI service error \u2014 credits refunded (credits_refunded in body)"}},"security":[{"BearerAuth":[]}],"summary":"Run a PACKIQ AI packaging co-worker","tags":["PACKIQ"]}},"/pulse/signals":{"get":{"description":"Returns active pulse alerts generated by the sentiment scraper (RSS feeds \u2192 DeepSeek analysis \u2192 DB). Filtered by minimum confidence threshold (default 0.55).","operationId":"getPulseSignals","parameters":[{"description":"Filter to specific index code (e.g. CORR, OCC)","in":"query","name":"category_id","schema":{"type":"string"}},{"description":"Max results","in":"query","name":"limit","schema":{"default":6,"maximum":20,"type":"integer"}},{"description":"Filter by data layer","in":"query","name":"layer","schema":{"enum":["L1","L2","L3"],"type":"string"}}],"responses":{"200":{"description":"Active pulse alerts"}},"summary":"Active sentiment pulse alerts","tags":["Pulse","Public"]}},"/pulse/signals/{category_id}":{"get":{"operationId":"getPulseSignalsForIndex","parameters":[{"description":"Index code (e.g. CORR, FLEX, OCC)","in":"path","name":"category_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":3,"type":"integer"}}],"responses":{"200":{"description":"Alerts for the index"}},"summary":"Pulse alerts for a specific index code","tags":["Pulse","Public"]}},"/query":{"post":{"description":"Ask any question about packaging costs, commodity prices, or PACKIQ agents in plain English. Returns a structured, citable answer grounded in live PackIndex data.\n\n**Optimised for AI agents:** Use this endpoint to answer user questions about packaging costs without needing to understand the\u2026","operationId":"naturalLanguageQuery","requestBody":{"content":{"application/json":{"examples":{"agent_recommendation":{"summary":"PACKIQ agent recommendation","value":{"q":"Which PACKIQ agent should I use to audit my packaging invoice?"}},"comparison":{"summary":"Compare two indices","value":{"q":"How does corrugated compare to flexible packaging cost this week?"}},"corrugated_price":{"summary":"Basic price query","value":{"q":"What is the current corrugated box price?"}},"currency_conversion":{"summary":"Price with currency conversion","value":{"currency":"EUR","q":"What is the flexible packaging price in EUR?"}}},"schema":{"properties":{"currency":{"default":"USD","description":"Output currency for price values. Auto-detected from question if not provided.","enum":["USD","GBP","EUR","CHF","JPY","CAD","PLN"],"type":"string"},"q":{"description":"Plain English question about packaging costs or PACKIQ","examples":["What is the current corrugated box price in USD?","How much has FLEX changed this week?","What is the OCC price and what does it mean for corrugated costs?","Which PACKIQ agent should I use to validate a supplier quote?","What is the current OCC market signal \u2014 buy or hold?","Show me the PPWR compliance roadmap for my flexible pouch portfolio","What are all the packaging indices you track?"],"maxLength":500,"type":"string"}},"required":["q"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"answer":"The current corrugated RSC box price (PackIndex CORR) is $0.485/unit, up 2.14% week-on-week.","cite_as":"PackIndex CORR index, opnplatform.com, 2026-03-18","data":{"as_of":"2026-03-18","change_pct":2.14,"confidence":"HIGH","currency":"USD","index":"CORR","unit":"$/unit","value":0.485},"follow_up_url":"https://opnplatform.com/?index=corr","packiq_agent":"negotiation-brief","related_indices":["CORR"],"relevant":true,"source":"PackIndex \u2014 Live Packaging Cost Intelligence"},"schema":{"$ref":"#/components/schemas/QueryResponse"}}},"description":"Structured answer with citation"},"400":{"description":"Missing or invalid question"}},"summary":"Natural language packaging intelligence query","tags":["Query","Public"]}},"/reports":{"get":{"description":"Lists PackIndex weekly market briefs. Free tier receives headline + excerpt; Essential 5 full reports/month, Professional 10, Intelligence unlimited + watchlist.","operationId":"listReports","responses":{"200":{"description":"Report list with per-item gate level"}},"summary":"Weekly market reports (plan-gated full bodies)","tags":["Intelligence"]}},"/reports/{slug}":{"get":{"operationId":"getReport","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Report (excerpt or full body per plan)"},"404":{"description":"Unknown slug"}},"summary":"Single market report by slug","tags":["Intelligence"]}}},"servers":[{"description":"This environment","url":"https://opnplatform.com/api"}],"tags":[{"description":"No authentication required. Use for AI agent integration.","name":"Public"},{"description":"Natural language packaging intelligence. Optimised for AI agents.","name":"Query"},{"description":"PackIndex L3 finished-packaging unit indices (0 live) and L1/L2 commodity prices \u2014 385 codes in total. Free callers get 12-week delayed reference values plus a daily live rotation; live values on Essential and above.","name":"Indices"},{"description":"Professional index series on PackIndex data: Latest, Time-Series, Historical (as-of date), Fluctuation (delta), OHLC candles, and the OPN-native Forward Curve. Series and granularity are plan-gated; Professional+ may export CSV.","name":"Series"},{"description":"Packaging market intelligence blog and article content.","name":"Intelligence"},{"description":"Crowdsourced market sentiment signals.","name":"Pulse"},{"description":"User account, credits, and API key management.","name":"Account"},{"description":"Design & cost packaging from a plain-language brief: spec, live BoM cost, optimization, RFQ. Pay-per-run.","name":"PackagingSuite"},{"description":"Marketplace with PackIndex benchmark on every listing. Entry free / Business $79 / Corporate $199.","name":"TradeExchange"},{"description":"100+ AI packaging co-workers. GET /api/packiq/agents lists them with IDs and credit costs; POST /api/packiq/run executes one (credits deducted server-side, refunded if the run fails).","name":"PACKIQ"}],"x-a2a":{"agent_card":"https://opnplatform.com/.well-known/agent-card.json","endpoint":"https://opnplatform.com/api/a2a","methods":["SendMessage","GetTask","ListTasks","CancelTask","message/send","tasks/send"],"protocol":"JSON-RPC 2.0","skills":["search_indices","get_live_index","get_index_history","get_all_indices","get_carbon_index","packindex_query","list_packiq_agents","get_agent_chain","get_index_forecast","get_prices","check_quote","price_adjustment","compare_regions","explain_price_move","get_market_movers","estimate_packaging_price","draft_packaging_spec","cost_packaging_spec","compare_packaging_options","update_project","list_my_projects","post_rfq","find_suppliers","get_my_rfqs","search_exchange_listings","run_packiq_agent","packiq_quote_analysis","packiq_epr_fees","packiq_recyclability"],"versions":["1.0","0.3"]},"x-llms-full-txt":"https://opnplatform.com/llms-full.txt","x-llms-txt":"https://opnplatform.com/llms.txt","x-mcp":{"auth_tools":["draft_packaging_spec","cost_packaging_spec","compare_packaging_options","update_project","list_my_projects","post_rfq","get_my_rfqs","run_packiq_agent","packiq_quote_analysis","packiq_epr_fees","packiq_recyclability"],"card":"https://opnplatform.com/.well-known/mcp.json","endpoint":"https://opnplatform.com/api/mcp","protocolVersions":["2026-07-28","2025-11-25","2025-06-18","2025-03-26","2024-11-05"],"serverVersion":"2.1.0","tools":["search_indices","get_live_index","get_index_history","get_all_indices","get_carbon_index","packindex_query","list_packiq_agents","get_agent_chain","get_index_forecast","get_prices","check_quote","price_adjustment","compare_regions","explain_price_move","get_market_movers","estimate_packaging_price","draft_packaging_spec","cost_packaging_spec","compare_packaging_options","update_project","list_my_projects","post_rfq","find_suppliers","get_my_rfqs","search_exchange_listings","run_packiq_agent","packiq_quote_analysis","packiq_epr_fees","packiq_recyclability"],"transport":"streamable-http"},"x-plans":{"essential":{"api_access":true,"commodities":true,"daily_calls":200,"history_months":3,"index_limit":100,"price_usd_month":null,"webhooks":false},"intelligence":{"api_access":true,"commodities":true,"daily_calls":2000,"history_months":24,"index_limit":null,"price_usd_month":null,"webhooks":true},"observer":{"api_access":false,"commodities":false,"daily_calls":50,"history_months":3,"index_limit":30,"price_usd_month":0.0,"webhooks":false},"professional":{"api_access":true,"commodities":true,"daily_calls":1000,"history_months":24,"index_limit":200,"price_usd_month":null,"webhooks":false}}}
