Adding return codes to api calls.