Skip to content

MngCreateAffiliateReferral

This is the recommended CRM command for affiliate onboarding. It creates the affiliate identity, grants access to the effective brand, creates its primary tracking link, and returns a URL built from the brand terminal_host.

{
  "command": "MngCreateAffiliateReferral",
  "extID": "1",
  "data": {
    "company_name": "Partner Ltd",
    "contact_name": "Jane Doe",
    "email": "[email protected]",
    "phone": "+35700000000"
  }
}

Request fields

Field Type Required Description
company_name string No Affiliate company or display name
contact_name string No Contact person
email string No Contact email
password string No Initial affiliate cabinet password (8–128 characters); enables cabinet access for this brand
phone string No Contact phone
code string No Affiliate code; generated when omitted
brand string Scope dependent Required for a super administrator without a fixed brand
campaign_id integer Deprecated Ignored; the primary affiliate link is always global
manager_id integer No Assigned manager; defaults to the current manager
link_code string No Tracking-link code; generated when omitted
link_name string No Link name; generated from the affiliate name when omitted
landing_path string No Defaults to /register
utm_*, sub_id* string No Optional advanced attribution parameters

Default tracking values are utm_source=<affiliate code> and utm_medium=affiliate.

The created primary link always has affiliate_id=<new affiliate> and campaign_id=0. To attribute part of the affiliate traffic to a campaign, create an additional combined link with MngAddMarketingLink.

Response

{
  "affiliate_id": 15,
  "affiliate_code": "AFF-72d6c928-318",
  "link_id": 42,
  "url": "https://brand.example/register?affiliate=AFF-72d6c928-318&link=REF-91a01d3f-825",
  "created": true
}

CRM should display url immediately and provide a Copy link action. It must not construct the URL on the client.