Google Groups

Re: Error 40120 on Time Entry Create


Sébastien Atoch Jun 5, 2012 10:40 AM
Posted in group: FreshBooks API (not monitored)
Your markup looks valid.
Another idea :  a permission issue ?  Some users are not allowed to track time (see Settings / Permissions)
Also did you try with another project ?

@Freshbooks : I would also like to get a list of errors code, even if it's not final.




On Tuesday, 5 June 2012 13:28:31 UTC-4, Spetz83 wrote:
Thanks for the suggestion. That doesn't work though. I would be sad if
their parser didn't ignore whitespace though.

On Jun 4, 6:47 pm, Sébastien Atoch <sebastien.at...@gmail.com> wrote:
> Hi Tom,
>
> Maybe you should try to get rid of the carriage return between the XML tags.
> It may confuse the parser somehow.
> Sebastien -
>
> <request method="time_entry.create">
>    <time_entry>
>      <project_id>1120</project_id>
>      <task_id>98</task_id>
>      <hours>3</hours>
>      <notes>Some notes here.</notes>
>    </time_entry>
> </request>
>
>
>
>
>
>
>
> On Monday, 4 June 2012 12:16:11 UTC-4, Spetz83 wrote:
>
> > Hi,
>
> > I am getting the following response when attempting to create a time
> > entry using the API:
>
> > <response xmlns="http://www.freshbooks.com/api/" status="fail">
> >   <error>Invalid node: project_id.</error>
> >   <code>40120</code>
> >   <field>project_id</field>
> > </response>
>
> > The XML that I am sending to the system looks like this:
> > <request method="time_entry.create">
> >    <time_entry>
> >      <project_id>
> >        1120
> >      </project_id>
> >      <task_id>
> >        98
> >      </task_id>
> >      <hours>
> >        3
> >      </hours>
> >      <notes>
> >        Some notes here.
> >      </notes>
> >    </time_entry>
> > </request>
>
> > I really need to know what is going on here. I know that project ID is
> > correct because I can use it successfully to retrieve a list of hours
> > for that project.
>
> > As far as I can tell, Freshbooks has not provided a list of error
> > codes and what they mean yet. I found one other thread requesting this
> > back in February and the response was that the list was not final.
>
> > Any help will be greatly appreciated.
>
> > Thanks
>
> > Tom