def METHOD_NAME(poi):
    """
    Function to create a JSON from a single poi object.
    :param poi: The poi object which should be converted
    :type poi: ~integreat_cms.cms.models.pois.poi.POI
    :return: data necessary for API
    :rtype: dict
    """
    if not poi:
        return {
            "id": None,
            "name": None,
            "address": None,
            "town": None,
            "state": None,
            "postcode": None,
            "region": None,
            "country": None,
            "latitude": None,
            "longitude": None,
        }
    return {
        "id": poi.id,
        "name": poi.default_public_translation.title,
        "address": poi.address,
        "town": poi.city,
        "state": None,
        "postcode": poi.postcode,
        "region": None,
        "country": poi.country,
        "latitude": poi.latitude,
        "longitude": poi.longitude,
    }