code: function(apiId) {
          return module.exports.fetchExistingStages(apiId).then(function(stages) {
              // If there are no stages, then delete the API
              if (!stages || stages.length === 0) {
                  return module.exports.deleteAPI(apiId);
              }
  
              return apiId;
          });
      }
docs: Delete the API if and only if there are no more stages deployed on it
  
  @return {Promise} which resolves to the ID of the API that was deleted