# Vendor Profiles

:::note
Vendor profile endpoints require the `vendor_profiles` feature to be enabled on your account. Contact support if you receive `403 Forbidden` on these endpoints.
:::

## Get a vendor profile

```
GET /api/v1/vendors/:slug
```

Returns a full vendor intelligence profile scoped to your provisioned transcripts: ratings, AI-generated likes/dislikes, buyer list, competitive context, and more.

The top-level response includes the first 10 buyers and first 10 "buyers also buy" entries. Use the paginated sub-endpoints for full lists.

### Query parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `product` | string | Filter to a specific product name (e.g. `"Salesforce Marketing Cloud"`) |
| `use_case` | string | Filter to a specific use case name (e.g. `"Email Marketing"`) |

Invalid `product` or `use_case` values return `422 Unprocessable Entity`.

### Example request

```bash
curl -H "Authorization: Token YOUR_API_KEY" \
  "https://app.alium.io/api/v1/vendors/salesforce"
```

### Response

```json
{
  "data": {
    "name": "Salesforce",
    "slug": "salesforce",
    "domain_name": "salesforce.com",
    "median_rating": 4.0,
    "average_rating": 3.8,
    "ratings_count": 47,
    "transcript_count": 52,
    "buyer_count": 38,
    "products": ["Salesforce Marketing Cloud", "Sales Cloud"],
    "use_cases": ["Email Marketing", "CRM"],
    "likes": [
      {"headline": "Strong integrations", "paragraph": "Buyers consistently praised the depth of native connectors..."},
      {"headline": "Scalable for enterprise", "paragraph": "Multiple buyers noted the platform handles high data volumes..."}
    ],
    "dislikes": [
      {"headline": "High cost", "paragraph": "Pricing was the most commonly cited concern, especially for mid-market buyers..."},
      {"headline": "Complex implementation", "paragraph": "Several buyers described lengthy onboarding timelines..."}
    ],
    "buyers": [
      {
        "company": "Acme Corp",
        "domain_name": "acme.com",
        "average_rating": 4.5,
        "use_cases": ["Email Marketing"],
        "transcripts": [
          {
            "id": "abc123",
            "title": "Interview with VP Marketing at Acme Corp",
            "date": "2024-03-15",
            "display_date": "March 2024",
            "buyer_perspective": "Their focus is on...",
            "relevant_tech_stack": [
              {"product": "Salesforce Marketing Cloud", "rating": 4, "use_cases": ["Email campaigns"]}
            ]
          }
        ]
      }
    ],
    "other_products_in_buyers_tech_stack": [
      {
        "vendor_slug": "hubspot",
        "vendor_name": "HubSpot",
        "overlap_pct": 62.5,
        "avg_rating_by_vendor_buyers": 3.9,
        "avg_rating": 4.1
      }
    ],
    "other_products_in_buyers_tech_stack_total_count": 18,
    "similar_vendors_by_use_case": [
      {"slug": "hubspot", "name": "HubSpot"}
    ],
    "links": {
      "buyers": "/api/v1/vendors/salesforce/buyers",
      "buyers_also_buy": "/api/v1/vendors/salesforce/buyers_also_buy"
    }
  }
}
```

### Response fields

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Vendor company name |
| `slug` | string | URL-safe vendor identifier |
| `domain_name` | string | Vendor website domain |
| `median_rating` | float | Median buyer rating (1–5) |
| `average_rating` | float | Average buyer rating (1–5) |
| `ratings_count` | integer | Number of ratings |
| `transcript_count` | integer | Number of transcripts mentioning this vendor |
| `buyer_count` | integer | Number of distinct buyers |
| `products` | string[] | Products from this vendor found in buyer tech stacks |
| `use_cases` | string[] | Use cases this vendor is associated with |
| `likes` | object[] \| null | AI-generated summary of what buyers like (may be `null` while cache warms) |
| `likes[].headline` | string | Short summary of the theme |
| `likes[].paragraph` | string | Detailed explanation with supporting evidence from transcripts |
| `dislikes` | object[] \| null | AI-generated summary of what buyers dislike (may be `null` while cache warms) |
| `dislikes[].headline` | string | Short summary of the theme |
| `dislikes[].paragraph` | string | Detailed explanation with supporting evidence from transcripts |
| `buyers` | object[] | First 10 buyers (use `/buyers` sub-endpoint for full list) |
| `buyers[].company` | string \| null | Buyer company name (`null` for anonymous transcripts) |
| `buyers[].domain_name` | string \| null | Buyer company domain (`null` for anonymous transcripts) |
| `buyers[].average_rating` | float | Average rating given by this buyer |
| `buyers[].use_cases` | string[] | Use cases this buyer evaluates the vendor for |
| `buyers[].transcripts` | object[] | Transcripts from this buyer referencing the vendor |
| `other_products_in_buyers_tech_stack` | object[] | First 10 products also found in buyers' tech stacks |
| `other_products_in_buyers_tech_stack_total_count` | integer | Total count of co-occurring products |
| `similar_vendors_by_use_case` | object[] | Vendors with overlapping use cases |
| `links.buyers` | string | URL for the paginated buyers sub-endpoint |
| `links.buyers_also_buy` | string | URL for the paginated buyers-also-buy sub-endpoint |

---

## List vendor buyers

```
GET /api/v1/vendors/:slug/buyers
```

Paginated list of buyers for a vendor. Returns the same buyer objects as the vendor profile.

### Query parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `product` | string | Filter by product name |
| `use_case` | string | Filter by use case name |
| `page` | integer | Page number (default: `1`) |
| `per_page` | integer | Results per page (default: `5`, max: `50`) |

### Response

```json
{
  "data": [ /* buyer objects — same shape as in vendor profile */ ],
  "meta": {"total_count": 38, "page": 1, "per_page": 5}
}
```

---

## Buyers also buy

```
GET /api/v1/vendors/:slug/buyers_also_buy
```

Paginated list of other products commonly found in the same buyers' tech stacks.

### Query parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `product` | string | Filter by product name |
| `use_case` | string | Filter by use case name |
| `page` | integer | Page number (default: `1`) |
| `per_page` | integer | Results per page (default: `5`, max: `50`) |

### Response

```json
{
  "data": [
    {
      "vendor_slug": "hubspot",
      "vendor_name": "HubSpot",
      "overlap_pct": 62.5,
      "avg_rating_by_vendor_buyers": 3.9,
      "avg_rating": 4.1
    }
  ],
  "meta": {"total_count": 18, "page": 1, "per_page": 5}
}
```

| Field | Type | Description |
|-------|------|-------------|
| `vendor_slug` | string | URL-safe vendor identifier |
| `vendor_name` | string | Vendor company name |
| `overlap_pct` | float | Percentage of buyers who also use this vendor |
| `avg_rating_by_vendor_buyers` | float | How this vendor's buyers rate the co-occurring product |
| `avg_rating` | float | Overall average rating for the co-occurring product |
