rentprep/smartmove-php

SmartMove PHP Library

1.0.3 2018-12-03 15:23 UTC

This package is not auto-updated.

Last update: 2025-06-09 03:56:03 UTC


README

Requirements

PHP 5.3.3 and later.

Composer

You can install the library via Composer. Run the following command:

composer require rentprep/smartmove-php

To use the library, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the library, include the init.php file.

require_once('/path/to/smartmove-php/init.php');

Getting Started

Simple usage looks like:

use SmartMove\SmartMove;

SmartMove::setApiKey('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
SmartMove::setSandboxMode(true); //change to false for production

$referenceId = 'XXX'; // The unique ID in your system of the person who created the application
$applications = SmartMove::getApplications($referenceId);

Optionally, your application's user $referenceId can be set once, globally.

use SmartMove\SmartMove;

SmartMove::setApiKey('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
SmartMove::setSandboxMode(true); //change to false for production
SmartMove::setReferenceId('XXX');

$applications = SmartMove::getApplications();

Usage

This is not intended to provide complete documentation of the API. For more detail, please refer to the official documentation.

##Applications

Create new application

string SmartMove::createApplication([mixed $referenceId [, array $params]]);

$referenceId The unique ID in your system of the person who created the application

$params Additional options used to prefill fields of the application

Returns a URL where the applicaiton can be accessed

List all applications

array SmartMove::getApplications([mixed $referenceId]);

$referenceId The unique ID in your system of the person who created the application

Returns an array of application objects

Get application details

object SmartMove::getApplication(int $applicationId [, mixed $referenceId]);

$applicationId The ID of an application fetched from SmartMove::getApplications

$referenceId The unique ID in your system of the person who created the application

Returns application object

Cancel application

bool SmartMove::cancelApplication(int $applicationId [, mixed $referenceId]);

$applicationId The ID of an application fetched from SmartMove::getApplications

$referenceId The unique ID in your system of the person who created the application

Returns true if the application was canceled, false otherwise

Add applicate to application

bool SmartMove::addApplicant(int $applicationId, mixed $email [, mixed $referenceId]);

$applicationId The ID of an application fetched from SmartMove::getApplications

$email A string or array of applicant email addresses

$referenceId The unique ID in your system of the person who created the application

Returns true if the applicant was added to application, false otherwise

Remove applicate from application

bool SmartMove::removeApplicant(int $applicationId, mixed $email [, mixed $referenceId]);

$applicationId The ID of an application fetched from SmartMove::getApplications

$email A string or array of applicant email addresses

$referenceId The unique ID in your system of the person who created the application

Returns true if the applicant was removed from the application, false otherwise

Get report URL

string SmartMove::getReportUrl(int $applicationId [, mixed $referenceId]);

$applicationId The ID of an application fetched from SmartMove::getApplications

$referenceId The unique ID in your system of the person who created the application

Returns a URL where the applicaiton report can be accessed