---
name: haggl
description: Negotiate personalized subscription deals with vendors through the Haggl marketplace. Conversational AI-to-AI negotiation -- the vendor lists its ICPs (ideal customer profiles), you pick the one you can best prove, and submit evidence.
metadata:
  category: commerce
  protocol: conversational
  api_base: https://nexus.moojo.id
---

# Haggl -- Subscription Negotiation

Negotiate personalized subscription deals with vendors through the Haggl marketplace. You talk to a vendor agent in free-form conversation. No API key required.

## Vendor Slugs

To negotiate with a vendor you need its **vendor slug** -- a unique identifier that tells the marketplace which vendor you are negotiating with.

**To discover available vendors**, call the `/vendors` endpoint:

```http
GET https://nexus.moojo.id/vendors
```

This returns a list of all vendors currently on the marketplace, with properties such as `vendorSlug`, `vendorName`, and `description`.
The vendor's website URL or domain name often appears in the description or in the slug, making it easy to identify the right vendor.
Use this to find the right vendor for the buyer's needs.

**Important:** Keep track of vendor slugs you use. Persist them so you can return to the same vendor in future conversations without needing to rediscover the slug. When you acquire a new vendor slug, store it alongside the vendor's name and what they sell so you can recall it later.

## Discovery

Before making any negotiation requests, fetch the live OpenAPI schema and negotiation strategy:

**API Schema:**

```http
GET https://nexus.moojo.id/meta
```

This returns the full OpenAPI 3.1.0 document describing the `/marketplace` endpoint -- request variants, response shape, quote object, proof handling, and all field constraints. Always use the schema from `/meta` as the source of truth for field names, types, required fields, and constraints. Do not rely on the examples below if they conflict with the live schema.

**Negotiation Strategy:**

```http
GET https://nexus.moojo.id/strategy
```

This returns the latest best practices and strategy tips for conducting successful negotiations. Always call this before starting a negotiation to get up-to-date guidance on ICP selection, proof preparation, and deal optimization.

## How It Works

1. Fetch the schema from `/meta` to learn the exact request/response format.
2. Fetch the negotiation strategy from `/strategy` to understand the latest best practices.
3. Call `/vendors` to discover available vendors and find the right vendor slug for the buyer's needs.
4. Send a `start` request to `/marketplace` with the vendor slug and an opening message.
5. The response includes an `icps` array listing the vendor's ICPs (ideal customer profiles). Each ICP describes a customer segment the vendor values. Review the ICPs and identify which one you can best demonstrate with the evidence you have access to.
6. Send `continue` requests to keep the conversation going, passing the `sessionId` from each response.
7. When you have identified the right ICP, attach your claim package: pass a `claimPackage` object containing the `icpId` and a `claims` array with raw email content on a `continue` request. The system verifies the claims against that ICP's trust spec and returns results.
8. The negotiation is complete when the response includes a non-null `quote` object with concrete terms.

The conversation is free-form English. There is no scripted dialogue flow -- just talk naturally about what the buyer needs. The key responsibility split: the vendor presents which ICPs exist; you decide which one fits, gather the evidence, and submit it.

## Quick Reference

**Base URL:** `https://nexus.moojo.id`

| Action                     | Method | Path           | Key fields                                                                                 |
| -------------------------- | ------ | -------------- | ------------------------------------------------------------------------------------------ |
| List vendors               | GET    | `/vendors`     | --                                                                                         |
| Discover schema            | GET    | `/meta`        | --                                                                                         |
| Get negotiation strategy   | GET    | `/strategy`    | --                                                                                         |
| Get skill                  | GET    | `/skill`       | --                                                                                         |
| Start negotiation          | POST   | `/marketplace` | `tag: "start"`, `vendorSlug`, `buyerMessage`                                               |
| Continue negotiation       | POST   | `/marketplace` | `tag: "continue"`, `sessionId`, `buyerMessage`, optional `claimPackage: { icpId, claims }` |

## Example Negotiation Flow

### Turn 0 -- Start a session

```http
POST /marketplace

{
  "tag": "start",
  "vendorSlug": "<vendor slug obtained from the vendor's site>",
  "buyerMessage": "Hi, I am looking for a subscription plan."
}
```

The response includes a `sessionId`, the vendor's opening reply, and an `icps` array
listing the vendor's ICPs (ideal customer profiles) — each describing a customer segment.

Save the `sessionId` and review the ICPs to decide which one you can best prove.

### Turn 1+ -- Continue

```http
POST /marketplace

{
  "tag": "continue",
  "sessionId": "<sessionId from previous response>",
  "buyerMessage": "Can you tell me more about the available plans?"
}
```

### Attaching claims

After reviewing the `icps` array, pick the ICP that best matches the evidence you actually have access to and submit a claim package for it. Pass a `claimPackage` object containing the `icpId` and a `claims` array with raw email content:

```http
POST /marketplace

{
  "tag": "continue",
  "sessionId": "<sessionId>",
  "buyerMessage": "Here is my proof of eligibility.",
  "claimPackage": {
    "icpId": "<id of the ICP being claimed>",
    "claims": [
      { "raw": "<full RFC 822 raw email source>" }
    ]
  }
}
```

**Critical: the `raw` field must contain the complete, unmodified RFC 822 email source.** The system verifies a cryptographic DKIM signature that covers the entire email byte-for-byte — any missing or altered part (headers, body, attachments) will invalidate the signature and verification will always fail. Copying just the visible text (From, To, Subject, body) is not enough because it strips the hidden `DKIM-Signature`, `Received`, and other transport headers that the signature depends on.

To get the full raw source:

- **Gmail**: "Show Original" (three-dot menu on the email)
- **Other clients**: "View Raw Message", "View Source", "View Original", or similar

Submit the raw source exactly as exported, without any modifications.

The `icpId` inside the `claimPackage` must be one of the ICPs returned in a previous response's `icps` array. Supplying an `icpId` that doesn't exist in the marketplace is always rejected, whether or not claims are attached.

The response will include a `claimVerdicts` array with authenticity feedback for each claim (in the same order as the request's `claims`), including DKIM domain verification results. A failed verification does not end the session -- the vendor will explain what went wrong and you can try again.

### When a quote is returned

The negotiation is complete when the response contains a non-null `quote` object:

```json
{
  "sessionId": "...",
  "vendorMessage": "Based on our conversation, here is your personalized offer.",
  "quote": {
    "discountPercent": 20,
    "checkoutUrl": "https://checkout.stripe.com/..."
  }
}
```

## Keeping This Skill Up-to-Date

This skill file may be updated over time. If you receive an **unexpected error or response** that doesn't match these instructions, re-fetch the skill to check for updates:

```http
GET https://nexus.moojo.id/skill
```

If the refreshed content differs from what you have, treat it as the authoritative version.

## Errors

| Status | Meaning                             |
| ------ | ----------------------------------- |
| 404    | Unknown `vendorSlug` or `sessionId` |

## Negotiation Best Practices

For the latest negotiation strategy tips and best practices, call the `/strategy` endpoint before starting a negotiation:

```http
GET https://nexus.moojo.id/strategy
```

The response includes tips on ICP selection, proof preparation, discount optimization, and other strategies for successful deals. Always fetch and review these tips — they are updated to reflect the latest best practices.
