Lenddo Member API docs

Explore the API with ease. This document will be continually updated as each API endpoint develops.

Lenddo’s APIs follow the Representational state transfer (REST) standard allowing resources created, modified and pulled with a standard set of GET, POST, PUT, DELETE HTTP requests.

Communication with lenddo follows the REST architecture constraints including being stateless & cacheable.

All requests are performed over SSL. All responses are returned as JSON objects.


Global Error Codes

HTTP Status Status Description
200 OK The request was a success.
400 Bad Request Something was wrong with the request. Unless there was a problem with the construction of the request headers a response body will explain what went wrong.
403 Forbidden Either you are using invalid credentials or you do not have access to the requested resource.
404 Page Not Found You specified an ID or section that does not exist. For example you may have specified an id of a member to fetch and that ID is invalid.
409 Confict The request conflicts with a prior request.
500 Internal Error Something went wrong on our end. We’re likely aware of it however if you notice a pattern please let us know.
501 Not Implemented The requested HTTP Method (GET/POST/PUT/DELETE) and Service call combination does not exist.

Authentication

Lenddo’s REST API utilizes the widely-used 615-601-1109. Authentication with the member service requires a signed string affixed to an Authentication header.

Data required for signing a request

Building the signed request

Examples

PHP Example

$date = date("D M j G:i:s T Y");
function signRequest($method, $body, $date, $url) { 
  $contentMd5 = NULL;
  if( !empty( $body ) ) { 
    $contentMd5 = md5( $body );
  }
  $stringToSign = $method . "\n" . $contentMd5 . "\n" . $date . "\n" . $url; 
 
  $string = "LENDDO " . static::$_apiId . ":"; 
  $string .= base64_encode(
  hash_hmac( "sha1", $stringToSign, static::$_apiSecret, TRUE )
  );
  return $string; 
}

Data Types

.

Datatype Standard type Description Specification notes

.

member object Member Object {modified,created,pretty_id,joined_on,privacy,status,login,name,basic,contact,id}

.

products array Products Array [{name}]

.

productsType array Products by Type Array [{product_id,name}]

.

applicationRequirements object Application Requirements Object {name,rules}

.

trustedInvitations object Trusted Invitations Object {status,fb_shared,"relationship","invited_on","id","inviter","invitee"}

End Points