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 implement Webhooks for PIM events ? #649

Open
sumanwebidigital opened this issue Feb 26, 2024 · 2 comments
Open

How to implement Webhooks for PIM events ? #649

sumanwebidigital opened this issue Feb 26, 2024 · 2 comments

Comments

@sumanwebidigital
Copy link

Hello, I is from Nepal. Me in deep trouble. Me company telling me how I making webhook inside backbone js. Me try to use existing PHP Event module. Me no find solution after 1 weeks and it showing me bery dengerours error.
Please telling us when to implement a general webhook API to emit events from PIM. My job was in danger. Please halp! 🙏

@sumanwebidigital
Copy link
Author

@rratsun @RomanZablodsky @goginyan @atrolex Plez halp sooner. Me in dip trouble. Thank yous. Dhanyawaad🙏

@yurdm
Copy link
Contributor

yurdm commented Mar 4, 2024

Hello @sumanwebidigital ! You can define custom webhooks in routes.json file. As example, we have Product/associatedMainProducts/relation route. It is binded to that method. In other way, you can use this route. It binds some action to entity. For example, you need to define "assignItems" action on Product entity. You need to create actionAssignItems method in the Product controller. Your route for this action is Product/action/assignItems. Note that all routes are relative to the API endpoint: /api/v1/Product/action/assignItems as example.

On the frontend side, you can make requests using this function. Pass relative part of route as URL parameter. Here is example.

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