gohighlevel-php-sdk

Saas Api

Get locations by stripeId with companyId

    GoHighLevel::init($access_token)->withVersion('2021-04-15')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->get([
        'companyId' => '',
        'subscriptionId' => '',
        'customerId' => ''
    ]);

Update Saas

    GoHighLevel::init($access_token)->withVersion('2021-04-15')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->update($locationid,[
        'companyId' => '',
        'subscriptionId' => '',
        'customerId' => ''
    ]);

Enable Saas For Location

$client = GoHighLevel::init($access_token)
    ->withVersion('2021-07-28')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->enable($locationId,[
        //body
    ]);

Disable Saas For Locations

$client = GoHighLevel::init($access_token)
    ->withVersion('2021-07-28')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->disable($locationId, [
        'locationIds' => ''
    ]);

Pause Saas For Location

$client = GoHighLevel::init($access_token)
    ->withVersion('2021-04-15')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->pause($locationId, [
        'paused' => true
        'companyId' => ''
    ]);

Update Rebilling

$client = GoHighLevel::init($access_token)
    ->withVersion('2021-04-15')
    ->withHttpHeader('channel','OAUTH')
    ->withHttpHeader('source','INTEGRATION')
    ->make()->Saas()->updateRebilling($companyId, [
        'product' => true
        'locationIds' => ''
        'config' => ''
    ]);