- listContacts - List Contacts
- createContact - Create Contact
- getContact - Get Contact
- updateContact - Update Contact (early access)
- listAccounts - List Accounts
- getAccount - Get Account
- listLists - Get all Lists
- getList - Get List
- listContactCustomFieldDefinitions - List Contact Custom Field Definitions
- getContactCustomFieldDefinition - Get Contact Custom Field Definition
List Contacts
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmListContactsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,first_name,last_name,company_name,emails,phone_numbers,deal_ids,remote_deal_ids,account_ids,remote_account_ids,custom_fields,created_at,updated_at,unified_custom_fields',
filter: new Operations\CrmListContactsQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
include: 'custom_fields',
prefer: 'heartbeat',
);
$responses = $sdk->crm->listContacts(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmListContactsRequest | ✔️ | The request object to use for the request. |
?Operations\CrmListContactsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create Contact
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$crmCreateContactRequestDto = new Components\CrmCreateContactRequestDto(
firstName: 'Steve',
lastName: 'Wozniak',
companyName: 'Apple Inc.',
emails: [
'steve@apple.com',
],
phoneNumbers: [
'123-456-7890',
],
dealIds: [
'deal-001',
'deal-002',
],
accountIds: [
'account-123',
'account-456',
],
customFields: [
new Components\CustomFields(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
name: 'Training Completion Status',
value: 'Completed',
valueId: 'value_456',
remoteValueId: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->crm->createContact(
xAccountId: '<id>',
crmCreateContactRequestDto: $crmCreateContactRequestDto,
prefer: 'heartbeat'
);
if ($response->contactResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
crmCreateContactRequestDto |
Components\CrmCreateContactRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\CrmCreateContactResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Contact
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmGetContactRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,first_name,last_name,company_name,emails,phone_numbers,deal_ids,remote_deal_ids,account_ids,remote_account_ids,custom_fields,created_at,updated_at,unified_custom_fields',
include: 'custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->crm->getContact(
request: $request
);
if ($response->contactResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmGetContactRequest | ✔️ | The request object to use for the request. |
?Operations\CrmGetContactResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update Contact (early access)
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$crmCreateContactRequestDto = new Components\CrmCreateContactRequestDto(
firstName: 'Steve',
lastName: 'Wozniak',
companyName: 'Apple Inc.',
emails: [
'steve@apple.com',
],
phoneNumbers: [
'123-456-7890',
],
dealIds: [
'deal-001',
'deal-002',
],
accountIds: [
'account-123',
'account-456',
],
customFields: [
new Components\CustomFields(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
name: 'Training Completion Status',
value: 'Completed',
valueId: 'value_456',
remoteValueId: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->crm->updateContact(
xAccountId: '<id>',
id: '<id>',
crmCreateContactRequestDto: $crmCreateContactRequestDto,
prefer: 'heartbeat'
);
if ($response->contactResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
crmCreateContactRequestDto |
Components\CrmCreateContactRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\CrmUpdateContactResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Accounts
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmListAccountsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at,unified_custom_fields',
filter: new Operations\CrmListAccountsQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->crm->listAccounts(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmListAccountsRequest | ✔️ | The request object to use for the request. |
?Operations\CrmListAccountsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Account
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmGetAccountRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->crm->getAccount(
request: $request
);
if ($response->accountResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmGetAccountRequest | ✔️ | The request object to use for the request. |
?Operations\CrmGetAccountResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get all Lists
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmListListsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',
filter: new Operations\CrmListListsQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->crm->listLists(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmListListsRequest | ✔️ | The request object to use for the request. |
?Operations\CrmListListsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get List
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmGetListRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->crm->getList(
request: $request
);
if ($response->listResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmGetListRequest | ✔️ | The request object to use for the request. |
?Operations\CrmGetListResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Contact Custom Field Definitions
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmListContactCustomFieldDefinitionsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,description,type,options,unified_custom_fields',
filter: new Operations\CrmListContactCustomFieldDefinitionsQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->crm->listContactCustomFieldDefinitions(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmListContactCustomFieldDefinitionsRequest | ✔️ | The request object to use for the request. |
?Operations\CrmListContactCustomFieldDefinitionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Contact Custom Field Definition
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\CrmGetContactCustomFieldDefinitionRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,description,type,options,unified_custom_fields',
filter: new Operations\CrmGetContactCustomFieldDefinitionQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$response = $sdk->crm->getContactCustomFieldDefinition(
request: $request
);
if ($response->customFieldDefinitionResultApiModel !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmGetContactCustomFieldDefinitionRequest | ✔️ | The request object to use for the request. |
?Operations\CrmGetContactCustomFieldDefinitionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |