This article shares some possible use cases your app could support, as well as an sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.
Offer a sale to customers through social media channels that runs for a limited time only. Create the checkout template and pull the URL to automatically redirect anyone that clicks on the link to a checkout page with the offer. When the period for the sale is complete, update the checkout template's status to INACTIVE to turn it off.
To create and share the offer:
checkoutTemplateId to build the URL to share with customers. Build the URL in this format: https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}.To turn off the offer at the end of the sale:
checkoutTemplate.status to INACTIVE.Offer a sale to the first 100 customers that click on an offer. Create a checkout template, then share your own custom link that will run custom logic before creating a new checkout for the customer.
Create a checkout template and add your own custom logic:
checkoutIds of checkouts created from this checkoutTemplateId.checkoutTemplateId, check the bank and count the number of checkoutIds being stored.100 checkouts, use Update Checkout Template to update checkoutTemplate.status to INACTIVE.