40060: Invalid value for field 'project_id' as a response to expense.create

151 views
Skip to first unread message

Kirill

unread,
May 6, 2012, 12:21:12 PM5/6/12
to FreshBooks API
Hello,

Here is a setup: Sample Project, assigned to the -internal- client.
project.list returns:
<project>
<project_id>1</project_id>
<name>Sample project</name>
...
<client_id></client_id>
...
</project>

Then, when project_id: 1 and client_id: "" (or 0) is used in
expense.create, the error "40060: Invalid value for field
'project_id'. Invalid value '1' for field 'project_id'." is returned.

Projects, assigned to real clients (where the project.list returns non-
empty <client_id>), can successfully be used in expense.create.

What's the correct way to submit expenses to projects of -internal-
client via API?

--
Kirill

Nox Dineen (FreshBooks)

unread,
May 9, 2012, 10:01:41 AM5/9/12
to freshbo...@googlegroups.com
Hi Kirill,

I'm afraid there isn't a way to associate an expense with an internal project. The limitation exists within the web app as well as via the API. Truthfully I'm not sure what the rationale for that restriction is, but I'll bring it up with the web app's product manager for re-consideration.

Cheers,
Nox Dineen | FreshBooks

Kirill

unread,
May 10, 2012, 2:06:49 PM5/10/12
to n...@freshbooks.com, freshbo...@googlegroups.com
Dear Nox,

> I'm afraid there isn't a way to associate an expense with an internal
> project. The limitation exists within the web app as well as via the API.
I'm so sorry - I must have been looking at the wrong field in the web
app. As long as web app and API agree, everything is good.

So, the only remaining problem for me - as discussed in another thread
- is compound taxes on expense.create. Hopefully, you will give me
good news soon.

Thank you!

--
Kirill
Reply all
Reply to author
Forward
0 new messages