import requests


def add_new_item(base_url, data_dict):
    """
    Create new item
    :param base_url: base API url
    :param data_dict: data of the item (dict)
    :return: new item ID
    """
    resp_create = requests.post(base_url, data=data_dict)
    if resp_create.status_code == 201:
        reg_dict = resp_create.json()
        item_id = str(reg_dict["id"])
        return item_id
    else:
        raise Exception("Item hasn't been added")