async def METHOD_NAME(req):
    """
    Update archived field.
    Sets the archived field on the job document.
    """
    try:
        document = await get_data_from_req(req).jobs.METHOD_NAME(req.match_info["job_id"])
    except ResourceNotFoundError:
        raise NotFound()
    except ResourceConflictError:
        raise HTTPBadRequest(text="Job already archived")
    return json_response(document)