There is no license information available for the latest version (1.1.0) of this package.

Vendasta account group library for PHP

1.1.0 2020-07-21 18:21 UTC

This package is auto-updated.

Last update: 2022-09-14 23:51:25 UTC


Account group php sdk


This is Vendasta's official PHP SDK for API integration of account-groups. This is used to create a business.



Install the requirements from above, then:

composer require vendasta/account-group-php-sdk


To authenticate your SDK calls, you must provision a service account from within the Vendasta platform.

This feature is currently in alpha, therefore your service account credentials file will be provided to you manually.

You must put this file on your server, and set an environment variable to it's path:

export VENDASTA_APPLICATION_CREDENTIALS=<path to credentials.json>

Client Initialization

It is highly recommended that you use a singleton client instance. Each client initilization will open it's own connection, therefore using a singleton results in reusing a connection, saving time and resources.

Set an environment variable for the production environment:


To instantiate the client:

$environment = getenv("PRODUCTION_ENVIRONMENT");
if ($environment == null) {
    $environment = "DEMO";

$client = new Vendasta\AccountGroup\V1\AccountGroupServiceClient($environment);

Notice that the production environment will be set to DEMO if it is not specified.

Creating account groups

$createReq = new Vendasta\AccountGroup\V1\CreateAccountGroupRequest();
$location = new Vendasta\AccountGroup\V1\AccountGroupLocation();
$workNumber = array("<phone_number>");


$resp = $client->Create($createReq);