NAV
Shell JavaScript Ruby Php Python

Leads2Keys public API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Leads2Keys public API

Base URLs:

Terms of service Email: Support

Authentication

Scope Scope Description
read:user read user

Default

api version

Code samples

# You can also use wget
curl -X GET https://api.leads2keys.io/ \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.leads2keys.io/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.leads2keys.io/',
  params: {
  }, headers: headers

p JSON.parse(result)

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.leads2keys.io/', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.leads2keys.io/', headers = headers)

print(r.json())

GET /

general information about the service

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK successful operation Inline
400 Bad Request Invalid status value None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

mandat

Operation about mandats

user's mandats

Code samples

# You can also use wget
curl -X GET https://api.leads2keys.io/mandats?status=available \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.leads2keys.io/mandats?status=available',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.leads2keys.io/mandats',
  params: {
  'status' => 'array[string]'
}, headers: headers

p JSON.parse(result)

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.leads2keys.io/mandats', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.leads2keys.io/mandats', params={
  'status': [
  "available"
]
}, headers = headers)

print(r.json())

GET /mandats

get an array of user mandats

Parameters

Name In Type Required Description
status query array[string] true Status values that need to be considered for filter

Enumerated Values

Parameter Value
status available
status pending
status sold

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK successful operation Inline
400 Bad Request Invalid status value None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Schemas

User

{
  "id": "string",
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none
username string false none none
firstName string false none none
lastName string false none none
email string false none none
phone string false none none