Post

Get Validation Violations


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

This endpoint retrieves validation violations from your app.

Wix calls this endpoint when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout. This endpoint validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the endpoint returns an object containing an empty list.

Notes:

  • By default, this endpoint only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the validateInCart parameter to true in the Ecom Validations Integration's config file located in the Wix Developers Center. For more information, see the prerequisites section of the introduction.
  • You cannot try out this endpoint because it has to be implemented by an app and can have an arbitrary URL. Therefore, ignore the Authorization and POST sections below as well as the Try It Out button.
Endpoint
POST
{DEPLOYMENT-URI}/v1/get-violations
Was this helpful?
Yes
No