API Extensions

Is there any way we can extend the behavior of API? for example if we want to provide custom validation when we receive any order, if Validation succeed then and only then VTEX persist the data else it will throw error message.

Thank you

Hi Kartik, we currently don’t have any extension points as described for our APIs.

But maybe there is something we can do in your specific case… Could you elaborate on your current need?

  • Are orders placed only on the native Checkout?
  • Is the information required to validate available at Checkout or only later?
  • Would it be acceptable to cancel the order after it is placed, instead of throwing an error before it is placed?

Hello George Thank you for the replay.

In our existing system we have couple of third party integrations through which we maintain entire order life cycle.

example :

  1. Whenever we receive payment via card we have integration with [Forter] (https://www.forter.com/) for any fraud prevention. If validation failed from Forter’s end then we don’t persist the data and notify user for failure.

  2. For Address verification we have third party integration with API which validates the address for fraud. If validation failed then we don’t persist the data notify user for failure.

both activity 1 and 2 are in-sync activity and it happens before we persist the order, however we have another use case where once order successfully placed we pass data asynchronously to another system for analytics.

Looks like you might want to check out our Anti-fraud Provider Protocol.

What do you recommend for Asyc Process? once the order is successful we have to post the data to our analytics application.

Hi there!

The “Hook” integration might help in this case. For example, it´s possible to configure VTEX to call an URL when there´s a new order.

2 Likes