In addition to using the dedicated API service, you can also cancel an order directly from the Gelato Dashboard.
First, go to Orders in the left menu and find the order you wish to cancel.
Then click on the order to open the detail page and select the Cancel button.
You can cancel orders only before they are printed, i.e. status Uploading or Passed. Read more on order status here.