To install the SDK first add the below to your composer.json
file:
{
"repositories": [
{
"type": "github",
"url": "https://github.com/structure-ac/structure-php.git"
}
],
"require": {
"structure/structure": "*"
}
}
Then run the following command:
composer update
You'll need to authenticate your requests to access any of the endpoints in the Structure API. In this guide, we'll look at how authentication works. Structure offers authentication for your API requests with a token.
Authentication with the Structure API is using OAuth2. When establishing a connection using OAuth2, you will need your access token — you will find it in the Structure dashboard under API settings.
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->countryCode = 'corrupti';
$request->headquarters = 'provident';
$request->id = 'distinctio';
$request->name = 'quibusdam';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = 'bd9d8d69-a674-4e0f-867c-c8796ed151a0';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = 'bd9d8d69-a674-4e0f-867c-c8796ed151a0';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = 'bd9d8d69-a674-4e0f-867c-c8796ed151a0';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
use structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$security = new Security();
$security->bearerAuth = 'Bearer YOUR_BEARER_TOKEN_HERE';
$sdk = SDK::builder()
->setSecurity($security);
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
``````php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use \structure\Structure\SDK;
use \structure\Structure\Models\Shared\Security;
use \structure\Structure\Models\Operations\EnrichCompanyRequest;
$sdk = SDK::builder()
->build();
try {
$request = new EnrichCompanyRequest();
$request->id = '89bd9d8d-69a6-474e-8f46-7cc8796ed151';
$response = $sdk->companies->enrich($request);
if ($response->body !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
```<!-- Start SDK Example Usage -->
<!-- End SDK Example Usage -->
<!-- Start SDK Available Operations -->
## Available Resources and Operations
### [accounts](docs/sdks/accounts/README.md)
* [listUsers](docs/sdks/accounts/README.md#listusers) - Show current user accounts
### [companies](docs/sdks/companies/README.md)
* [enrich](docs/sdks/companies/README.md#enrich) - Enrich a company profile
* [listEmployees](docs/sdks/companies/README.md#listemployees) - List company employees
* [listJobs](docs/sdks/companies/README.md#listjobs) - List company jobs
* [search](docs/sdks/companies/README.md#search) - Search Companies
### [people](docs/sdks/people/README.md)
* [enrich](docs/sdks/people/README.md#enrich) - Enrich a person profile
* [search](docs/sdks/people/README.md#search) - Search People
### [user](docs/sdks/user/README.md)
* [login](docs/sdks/user/README.md#login) - Login user
* [me](docs/sdks/user/README.md#me) - Show current user
<!-- End SDK Available Operations -->
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)