Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update the response body description and status code

...

Excerpt

Creates a new Lead entity. The leadSourceID and all fields are configured within the Rubiq Lead Management app.


Endpoint ID:

1100

Method
Status
colourGreen
titlePOST
URL:

/

user

entity/lead/{leadSourceID}


leadSourceID

A GUID identifying the type of Lead to create

Request body:

JSON data with properties corresponding to the fields in the specified Lead type

keys: Required. Uniquely identifiable keys for the lead, configured in the Rubiq Lead Management app.

data: Optional. Lead entity data fields, configured in the Rubiq Lead Management app. Note that this property is only optional as long as no required data fields have been configured.

context: Optional. Extra information about where this lead has come from, e.g. pageUrlticketpopupNamepartnerNameemployeeName, ...

Code Block
titleExample 1 - Contract specifies full name, email and password:
languagejs
{
	"keys": {
        "email": "mailbox@mailserver.com",
        "mobile": "123 456 789"
    },
	"data": {
        "name": "John Doe",
        "address": "1 Harbour Tce., Townsville"
    },
	"context": {
        "pageUrl": "https://domain.org/lead/generation",
        "campaignID": "f3ff7b9a-c57c-409b-8d6a-8d6c44640f0e"
    }
}



Span
stylewhite-space:
pre
nowrap

Response body:

JSON data with key for


The Rubiq ID of the newly created

or updated Lead including the lead data

lead entity is returned, unless the lead source has been configured to not create entities, in which case an empty JSON block { } is returned.

Code Block
titleExample 1 – App setting specifies no specific key:
languagejs
{
	"
entityID
id": 
123456, "keys": { "email": "mailbox@mailserver.com", "mobile": "123 456 789" }, "data": { "name": "John Doe", "address": "1 Harbour Tce., Townsville" }
12345
}


Status codes:

HttpStatusCode
200

A Lead already exists with matching keys - the Lead data was updated.

201
ApiStatusSubCode
Description
200
Lead created
400

Request is valid but data validation failed

In case SMS verification is enabled, the following sub codes may be returned:

400.1Inactive leadSourceID
400.3Required keys field missing
400.4Required data field missing
400.5Required context field missing
404404.4

leadSourceID not found