All URIs are relative to https://zernio.com/api, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| clearContactFieldValue() | DELETE /v1/contacts/{contactId}/fields/{slug} | Clear custom field value |
| createCustomField() | POST /v1/custom-fields | Create custom field |
| deleteCustomField() | DELETE /v1/custom-fields/{fieldId} | Delete custom field |
| listCustomFields() | GET /v1/custom-fields | List custom field definitions |
| setContactFieldValue() | PUT /v1/contacts/{contactId}/fields/{slug} | Set custom field value |
| updateCustomField() | PATCH /v1/custom-fields/{fieldId} | Update custom field |
clearContactFieldValue($contact_id, $slug)Clear custom field value
Remove a custom field value from a contact. The field definition is not affected.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$contact_id = 'contact_id_example'; // string
$slug = 'slug_example'; // string
try {
$apiInstance->clearContactFieldValue($contact_id, $slug);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->clearContactFieldValue: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | string | ||
| slug | string |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createCustomField($create_custom_field_request): \Zernio\Model\CreateCustomField200ResponseCreate custom field
Create a new custom field definition. Supported types are text, number, date, boolean, and select.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_custom_field_request = new \Zernio\Model\CreateCustomFieldRequest(); // \Zernio\Model\CreateCustomFieldRequest
try {
$result = $apiInstance->createCustomField($create_custom_field_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->createCustomField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_custom_field_request | \Zernio\Model\CreateCustomFieldRequest |
\Zernio\Model\CreateCustomField200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteCustomField($field_id)Delete custom field
Delete a custom field definition and remove its values from all contacts.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$field_id = 'field_id_example'; // string
try {
$apiInstance->deleteCustomField($field_id);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->deleteCustomField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_id | string |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listCustomFields($profile_id): \Zernio\Model\ListCustomFields200ResponseList custom field definitions
Returns all custom field definitions. Optionally filter by profile.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$profile_id = 'profile_id_example'; // string | Filter by profile. Omit to list across all profiles
try {
$result = $apiInstance->listCustomFields($profile_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->listCustomFields: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | string | Filter by profile. Omit to list across all profiles | [optional] |
\Zernio\Model\ListCustomFields200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setContactFieldValue($contact_id, $slug, $set_contact_field_value_request)Set custom field value
Set or overwrite a custom field value on a contact. The value type must match the field definition.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$contact_id = 'contact_id_example'; // string
$slug = 'slug_example'; // string
$set_contact_field_value_request = new \Zernio\Model\SetContactFieldValueRequest(); // \Zernio\Model\SetContactFieldValueRequest
try {
$apiInstance->setContactFieldValue($contact_id, $slug, $set_contact_field_value_request);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->setContactFieldValue: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | string | ||
| slug | string | ||
| set_contact_field_value_request | \Zernio\Model\SetContactFieldValueRequest |
void (empty response body)
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateCustomField($field_id, $update_custom_field_request): \Zernio\Model\UpdateCustomField200ResponseUpdate custom field
Update a custom field definition. The field type cannot be changed after creation.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CustomFieldsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$field_id = 'field_id_example'; // string
$update_custom_field_request = new \Zernio\Model\UpdateCustomFieldRequest(); // \Zernio\Model\UpdateCustomFieldRequest
try {
$result = $apiInstance->updateCustomField($field_id, $update_custom_field_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomFieldsApi->updateCustomField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_id | string | ||
| update_custom_field_request | \Zernio\Model\UpdateCustomFieldRequest | [optional] |
\Zernio\Model\UpdateCustomField200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]