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