Retrieve a customer's lead source

Retrieves lead source data for a customer with a specified ID.

A lead source is the marketing campaign that generates customer interaction, a sale, or a trial. For more information, see Lead source attribution.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

get
/customers/{id}/lead-source
Request samples
$customer = $client->customers()->load('myCustomerId');
$leadSource = $customer->getLeadSource();
Responses

200

Lead source retrieved.

Response Schema: application/json
medium
string or null <= 512 characters

Category of the lead source traffic. For example, the medium could be organic search, Google ads, Display ads, and so on.

source
string or null <= 512 characters

Domain, platform, or channel from which the lead source originates.

campaign
string or null <= 512 characters

Campaign name of the lead source.

term
string or null <= 512 characters

Term associated with a lead source.

content
string or null <= 512 characters

Content contained in the lead source content. For example, content could be graphics, video, and so on.

affiliate
string or null <= 512 characters

Individual or entity that is affiliated with the lead source.

subAffiliate
string or null <= 512 characters

Individual or entity that is associated with a lead source affiliate. In other products, this field may also be referred to as sub ID or click ID in some.

salesAgent
string or null <= 512 characters

Name of the sales agent associated with the lead source.

clickId
string or null <= 512 characters

ID of the lead source click. This value is passed in the ad click URL for tracking and campaign attribution.

path
string or null <= 512 characters

URL from which the lead source originates.

referrer
string or null <url> <= 2083 characters
createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects

Related links.

object

Lead source information.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

Response samples
application/json
{ "medium": "string", "source": "string", "campaign": "string", "term": "string", "content": "string", "affiliate": "string", "subAffiliate": "string", "salesAgent": "string", "clickId": "string", "path": "string", "referrer": "string", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ ], "original": { "medium": "string", "source": "string", "campaign": "string", "term": "string", "content": "string", "affiliate": "string", "subAffiliate": "string", "salesAgent": "string", "clickId": "string", "path": "string", "referrer": "string", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", } }