Documentation :: TravelNurseSource.com

TravelNurseSource API v2.0

Lead Data

The leads endpoint is used to fetch application data submitted by leads on TravelNurseSource.

Fetch leads

GET https://www.travelnursesource.com/api/v2.0/leads.jsonxml

Parameters

Parameters should be appended to the endpoint URL as a standard query string.

Name Format/Values Required Description
state USPS 2-letter abbreviation No Fetch only leads who reside in the specified state
license One of the following values:
  • RN
  • LPN
  • CNA
No Fetch only leads of the specified leadtype
start_date YYYY-MM-DD No Fetch only leads who submitted their application to your company after the specified date
end_date YYYY-MM-DD No Fetch only leads who submitted their application to your company before the specified date
sort One of the following values:
  • id
  • name
  • state
  • license
  • sent
No Sort by the specified field. Defaults to ascending order; for descending order, put a - (hyphen) in front of the field name.

For example: -sent would sort the leads in descending order based on the date they submitted their application to your company.
max Integer > 0 No Maximum number of leads to return
has_job_apps 1 or 0 No Fetch only leads who have (1) or have not (0) applied to one of your jobs.

Sample Request

To show only 2 company leads in Kentucky, sorted alphabetically by name, your request would look like this:

GET https://www.travelnursesource.com/api/v2.0/leads.jsonxml?state=KY&license=RN&sort=name&max=2

Sample Response

[
    {
        "id": "12345",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@test.com",
        "phone": "1234567890",
        "license": "CNA",
        "city": "Louisville",
        "state": "KY",
        "zip": "40210",
        "sent": "2015-12-08T15:24:35-05:00",
        "has_job_apps": true
    },
    {
        "id": "67890",
        "first_name": "Jane",
        "last_name": "Smith",
        "email": "janesmith@test.com",
        "phone": "1234657890",
        "license": "LPN",
        "city": "Lexington",
        "state": "KY",
        "zip": "40503",
        "sent": "2015-12-08T15:24:35-05:00",
        "has_job_apps": false
    }
]
<?xml version="1.0"?>
<leads>
  <lead>
    <id>12345</id>
    <first_name>John</first_name>
    <last_name>Doe</last_name>
    <email>johndoe@test.com</email>
    <phone>1234567890</phone>
    <license>CNA</license>
    <city>Louisville</city>
    <state>KY</state>
    <zip>40210</zip>
    <sent>2015-12-08T15:24:35-05:00</sent>
    <has_job_apps>1</has_job_apps>
  </lead>
  <lead>
    <id>67890</id>
    <first_name>Jane</first_name>
    <last_name>Smith</last_name>
    <email>janesmith@test.com</email>
    <phone>1234657890</phone>
    <license>LPN</license>
    <city>Lexington</city>
    <state>KY</state>
    <zip>40503</zip>
    <sent>2015-12-08T15:24:35-05:00</sent>
    <has_job_apps></has_job_apps>
  </lead>
</leads>

Fetch a Single Lead

GET https://www.travelnursesource.com/api/v2.0/leads.jsonxml/{id}

Parameters

Parameters should be appended to the endpoint URL.

Field Format/Values Required Description
id Integer Yes The ID number of the lead you want to fetch.

Sample Request

GET https://www.travelnursesource.com/api/v2.0/leads.jsonxml/12345

Sample Response

{
    "first_name": "John",
    "last_name": "Doe",
    "address": "1234 Example Street",
    "address2": null,
    "city": "Louisville",
    "state": "KY",
    "zip": "40210",
    "email": "johndoe@test.com",
    "phone": "1234567890",
    "license": "RN",
    "experience": "46 - 50",
    "employmentType": "Part-Time",
    "certification": "PALS",
    "specialties": "Pain Management",
    "contact_time": "Afternoon",
    "work_eligible": "Yes",
    "preferred_destinations": "South Carolina",
    "licensed_states": "Tennessee",
    "license_number": "x3o2l2a5l5o1r6k4r9n5",
    "license_state": "California",
    "license_date_issued": "02/25/1958",
    "license_date_expires": "05/22/1938",
    "license_investigated": "No",
    "license_investigation_details": "",
    "travel_status": "None",
    "job_applications": [
        {
            "job_id": 22882,
            "title": "Example Job Title",
            "reference": "EXAMPLE12356",
            "created_at": "1934-02-27T02:42:43+00:00"
        }
    ]
}
<?xml version="1.0"?>
<leads>
  <lead>
    <first_name>John</first_name>
    <last_name>Doe</last_name>
    <address>1234 Example Street</address>
    <address2></address2>
    <city>Louisville</city>
    <state>KY</state>
    <zip>40210</zip>
    <email>johndoe@test.com</email>
    <phone>1234567890</phone>
    <license>RN</license>
    <experience>46 - 50</experience>
    <employmentType>Part-Time</employmentType>
    <certification>PALS</certification>
    <specialties>Pain Management</specialties>
    <contact_time>Afternoon</contact_time>
    <work_eligible>Yes</work_eligible>
    <preferred_destinations>South Carolina</preferred_destinations>
    <licensed_states>Tennessee</licensed_states>
    <license_number>x3o2l2a5l5o1r6k4r9n5</license_number>
    <license_state>California</license_state>
    <license_date_issued>02/25/1958</license_date_issued>
    <license_date_expires>05/22/1938</license_date_expires>
    <license_investigated>No</license_investigated>
    <license_investigation_details></license_investigation_details>
    <travel_status>None</travel_status>
    <job_applications>
      <job_id>22882</job_id>
      <title>Example Job Title</title>
      <reference>EXAMPLE12356</reference>
      <created_at>1934-02-27T02:42:43+00:00</created_at>
    </job_applications>
  </lead>
</leads>