collingmedia / lasso-api
A PHP SDK for the Lasso CRM API.
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2
- phploc/phploc: ^5.0
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^7
- sebastian/phpcpd: ^4.1
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2024-11-12 10:10:13 UTC
README
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
- Address
- AddressRead
- AddressWrite
- Answer
- Answer1
- AuthForbidden
- BicycleLocker
- Component
- ContactInformation
- Creator
- Dates
- DatesLinks
- Deposit
- EmailRead
- EmailWrite
- ErrorInventoryAlreadySynced
- ErrorInventoryCannotBeDeleted
- ErrorInventoryNotFound
- ErrorLimitReached
- ErrorPurchaserNotFound
- ErrorStorageSupplyExhausted
- ExternalId
- FollowUpProcess
- HistoryRead
- HistoryReadFull
- HistoryWithoutContent
- HistoryWithoutContentLinks
- HistoryWrite
- InlineResponse200
- InlineResponse2001
- InlineResponse2001Items
- InlineResponse2001Links
- InlineResponse200Links
- InvalidSubResourceAction
- Inventory
- InventoryCreate
- InventoryFull
- InventoryLinks
- InventoryPlanTypeWrite
- InventoryRead
- InventorySync
- InventoryUpdate
- Note
- Option
- ParkingStall
- Phone
- PhoneRead
- PhoneWrite
- PlanTypeRead
- PlanTypeWrite
- Pricing
- PricingLinks
- PricingRevision
- Project
- ProjectRating
- ProjectRotation
- ProjectSalesRep
- ProjectSecondarySourceType
- ProjectSettings
- ProjectSourceType
- ProjectWebsiteTracking
- Purchaser
- PurchaserCreate
- Question
- Rating
- Realtor
- RealtorCompensation
- RealtorCompensationCutOff
- RealtorCompensationPercentages
- Registrant
- RegistrantNoteRead
- RegistrantNoteWrite
- RegistrantNoteWriteLinks
- RegistrantPersonalInfo
- RegistrantRead
- RegistrantRelationshipCreate
- RegistrantRelationshipRead
- RegistrantRelationshipUpdate
- RegistrantWebsiteTracking
- RegistrantWrite
- RegistrantWriteLinks
- SalesRep
- SecondarySourceType
- SourceType
- StandardError
- Storage
- StorageLocker
- SubResourceNotFound
- Subject
Documentation For Authorization
JwtAuthorizer
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header