Brand Competitors

Add a competitor to a brand

Adds a competitor by name, optionally linked to a SponsorUnited brand. The row is marked admin-added, so a re-scrape never removes it. A linked add counts as approved, removes any unlinked row with the same name and writes the name as a synonym of the linked brand, unless that name is already a synonym of another brand (the link is still saved). A competitor an admin removed earlier is restored instead of duplicated. Requires approve-company permission.

post/api/admin/brand-competitors

Request

Request body

source_brand_idinteger required

The brand (companies.id) the competitor is added to.

raw_namestring required

Competitor name as the admin typed it.

target_brand_idinteger nullable

SponsorUnited brand (companies.id) to link the competitor to. Leave out to add an unlinked competitor. Linking writes the name as a synonym of that brand.

Example request

{
  "source_brand_id": 4711,
  "raw_name": "Pepsi",
  "target_brand_id": 9001
}

Response

Competitor added.

Example response

{
  "data": {
    "id": 81,
    "source_brand_id": 4711,
    "raw_name": "Pepsi Inc.",
    "normalized_name": "pepsi",
    "linked": true,
    "target_brand": {
      "id": 9001,
      "name": "Pepsi"
    },
    "decision_source": "auto_linked",
    "origin": "scraped",
    "decision": "auto_linked",
    "match_source": "meilisearch",
    "score_at_decision": 97,
    "decided_by": {
      "id": 42,
      "name": "Jane Reviewer",
      "email": "jane@sponsorunited.com"
    }
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.