{"openapi":"3.1.0","info":{"title":"Nteli Quoting API","version":"1.0.0","description":"Configure, price and quote with your Nteli workspace from Salesforce, NetSuite or your own systems. The rules stay in Nteli: you send answers and get priced results and lines back."},"servers":[{"url":"https://quote.nteli.io/api/v1"}],"components":{"securitySchemes":{"clientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://quote.nteli.io/api/v1/oauth/token","scopes":{"configure":"Configure","quote:submit":"Submit quotes","quote:read":"Read quotes","quote:won":"Mark quotes won","pricebook:read":"Read your prices","pricebook:propose":"Propose price changes","events:read":"Read events","orders:read":"Read order packets","orders:create":"Make and complete order packets","aftermarket":"Aftermarket add-on","insights:read":"Read revenue intelligence","insights:write":"Load deal history","dealdesk":"Deal desk reviews, decisions and ledger","rulewatch:read":"Read rule watch","rulewatch:propose":"Work rule watch hits","eco:read":"ECO sync add-on: read","eco:write":"ECO sync add-on: change","rebates":"Rebates & commissions","channel":"Channel add-on","governance:read":"Governance: read","governance:write":"Governance: change","negotiate":"Agent-to-agent quoting and negotiation"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}},"Configuration":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}},"Quote":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"revision_of":{"type":"string"},"revises":{"type":["string","null"]},"superseded_by":{"type":["string","null"]},"status":{"enum":["pending","approved","rejected","won","recalled","superseded"]},"customer":{"type":"string"},"model":{"type":"string"},"model_version":{"type":"string"},"configuration":{"type":["string","null"]},"currency":{"type":"string"},"list_total":{"type":"number"},"discount_pct":{"type":["number","null"]},"net_total":{"type":"number"},"approvals":{"type":"object"},"accept_url":{"type":["string","null"]},"confirm_with_customer":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable: <first quote>:<revision>:<n>. Upsert on it."},"n":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]},"kind":{"enum":["part","labour","custom","pass_through"]},"uom":{"type":"string"},"qty":{"type":"number"},"per_panel":{"type":["number","null"]},"once":{"type":"boolean"},"list_unit":{"type":"number"},"net_unit":{"type":"number"},"net_total":{"type":"number"}}}},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}},"Line":{"type":"object","properties":{"key":{"type":"string","description":"Stable: <first quote>:<revision>:<n>. Upsert on it."},"n":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]},"kind":{"enum":["part","labour","custom","pass_through"]},"uom":{"type":"string"},"qty":{"type":"number"},"per_panel":{"type":["number","null"]},"once":{"type":"boolean"},"list_unit":{"type":"number"},"net_unit":{"type":"number"},"net_total":{"type":"number"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"cursor":{"type":"integer"},"at":{"type":"string"},"type":{"enum":["quote.submitted","quote.revised","quote.approved","quote.rejected","quote.recalled","quote.accepted","quote.won","submittal.issued","pricebook.changed","order.packet_created","order.packet_updated"]},"via":{"type":"string"},"data":{"type":"object"}}},"OrderPacket":{"type":"object","description":"An order packet (schema nteli.order_packet 1.1, docs/order-packet.md)","properties":{"schema":{"const":"nteli.order_packet"},"schema_version":{"type":"string"},"id":{"type":"string"},"revision":{"type":"integer"},"status":{"enum":["final","needs_review"]},"source":{"type":"object","properties":{"kind":{"enum":["nteli_quote","external_quote"]},"quote":{"type":["string","null"]},"quote_number":{"type":["string","null"]},"filename":{"type":["string","null"]}}},"customer":{"type":["string","null"]},"customer_po":{"type":["string","null"]},"ship_to":{"type":["string","null"]},"bill_to":{"type":["string","null"]},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"part_number":{"type":["string","null"]},"description":{"type":["string","null"]},"qty":{"type":["number","null"]},"uom":{"type":"string"},"unit_price":{"type":["number","null"]},"extended_price":{"type":["number","null"]},"type":{"enum":["part","material","labour","custom","included","pass_through"]},"group":{"type":["string","null"]},"known_part":{"type":["boolean","null"]},"flags":{"type":"array","items":{"type":"string"}},"external_line_id":{"type":"string"},"contract_line_id":{"type":"string"},"contract_price":{"type":"number"},"list_price":{"type":"number","description":"An outside quote's own list price (e.g. WAC)"},"net_price":{"type":"number","description":"An outside quote's own net price (e.g. dead net)"}}}},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"charges":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["freight","surcharge","adjustment"]},"description":{"type":"string"},"amount":{"type":["number","null"]},"percent":{"type":"number","description":"Given as a percent of the lines (an outside quote's \"5%\")"},"as_written":{"type":"string","description":"The cell as written when it was neither an amount nor a plain percent; not counted"}}}},"totals":{"type":"object","properties":{"lines":{"type":"number"},"charges":{"type":"number"},"total":{"type":"number"},"quote_total":{"type":["number","null"]},"difference":{"type":["number","null"]},"ties":{"type":"boolean"}}},"bom":{"type":["object","null"]},"configuration":{"type":["object","null"]},"model":{"type":["object","null"]},"clarifications":{"type":"array","items":{"type":"string"}},"sow":{"type":"object","description":"An NRE program's statement of work and milestone schedule (schema 1.2); the milestones tie to the quote total to the cent"},"validation":{"type":"object","properties":{"ok":{"type":"boolean"},"errors":{"type":"integer"},"warnings":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["error","warning","info"]},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"line":{"type":"integer"}}}}}}}}}},"paths":{"/me":{"get":{"summary":"Who this connection and person are","security":[{"clientCredentials":[]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/models":{"get":{"summary":"Product lines this workspace quotes","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations":{"post":{"summary":"Start a configuration","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string"},"title":{"type":"string"},"customer":{"type":"string"},"answers":{"type":"object"},"groups":{"type":"array","items":{"type":"object"}},"stated":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"facts":{"type":"object"},"assumed":{"type":"object"},"qty":{"type":"integer"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}}},"/configurations/{cid}":{"get":{"summary":"A configuration's state","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations/{cid}/steps":{"get":{"summary":"Questions, a step at a time, with priced answers","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}},{"name":"step","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations/{cid}/answers":{"patch":{"summary":"Answer questions","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["answers"],"properties":{"answers":{"type":"object"},"path":{"type":"string"},"stated":{"type":"boolean"},"strength":{"enum":["hard","assume"]},"reason":{"type":"string"}}}}}}}},"/configurations/{cid}/devices":{"post":{"summary":"Add a device group (assemblies)","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"qty":{"type":"integer"},"answers":{"type":"object"},"name":{"type":"string"},"parent":{"type":"string"},"stated":{"type":"array","items":{"type":"string"}}}}}}}},"patch":{"summary":"Change a group's quantity","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path","qty"],"properties":{"path":{"type":"string"},"qty":{"type":"integer"}}}}}}},"delete":{"summary":"Remove a group","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations/{cid}/deal":{"put":{"summary":"Quantity, channel and project discount","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"qty":{"type":"integer"},"channel":{"type":"string"},"discount_pct":{"type":"number"}}}}}}}},"/configurations/{cid}/custom-lines":{"post":{"summary":"Add a custom line (assemblies)","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["description","sell_price"],"properties":{"description":{"type":"string"},"sell_price":{"type":"number"},"qty":{"type":"integer"},"per_panel":{"type":"boolean"},"cost":{"type":"number"},"group":{"type":"string"},"note":{"type":"string"}}}}}}},"delete":{"summary":"Remove a custom line","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}},{"name":"line","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"string"},"kind":{"enum":["assembly","flat"]},"state":{"type":"object","description":"Status, blockers, steps, BOM view and totals"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations/{cid}/proposal":{"get":{"summary":"The customer proposal (assemblies)","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/configurations/{cid}/submittal":{"post":{"summary":"Submittal sheets as signed PDF links (control panels)","security":[{"clientCredentials":["configure"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/quotes":{"post":{"summary":"Submit a configuration as a quote","security":[{"clientCredentials":["quote:submit"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"revision_of":{"type":"string"},"revises":{"type":["string","null"]},"superseded_by":{"type":["string","null"]},"status":{"enum":["pending","approved","rejected","won","recalled","superseded"]},"customer":{"type":"string"},"model":{"type":"string"},"model_version":{"type":"string"},"configuration":{"type":["string","null"]},"currency":{"type":"string"},"list_total":{"type":"number"},"discount_pct":{"type":["number","null"]},"net_total":{"type":"number"},"approvals":{"type":"object"},"accept_url":{"type":["string","null"]},"confirm_with_customer":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable: <first quote>:<revision>:<n>. Upsert on it."},"n":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]},"kind":{"enum":["part","labour","custom","pass_through"]},"uom":{"type":"string"},"qty":{"type":"number"},"per_panel":{"type":["number","null"]},"once":{"type":"boolean"},"list_unit":{"type":"number"},"net_unit":{"type":"number"},"net_total":{"type":"number"}}}},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["configuration"],"properties":{"configuration":{"type":"string"},"customer":{"type":"string"},"note":{"type":"string"},"discount_pct":{"type":"number"},"revises":{"type":"string"},"reason":{"enum":["customer_request","internal_correction"]},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"get":{"summary":"Quotes","security":[{"clientCredentials":["quote:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/quotes/{qid}":{"get":{"summary":"A quote and its line set","security":[{"clientCredentials":["quote:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"revision_of":{"type":"string"},"revises":{"type":["string","null"]},"superseded_by":{"type":["string","null"]},"status":{"enum":["pending","approved","rejected","won","recalled","superseded"]},"customer":{"type":"string"},"model":{"type":"string"},"model_version":{"type":"string"},"configuration":{"type":["string","null"]},"currency":{"type":"string"},"list_total":{"type":"number"},"discount_pct":{"type":["number","null"]},"net_total":{"type":"number"},"approvals":{"type":"object"},"accept_url":{"type":["string","null"]},"confirm_with_customer":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable: <first quote>:<revision>:<n>. Upsert on it."},"n":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]},"kind":{"enum":["part","labour","custom","pass_through"]},"uom":{"type":"string"},"qty":{"type":"number"},"per_panel":{"type":["number","null"]},"once":{"type":"boolean"},"list_unit":{"type":"number"},"net_unit":{"type":"number"},"net_total":{"type":"number"}}}},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/quotes/{qid}/won":{"post":{"summary":"The PO came in","security":[{"clientCredentials":["quote:won"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"revision_of":{"type":"string"},"revises":{"type":["string","null"]},"superseded_by":{"type":["string","null"]},"status":{"enum":["pending","approved","rejected","won","recalled","superseded"]},"customer":{"type":"string"},"model":{"type":"string"},"model_version":{"type":"string"},"configuration":{"type":["string","null"]},"currency":{"type":"string"},"list_total":{"type":"number"},"discount_pct":{"type":["number","null"]},"net_total":{"type":"number"},"approvals":{"type":"object"},"accept_url":{"type":["string","null"]},"confirm_with_customer":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable: <first quote>:<revision>:<n>. Upsert on it."},"n":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]},"kind":{"enum":["part","labour","custom","pass_through"]},"uom":{"type":"string"},"qty":{"type":"number"},"per_panel":{"type":["number","null"]},"once":{"type":"boolean"},"list_unit":{"type":"number"},"net_unit":{"type":"number"},"net_total":{"type":"number"}}}},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["po"],"properties":{"po":{"type":"string"},"note":{"type":"string"},"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"ship_to":{"type":"string"},"bill_to":{"type":"string"}}}}}}}},"/quotes/{qid}/refs":{"put":{"summary":"Record CRM/ERP ids for a quote","security":[{"clientCredentials":["quote:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_refs"],"properties":{"external_refs":{"type":"object","description":"CRM/ERP ids: {\"salesforce\": {\"quote\": \"0Q0...\", \"opportunity\": \"006...\"}}","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}}},"/price-book":{"get":{"summary":"Your own prices (never the reference list)","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/price-book/proposals":{"post":{"summary":"Propose price changes (a second person approves)","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rows"],"properties":{"rows":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"list":{"type":"number"},"cost":{"type":"number"},"description":{"type":"string"}}}},"source":{"type":"string"},"note":{"type":"string"}}}}}}}},"/events":{"get":{"summary":"Events after a cursor","security":[{"clientCredentials":["events:read"]}],"parameters":[{"name":"after","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"cursor":{"type":"integer"},"at":{"type":"string"},"type":{"enum":["quote.submitted","quote.revised","quote.approved","quote.rejected","quote.recalled","quote.accepted","quote.won","submittal.issued","pricebook.changed","order.packet_created","order.packet_updated"]},"via":{"type":"string"},"data":{"type":"object"}}}},"next":{"type":"integer"},"more":{"type":"boolean"}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/order-packets":{"get":{"summary":"Order packets (Quote-to-order add-on)","security":[{"clientCredentials":["orders:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"quote","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order_packets":{"type":"array","items":{"type":"object"}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"An outside quote as a checked order packet","security":[{"clientCredentials":["orders:create"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"An order packet (schema nteli.order_packet 1.1, docs/order-packet.md)","properties":{"schema":{"const":"nteli.order_packet"},"schema_version":{"type":"string"},"id":{"type":"string"},"revision":{"type":"integer"},"status":{"enum":["final","needs_review"]},"source":{"type":"object","properties":{"kind":{"enum":["nteli_quote","external_quote"]},"quote":{"type":["string","null"]},"quote_number":{"type":["string","null"]},"filename":{"type":["string","null"]}}},"customer":{"type":["string","null"]},"customer_po":{"type":["string","null"]},"ship_to":{"type":["string","null"]},"bill_to":{"type":["string","null"]},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"part_number":{"type":["string","null"]},"description":{"type":["string","null"]},"qty":{"type":["number","null"]},"uom":{"type":"string"},"unit_price":{"type":["number","null"]},"extended_price":{"type":["number","null"]},"type":{"enum":["part","material","labour","custom","included","pass_through"]},"group":{"type":["string","null"]},"known_part":{"type":["boolean","null"]},"flags":{"type":"array","items":{"type":"string"}},"external_line_id":{"type":"string"},"contract_line_id":{"type":"string"},"contract_price":{"type":"number"},"list_price":{"type":"number","description":"An outside quote's own list price (e.g. WAC)"},"net_price":{"type":"number","description":"An outside quote's own net price (e.g. dead net)"}}}},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"charges":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["freight","surcharge","adjustment"]},"description":{"type":"string"},"amount":{"type":["number","null"]},"percent":{"type":"number","description":"Given as a percent of the lines (an outside quote's \"5%\")"},"as_written":{"type":"string","description":"The cell as written when it was neither an amount nor a plain percent; not counted"}}}},"totals":{"type":"object","properties":{"lines":{"type":"number"},"charges":{"type":"number"},"total":{"type":"number"},"quote_total":{"type":["number","null"]},"difference":{"type":["number","null"]},"ties":{"type":"boolean"}}},"bom":{"type":["object","null"]},"configuration":{"type":["object","null"]},"model":{"type":["object","null"]},"clarifications":{"type":"array","items":{"type":"string"}},"sow":{"type":"object","description":"An NRE program's statement of work and milestone schedule (schema 1.2); the milestones tie to the quote total to the cent"},"validation":{"type":"object","properties":{"ok":{"type":"boolean"},"errors":{"type":"integer"},"warnings":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["error","warning","info"]},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"line":{"type":"integer"}}}}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"type":"object","description":"customer, customer_po, ship_to, bill_to, quote_number, currency, quote_total, external_ids, lines [{part_number, description, qty, uom, unit_price, extended_price, contract_line_id, contract_price, list_price, net_price, external_line_id}], freight, surcharge"},"file":{"type":"string","contentEncoding":"base64","description":"A CSV, XLSX or JSON quote file"},"filename":{"type":"string"},"customer":{"type":"string"},"customer_po":{"type":"string"},"ship_to":{"type":"string"},"bill_to":{"type":"string"},"quote_number":{"type":"string"},"currency":{"type":"string"},"quote_total":{"type":"number"}}}}}}}},"/order-packets/{pid}":{"get":{"summary":"One order packet: JSON, or ?format=csv|pdf as a file","security":[{"clientCredentials":["orders:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"pid","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"enum":["json","csv","pdf"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"An order packet (schema nteli.order_packet 1.1, docs/order-packet.md)","properties":{"schema":{"const":"nteli.order_packet"},"schema_version":{"type":"string"},"id":{"type":"string"},"revision":{"type":"integer"},"status":{"enum":["final","needs_review"]},"source":{"type":"object","properties":{"kind":{"enum":["nteli_quote","external_quote"]},"quote":{"type":["string","null"]},"quote_number":{"type":["string","null"]},"filename":{"type":["string","null"]}}},"customer":{"type":["string","null"]},"customer_po":{"type":["string","null"]},"ship_to":{"type":["string","null"]},"bill_to":{"type":["string","null"]},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"part_number":{"type":["string","null"]},"description":{"type":["string","null"]},"qty":{"type":["number","null"]},"uom":{"type":"string"},"unit_price":{"type":["number","null"]},"extended_price":{"type":["number","null"]},"type":{"enum":["part","material","labour","custom","included","pass_through"]},"group":{"type":["string","null"]},"known_part":{"type":["boolean","null"]},"flags":{"type":"array","items":{"type":"string"}},"external_line_id":{"type":"string"},"contract_line_id":{"type":"string"},"contract_price":{"type":"number"},"list_price":{"type":"number","description":"An outside quote's own list price (e.g. WAC)"},"net_price":{"type":"number","description":"An outside quote's own net price (e.g. dead net)"}}}},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"charges":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["freight","surcharge","adjustment"]},"description":{"type":"string"},"amount":{"type":["number","null"]},"percent":{"type":"number","description":"Given as a percent of the lines (an outside quote's \"5%\")"},"as_written":{"type":"string","description":"The cell as written when it was neither an amount nor a plain percent; not counted"}}}},"totals":{"type":"object","properties":{"lines":{"type":"number"},"charges":{"type":"number"},"total":{"type":"number"},"quote_total":{"type":["number","null"]},"difference":{"type":["number","null"]},"ties":{"type":"boolean"}}},"bom":{"type":["object","null"]},"configuration":{"type":["object","null"]},"model":{"type":["object","null"]},"clarifications":{"type":"array","items":{"type":"string"}},"sow":{"type":"object","description":"An NRE program's statement of work and milestone schedule (schema 1.2); the milestones tie to the quote total to the cent"},"validation":{"type":"object","properties":{"ok":{"type":"boolean"},"errors":{"type":"integer"},"warnings":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["error","warning","info"]},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"line":{"type":"integer"}}}}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"patch":{"summary":"Complete or correct a packet's header; checked again as a new revision","security":[{"clientCredentials":["orders:create"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"pid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"An order packet (schema nteli.order_packet 1.1, docs/order-packet.md)","properties":{"schema":{"const":"nteli.order_packet"},"schema_version":{"type":"string"},"id":{"type":"string"},"revision":{"type":"integer"},"status":{"enum":["final","needs_review"]},"source":{"type":"object","properties":{"kind":{"enum":["nteli_quote","external_quote"]},"quote":{"type":["string","null"]},"quote_number":{"type":["string","null"]},"filename":{"type":["string","null"]}}},"customer":{"type":["string","null"]},"customer_po":{"type":["string","null"]},"ship_to":{"type":["string","null"]},"bill_to":{"type":["string","null"]},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"part_number":{"type":["string","null"]},"description":{"type":["string","null"]},"qty":{"type":["number","null"]},"uom":{"type":"string"},"unit_price":{"type":["number","null"]},"extended_price":{"type":["number","null"]},"type":{"enum":["part","material","labour","custom","included","pass_through"]},"group":{"type":["string","null"]},"known_part":{"type":["boolean","null"]},"flags":{"type":"array","items":{"type":"string"}},"external_line_id":{"type":"string"},"contract_line_id":{"type":"string"},"contract_price":{"type":"number"},"list_price":{"type":"number","description":"An outside quote's own list price (e.g. WAC)"},"net_price":{"type":"number","description":"An outside quote's own net price (e.g. dead net)"}}}},"external_ids":{"type":"object","additionalProperties":{"type":"string"}},"charges":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["freight","surcharge","adjustment"]},"description":{"type":"string"},"amount":{"type":["number","null"]},"percent":{"type":"number","description":"Given as a percent of the lines (an outside quote's \"5%\")"},"as_written":{"type":"string","description":"The cell as written when it was neither an amount nor a plain percent; not counted"}}}},"totals":{"type":"object","properties":{"lines":{"type":"number"},"charges":{"type":"number"},"total":{"type":"number"},"quote_total":{"type":["number","null"]},"difference":{"type":["number","null"]},"ties":{"type":"boolean"}}},"bom":{"type":["object","null"]},"configuration":{"type":["object","null"]},"model":{"type":["object","null"]},"clarifications":{"type":"array","items":{"type":"string"}},"sow":{"type":"object","description":"An NRE program's statement of work and milestone schedule (schema 1.2); the milestones tie to the quote total to the cent"},"validation":{"type":"object","properties":{"ok":{"type":"boolean"},"errors":{"type":"integer"},"warnings":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["error","warning","info"]},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"line":{"type":"integer"}}}}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"string"},"customer_po":{"type":"string"},"ship_to":{"type":"string"},"bill_to":{"type":"string"},"quote_number":{"type":"string"},"currency":{"type":"string"},"quote_total":{"type":"number"}}}}}}}},"/aftermarket/summary":{"get":{"summary":"Installed base at a glance","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/units":{"get":{"summary":"The installed base","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"customer","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"Add or update units: a list, an order packet, or every won Nteli quote","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"units":{"type":"array","items":{"type":"object","required":["customer"],"properties":{"customer":{"type":"string"},"site":{"type":"string"},"serial":{"type":"string"},"model":{"type":"string"},"bom":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"}}}},"ship_date":{"type":"string","format":"date"},"warranty_end":{"type":"string","format":"date"},"warranty_months":{"type":"integer"},"value":{"type":"number"}}}},"order_packet":{"type":"object"},"from_quotes":{"type":"boolean"}}}}}}}},"/aftermarket/imports/{kind}":{"post":{"summary":"Import a CSV, XLSX or JSON file","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"kind","in":"path","required":true,"schema":{"enum":["units","catalog","orders","contracts"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","content_base64"],"properties":{"filename":{"type":"string"},"content_base64":{"type":"string"}}}}}}}},"/aftermarket/units/{uid}":{"get":{"summary":"A unit with its warranty and spares","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unit id (U-...) or serial"},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/units/{uid}/spares":{"get":{"summary":"Wear and critical parts, due dates and the recommended spares kit","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unit id (U-...) or serial"},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/units/{uid}/spares-quotes":{"post":{"summary":"Quote spares for a unit (the kit, or chosen lines)","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unit id (U-...) or serial"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"oneOf":[{"const":"kit"},{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"qty":{"type":"number"}}}}]},"discount_pct":{"type":"number"},"note":{"type":"string"}}}}}}}},"/aftermarket/units/{uid}/warranty":{"get":{"summary":"Warranty status and contracts","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unit id (U-...) or serial"},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/units/{uid}/contracts":{"post":{"summary":"Attach a service contract from a template","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unit id (U-...) or serial"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template"],"properties":{"template":{"type":"string"},"start":{"type":"string","format":"date"},"price":{"type":"number"}}}}}}}},"/aftermarket/orders":{"post":{"summary":"Record spares bought outside Nteli","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rows"],"properties":{"rows":{"type":"array","items":{"type":"object","properties":{"serial":{"type":"string"},"unit":{"type":"string"},"sku":{"type":"string"},"qty":{"type":"number"},"at":{"type":"string","format":"date"},"ref":{"type":"string"}}}}}}}}}}},"/aftermarket/catalog":{"get":{"summary":"The service catalog: which parts wear or are critical, intervals, kit quantities","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Add or change service catalog rows (part numbers or prefixes like FLT-*)","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rows"],"properties":{"rows":{"type":"array","items":{"type":"object"}}}}}}}}},"/aftermarket/templates":{"get":{"summary":"Service contract templates","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"Add or change a template","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","term_months","price_kind","price_value"],"properties":{"name":{"type":"string"},"coverage":{"type":"string"},"term_months":{"type":"integer"},"price_kind":{"enum":["pct","flat"]},"price_value":{"type":"number"},"is_default":{"type":"boolean"}}}}}}}},"/aftermarket/renewals":{"get":{"summary":"Warranties and contracts ending in the next 30/60/90 days","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"days","in":"query","schema":{"type":"integer"}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/renewals/drafts":{"post":{"summary":"Draft a renewal quote for each","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer"}}}}}}}},"/aftermarket/quotes":{"get":{"summary":"Spares and renewal quotes","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"unit","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"enum":["spares","renewal"]}},{"name":"status","in":"query","schema":{"enum":["draft","sent","won","lost"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/quotes/{qid}":{"get":{"summary":"One spares or renewal quote","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/quotes/{qid}/status":{"post":{"summary":"Mark it sent, won or lost","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"enum":["sent","won","lost"]},"po":{"type":"string"}}}}}}}},"/aftermarket/ledger":{"get":{"summary":"Leak Ledger lines: unquoted spares demand, lapsed warranties and contracts","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Evaluate as of this date (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/aftermarket/settings":{"get":{"summary":"Aftermarket settings","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Change settings","security":[{"clientCredentials":["aftermarket"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/addons":{"get":{"summary":"This workspace's add-ons","security":[{"clientCredentials":[]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/win-loss":{"get":{"summary":"Win rate, cycle time and discount by slice","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"source","in":"query","schema":{"type":"string"},"description":"quote, history, upload (comma list)"},{"name":"by","in":"query","schema":{"type":"string"}},{"name":"min_closed","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/waterfall":{"get":{"summary":"Margin waterfall in the stage profile's steps","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"source","in":"query","schema":{"type":"string"},"description":"quote, history, upload (comma list)"},{"name":"outcome","in":"query","schema":{"enum":["won","all"]}},{"name":"by","in":"query","schema":{"type":"string"}},{"name":"profile","in":"query","schema":{"type":"string"},"description":"manufacturing or pharma_gtn (default: the workspace's)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/profile":{"get":{"summary":"The waterfall's stage profile","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Set the stage profile (a built-in name or custom steps)","security":[{"clientCredentials":["insights:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["profile"],"properties":{"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"title":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"enum":["start","down","up","subtotal"]}}}}}}]}}}}}}}},"/insights/profitability":{"get":{"summary":"Profitability by customer x product x channel, losses first","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"source","in":"query","schema":{"type":"string"},"description":"quote, history, upload (comma list)"},{"name":"by","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/waterfall/{step}":{"get":{"summary":"The deals behind one waterfall step","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"source","in":"query","schema":{"type":"string"},"description":"quote, history, upload (comma list)"},{"name":"outcome","in":"query","schema":{"enum":["won","all"]}},{"name":"by","in":"query","schema":{"type":"string"}},{"name":"step","in":"path","required":true,"schema":{"type":"string"}},{"name":"value","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/discounts":{"get":{"summary":"Discounting out of line with peers","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"source","in":"query","schema":{"type":"string"},"description":"quote, history, upload (comma list)"},{"name":"by","in":"query","schema":{"type":"string"}},{"name":"min_deals","in":"query","schema":{"type":"integer"}},{"name":"threshold","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/insights/deals":{"get":{"summary":"Deal history loaded, by source","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"Load deal history (CSV, Excel or JSON)","security":[{"clientCredentials":["insights:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object"}},"filename":{"type":"string"},"content_base64":{"type":"string"},"mapping":{"type":"object"},"replace":{"type":"boolean"}}}}}}},"delete":{"summary":"Remove the uploaded deal history","security":[{"clientCredentials":["insights:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/ledger":{"get":{"summary":"The Leak Ledger roll-up","security":[{"clientCredentials":["insights:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","schema":{"type":"string"},"description":"2026, 2026-Q3, 2026-10, last-90d, 2026-01-01..2026-06-30 or all (default last-365d)"},{"name":"stages","in":"query","schema":{"enum":["revops","channel"]},"description":"revops: Quote, Order, Recognize, Comply; channel: Agree, Transact, Settle, Comply"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object"},"total":{"type":"number"},"gross":{"type":"number"},"overlap_eliminated":{"type":"number"},"stopped":{"type":"number"},"held_up":{"type":"number"},"stages":{"type":"array","items":{"type":"object"}},"lines":{"type":"array","items":{"type":"object","properties":{"stage":{"enum":["Quote","Order","Recognize","Comply"]},"label":{"type":"string"},"dollars":{"type":"number"},"count":{"type":"integer"},"drilldown":{"type":"object"},"basis":{"type":"string"},"key":{"type":"string"},"overlaps":{"type":["string","null"]},"module":{"enum":["configure","price_governance","deal_desk","order_packet","revenue_intel","channel","rebates","aftermarket","eco_sync"]},"counted":{"type":"boolean"},"held":{"type":"boolean"},"stopped":{"type":"boolean"}}}},"modules":{"type":"array","items":{"type":"object"}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/deal-desk/guardrails":{"get":{"summary":"Deal desk guardrails","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Change the deal desk guardrails (pricing or an owner)","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"discount_bands":{"type":"array","items":{"type":"object"}},"margin_floors":{"type":"array","items":{"type":"object"}},"discount_chain":{"enum":["authority_only","each_level"]},"chains":{"type":"object"},"large_deal_usd":{"type":"number"},"price_tolerance_pct":{"type":"number"},"cash_discount_pct":{"type":"number"},"required_fields":{"type":"array","items":{"enum":["award_type","effective_date","category","sku","cost"]}},"undercut_tolerance_pct":{"type":"number"},"terms":{"type":"object"},"preset":{"enum":["pharma_bid"],"description":"Alone: apply a preset over the current guardrails"}}}}}}}},"/deal-desk/reviews":{"post":{"summary":"Review an outside quote: first pass and routing","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"string"},"channel":{"type":"string"},"reference":{"type":"string"},"note":{"type":"string"},"cash_discount_pct":{"type":"number"},"terms":{"description":"Text, a list of texts, or {name: text}"},"lines":{"type":"array","items":{"type":"object","required":["list_price"],"properties":{"sku":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"qty":{"type":"number"},"list_price":{"type":"number"},"net_price":{"type":"number"},"discount_pct":{"type":"number"},"cost":{"type":"number","description":"Optional: without it the margin isn't checked"},"dead_net":{"type":"number","description":"What the customer pays after the cash discount (else worked out)"},"gm":{"description":"Stated gross margin: a percentage (\"42%\") or dollars a unit; checked"},"award_type":{"type":"string"},"effective_date":{"type":"string","format":"date"}}}},"file":{"type":"object","properties":{"name":{"type":"string","description":"deal.csv or deal.xlsx"},"content_base64":{"type":"string"}}}}}}}}},"get":{"summary":"Deal desk reviews","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/deal-desk/reviews/{qid}":{"get":{"summary":"One review: first pass, approval chain, decisions","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/deal-desk/reviews/{qid}/decision":{"post":{"summary":"Approve (optionally at a counter discount) or reject, with the reason","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve","reason"],"properties":{"approve":{"type":"boolean"},"reason":{"type":"string"},"counter_discount_pct":{"type":"number"}}}}}}}},"/deal-desk/history":{"post":{"summary":"Past deals to compare against","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object"}},"prices":{"type":"array","items":{"type":"object"}},"file":{"type":"object","properties":{"name":{"type":"string","description":"deal.csv or deal.xlsx"},"content_base64":{"type":"string"}}},"kind":{"enum":["deals","prices"]},"source":{"type":"string"}}}}}}}},"/deal-desk/ledger":{"get":{"summary":"Leak Ledger line: discount beyond authority, margin below floor","security":[{"clientCredentials":["dealdesk"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"start","in":"query","schema":{"type":"string"}},{"name":"end","in":"query","schema":{"type":"string"}},{"name":"days","in":"query","schema":{"type":"integer"}},{"name":"include_nteli","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/price-governance":{"get":{"summary":"Price governance: charges, rollouts, uploads","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/price-book":{"post":{"summary":"Load a price book (standalone)","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"file":{"type":"string","contentEncoding":"base64"},"filename":{"type":"string"},"mapping":{"type":"object"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/quotes":{"post":{"summary":"Load a quote list (standalone)","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"file":{"type":"string","contentEncoding":"base64"},"filename":{"type":"string"},"mapping":{"type":"object"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/pass-throughs":{"get":{"summary":"Pass-through charges","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]},"post":{"summary":"Add a pass-through charge","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","reason","basis","amount"],"properties":{"name":{"type":"string"},"reason":{"type":"string","description":"Shown to the customer on the quote line"},"scope":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"basis":{"enum":["pct","per_unit"]},"amount":{"type":"number"},"effective":{"type":"string","format":"date"},"expires":{"type":"string","format":"date"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/pass-throughs/{rid}/expire":{"post":{"summary":"Expire a pass-through charge","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"string","format":"date"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/pass-throughs/applications":{"get":{"summary":"Which quotes carried which charge","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/rollouts":{"get":{"summary":"Price increase rollouts","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]},"post":{"summary":"Commit a rollout","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["basis","amount"],"properties":{"name":{"type":"string"},"scope":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"basis":{"enum":["pct","amount"]},"amount":{"type":"number"},"effective":{"type":"string","format":"date"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/rollouts/preview":{"post":{"summary":"Preview a rollout","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["basis","amount"],"properties":{"name":{"type":"string"},"scope":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"basis":{"enum":["pct","amount"]},"amount":{"type":"number"},"effective":{"type":"string","format":"date"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/rollouts/{rid}":{"delete":{"summary":"Cancel a scheduled rollout","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/price-files":{"get":{"summary":"Customer price files","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]},"post":{"summary":"Load and check a customer price file","security":[{"clientCredentials":["pricebook:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"file":{"type":"string","contentEncoding":"base64"},"filename":{"type":"string"},"mapping":{"type":"object"},"customer":{"type":"string"},"rev":{"type":"string","format":"date"},"terms":{"type":"array","items":{"type":"object","properties":{"term_type":{"type":"string"},"rate":{"type":"number"},"amount":{"type":"number"},"basis":{"enum":["wac","direct_price","list","contract","running"]}}}},"volumes":{"type":"object"},"low_margin_pct":{"type":"number"}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/price-files/{fid}":{"get":{"summary":"A price file: waterfalls and findings","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"fid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/price-files/{fid}/diff":{"get":{"summary":"What a revision changed","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"fid","in":"path","required":true,"schema":{"type":"string"}},{"name":"against","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/price-governance/leaks":{"get":{"summary":"Leak report and Leak Ledger lines","security":[{"clientCredentials":["pricebook:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"top","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Price governance (add-on)"]}},"/rule-watch":{"get":{"summary":"Rule watch: counts, last check, hits","security":[{"clientCredentials":["rulewatch:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Rule watch"]}},"/rule-watch/hits/{hid}":{"get":{"summary":"One rule watch hit and its events","security":[{"clientCredentials":["rulewatch:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"hid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Rule watch"]}},"/rule-watch/check":{"post":{"summary":"Check the sources now","security":[{"clientCredentials":["rulewatch:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"tags":["Rule watch"]}},"/rule-watch/letters":{"post":{"summary":"Load a supplier price letter","security":[{"clientCredentials":["rulewatch:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"filename":{"type":"string"},"content_base64":{"type":"string","contentEncoding":"base64"},"pack":{"type":"string"},"note":{"type":"string"}}}}}},"tags":["Rule watch"]}},"/rule-watch/hits/{hid}/propose":{"post":{"summary":"Propose a hit (background replay)","security":[{"clientCredentials":["rulewatch:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"hid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"type":"string"},"rules":{"type":"array","items":{"type":"string"}},"price_change_pct":{"type":"number"},"pass_through":{"type":"boolean"},"note":{"type":"string"}}}}}},"tags":["Rule watch"]}},"/rule-watch/hits/{hid}/dismiss":{"post":{"summary":"Dismiss a hit, with the reason","security":[{"clientCredentials":["rulewatch:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"hid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"tags":["Rule watch"]}},"/rule-watch/hits/{hid}/reopen":{"post":{"summary":"Reopen a hit","security":[{"clientCredentials":["rulewatch:propose"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"hid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"tags":["Rule watch"]}},"/eco/summary":{"get":{"summary":"Engineering changes at a glance","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/ecos":{"get":{"summary":"Engineering changes","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","required":false,"schema":{"enum":["draft","proposed","approved","rejected"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"File an engineering change (the form): a draft, nothing proposed yet","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["eco"],"properties":{"eco":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"},"effectivity":{"type":"object","properties":{"kind":{"enum":["date","serial","stock"]},"date":{"type":"string","format":"date"},"serial":{"type":"string"}}},"cost_delta":{"type":"number","description":"per unit of the affected item, when the BOM lines don't say"},"items":{"type":"array","items":{"type":"object","required":["item"],"properties":{"item":{"type":"string"},"old_rev":{"type":"string"},"new_rev":{"type":"string"}}}},"lines":{"type":"array","items":{"type":"object","required":["item","action","component"],"properties":{"item":{"type":"string"},"action":{"enum":["add","remove","qty","substitute"]},"component":{"type":"string"},"new_component":{"type":"string"},"old_qty":{"type":"number"},"new_qty":{"type":"number"},"unit_cost":{"type":"number"},"cost_delta":{"type":"number"}}}}}}}}}}},"/eco/imports/{kind}":{"post":{"summary":"Import a CSV, XLSX or JSON file: ECOs, the item master and BOMs, or backlog orders","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"kind","in":"path","required":true,"schema":{"enum":["ecos","master","orders"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","content_base64"],"properties":{"filename":{"type":"string"},"content_base64":{"type":"string"},"mapping":{"type":"object","description":"column header -> field, when the headers aren't recognised"}}}}}}}},"/eco/ecos/{eco}":{"get":{"summary":"One change: revisions, BOM lines, cost delta, sales parts, price change, ERP list","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/ecos/{eco}/submit":{"post":{"summary":"Propose the one-pass update (mapping, BOM, price) for a second person's approval","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"enum":["carry","hold"]},"note":{"type":"string"}}}}}}}},"/eco/ecos/{eco}/decision":{"post":{"summary":"Approve or reject a proposed change (a different planner or engineer)","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"},"comment":{"type":"string"}}}}}}}},"/eco/ecos/{eco}/impact":{"get":{"summary":"Open quotes and backlog orders the change touches, with cost, price and margin delta","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/ecos/{eco}/erp":{"get":{"summary":"What the ERP must change (JSON, or CSV with format=csv). Nothing is written to the ERP","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"},{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/ecos/{eco}/requote":{"post":{"summary":"Open a revision of each affected open quote on today's prices","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"path","required":true,"schema":{"type":"string"},"description":"ECO number"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"string"}}}}}}}}},"/eco/items/{item}":{"get":{"summary":"An item's revisions and BOMs, and the revision in effect","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"item","in":"path","required":true,"schema":{"type":"string"},"description":"Item (part number)"},{"name":"on","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"serial","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/ledger":{"get":{"summary":"Leak Ledger line: ECO cost not carried","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"period","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/eco/notices":{"get":{"summary":"Obsolescence and last-time-buy notice drafts","security":[{"clientCredentials":["eco:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"eco","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"Draft a notice for each customer who quoted, ordered or installed the item","security":[{"clientCredentials":["eco:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["item","kind"],"properties":{"item":{"type":"string"},"kind":{"enum":["obsolescence","last_time_buy"]},"last_buy_date":{"type":"string","format":"date"},"replacement":{"type":"string"},"eco":{"type":"string"},"note":{"type":"string"}}}}}}}},"/rebates-commissions":{"get":{"summary":"Rebates & commissions: uploads, programs and plans","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/uploads":{"get":{"summary":"Invoice and payment uploads","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"kind","in":"query","schema":{"enum":["invoices","payments","contract_terms","memberships","orders"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"post":{"summary":"Upload invoices or payments (CSV text, XLSX base64, JSON rows)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","format","content"],"properties":{"kind":{"enum":["invoices","payments","contract_terms","memberships","orders"]},"format":{"enum":["csv","xlsx","json"]},"content":{},"name":{"type":"string"},"mapping":{"type":"object"},"type":{"enum":["rebate_paid","rebate_accrued","commission_paid"]},"sheet":{"type":"string"}}}}}}}},"/rebates-commissions/uploads/{uid}":{"get":{"summary":"An upload, with its rows (?rows=1)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"delete":{"summary":"Set an upload aside","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/programs":{"get":{"summary":"Rebate programs","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/programs/{tid}":{"get":{"summary":"A rebate program","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Save a rebate program (a new version)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"summary":"Retire a rebate program","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/plans":{"get":{"summary":"Commission plans","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/plans/{tid}":{"get":{"summary":"A commission plan","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"put":{"summary":"Save a commission plan (a new version)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"summary":"Retire a commission plan","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/rebates":{"get":{"summary":"Tier, accrual, projection and next tier per participant","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"nteli","in":"query","schema":{"type":"boolean"},"description":"Count Nteli's won quotes as orders (default true)"},{"name":"program","in":"query","schema":{"type":"string"}},{"name":"detail","in":"query","schema":{"enum":["lines"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/rebates/{pid}/statements/{party}":{"get":{"summary":"Rebate settlement statement (JSON, CSV or PDF)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"pid","in":"path","required":true,"schema":{"type":"string"}},{"name":"party","in":"path","required":true,"schema":{"type":"string"}},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"format","in":"query","schema":{"enum":["json","csv","pdf"]}},{"name":"nteli","in":"query","schema":{"type":"boolean"},"description":"Count Nteli's won quotes as orders (default true)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/commissions":{"get":{"summary":"Commission per rep: earned, held, claw-backs, payable","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"nteli","in":"query","schema":{"type":"boolean"},"description":"Count Nteli's won quotes as orders (default true)"},{"name":"plan","in":"query","schema":{"type":"string"}},{"name":"detail","in":"query","schema":{"enum":["lines"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/commissions/{pid}/statements/{rep}":{"get":{"summary":"Rep commission statement (JSON, CSV or PDF)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"pid","in":"path","required":true,"schema":{"type":"string"}},{"name":"rep","in":"path","required":true,"schema":{"type":"string"}},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"format","in":"query","schema":{"enum":["json","csv","pdf"]}},{"name":"nteli","in":"query","schema":{"type":"boolean"},"description":"Count Nteli's won quotes as orders (default true)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/reconciliation":{"get":{"summary":"Accrued vs paid rebates, calculated vs paid commissions, with reason codes","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"nteli","in":"query","schema":{"type":"boolean"},"description":"Count Nteli's won quotes as orders (default true)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/rebates-commissions/ledger":{"get":{"summary":"Leak Ledger lines (Recognize stage)","security":[{"clientCredentials":["rebates"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel":{"get":{"summary":"Channel add-on: counts and its Leak Ledger line","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/registrations":{"post":{"summary":"Register an opportunity","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["end_customer"],"properties":{"party":{"type":"string"},"end_customer":{"type":"string"},"product":{"type":"string"},"est_value":{"type":"number"},"expected_close":{"type":"string"},"note":{"type":"string"}}}}}}},"get":{"summary":"Registrations","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"party","in":"query","schema":{"type":"string"}},{"name":"end_customer","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/registrations/import":{"post":{"summary":"Load registrations from rows or a file","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"filename":{"type":"string"},"content_base64":{"type":"string","description":"A CSV, XLSX or JSON file, base64"}}}}}}}},"/channel/registrations/{rid}":{"get":{"summary":"A registration and its conflicts","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/registrations/{rid}/decision":{"post":{"summary":"Approve (with expiry and protected discount) or reject","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"},"expires":{"type":"string"},"days":{"type":"integer"},"protected_pct":{"type":"number"},"note":{"type":"string"}}}}}}}},"/channel/spas":{"post":{"summary":"Add a special pricing agreement","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["distributor","end_customer","lines","start","end"],"properties":{"distributor":{"type":"string"},"end_customer":{"type":"string"},"ref":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"note":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string"},"category":{"type":"string"},"price":{"type":"number"},"book_cost":{"type":"number"},"qty_cap":{"type":"number"}}}}}}}}}},"get":{"summary":"Special pricing agreements, with quantity used and remaining","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"distributor","in":"query","schema":{"type":"string"}},{"name":"end_customer","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/spas/import":{"post":{"summary":"Load agreements from rows or a file","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"distributor":{"type":"string"},"filename":{"type":"string"},"content_base64":{"type":"string","description":"A CSV, XLSX or JSON file, base64"}}}}}}}},"/channel/spas/{sid}":{"get":{"summary":"An agreement","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/spas/{sid}/cancel":{"post":{"summary":"Cancel an agreement","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}}}},"/channel/claims":{"post":{"summary":"Submit a ship-and-debit claim: validated line by line","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"distributor":{"type":"string"},"totals":{"type":"object"},"approved":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}},"adjust":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}},"rejected":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["distributor"],"properties":{"distributor":{"type":"string"},"ref":{"type":"string"},"rows":{"type":"array","items":{"type":"object"}},"kind":{"enum":["ship_and_debit","chargeback"]},"filename":{"type":"string"},"content_base64":{"type":"string","description":"A CSV, XLSX or JSON file, base64"}}}}}}},"get":{"summary":"Claims, with the reason codes","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"distributor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/claims/{cid}":{"get":{"summary":"A claim: approved, adjust and rejected lines with reasons","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"distributor":{"type":"string"},"totals":{"type":"object"},"approved":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}},"adjust":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}},"rejected":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"invoice":{"type":"string"},"part":{"type":"string"},"qty":{"type":"number"},"claimed":{"type":"number"},"approved":{"type":"number"},"outcome":{"enum":["approved","adjust","rejected"]},"contract":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["ALLOCATION_EXCEEDED","BAD_VALUE","CAP_PARTIAL","CAP_REACHED","CONTRACT_CANCELLED","CONTRACT_DRAFT","CONTRACT_EXPIRED","CONTRACT_NOT_FOUND","CONTRACT_NOT_STARTED","CONTRACT_PRICE_MISMATCH","CREDIT_MATH","DUPLICATE_CLAIM","DUPLICATE_IN_FILE","INVENTORY_EXCEEDED","INVENTORY_PARTIAL","INVENTORY_UNVERIFIED","LINE_NOT_EFFECTIVE","MISSING_FIELD","NOT_ELIGIBLE","NO_CONTRACT","NO_CREDIT_DUE","NO_REGISTRATION","POS_CUSTOMER_MISMATCH","POS_DATE_MISMATCH","POS_NO_RECORD","POS_QTY_OVER","POS_UNVERIFIED","PRODUCT_NOT_ON_CONTRACT","REF_PRICE_MISMATCH","REF_UNVERIFIED","REGISTRATION_EXPIRED","REGISTRATION_OTHER_PARTY","UNDERCLAIM","WHOLESALER_NOT_AUTHORIZED","XWALK_MISMATCH","XWALK_UNMAPPED"]},"text":{"type":"string"}}}},"leak":{"type":"object"}}}}}}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/claims/{cid}/credit-memo":{"get":{"summary":"The credit memo a validated claim supports: one row per line that pays","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/price-check":{"post":{"summary":"Agreement prices and registration protection for a quote or an order","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"party":{"type":"string"},"end_customer":{"type":"string"},"channel":{"enum":["direct","indirect"]},"quote":{"type":"string"},"date":{"type":"string"},"ref":{"type":"string"},"record":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object"}}}}}}}}},"/channel/ledger":{"get":{"summary":"The add-on's Leak Ledger line (Settle stage)","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"since","in":"query","schema":{"type":"string"}},{"name":"until","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/master/{kind}":{"post":{"summary":"Load accounts, memberships, products (dated WAC/book), crosswalk or allocations","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"filename":{"type":"string"},"content_base64":{"type":"string","description":"A CSV, XLSX or JSON file, base64"}}}}}}},"get":{"summary":"Master data of one kind","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"kind","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/contracts":{"post":{"summary":"Add a contract (lines by product or category, channel, wholesaler; terms)","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["account","contract_type","lines","start"],"properties":{"account":{"type":"string"},"contract_type":{"enum":["spa","gpo","direct","idn","wholesaler","other"]},"start":{"type":"string"},"end":{"type":"string"},"ref":{"type":"string"},"status":{"enum":["draft","active"]},"lines":{"type":"array","items":{"type":"object"}},"terms":{"type":"array","items":{"type":"object"}}}}}}}},"get":{"summary":"Contracts","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"account","in":"query","schema":{"type":"string"}},{"name":"contract_type","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/contracts/import":{"post":{"summary":"A customer price file as a contract, or its dated price changes","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["account"],"properties":{"account":{"type":"string"},"contract_type":{"type":"string"},"wholesaler":{"type":"string"},"channel":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"ref":{"type":"string"},"effective":{"type":"string"},"columns":{"type":"object"},"rows":{"type":"array","items":{"type":"object"}},"filename":{"type":"string"},"content_base64":{"type":"string","description":"A CSV, XLSX or JSON file, base64"}}}}}}}},"/channel/contracts/{cid}":{"get":{"summary":"A contract with its lines (current and superseded) and terms","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/channel/contracts/{cid}/prices":{"post":{"summary":"A new contract price from an effective date","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product","price","effective"],"properties":{"product":{"type":"string"},"price":{"type":"number"},"effective":{"type":"string"},"wholesaler":{"type":"string"},"channel":{"type":"string"},"reason":{"type":"string"}}}}}}}},"/channel/contracts/{cid}/status":{"post":{"summary":"Activate a draft or cancel a contract","security":[{"clientCredentials":["channel"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"enum":["active","cancelled"]},"note":{"type":"string"}}}}}}}},"/governance":{"get":{"summary":"Every agent action's dial: stage, gate progress, waiting promotions; step-backs, held actions, open disagreements and the latest of the trail","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/dials/{module}/{kind}":{"get":{"summary":"One action's dial with its evidence, step-backs and audit trail","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}},"patch":{"summary":"A governing body sets the risk class, gate (raise only) and scoped limits","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"risk":{"enum":["routine","standard","high"],"description":"Raise only: never below the action kind's own class"},"gate_pct":{"type":["number","null"],"description":"Raise only: never below the risk class's floor"},"gate_cases":{"type":["integer","null"],"description":"Raise only: never below the risk class's floor"},"max_discount_pct":{"type":["number","null"]},"max_amount_usd":{"type":["number","null"]},"models":{"type":"array","items":{"type":"string"},"description":"Models or families the agent may act on; empty: any"}}}}}}}},"/governance/dials/{module}/{kind}/promote":{"post":{"summary":"Approve moving up one stage: the gate must be met and the tier must allow it","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"comment":{"type":"string"}}}}}}}},"/governance/dials/{module}/{kind}/decline":{"post":{"summary":"Decline the waiting promotion","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"comment":{"type":"string"}}}}}}}},"/governance/dials/{module}/{kind}/demote":{"post":{"summary":"Step the action back one stage, with the reason","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"}}}}}}}},"/governance/failures":{"post":{"summary":"Report a failure (a guardrail breach or a reversal): the action steps back one stage","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["module","kind","reason"],"properties":{"module":{"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"ref":{"type":"string"},"source":{"enum":["guardrail_breach","reversal"]}}}}}}}},"/governance/actions":{"post":{"summary":"An agent's action with no queue of its own (a ledger fix, a credit memo): executed if its dial allows, else held for a person","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["module","kind"],"properties":{"module":{"type":"string"},"kind":{"type":"string"},"ref":{"type":"string"},"inputs":{"type":"object"}}}}}}}},"/governance/actions/{n}/reverse":{"post":{"summary":"A person reverses something an agent executed: it steps back","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"n","in":"path","required":true,"schema":{"type":"integer"},"description":"The agent action's row in the trail"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"}}}}}}}},"/governance/proposals":{"post":{"summary":"An agent's proposed decision on an item, scored against the person's (Shadow and Approve)","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["module","kind","ref","decision"],"properties":{"module":{"type":"string"},"kind":{"type":"string"},"ref":{"type":"string"},"decision":{"type":"string"},"price":{"type":"number"}}}}}}}},"/governance/held":{"get":{"summary":"Agent actions held for a person","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","required":false,"schema":{"enum":["held","approved","rejected"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/held/{hid}/decision":{"post":{"summary":"Approve (it executes) or reject a held agent action","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"hid","in":"path","required":true,"schema":{"type":"string"},"description":"A held action (G-...)"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"},"comment":{"type":"string"}}}}}}}},"/governance/audit":{"get":{"summary":"The append-only trail of agent actions and the answers to them","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"}},{"name":"ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/questions":{"get":{"summary":"Shadow disagreements as engineer questions","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"status","in":"query","required":false,"schema":{"enum":["open","needs_change","resolved"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/questions/{qid}/answer":{"post":{"summary":"Answer a disagreement: rule_is_wrong (link the proposed change), sales_were_exceptions, agent_is_wrong or ignore","security":[{"clientCredentials":["governance:write"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"},"description":"A disagreement (shadow:<case>)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["verdict"],"properties":{"verdict":{"enum":["rule_is_wrong","sales_were_exceptions","agent_is_wrong","ignore"]},"note":{"type":"string"},"change_id":{"type":"string"}}}}}}}},"/governance/policy":{"get":{"summary":"Every action's effective policy, readable by machines: stage, limits, risk class, gate (never rule content)","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/policy/{module}/{kind}":{"get":{"summary":"One action's effective policy: what an agent can settle on its own and what goes to a person","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"module","in":"path","required":true,"schema":{"type":"string"},"description":"configure, deal_desk, price_governance, rule_watch, eco_sync, revenue_intel, rebates, channel, aftermarket"},{"name":"kind","in":"path","required":true,"schema":{"enum":["issue_quote","apply_discount","rule_change","ledger_fix","draft_notice"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/governance/evaluate":{"post":{"summary":"A dry run: allow, queue or deny and the reason, for you or a counterparty agent; records nothing","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"},"module":{"type":"string"},"amount":{"type":"number"},"discount_pct":{"type":"number"},"model":{"type":"string"},"ref":{"type":"string"},"actor":{"type":"object","properties":{"type":{"const":"counterparty_agent"},"id":{"type":"string"},"on_behalf_of":{"type":"string"}}}}}}}}}},"/governance/scorecard":{"get":{"summary":"Per action in a period: cases, agreement, executed and held actions, step-backs, promotions","security":[{"clientCredentials":["governance:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"start","in":"query","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/negotiations":{"post":{"summary":"Request a quote (a new negotiation)","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["on_behalf_of"],"properties":{"on_behalf_of":{"type":"string"},"model":{"type":"string"},"facts":{"type":"object"},"qty":{"type":"integer"},"rfq":{"type":"string","maxLength":4000},"reference":{"type":"string"},"delivery_by":{"type":"string","format":"date"}}}}}}},"get":{"summary":"This connection's negotiations","security":[{"clientCredentials":["negotiate"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/negotiations/{tid}":{"get":{"summary":"One negotiation","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/negotiations/{tid}/rfq":{"post":{"summary":"More answers for a negotiation waiting on them","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on_behalf_of":{"type":"string"},"model":{"type":"string"},"facts":{"type":"object"},"qty":{"type":"integer"},"rfq":{"type":"string","maxLength":4000},"reference":{"type":"string"},"delivery_by":{"type":"string","format":"date"}}}}}}}},"/negotiations/{tid}/counter":{"post":{"summary":"Counter the offer","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_price":{"type":"number"},"qty":{"type":"integer"},"delivery_by":{"type":"string","format":"date"},"escalate":{"type":"boolean"},"note":{"type":"string"}}}}}}}},"/negotiations/{tid}/accept":{"post":{"summary":"Accept the signed offer","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["po"],"properties":{"po":{"type":"string"},"quote":{"type":"string"},"digest":{"type":"string"},"note":{"type":"string"},"ship_to":{"type":"string"},"bill_to":{"type":"string"}}}}}}}},"/negotiations/{tid}/withdraw":{"post":{"summary":"Withdraw a negotiation","security":[{"clientCredentials":["negotiate"]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"A repeat with the same key returns the first answer (kept 24 hours)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A negotiation: thread, status (input_required, offer, pending_human_review, accepted, declined, expired, withdrawn), result, questions, offer (signed), review (eta), order (signed acknowledgement), rounds, expires_at, message"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/quotes/{qid}/verify":{"get":{"summary":"Verify a signed quote (or ?doc=order its acknowledgement)","security":[{"clientCredentials":[]}],"parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc","in":"query","schema":{"enum":["quote","order"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}},"/quotes/{qid}/attestation":{"get":{"summary":"An issued quote's signed attestation","security":[{"clientCredentials":["quote:read"]}],"parameters":[{"name":"X-Nteli-User","in":"header","required":true,"schema":{"type":"string","format":"email"},"description":"The person this call acts for: their email in the Nteli workspace. Their roles apply."},{"name":"qid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Refused, with the reason in plain words","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Plain words, safe to show to the person"}}}}}}}}}}}}}