Remove specific action and send generic nummerical id back


I have an application which sends five types of event to the same endpoint.
Three of these events starting i.e.,, are succesfully processed. The returned message contains a random ID.
But as for & cannot be processed by the receiver. They want me to handle these actions within the same request and send them a generic UUID back.

What would be the right approach to remove or transform these two actions, so that the receiver doesnt have to handle them, but the sender gets a proper confirmation with the UUID.

I don’t think there is a best practice approach to this.

It depends on the technology and various other factors.

I don’t know why the “receiver” can’t handle the requests separately so I can only discuss some options.

I also don’t know what type of end point this is? And whether you are the developer of the endpoint or its a third party API that you are consuming (which will limit what you can do).

Is it a REST endpoint with multiple methods? (for each of the actions).

You could build a new method that combine action4 and action5, which means you don’t necessarily have to deprecate those methods if other customers are using them. (If you are the developer of the API).

We generally interface all third party API’s with our ESB (Enterprise Service Bus). Our applications call our ESB (REST or SOAP interfaces) which calls the API, which means we can put the complex logic in the ESB instead of our application. Which often means that its one call to the ESB, but potentially 3-4 to the API to return one set of data to the application. You could use an similar pattern to transform the data. (Our ESB costs a fair bit though, so its not an investment that you take lightly, its a major design decision).

We do use our ESB indeed. I think I found a solution, been busy testing it ;).
Thanks a lot and have a nice day!!