collingmedia/lasso-api

A PHP SDK for the Lasso CRM API.

v0.0.1 2019-07-11 22:37 UTC

This package is auto-updated.

Last update: 2024-10-12 09:56:24 UTC


README

Latest Version on Packagist Build Status StyleCI Total Downloads

Manage Registrant and Inventory data within Lasso CRM. Authorization header with a Bearer JWT api key token is required for all requests. API keys are project/location based, and can be obtained from your business contact with Lasso Data Systems. In the future, Project Admin's will be able to generate their own api keys from the Lasso CRM web application. To try it out in swagger: - Select the Authorize button and place your api key in the textbox - Ensure that the api key is prefixed with Bearer including a space separating Bearer from the api key - Go to the route you want to try out in the swagger definition - Select Try it out - Input any required fields, query params, and request payload - Select Execute Alternatively, you can try it on your command line with curl, for example: curl -X GET \"https://api.lassocrm.com/v1/registrants/123456\" -H \"accept: application/json\" -H \"Authorization: Bearer ***apikey***\"

Requirements

PHP 7.0 and later

Installation & Usage

Composer

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/lasso-api/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: JwtAuthorizer
$config = CollingMedia\Lasso\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = CollingMedia\Lasso\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new CollingMedia\Lasso\Api\InventoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->inventoryGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->inventoryGet: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.lassocrm.com/v1

Documentation For Models

Documentation For Authorization

JwtAuthorizer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header