Sources
Return all the sources
GET /sources
|
page
|
Page number of sources to return. Returns empty array if the page has no sources. If page parameter isn't present, returns the first page
|
Optional
|
size
|
Number of sources to return in a page. If size parameter isn't present, returns the page with 25 sources
|
Optional
|
[
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source",
"leads": [
{
"_id": "521f26eccce8b4310e000074",
"name": "[Sample] Foo"
}
]
}
]
Show details of an individual source
GET /sources/:source_id
|
source_id
|
Unique identifier of the source
|
Required
|
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source",
"leads": [
{
"_id": "521f26eccce8b4310e000074",
"name": "[Sample] Foo"
}
]
}
Create a new source
POST /sources
|
name
|
Name of the source
|
Required
|
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source"
}
Update the name of a source
PUT /sources/:source_id
|
source_id
|
Unique identifier of the source
|
Required
|
name
|
Name of the source
|
Optional
|
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source",
}
Delete a source
DELETE /sources/:source_id
|
source_id
|
Unique identifier of the source
|
Required
|
Return all the sources for a specified lead
GET /leads/:lead_id/sources
|
lead_id
|
Unique identifier of the lead
|
Required
|
page
|
Page number of sources to return. Returns empty array if the page has no sources. If page parameter isn't present, returns the first page
|
Optional
|
size
|
Number of sources to return in a page. If size parameter isn't present, returns the page with 25 sources
|
Optional
|
[
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source",
"leads": [
{
"_id": "521f26eccce8b4310e000074",
"name": "[Sample] Foo"
}
]
}
]
Show details of an individual source associated with a specified lead
GET /leads/:lead_id/sources/:source_id
|
lead_id
|
Unique identifier of the lead
|
Required
|
source_id
|
Unique identifier of the source
|
Required
|
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source",
"leads": [
{
"_id": "521f26eccce8b4310e000074",
"name": "[Sample] Foo"
}
]
}
Add a source to a specified lead
PUT /leads/:lead_id/sources/:source_id
|
lead_id
|
Unique identifier of the lead
|
Required
|
source_id
|
Unique identifier of the source
|
Required
|
{
"_id": "527cdd8acce8b4e278000020",
"name": "Foo Source"
}
Remove a source from the list of sources associated with a specified lead
DELETE /leads/:lead_id/sources/:source_id
|
lead_id
|
Unique identifier of the lead
|
Required
|
source_id
|
Unique identifier of the source
|
Required
|