def aggregate_payload(submitted_keywords: dict) -> dict:  # pylint: disable=R0912
    """Create the standardized BODY payload necessary for aggregate operations.

    Creates the following payload, no parameters shown below are required:
    {
        "date_ranges": [
            {
                "from": "string",
                "to": "string"
            }
        ],
        "field": "string",
        "filter": "string",
        "interval": "string",
        "min_doc_count": 0,
        "missing": "string",
        "name": "string",
        "q": "string",
        "ranges": [
            {
                "From": 0,
                "To": 0
            }
        ],
        "size": 0,
        "sort": "string",
        "sub_aggregates": [
            null
        ],
        "time_zone": "string",
        "type": "string"
    }
    """
    returned_payload = {}

    if submitted_keywords.get("date_ranges", None):
        returned_payload["date_ranges"] = submitted_keywords.get("date_ranges", None)

    if submitted_keywords.get("field", None):
        returned_payload["field"] = submitted_keywords.get("field", None)

    if submitted_keywords.get("filter", None):
        returned_payload["filter"] = submitted_keywords.get("filter", None)

    if submitted_keywords.get("interval", None):
        returned_payload["interval"] = submitted_keywords.get("interval", None)

    if submitted_keywords.get("min_doc_count", -1) >= 0:
        returned_payload["min_doc_count"] = submitted_keywords.get("min_doc_count", -1)

    if submitted_keywords.get("missing", None):
        returned_payload["missing"] = submitted_keywords.get("missing", None)

    if submitted_keywords.get("name", None):
        returned_payload["name"] = submitted_keywords.get("name", None)

    if submitted_keywords.get("q", None):
        returned_payload["q"] = submitted_keywords.get("q", None)

    if submitted_keywords.get("ranges", None):
        returned_payload["ranges"] = submitted_keywords.get("ranges", None)

    if submitted_keywords.get("size", None):
        returned_payload["size"] = submitted_keywords.get("size", None)

    if submitted_keywords.get("sort", None):
        returned_payload["sort"] = submitted_keywords.get("sort", None)

    if submitted_keywords.get("sub_aggregates", None):
        returned_payload["sub_aggregates"] = submitted_keywords.get("sub_aggregates", None)

    if submitted_keywords.get("time_zone", None):
        returned_payload["time_zone"] = submitted_keywords.get("time_zone", None)

    if submitted_keywords.get("type", None):
        returned_payload["type"] = submitted_keywords.get("type", None)

    return returned_payload