Leads API

List leads

GET /lead
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • id

The following scopes are needed:

  • lead_show
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 447
Content-Type: application/json
[
  {
    "id": 1,
    "user_id": 1,
    "contact_id": 1,
    "sub_contact_id": null,
    "lead_source_id": 2,
    "lead_campaign_id": null,
    "description": "Scheint interessiert zu sein.",
    "date": "2013-01-16",
    "reference_character": 70,
    "acquire_possibility": 20,
    "lead_status_id": 1
  },
  {
    "id": 2,
    "user_id": 1,
    "contact_id": 1,
    "sub_contact_id": null,
    "lead_source_id": null,
    "lead_campaign_id": null,
    "description": "",
    "date": "2013-01-16",
    "reference_character": 10,
    "acquire_possibility": 60,
    "lead_status_id": 1
  }
]

Show leads

GET /lead/2
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • lead_show
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 209
Content-Type: application/json
{
  "id": 2,
  "user_id": 1,
  "contact_id": 1,
  "sub_contact_id": null,
  "lead_source_id": null,
  "lead_campaign_id": null,
  "description": "",
  "date": "2013-01-16",
  "reference_character": 10,
  "acquire_possibility": 60,
  "lead_status_id": 1
}

Create lead

POST /lead
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "lead_status_id": 1,
  "contact_id": 1,
  "date": "2013-01-16",
  "reference_character": 10,
  "acquire_possibility": 60,
  "user_id": 1
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
acquire_possibility required undefined Acquire possibility in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
contact_id required Resource contact
date required date (Format yyyy-mm-dd)
lead_status_id required Resource lead_status
reference_character required undefined Reference character in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
user_id required Resource user
description optional string
estimated_amount optional decimal
lead_campaign_id optional Resource lead_campaign
lead_source_id optional Resource lead_source
sub_contact_id optional Resource contact

The following scopes are needed:

  • lead_edit
Status: 201 Created
X-Authenticated-User: apiextract_1
Content-Length: 209
Content-Type: application/json
{
  "id": 2,
  "user_id": 1,
  "contact_id": 1,
  "sub_contact_id": null,
  "lead_source_id": null,
  "lead_campaign_id": null,
  "description": "",
  "date": "2013-01-16",
  "reference_character": 10,
  "acquire_possibility": 60,
  "lead_status_id": 1
}

Overwrite lead

PUT /lead/2
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "lead_status_id": 1,
  "contact_id": 1,
  "date": "2013-01-16",
  "reference_character": 10,
  "acquire_possibility": 60,
  "user_id": 1
}
Name Required Type Description
callback optional string
Name Required Type Description
acquire_possibility required undefined Acquire possibility in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
contact_id required Resource contact
date required date (Format yyyy-mm-dd)
lead_status_id required Resource lead_status
reference_character required undefined Reference character in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
user_id required Resource user
description optional string
estimated_amount optional decimal
lead_campaign_id optional Resource lead_campaign
lead_source_id optional Resource lead_source
sub_contact_id optional Resource contact

The following scopes are needed:

  • lead_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 209
Content-Type: application/json
{
  "id": 2,
  "user_id": 1,
  "contact_id": 1,
  "sub_contact_id": null,
  "lead_source_id": null,
  "lead_campaign_id": null,
  "description": "",
  "date": "2013-01-16",
  "reference_character": 10,
  "acquire_possibility": 60,
  "lead_status_id": 1
}

Edit lead

POST /lead/2
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "lead_status_id": 1,
  "contact_id": 1,
  "date": "2013-01-17",
  "reference_character": 10,
  "acquire_possibility": 60,
  "user_id": 1
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
acquire_possibility optional undefined Acquire possibility in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
contact_id optional Resource contact
date optional date (Format yyyy-mm-dd)
description optional string
estimated_amount optional decimal
lead_campaign_id optional Resource lead_campaign
lead_source_id optional Resource lead_source
lead_status_id optional Resource lead_status
reference_character optional undefined Reference character in %.
Valid values 0-100 in steps of 10 (0, 10, 20, 30, ...)
sub_contact_id optional Resource contact
user_id optional Resource user

The following scopes are needed:

  • lead_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 209
Content-Type: application/json
{
  "id": 2,
  "user_id": 1,
  "contact_id": 1,
  "sub_contact_id": null,
  "lead_source_id": null,
  "lead_campaign_id": null,
  "description": "",
  "date": "2013-01-17",
  "reference_character": 10,
  "acquire_possibility": 60,
  "lead_status_id": 1
}

Delete lead

DELETE /lead/2
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • lead_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 16
Content-Type: application/json
{
  "success": true
}