Lead Source GET

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/contact-service/lead-source/{ID-SET}

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

Through our other API messages, you’ll find that we show you the lead source currently assigned to an order or a contact. Using this message, you can retrieve any additional information about the lead source.

Detailed field description:

Field Name Field Description
id The lead source's unique ID.
ownerId The owner ID (if any). If no ID exists, result will be '0'.
parentId The parent ID (if any). If no ID exists, result will be '0'.
name The lead source display name.
isActive Boolean value showing whether lead source is active.

Note: The ID set in the request URI is optional. If no ID set is given, the call will automatically return ALL lead sources.

Example 1

Request all lead sources. If successful, HTTP response status 200.

Request URI

/lead-source

Response

{
	"response": [
		{
			"id": 1,
			"ownerId": 0,
			"parentId": 0,
			"name": "Word of mouth",
			"isActive": true
		},
		{
			"id": 2,
			"ownerId": 0,
			"parentId": 0,
			"name": "Other search engine",
			"isActive": true
		},
		{
			"id": 3,
			"ownerId": 0,
			"parentId": 0,
			"name": "Existing client",
			"isActive": true
		},
		{
			"id": 4,
			"ownerId": 0,
			"parentId": 0,
			"name": "Google",
			"isActive": true
		}
	]
}

Example 2

Request single or multiple lead sources using an ID Set. If successful, HTTP response status 200.

Request URI

/lead-source/1,3

Response

{
	"response": [
		{
			"id": 1,
			"ownerId": 0,
			"parentId": 0,
			"name": "Word of mouth",
			"isActive": true
		},
		{
			"id": 3,
			"ownerId": 0,
			"parentId": 0,
			"name": "Existing client",
			"isActive": true
		}
	]
}