How to create an regular promotion with nominal discount based on formula by VTEX API

Hello everyone,

I would like to know, how can I create a promotion with nominal discount based on formula using the VTEX API? Follow the API reference Create or Update Promotion or Tax

Somebody, could help me?

Thanks,

Hi, med! Good afternoon, how are you?

Well, there is no easy way to create it directly through API, the API does not validate lots of data that is necessary to create an actual working promotion, because of that, if you create a promotion using API without all the necessary data, it may not work properly. So, what do we recommend?

  • Create the promotion using the UI and copy the promotion ID (it will appear on the promotion URL)
  • Use the Get Promotion or Tax by Id API to retrieve the information for the promotion;
  • Use the Create or Update Promotion or Tax API, to update the promotion using the body from the Get promotion or Tax by Id API, changing what is necessary.

Regards