$webhooksController = $client->getWebhooksController();WebhooksController
- Create a New Transaction Batch Postback Config
- Create a New Contact Postback Config
- Create a New Transaction Postback Config
- Delete a Postback Config
- Update Transaction Batch Postback Config
- Update Contact Postback Config
- Update Transaction Postback Config
Create a new transaction batch postback config
function createANewTransactionBatchPostbackConfig(
V1WebhooksBatchRequest $body,
?array $expand = null
): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
V1WebhooksBatchRequest |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$body_isActive = true;
$body_locationId = '11e95f8ec39de8fbdb0a4f1a';
$body_onCreate = true;
$body_onUpdate = true;
$body_onDelete = true;
$body_productTransactionId = '11e95f8ec39de8fbdb0a4f1a';
$body_numberOfAttempts = 1;
$body_url = 'https://127.0.0.1/receiver';
$body = new Models\V1WebhooksBatchRequest(
$body_isActive,
$body_locationId,
$body_onCreate,
$body_onUpdate,
$body_onDelete,
$body_productTransactionId,
$body_numberOfAttempts,
$body_url
);
$result = $webhooksController->createANewTransactionBatchPostbackConfig($body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |
Create a new contact postback config
function createANewContactPostbackConfig(V1WebhooksContactRequest $body, ?array $expand = null): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
V1WebhooksContactRequest |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$body_isActive = true;
$body_locationId = '11e95f8ec39de8fbdb0a4f1a';
$body_onCreate = true;
$body_onUpdate = true;
$body_onDelete = true;
$body_numberOfAttempts = 1;
$body_url = 'https://127.0.0.1/receiver';
$body = new Models\V1WebhooksContactRequest(
$body_isActive,
$body_locationId,
$body_onCreate,
$body_onUpdate,
$body_onDelete,
$body_numberOfAttempts,
$body_url
);
$result = $webhooksController->createANewContactPostbackConfig($body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |
Create a new transaction postback config
function createANewTransactionPostbackConfig(
V1WebhooksTransactionRequest $body,
?array $expand = null
): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
V1WebhooksTransactionRequest |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$body_isActive = true;
$body_locationId = '11e95f8ec39de8fbdb0a4f1a';
$body_onCreate = true;
$body_onUpdate = true;
$body_onDelete = true;
$body_productTransactionId = '11e95f8ec39de8fbdb0a4f1a';
$body_numberOfAttempts = 1;
$body_url = 'https://127.0.0.1/receiver';
$body = new Models\V1WebhooksTransactionRequest(
$body_isActive,
$body_locationId,
$body_onCreate,
$body_onUpdate,
$body_onDelete,
$body_productTransactionId,
$body_numberOfAttempts,
$body_url
);
$result = $webhooksController->createANewTransactionPostbackConfig($body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |
Delete a postback config
function deleteAPostbackConfig(string $webhookId): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
webhookId |
string |
Template, Required | Postback Config ID Constraints: Pattern: ^(([0-9a-fA-F]{24})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
$webhookId = '11e95f8ec39de8fbdb0a4f1a';
$result = $webhooksController->deleteAPostbackConfig($webhookId);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
Update transaction batch postback config
function updateTransactionBatchPostbackConfig(
string $webhookId,
V1WebhooksBatchRequest1 $body,
?array $expand = null
): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
webhookId |
string |
Template, Required | Postback Config ID Constraints: Pattern: ^(([0-9a-fA-F]{24})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksBatchRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$webhookId = '11e95f8ec39de8fbdb0a4f1a';
$body = new Models\V1WebhooksBatchRequest1();
$result = $webhooksController->updateTransactionBatchPostbackConfig($webhookId, $body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |
Update contact postback config
function updateContactPostbackConfig(
string $webhookId,
V1WebhooksContactRequest1 $body,
?array $expand = null
): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
webhookId |
string |
Template, Required | Postback Config ID Constraints: Pattern: ^(([0-9a-fA-F]{24})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksContactRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$webhookId = '11e95f8ec39de8fbdb0a4f1a';
$body = new Models\V1WebhooksContactRequest1();
$result = $webhooksController->updateContactPostbackConfig($webhookId, $body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |
Update transaction postback config
function updateTransactionPostbackConfig(
string $webhookId,
V1WebhooksTransactionRequest1 $body,
?array $expand = null
): ResponseWebhook| Parameter | Type | Tags | Description |
|---|---|---|---|
webhookId |
string |
Template, Required | Postback Config ID Constraints: Pattern: ^(([0-9a-fA-F]{24})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksTransactionRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand83Enum) |
Query, Optional | Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request. Constraints: Unique Items Required, Pattern: ^[\w]+$ |
$webhookId = '11e95f8ec39de8fbdb0a4f1a';
$body = new Models\V1WebhooksTransactionRequest1();
$result = $webhooksController->updateTransactionPostbackConfig($webhookId, $body);{
"type": "Webhook",
"data": {
"attempt_interval": 300,
"basic_auth_username": "username",
"basic_auth_password": "password",
"expands": "changelogs,tags",
"format": "api-default",
"is_active": true,
"location_id": "11e95f8ec39de8fbdb0a4f1a",
"on_create": true,
"on_update": true,
"on_delete": true,
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"product_transaction_id": "11e95f8ec39de8fbdb0a4f1a",
"resource": "contact",
"number_of_attempts": 1,
"url": "https://127.0.0.1/receiver",
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_logs": [
{
"id": "11e95f8ec39de8fbdb0a4f1a",
"postback_config_id": "11e95f8ec39de8fbdb0a4f1a",
"changelog_id": "11e95f8ec39de8fbdb0a4f1a",
"next_run_ts": 1422040992,
"created_ts": 1422040992,
"model_id": "11e95f8ec39de8fbdb0a4f1a"
}
]
}
}| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 401 | Unauthorized | Response401tokenException |
| 412 | Precondition Failed | Response412Exception |