NAV
bash php python javascript

Info

Welcome to the generated API reference. Get Postman Collection

Authorization

Authorization is done by using the Bearer token provided to you when you became a partner. The authorization header will therefor look like this: Authorization: Bearer {TOKEN}

In case of a failed authorization you will always receive a 401 Unauthorized response header with the following body: { "message": "Unauthenticated." }

Additional notes

The Content-Type and Accept are optional but recommended and they should both be application/json

In case of a validation errors you will always receive a 422 Unprocessable Entity header. Example: { "zip": [ "The zip code is required" ] }

Leads

api/leads/add


Requires authentication

Example request:

curl -X POST \
    "https://api.medicaidplanningassistance.org/api/leads/add" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"first_name":"John","last_name":"Smith","email":"[email protected]","phone":"2182222222","zip":"12345","city":"Los Angeles","state":"CA"}'

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.medicaidplanningassistance.org/api/leads/add',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
        'json' => [
            'first_name' => 'John',
            'last_name' => 'Smith',
            'email' => '[email protected]',
            'phone' => '2182222222',
            'zip' => '12345',
            'city' => 'Los Angeles',
            'state' => 'CA',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.medicaidplanningassistance.org/api/leads/add'
payload = {
    "first_name": "John",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "2182222222",
    "zip": "12345",
    "city": "Los Angeles",
    "state": "CA"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
    "https://api.medicaidplanningassistance.org/api/leads/add"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "first_name": "John",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "2182222222",
    "zip": "12345",
    "city": "Los Angeles",
    "state": "CA"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 4,
    "name": "Jessica Jones",
    "error": false,
    "message": "Lead Accepted"
}

Example response (422):

{
    "error": true,
    "message": "The phone number is required"
}

Example response (422):

{
    "error": true,
    "message": "The zip code must be numeric with a length of 5"
}

HTTP Request

POST api/leads/add

Body Parameters

Parameter Type Status Description
first_name string required The first name must be a string between 1 and 100 characters
last_name string required The last name must be a string between 1 and 100 characters
email string required A valid email address.
phone string required The phone number must be a string of 10 digits [0-9]{10}
state string required The 2 letter state code of the lead. Example: CA
medicaid_enrollment_status string optional If provided, valid values are: one of ["Currently on Medicaid", "Medicaid Application Pending", "Medicaid Application Denied", "Not Yet Applied for Medicaid", "Will Not Apply for Medicaid", "Currently on Medicaid Long Term Care", "Currently on Regular Medicaid" ]
zip string optional If provided, the zip code must be a string of digits with a length of 5
city string optional If provided, the city must be a string between 2 and 200 characters
source_id int optional Only if a source_id has been provided to you
relationship_to_claimant string optional If provided, valid values are: one of ["N/A", "Parent", "Spouse", "Yourself", "Loved one", "Client"]
marital_status string optional If provided, valid values are: one of ["N/A", "Not Married", "Married", "Divorced", "Widowed", "Never married"]
type_of_care string optional If provided, valid values are: one of ["Nursing home", "Assisted living", "Home care", "Not Sure or Other"]
description string optional We suggest that you concatenate all available data points in this field

Support and Bug Reports

We encourage you to send any potential bug reports to info[at]codepunker.com.

If you send a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue.

Security Vulnerabilities

If you discover a security vulnerability within our API, please send an email to Daniel Gheorghe at info[at]codepunker.com. All security vulnerabilities will be promptly addressed.