Prospects

Import Prospects

POST /v1/prospects/import

POST/v1/prospects/import
POST
/v1/prospects/import

To import new prospects

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

prospectListobject

The array of prospect list. Each prospect is represented by an array of fields.

Example: [{"fields":[{"id":"0VOLRwYe82","value":"john"},{"id":"pRjY60lBPa","value":"smith"},{"id":"KNz9Zgl7R3","value":"[email protected]"}]}]

stepIdnumber

Optional. Set the step to which the prospect is to be added

Example: "0VOLRwYe82"

verifyProspectsboolean

Optional. Set to "true" if prospect's email address should be verified

conflictActionstring

Conflict action to take if we attempt to add an already existing prospect

KeyValueDescription
overwriteOverwriteUpdates existing fields using data from the CSV. Fields that are currently empty will not be filled in
noUpdateSkip Existing ProspectsKeeps existing prospect field details unchanged and does not apply any updates.
addMissingFieldsAdd Missing FieldsFills in fields that are currently empty using data from the CSV. Existing field data is not changed
upsertUpdate All FieldsUpdates existing fields using data from the CSV and adds any that are missing. A blank cell clears the existing value
Value in: "overwrite" | "noUpdate" | "addMissingFields" | "upsert"

Responses

201
Prospect Import Status Codes :
Status: 10000   Description: Success
Status: 10100   Description: Invalid Email
Status: 10200   Description: Prospect already present in another step of same sequence
Status: 10300   Description: Mismatch in custom field type
Status: 10400   Description: Nothing to update
Status: 10500   Description: Nothing to overwrite
Status: 10600   Description: Duplicate prospect
Status: 10700   Description: Bounced prospect
Status: 10800   Description: Unsubscribed prospect
Status: 10900   Description: More then One Separator
Status: 11000   Description: Prospect already present with different owner
Status: 12000   Description: Prospect is active in another sequence
{
  "message": "Prospects have been imported",
  "payload": [
    {
      "email": "[email protected]",
      "status": 10200
    },
    {
      "email": "[email protected]",
      "status": 10200
    }
  ]
}

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/prospects/import" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prospectList": [
    {
      "fields": [
        {
          "id": "0VOLRwYe82",
          "value": "john"
        },
        {
          "id": "pRjY60lBPa",
          "value": "smith"
        },
        {
          "id": "KNz9Zgl7R3",
          "value": "[email protected]"
        }
      ]
    }
  ],
  "stepId": "0VOLRwYe82",
  "verifyProspects": false,
  "conflictAction": "overwrite"
}'

Response

No response body