anchor.diff:              lager:debug("No file uploaded"),
               cb_context:add_system_error('no file uploaded', Context)
       end.
  -
  -carrier_doc_id(Id, _Context) ->
  -    <<"onbill_carrier.", (kz_util:to_binary(Id))/binary>>.
  
positive.code: 
  -spec validate_onbill(cb_context:context(), path_token(), http_method()) -> cb_context:context().
  validate_onbill(Context, Id, ?HTTP_GET) ->
      crossbar_doc:load(carrier_doc_id(Id, Context), Context, [{'expected_type', ?CARRIER_DOC_TYPE}]);
  validate_onbill(Context, Id, ?HTTP_POST) ->
      save(carrier_doc_id(Id, Context), Context).
  
  -spec validate_onbill(cb_context:context(), path_token(), path_token(), http_method()) -> cb_context:context().
  validate_onbill(Context, Id, AttachmentId, ?HTTP_GET) ->
      load_carrier_attachment(Context, carrier_doc_id(Id, Context), <<Id/binary, "_", AttachmentId/binary, ".tpl">>);
  validate_onbill(Context, Id, AttachmentId, ?HTTP_POST) ->
      save_carrier_attachment(Context, carrier_doc_id(Id, Context), <<Id/binary, "_", AttachmentId/binary, ".tpl">>).
  
  -spec save(ne_binary(), cb_context:context()) -> cb_context:context().
  save(Id, Context) ->
  
negative.code:     NewDoc = kz_json:merge_recursive(ReqData, Doc),
      Context1 = crossbar_doc:save(cb_context:set_doc(Context, NewDoc)),
      cb_context:set_resp_data(Context1, ReqData).
  
  save_carrier_attachment(Context, DocId, AName) ->
      case cb_context:req_files(Context) of
  