Renaming a Transcription

๐Ÿ“ Change the File Name of Your Order

Using the following code, you can change the file name of your transcription.

import requests
import json

# API endpoint
api_url = "https://um2vro8lrb.execute-api.eu-central-1.amazonaws.com/prod/filedirectory/renamefilebyorderid"

cid = 'your_api_key'
orderid = 'your_order_id'
new_name = "new_file_name"

# Parameters for the API call
params = {
    'cid': cid,
    'orderid': orderid,
    'Tname': new_name
}

print(f"Making API call with parameters: {params}")

# Make the API call
response = requests.get(api_url, params=params)

# Check the status code
if response.status_code == 200:
    print("API call successful.")
    try:
        data = response.json()
        if data:
            # Print the result
            print(json.dumps(data, indent=4))
        else:
            print("No data found in the response.")
    except json.JSONDecodeError:
        print("Error decoding the JSON response.")
        print("Response text:", response.text)
else:
    print(f"API call failed with status code: {response.status_code}")
    print("Response:", response.text)

Response


200 OK

{
  "message": "File name updated successfully"
}

400 Bad Request

{
  "error": "Missing parameters"
}

404 Not Found

{
  "error": "OrderID not found"
}

500 Internal Server Error

{
  "message": "Internal Server Error"
}