Create a customer's lead source

Creates a lead source 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.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

Lead Source resource.

medium
string

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

source
string

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

campaign
string

Campaign name of the lead source.

term
string

Term associated with a lead source.

content
string

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

affiliate
string

Individual or entity that is affilated with the lead source.

subAffiliate
string

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

Name of the sales agent associated with the lead source.

clickId
string

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

path
string

URL from which the lead source originates.

referrer
string

Lead source referrer URL.

Responses
201

Lead source created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
medium
string

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

source
string

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

campaign
string

Campaign name of the lead source.

term
string

Term associated with a lead source.

content
string

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

affiliate
string

Individual or entity that is affilated with the lead source.

subAffiliate
string

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

Name of the sales agent associated with the lead source.

clickId
string

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

path
string

URL from which the lead source originates.

referrer
string

Lead source referrer URL.

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.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer"
object

Lead source information.

medium
string

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

source
string

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

campaign
string

Campaign name of the lead source.

term
string

Term associated with a lead source.

content
string

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

affiliate
string

Individual or entity that is affilated with the lead source.

subAffiliate
string

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

Name of the sales agent associated with the lead source.

clickId
string

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

path
string

URL from which the lead source originates.

referrer
string

Lead source referrer URL.

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.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

put/customers/{id}/lead-source
Request 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"
}
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": {
    }
}