$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[]) (Expand91Enum) |
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 = V1WebhooksBatchRequestBuilder::init(
true,
'11e95f8ec39de8fbdb0a4f1a',
true,
true,
true,
'11e95f8ec39de8fbdb0a4f1a',
1,
'https://127.0.0.1/receiver'
)
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->build();
$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[]) (Expand91Enum) |
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 = V1WebhooksContactRequestBuilder::init(
true,
'11e95f8ec39de8fbdb0a4f1a',
true,
true,
true,
1,
'https://127.0.0.1/receiver'
)
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->productTransactionId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->build();
$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[]) (Expand91Enum) |
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 = V1WebhooksTransactionRequestBuilder::init(
true,
'11e95f8ec39de8fbdb0a4f1a',
true,
true,
true,
'11e95f8ec39de8fbdb0a4f1a',
1,
'https://127.0.0.1/receiver'
)
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->build();
$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,36})|(([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,36})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksBatchRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand91Enum) |
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 = V1WebhooksBatchRequest1Builder::init()
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->isActive(true)
->locationId('11e95f8ec39de8fbdb0a4f1a')
->onCreate(true)
->onUpdate(true)
->onDelete(true)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->productTransactionId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->numberOfAttempts(1)
->url('https://127.0.0.1/receiver')
->build();
$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,36})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksContactRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand91Enum) |
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 = V1WebhooksContactRequest1Builder::init()
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->isActive(true)
->locationId('11e95f8ec39de8fbdb0a4f1a')
->onCreate(true)
->onUpdate(true)
->onDelete(true)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->productTransactionId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->numberOfAttempts(1)
->url('https://127.0.0.1/receiver')
->build();
$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,36})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$ |
body |
V1WebhooksTransactionRequest1 |
Body, Required | - |
expand |
?(string[]) (Expand91Enum) |
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 = V1WebhooksTransactionRequest1Builder::init()
->attemptInterval(300)
->basicAuthUsername('tester')
->basicAuthPassword('Test@522')
->expands('changelogs,tags')
->format(FormatEnum::APIDEFAULT)
->isActive(true)
->locationId('11e95f8ec39de8fbdb0a4f1a')
->onCreate(true)
->onUpdate(true)
->onDelete(true)
->postbackConfigId('11e95f8ec39de8fbdb0a4f1a')
->productTransactionId('11e95f8ec39de8fbdb0a4f1a')
->resource(Resource12Enum::CONTACT)
->numberOfAttempts(1)
->url('https://127.0.0.1/receiver')
->build();
$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 |