   ([endpoint operations]
    (bulk-operations endpoint operations req/bulk-operations res/bulk-operations))
   ([endpoint operations request-builder response-parser]
-   {:pre [(is-valid-endpoint endpoint)
+   {:pre [(endpoint? endpoint)
           (not-empty (filter 
                        (comp not nil?) 
                        (map (fn[op] 

  ([endpoint document-ids]
   (load-documents endpoint document-ids req/load-documents res/load-documents))
  ([endpoint document-ids request-builder response-parser]
   {:pre [(is-valid-endpoint endpoint) (not-empty document-ids)]}
   (let [request (request-builder (:address endpoint) document-ids)
         response (post-req request)]
     (response-parser response))))

  ([endpoint key document]
   (put-document endpoint key document req/put-document res/put-document))
  ([endpoint key document request-builder response-parser]
   {:pre [(endpoint? endpoint)]}
   (let [request (request-builder (:address endpoint) key document)
         response (post-req request)]
     (response-parser response))))
