{"status":"success","traceId":"be131d5c-0968-45ed-9b56-aaa47582e4ef","data":{"openapi":"3.1.0","info":{"title":"Nexus Service API","version":"1.0.0","description":"Runtime-discoverable OpenAPI schema for nexus-service endpoints"},"servers":[{"url":"https://nexus.moojo.id"}],"security":[],"paths":{"/marketplace":{"post":{"operationId":"marketplace","summary":"Run a marketplace negotiation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceRequest"}}}},"responses":{"200":{"description":"Marketplace negotiation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceResponse"}}}}}}},"/vendors":{"get":{"operationId":"vendors","summary":"List all vendors available on the marketplace","responses":{"200":{"description":"List of available vendors with their slugs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorsResponse"}}}}}}},"/meta":{"get":{"operationId":"meta","summary":"Get the OpenAPI document for this service","responses":{"200":{"description":"OpenAPI document for nexus-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaResponse"}}}}}}},"/strategy":{"get":{"operationId":"strategy","summary":"Get negotiation best practices and strategy guidelines","responses":{"200":{"description":"Negotiation strategy and best practices","content":{"text/markdown":{"schema":{"$ref":"#/components/schemas/StrategyResponse"}}}}}}},"/subscribeToUpdates":{"post":{"operationId":"subscribeToUpdates","summary":"Subscribe to a marketplace newsletter feed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeToUpdatesRequest"}}}},"responses":{"200":{"description":"Opaque subscription identifier for use with catchUp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeToUpdatesResponse"}}}}}}},"/catchUp":{"post":{"operationId":"catchUp","summary":"Fetch newsletters published since this subscription last caught up","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatchUpRequest"}}}},"responses":{"200":{"description":"Newsletters accumulated since the previous catchUp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatchUpResponse"}}}}}}}},"components":{"schemas":{"MarketplaceRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"tag":{"type":"string","const":"start","description":"Starts a new negotiation session"},"vendorSlug":{"type":"string","description":"Target vendor slug identifying the marketplace for this negotiation"},"buyerMessage":{"type":"string","description":"Buyer message to begin the negotiation"},"experiments":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":50},"description":"Do not set. Reserved for internal experiment routing."}},"required":["tag","vendorSlug","buyerMessage"],"additionalProperties":false,"description":"Start a new marketplace negotiation session"},{"type":"object","properties":{"tag":{"type":"string","const":"continue","description":"Continues an existing negotiation session"},"sessionId":{"type":"string","description":"Existing session identifier returned by a previous response"},"buyerMessage":{"type":"string","description":"Latest buyer message in the ongoing negotiation"},"claimPackage":{"type":"object","properties":{"icpId":{"type":"string","description":"ICP identifier the buyer is claiming to have a fit with, from the list of ICPs in a prior response"},"claims":{"maxItems":15,"type":"array","items":{"type":"object","properties":{"raw":{"type":"string","maxLength":2000000,"description":"The complete, unmodified RFC 822 email source. The system verifies a cryptographic DKIM signature that covers the entire email, so the content must be byte-for-byte identical to what the mail server sent — any missing or altered part (headers, body, attachments) will invalidate the signature. Obtain it via \"Show Original\" (Gmail) or \"View Source\" / \"View Raw Message\" (other clients). Copying just the visible text will always fail verification."}},"required":["raw"],"additionalProperties":false,"description":"Buyer-provided email proof used to verify eligibility conditions"},"description":"List of claims the potentially prove the fit with that ICP"}},"required":["icpId","claims"],"additionalProperties":false},"selfAttestedScoring":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":1000},"description":"Confidence ranking across self-attested ICPs (those with `acceptsSelfAttested: true`), keyed by `icpId` from a prior response. Each value is an integer in [0, 1000]; 0 excludes that ICP from consideration, and all non-zero scores must be distinct — you commit to a strict ranking among the ICPs you put forward. The system selects a single winning ICP from your non-zero set by combining scores with vendor-side discount weights (hidden from buyers); the winning ICP's discount cap is awarded in full. At least one score must be non-zero — to opt out of the self-attested flow (e.g. because the buyer fits none of the eligible ICPs), omit `selfAttestedScoring` entirely on this turn and use the email-proof flow instead."}},"required":["tag","sessionId","buyerMessage"],"additionalProperties":false,"description":"Continue an existing marketplace negotiation session"}],"description":"Marketplace negotiation request payload"},"MarketplaceResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","description":"Session identifier to send on subsequent continue turns"},"icps":{"description":"Available ideal customer profiles the buyer can claim","type":"array","items":{"type":"object","properties":{"icpId":{"type":"string","description":"Stable identifier for this ideal customer profile"},"description":{"type":"string","description":"Human-readable description of who qualifies for this ICP"},"acceptsSelfAttested":{"description":"When true, this ICP can be claimed via a self-attested confidence ranking instead of cryptographic email proof. Submit your ranking via the `selfAttestedScoring` field on the continue request — see that field for the scoring contract. When false or absent, this ICP follows the email-proof flow via `claimPackage`.","type":"boolean"}},"required":["icpId","description"],"additionalProperties":false,"description":"An ideal customer profile that the buyer can claim to unlock discounted pricing"}},"claimVerdicts":{"description":"authenticity feedback for each claim, in the same order as the request's claims","type":"array","items":{"type":"object","properties":{"ordinal":{"type":"number"},"domains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"tag":{"type":"string","const":"confirmed","description":"Indicates DKIM signature was successfully verified"},"domain":{"type":"string","description":"The email domain whose DKIM signature was verified"}},"required":["tag","domain"],"additionalProperties":false,"description":"DKIM verification succeeded for this email"},{"type":"object","properties":{"tag":{"type":"string","const":"unconfirmed","description":"Indicates DKIM verification did not confirm authenticity"},"domain":{"type":"string","description":"The email domain that was checked"},"status":{"type":"string","enum":["fail","neutral","none","temperror","temperr","permerror","policy","softfail","skipped"],"description":"DKIM verification result status code"},"comments":{"type":"array","items":{"type":"string"},"description":"Additional context explaining the verification failure"}},"required":["tag","domain","status","comments"],"additionalProperties":false,"description":"DKIM verification did not confirm email authenticity"}],"description":"Result of DKIM signature verification for an email"}},"numConfirmedDomains":{"type":"number"},"type":{"type":"string","const":"email"}},"required":["ordinal","domains","numConfirmedDomains","type"],"additionalProperties":false}},"vendorMessage":{"type":"string","description":"Vendor response message generated for this turn"},"quote":{"description":"Absent until the negotiation is fully closed. If this field is missing, the deal is not done yet — continue negotiating","type":"object","properties":{"discountPercent":{"type":"number","minimum":0,"maximum":100},"checkoutUrl":{"type":"string","description":"Stripe Checkout URL to finalize the deal. Autonomous agents should check improvementHint first — if it is present, submitting additional claims may yield a better discount before following this URL; otherwise, follow this URL immediately to complete the deal."},"improvementHint":{"description":"When present, indicates the current discount is below the maximum possible for the claimed profile. Submit additional claims to improve the deal.","type":"string"}},"required":["discountPercent","checkoutUrl"],"additionalProperties":false},"paperTrailId":{"description":"used internally for debugging purposes","type":"string"}},"required":["sessionId","vendorMessage"],"additionalProperties":false,"description":"Marketplace negotiation response payload"},"StrategyResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"VendorsResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vendors":{"type":"array","items":{"type":"object","properties":{"vendorSlug":{"type":"string","description":"Identifies the vendor to pass in a marketplace start request"},"vendorName":{"type":"string","description":"Human-readable vendor name"},"description":{"description":"Brief description of what the vendor offers","type":"string"},"category":{"description":"A free-form category describing the vendor's business domain (e.g., \"energy\", \"dev-saas\", etc.). The value set is open-ended and not restricted to a predefined list.","type":"string"}},"required":["vendorSlug","vendorName"],"additionalProperties":false,"description":"A vendor available on the marketplace"},"description":"List of vendors currently available on the marketplace"}},"required":["vendors"],"additionalProperties":false,"description":"List of available vendors"},"MetaResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"openapi":{"type":"string","const":"3.1.0","description":"OpenAPI specification version"},"info":{"type":"object","properties":{"title":{"type":"string","description":"API title"},"version":{"type":"string","description":"API version"},"description":{"description":"Optional API description","type":"string"}},"required":["title","version"],"additionalProperties":false,"description":"OpenAPI info object"},"servers":{"description":"OpenAPI server list","type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"}},"required":["url"],"additionalProperties":false}},"security":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"description":"OpenAPI security requirements"},"paths":{"description":"OpenAPI paths object"},"components":{"type":"object","properties":{"schemas":{"description":"OpenAPI component schemas"}},"required":["schemas"],"additionalProperties":false,"description":"OpenAPI reusable components"}},"required":["openapi","info","security","paths","components"],"additionalProperties":false,"description":"Runtime metadata for auto-discovering service endpoints via OpenAPI"},"SubscribeToUpdatesRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"marketplaceId":{"type":"string","description":"Identifier of the marketplace whose newsletter updates to subscribe to"}},"required":["marketplaceId"],"additionalProperties":false,"description":"Request to subscribe to a marketplace newsletter feed"},"SubscribeToUpdatesResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subscriptionId":{"type":"string","description":"Opaque subscription identifier to pass to catchUp in order to fetch newsletters since the last catchUp"}},"required":["subscriptionId"],"additionalProperties":false,"description":"Result of subscribing to a marketplace newsletter feed"},"CatchUpRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subscriptionId":{"type":"string","description":"Subscription identifier returned by a previous subscribeToUpdates call"},"limit":{"description":"Maximum number of newsletters to return; omit for the server default. Use 1 to fetch one at a time","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"since":{"description":"ISO-8601 timestamp. When provided, returns newsletters published after this instant instead of resuming from the stored cursor — an ad-hoc read that does NOT advance the stored cursor","type":"string"}},"required":["subscriptionId"],"additionalProperties":false,"description":"Request to fetch the newsletters published since this subscription last caught up"},"CatchUpResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contents":{"type":"array","items":{"type":"string"},"description":"Contents of every newsletter published for the subscribed marketplace since the last catchUp, oldest first"},"couponCode":{"description":"A freshly-minted discount coupon code, granted only when this catchUp delivered at least one new newsletter and the subscribed marketplace runs on Shopify. Absent otherwise","type":"string"}},"required":["contents"],"additionalProperties":false,"description":"Newsletters accumulated since the previous catchUp for this subscription"}}}}}