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 /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

Sample Request

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

GET /api/v2.0/leads.jsonxml?state=KY&license=CNA&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"
    },
    {
        "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"
    }
]
<?xml version="1.0"?>
<leads>
  <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>
  </lead>
</leads>

Fetch a Single Lead

GET /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 /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": "CNA",
    "experience": "31 - 35",
    "certification": "PALS",
    "specialties": "Diabetes",
    "preferred_specialties": "Rehab",
    "contact_time": "Afternoon",
    "work_eligible": "No",
    "preferred_destinations": "Pennsylvania",
    "licensed_states": "Utah",
    "license_number": "r0w2q1w3n1t1k8l8i7v8",
    "license_state": "Kentucky",
    "license_date_issued": "07\/27\/1938",
    "license_date_expires": "10\/03\/1954",
    "license_investigated": "Yes",
    "license_investigation_details": "",
    "travel_status": ""
}
<?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>LPN</license>
    <experience>31 - 35</experience>
    <certification>BLS</certification>
    <specialties>Postpartum</specialties>
    <preferred_specialties>PCU</preferred_specialties>
    <contact_time>Evening</contact_time>
    <work_eligible>No</work_eligible>
    <preferred_destinations>Wyoming</preferred_destinations>
    <licensed_states>Texas</licensed_states>
    <license_number>e3f0b4g4z0e5d2w4k4b4</license_number>
    <license_state>Hawaii</license_state>
    <license_date_issued>03/08/1978</license_date_issued>
    <license_date_expires>11/25/1980</license_date_expires>
    <license_investigated>Yes</license_investigated>
    <license_investigation_details></license_investigation_details>
    <travel_status></travel_status>
  </lead>
</leads>