Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a HTTP Subscription with Extension Destination #220

Open
DevonVejay opened this issue May 5, 2023 · 1 comment
Open

How to create a HTTP Subscription with Extension Destination #220

DevonVejay opened this issue May 5, 2023 · 1 comment

Comments

@DevonVejay
Copy link

I'm trying to create a webhook with this SDK to createa a "ProductCreated" Subscription event with this SDK but can't figure it out
`

        // Create the client instance
        var client = new ClientFactory().Create(config);

        // Set up the subscription payload

        var httpDestination = new HttpDestination
        {
            Url = "https://mysite.dev/webhook",
        };

        // Set up the subscription payload
        var payload = new SubscriptionDraft
        {

            Destination = httpDestination,
            Changes = new { "ProductCreated" },
            Key = "product-created-subscription",
        };

`
Any pointers appreciated

@davidweterings
Copy link

davidweterings commented Jun 14, 2023

https://docs.commercetools.com/api/projects/subscriptions#destination there is no HttpDestination for subscriptions, that is for API Extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants