Brand Competitors

Rename a competitor

Changes the competitor name and keeps its decision. For a linked competitor the synonym written for the old name is removed (unless another competitor still links that name to the same brand, or the synonym was added by hand or by another pipeline), the new name is written as a synonym unless another brand already has it, and unlinked rows with the new name are removed. Renaming a scraped competitor marks it admin-added, so a re-scrape never removes it, and keeps the old name on record as removed by an admin, so a re-scrape does not add the old name back. Requires approve-company permission.

patch/api/admin/brand-competitors/{id}

Request

Path parameters

idinteger required

Request body

raw_namestring required

New competitor name.

Example request

{
  "raw_name": "PepsiCo"
}

Response

Competitor renamed.

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.