Two API requests are required, because a promo code can only be applied to a cart.
To apply a promo code:
-
Add services to cart with the <itemtype>.order.param function. Example of a request:
<platform_address>?clicked_button=finish&datacenter=1&func=vds.order.param&licence_agreement=on&ostempl=ISPsystem__Ubuntu-20.04-amd64&period=1&pricelist=5&sok=ok
Comment -
Apply the promo code to the cart:
<platform_address>?clicked_button=setpromocode&func=basket&promocode=<promo_code>&sok=ok
Comment
You can create other requests by following the How to generate an API request using the log file instruction in the Guide to ISPsystem software API article of BILLmanager documentation.