Create a customer's lead source

Request

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.

Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required

ID of the resource.

Bodyapplication/jsonrequired

Lead Source resource.

mediumstring 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.

sourcestring or null, <= 512 characters

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

campaignstring or null, <= 512 characters

Campaign name of the lead source.

termstring or null, <= 512 characters

Term associated with a lead source.

contentstring or null, <= 512 characters

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

affiliatestring or null, <= 512 characters

Individual or entity that is affiliated with the lead source.

subAffiliatestring 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.

salesAgentstring or null, <= 512 characters

Name of the sales agent associated with the lead source.

clickIdstring or null, <= 512 characters

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

pathstring or null, <= 512 characters

URL from which the lead source originates.

referrerstring or null, (uri), <= 2083 characters

Lead source referrer URL.

Example:"https://www.rebilly.com"
curl -i -X PUT \
  'https://www.rebilly.com/_mock/catalog/all/customers/{id}/lead-source' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "medium": "string",
    "source": "string",
    "campaign": "string",
    "term": "string",
    "content": "string",
    "affiliate": "string",
    "subAffiliate": "string",
    "salesAgent": "string",
    "clickId": "string",
    "path": "string",
    "referrer": "https://www.rebilly.com"
  }'

Responses

Lead source created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
mediumstring 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.

sourcestring or null, <= 512 characters

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

campaignstring or null, <= 512 characters

Campaign name of the lead source.

termstring or null, <= 512 characters

Term associated with a lead source.

contentstring or null, <= 512 characters

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

affiliatestring or null, <= 512 characters

Individual or entity that is affiliated with the lead source.

subAffiliatestring 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.

salesAgentstring or null, <= 512 characters

Name of the sales agent associated with the lead source.

clickIdstring or null, <= 512 characters

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

pathstring or null, <= 512 characters

URL from which the lead source originates.

referrerstring or null, (uri), <= 2083 characters

Lead source referrer URL.

Example:"https://www.rebilly.com"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

originalobject(LeadSourceData)read-only

Lead source information.

Response
{ "medium": "string", "source": "string", "campaign": "string", "term": "string", "content": "string", "affiliate": "string", "subAffiliate": "string", "salesAgent": "string", "clickId": "string", "path": "string", "referrer": "https://www.rebilly.com", "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": "https://www.rebilly.com", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [] } }