Fields

Fetch all fields for a lead


Return all the fields for a specified lead
GET /leads/:lead_id/fields
lead_id Unique identifier of the lead Required
page Page number of fields to return. Returns empty array if the page has no fields. If page parameter isn't present, returns the first page Optional
size Number of fields to return in a page. If size parameter isn't present, returns the page with 25 fields Optional
Response Body
[
    {
        "_id": "527cbf34cce8b4f468000002",
        "name": "Field1",
        "value": "Value1"
    },
    {
        "_id": "527cbf37cce8b44df7000005",
        "name": "Field2",
        "value": ""
    },
    {
        "_id": "527cbf3ecce8b4f468000008",
        "name": "Field 3",
        "value": "Value 3"
    }
]

Show a field


Show details of an individual field for a specified lead
GET /leads/:lead_id/fields/:field_id
lead_id Unique identifier of the lead Required
field_id Unique identifier of the field Required
Response Body
{
    "_id": "527cbf34cce8b4f468000002",
    "name": "Field1",
    "value": "Value1"
}

Create a field


Create a new field for a specified lead
POST /leads/:lead_id/fields
lead_id Unique identifier of the lead Required
name Name of the field Required
value Value of the field Optional
Response Body
{
    "_id": "527cc0cbcce8b40d3100000d",
    "name": "Field4",
    "value": "Value4"
}

Update a field


Update the value of a field for a specified lead
PUT /leads/:lead_id/fields/:field_id
lead_id Unique identifier of the lead Required
field_id Unique identifier of the field Required
value Value of the field Required
Response Body
{
    "_id": "527cc0cbcce8b40d3100000d",
    "name": "Field4",
    "value": "NewValue"
}

Delete a field


Delete a field
DELETE /leads/:lead_id/fields/:field_id
lead_id Unique identifier of the lead Required
field_id Unique identifier of the field Required
Response Body
{}