def _build_response_body(contact_id, response):
    """Builds a dictionary representing the response body"""

    contact_details = {
        'contactId': contact_id
    }

    item = response['Item']
    if 'name' in item:
        contact_details['name'] = item['name']['S']

    if 'telephone' in item:
        contact_details['telephone'] = item['telephone']['S']

    return contact_details