- list - List custom object schemas
- create - Create custom object schema
- get - Get custom object schema
- update - Update custom object schema
- delete - Delete custom object schema
List custom object schemas
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CrmCustomObjectSchemasAllRequest(
serviceId: 'salesforce',
passThrough: [
'search' => 'San Francisco',
],
);
$responses = $sdk->crm->customObjectSchemas->list(
request: $request
);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmCustomObjectSchemasAllRequest | ✔️ | The request object to use for the request. |
?Operations\CrmCustomObjectSchemasAllResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\PaymentRequiredResponse | 402 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\UnprocessableResponse | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Create custom object schema
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CrmCustomObjectSchemasAddRequest(
serviceId: 'salesforce',
customObjectSchema: new Components\CustomObjectSchemaInput(
name: 'project',
description: 'This schema defines a project custom object',
fields: [
new Components\Fields(
id: 'field_123',
name: 'project_name',
description: 'Name of the project',
type: Components\CustomObjectSchemaType::String,
required: true,
options: [
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
],
defaultValue: 'New Project',
),
],
visible: true,
active: true,
passThrough: [
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
],
),
);
$response = $sdk->crm->customObjectSchemas->create(
request: $request
);
if ($response->createCustomObjectSchemaResponse !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmCustomObjectSchemasAddRequest | ✔️ | The request object to use for the request. |
?Operations\CrmCustomObjectSchemasAddResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\PaymentRequiredResponse | 402 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\UnprocessableResponse | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Get custom object schema
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CrmCustomObjectSchemasOneRequest(
id: '<id>',
serviceId: 'salesforce',
);
$response = $sdk->crm->customObjectSchemas->get(
request: $request
);
if ($response->getCustomObjectSchemaResponse !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmCustomObjectSchemasOneRequest | ✔️ | The request object to use for the request. |
?Operations\CrmCustomObjectSchemasOneResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\PaymentRequiredResponse | 402 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\UnprocessableResponse | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Update custom object schema
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CrmCustomObjectSchemasUpdateRequest(
id: '<id>',
serviceId: 'salesforce',
customObjectSchema: new Components\CustomObjectSchemaInput(
name: 'project',
description: 'This schema defines a project custom object',
fields: [
new Components\Fields(
id: 'field_123',
name: 'project_name',
description: 'Name of the project',
type: Components\CustomObjectSchemaType::String,
required: true,
options: [
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
],
defaultValue: 'New Project',
),
new Components\Fields(
id: 'field_123',
name: 'project_name',
description: 'Name of the project',
type: Components\CustomObjectSchemaType::String,
required: true,
options: [
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
],
defaultValue: 'New Project',
),
new Components\Fields(
id: 'field_123',
name: 'project_name',
description: 'Name of the project',
type: Components\CustomObjectSchemaType::String,
required: true,
options: [
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
new Components\CustomObjectSchemaOptions(
value: 'option1',
label: 'Option 1',
),
],
defaultValue: 'New Project',
),
],
visible: true,
active: true,
passThrough: [
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
],
),
);
$response = $sdk->crm->customObjectSchemas->update(
request: $request
);
if ($response->updateCustomObjectSchemaResponse !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmCustomObjectSchemasUpdateRequest | ✔️ | The request object to use for the request. |
?Operations\CrmCustomObjectSchemasUpdateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\PaymentRequiredResponse | 402 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\UnprocessableResponse | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Delete custom object schema
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CrmCustomObjectSchemasDeleteRequest(
id: '<id>',
serviceId: 'salesforce',
);
$response = $sdk->crm->customObjectSchemas->delete(
request: $request
);
if ($response->deleteCustomObjectSchemaResponse !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\CrmCustomObjectSchemasDeleteRequest | ✔️ | The request object to use for the request. |
?Operations\CrmCustomObjectSchemasDeleteResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\PaymentRequiredResponse | 402 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\UnprocessableResponse | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |