SAP Customer Data Cloud Webhook Service API

GigyaWebhook

receiveWebhookEvents

Receive webhook events from SAP Customer Data Cloud and process them.

Receives the webhook events and schedules a task to create B2B users with their roles.


/{baseSiteId}/b2bwebhook

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/gigyab2bwebservices/v1/{baseSiteId}/b2bwebhook"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GigyaWebhookApi;

import java.io.File;
import java.util.*;

public class GigyaWebhookApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        GigyaWebhookApi apiInstance = new GigyaWebhookApi();
        GigyaWebHookRequest body = ; // GigyaWebHookRequest | 
        String xGigyaSigJwt = xGigyaSigJwt_example; // String | The JWT Token sent by SAP CDC in the header
        String baseSiteId = baseSiteId_example; // String | The Base site identifier
        try {
            GigyaWebHookResponse result = apiInstance.receiveWebhookEvents(body, xGigyaSigJwt, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GigyaWebhookApi#receiveWebhookEvents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GigyaWebhookApi;

public class GigyaWebhookApiExample {

    public static void main(String[] args) {
        GigyaWebhookApi apiInstance = new GigyaWebhookApi();
        GigyaWebHookRequest body = ; // GigyaWebHookRequest | 
        String xGigyaSigJwt = xGigyaSigJwt_example; // String | The JWT Token sent by SAP CDC in the header
        String baseSiteId = baseSiteId_example; // String | The Base site identifier
        try {
            GigyaWebHookResponse result = apiInstance.receiveWebhookEvents(body, xGigyaSigJwt, baseSiteId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GigyaWebhookApi#receiveWebhookEvents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
GigyaWebHookRequest *body = ; // 
String *xGigyaSigJwt = xGigyaSigJwt_example; // The JWT Token sent by SAP CDC in the header
String *baseSiteId = baseSiteId_example; // The Base site identifier

GigyaWebhookApi *apiInstance = [[GigyaWebhookApi alloc] init];

// Receive webhook events from SAP Customer Data Cloud and process them.
[apiInstance receiveWebhookEventsWith:body
    xGigyaSigJwt:xGigyaSigJwt
    baseSiteId:baseSiteId
              completionHandler: ^(GigyaWebHookResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SapCustomerDataCloudWebhookServiceApi = require('sap_customer_data_cloud_webhook_service_api');
var defaultClient = SapCustomerDataCloudWebhookServiceApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new SapCustomerDataCloudWebhookServiceApi.GigyaWebhookApi()
var body = ; // {{GigyaWebHookRequest}} 
var xGigyaSigJwt = xGigyaSigJwt_example; // {{String}} The JWT Token sent by SAP CDC in the header
var baseSiteId = baseSiteId_example; // {{String}} The Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.receiveWebhookEvents(bodyxGigyaSigJwtbaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class receiveWebhookEventsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new GigyaWebhookApi();
            var body = new GigyaWebHookRequest(); // GigyaWebHookRequest | 
            var xGigyaSigJwt = xGigyaSigJwt_example;  // String | The JWT Token sent by SAP CDC in the header
            var baseSiteId = baseSiteId_example;  // String | The Base site identifier

            try
            {
                // Receive webhook events from SAP Customer Data Cloud and process them.
                GigyaWebHookResponse result = apiInstance.receiveWebhookEvents(body, xGigyaSigJwt, baseSiteId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GigyaWebhookApi.receiveWebhookEvents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiGigyaWebhookApi();
$body = ; // GigyaWebHookRequest | 
$xGigyaSigJwt = xGigyaSigJwt_example; // String | The JWT Token sent by SAP CDC in the header
$baseSiteId = baseSiteId_example; // String | The Base site identifier

try {
    $result = $api_instance->receiveWebhookEvents($body, $xGigyaSigJwt, $baseSiteId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GigyaWebhookApi->receiveWebhookEvents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GigyaWebhookApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::GigyaWebhookApi->new();
my $body = WWW::SwaggerClient::Object::GigyaWebHookRequest->new(); # GigyaWebHookRequest | 
my $xGigyaSigJwt = xGigyaSigJwt_example; # String | The JWT Token sent by SAP CDC in the header
my $baseSiteId = baseSiteId_example; # String | The Base site identifier

eval { 
    my $result = $api_instance->receiveWebhookEvents(body => $body, xGigyaSigJwt => $xGigyaSigJwt, baseSiteId => $baseSiteId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GigyaWebhookApi->receiveWebhookEvents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.GigyaWebhookApi()
body =  # GigyaWebHookRequest | 
xGigyaSigJwt = xGigyaSigJwt_example # String | The JWT Token sent by SAP CDC in the header
baseSiteId = baseSiteId_example # String | The Base site identifier

try: 
    # Receive webhook events from SAP Customer Data Cloud and process them.
    api_response = api_instance.receive_webhook_events(body, xGigyaSigJwt, baseSiteId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GigyaWebhookApi->receiveWebhookEvents: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
The Base site identifier
Required
Header parameters
Name Description
x-gigya-sig-jwt*
String
The JWT Token sent by SAP CDC in the header
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Ok

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found