anchor.diff:  	{error, 400}.
   
   %% @hidden
  -get_acct_usage(Query) ->
  +get_acct_usage(Query, Headers) ->
   	case lists:keytake("fields", 1, Query) of
   		{value, {_, L}, NewQuery} ->
   			Filters = string:tokens(L, ","),
  -			get_acct_usage(NewQuery, Filters);
  +			get_acct_usage(NewQuery, Filters, Headers);
   		false ->
  -			get_acct_usage(Query, [])
  +			get_acct_usage(Query, [], Headers)
   	end.
  -%% @hidden
  -get_acct_usage(Query, Filters) ->
  +
  +%% @hidden
  +get_acct_usage(Query, Filters, _Headers) ->
   	case lists:keytake("sort", 1, Query) of
   		{value, {_, "-date"}, NewQuery} ->
   			get_acct_last(NewQuery, Filters);
   		{value, {_, Date}, NewQuery}
   				when Date == "date"; Date == "+date" ->
  -			get_auth_query(NewQuery, Filters);
  +			get_acct_query(NewQuery, Filters);
   		false ->
   			get_acct_query(Query, Filters);
   		_ ->
  
positive.code: 		_:_Reason1 ->
  			{error, 404}
  	end;
  get_usage("acct-" ++ _ = Id, [] = _Query) ->
  	try
  		["acct", TimeStamp, Serial] = string:tokens(Id, [$-]),
  		TS = list_to_integer(TimeStamp),
  
negative.code: content_types_provided() ->
  	["application/json"].
  
  -spec get_usage(Query, Headers) -> Result
  	when
  		Query :: [{Key :: string(), Value :: string()}],
  		Headers :: [tuple()],
  		Result :: {ok, Headers :: [tuple()], Body :: iolist()}
  				| {error, ErrorCode :: integer()}.
  %% @doc Body producing function for
  %% 	`GET /usageManagement/v1/usage'
  %% 	requests.
  get_usage(Query, Headers) ->
  	case lists:keyfind("type", 1, Query) of
  		{_, "AAAAccessUsage"} ->
  			get_auth_usage(lists:keydelete("type", 1, Query), Headers);
  		{_, "AAAAccountingUsage"} ->
  			get_acct_usage(lists:keydelete("type", 1, Query), Headers);
  		{_, "PublicWLANAccessUsageSpec"} ->
  			{error, 500}; % todo?
  		_ ->
  			{error, 404}
  	end.
  
  -spec get_usage(Id, Query, Headers) -> Result
  	when
  		Id :: string(),
  		Query :: [{Key :: string(), Value :: string()}],
  		Headers :: [tuple()],
  		Result :: {ok, Headers :: [tuple()], Body :: iolist()}
  				| {error, ErrorCode :: integer()}.
  %% @doc Body producing function for
  %% 	`GET /usageManagement/v1/usage/{id}'
  %% 	requests.
  get_usage("auth-" ++ _ = Id, [] = _Query, _Headers) ->
  	try
  		["auth", TimeStamp, Serial] = string:tokens(Id, [$-]),
  		TS = list_to_integer(TimeStamp),
  