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-04-12 09:00:51 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

Class Method HTTP request Description
InventoryApi inventoryGet GET /inventory Returns a list of all inventories
InventoryApi inventoryInventoryIdDelete DELETE /inventory/{inventoryId} Delete an inventory
InventoryApi inventoryInventoryIdGet GET /inventory/{inventoryId} Get a single inventory
InventoryApi inventoryInventoryIdPut PUT /inventory/{inventoryId} Update an inventory
InventoryApi inventoryInventoryIdResetPost POST /inventory/{inventoryId}/reset Reset an inventory items. Deletes all associated data with the inventory item, e.g. pricing information, options and upgrades, deposits, etc.
InventoryApi inventoryInventoryIdSyncPut PUT /inventory/{inventoryId}/sync Sync an inventory
InventoryApi inventoryPost POST /inventory Create an inventory
InventoryApi inventorySearchGet GET /inventory/search Search inventories by strataLot and inventoryNumber.
InventoryDatesApi inventoryInventoryIdDatesGet GET /inventory/{inventoryId}/dates
InventoryDatesApi inventoryInventoryIdDatesPut PUT /inventory/{inventoryId}/dates
InventoryPlanTypesApi inventoryInventoryIdPlansGet GET /inventory/{inventoryId}/plans
InventoryPlanTypesApi inventoryInventoryIdPlansPut PUT /inventory/{inventoryId}/plans
InventoryPlanTypesApi inventoryPlansGet GET /inventory/plans
InventoryPlanTypesApi inventoryPlansPlanTypeIdGet GET /inventory/plans/{planTypeId}
InventoryPlanTypesApi inventoryPlansPlanTypeIdPut PUT /inventory/plans/{planTypeId}
InventoryPlanTypesApi inventoryPlansPost POST /inventory/plans
InventoryPricingApi inventoryInventoryIdPricingGet GET /inventory/{inventoryId}/pricing
InventoryPricingApi inventoryInventoryIdPricingPut PUT /inventory/{inventoryId}/pricing
InventoryPricingRevisionsApi inventoryInventoryIdPricingRevisionsGet GET /inventory/{inventoryId}/pricing-revisions
InventoryPricingRevisionsApi inventoryInventoryIdPricingRevisionsPost POST /inventory/{inventoryId}/pricing-revisions
InventoryPurchasersApi inventoryInventoryIdPurchasersGet GET /inventory/{inventoryId}/purchasers
InventoryPurchasersApi inventoryInventoryIdPurchasersPut PUT /inventory/{inventoryId}/purchasers
ProjectApi projectsSettingsGet GET /projects/settings Retrieve a project's settings
RegistrantApi registrantsGet GET /registrants List of registrants for a project.
RegistrantApi registrantsPost POST /registrants Create a registrant
RegistrantApi registrantsRegistrantIdGet GET /registrants/{registrantId} Extended data for a registrant
RegistrantApi registrantsRegistrantIdPut PUT /registrants/{registrantId}
RegistrantApi registrantsSearchGet GET /registrants/search Search registrants by name, email, phone, nickname, externalId, rating or creation date.
RegistrantAssignedSalesRepsApi registrantsRegistrantIdAssignedSalesRepsGet GET /registrants/{registrantId}/assigned-sales-reps
RegistrantAssignedSalesRepsApi registrantsRegistrantIdAssignedSalesRepsPut PUT /registrants/{registrantId}/assigned-sales-reps
RegistrantContactInformationApi registrantsRegistrantIdAddressesAddressIdDelete DELETE /registrants/{registrantId}/addresses/{addressId}
RegistrantContactInformationApi registrantsRegistrantIdAddressesAddressIdPut PUT /registrants/{registrantId}/addresses/{addressId}
RegistrantContactInformationApi registrantsRegistrantIdAddressesPost POST /registrants/{registrantId}/addresses
RegistrantContactInformationApi registrantsRegistrantIdEmailsEmailIdDelete DELETE /registrants/{registrantId}/emails/{emailId}
RegistrantContactInformationApi registrantsRegistrantIdEmailsEmailIdPut PUT /registrants/{registrantId}/emails/{emailId}
RegistrantContactInformationApi registrantsRegistrantIdEmailsPost POST /registrants/{registrantId}/emails
RegistrantContactInformationApi registrantsRegistrantIdPersonContactInformationGet GET /registrants/{registrantId}/person/contact-information Retrieve all of a registrant's contact information
RegistrantContactInformationApi registrantsRegistrantIdPersonContactInformationPut PUT /registrants/{registrantId}/person/contact-information Convenience method to update all of a registrant's contact information in a single call
RegistrantContactInformationApi registrantsRegistrantIdPhonesPhoneIdDelete DELETE /registrants/{registrantId}/phones/{phoneId}
RegistrantContactInformationApi registrantsRegistrantIdPhonesPhoneIdPut PUT /registrants/{registrantId}/phones/{phoneId}
RegistrantContactInformationApi registrantsRegistrantIdPhonesPost POST /registrants/{registrantId}/phones
RegistrantHistoryApi registrantsRegistrantIdHistoriesHistoryIdGet GET /registrants/{registrantId}/histories/{historyId}
RegistrantHistoryApi registrantsRegistrantIdHistoriesHistoryIdPut PUT /registrants/{registrantId}/histories/{historyId}
RegistrantHistoryApi registrantsRegistrantIdHistoriesPost POST /registrants/{registrantId}/histories
RegistrantIntegrationsApi registrantsRegistrantIdExternalExternalIdDelete DELETE /registrants/{registrantId}/external/{externalId}
RegistrantIntegrationsApi registrantsRegistrantIdIntegrationsDelete DELETE /registrants/{registrantId}/integrations
RegistrantIntegrationsApi registrantsRegistrantIdIntegrationsPost POST /registrants/{registrantId}/integrations
RegistrantNotesApi registrantsRegistrantIdNotesNoteIdDelete DELETE /registrants/{registrantId}/notes/{noteId}
RegistrantNotesApi registrantsRegistrantIdNotesPost POST /registrants/{registrantId}/notes
RegistrantQuestionAnswersApi registrantsRegistrantIdQuestionsPost POST /registrants/{registrantId}/questions
RegistrantQuestionAnswersApi registrantsRegistrantIdQuestionsQuestionIdPut PUT /registrants/{registrantId}/questions/{questionId}
RegistrantRelationshipsApi registrantsRegistrantIdRelationshipsPost POST /registrants/{registrantId}/relationships
RegistrantRelationshipsApi registrantsRegistrantIdRelationshipsRelationshipIdDelete DELETE /registrants/{registrantId}/relationships/{relationshipId}
RegistrantRelationshipsApi registrantsRegistrantIdRelationshipsRelationshipIdPut PUT /registrants/{registrantId}/relationships/{relationshipId}
RegistrantSalesDetailsApi registrantsRegistrantIdFollowUpProcessPut PUT /registrants/{registrantId}/follow-up-process
RegistrantSalesDetailsApi registrantsRegistrantIdRatingPut PUT /registrants/{registrantId}/rating
RegistrantSalesDetailsApi registrantsRegistrantIdSecondarySourceTypePut PUT /registrants/{registrantId}/secondary-source-type
RegistrantSalesDetailsApi registrantsRegistrantIdSourceTypePut PUT /registrants/{registrantId}/source-type

Documentation For Models

Documentation For Authorization

JwtAuthorizer

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