The Ordering module contains 10 methods that allow purchasing Voxbone services. An example of a call flow to order a DID could be the following:
- createCart will return a cartIdentifier (listCart as well if you’ve already got an existing cart)
- Get a didGroupId from listDidGroup (Inventory module)
- add a certain quantity of DIDs (didCartItem) from a didGroupId to the CartIdentifier using addToCart
- Check your funds with accountBalance
- Make sure that the cart value (setup100 + monthly100 will be charged) is not higher than your account Balance.
- Re-iterate the last 3 operations until you wish to check-out your cart using checkoutCart
- Use the listOrder method to retrieve your orders and their status (carts can lead to 1 or multiple order(s)).
- When running the checkoutCart operation, the response contains a list of productCheckout elements. These elements give you an orderReference for each product type contained in your cart, which can be used as a filter for the listDid operation.