API - Add Expense

15 views
Skip to first unread message

Brian J. Kim

unread,
May 23, 2011, 11:13:55 PM5/23/11
to Less Accounting API
I keep getting a 500 error and the following message when trying to
POST a new expense item:

-----------------------------------------
We're sorry, but something went wrong

We're super sorry about this hiccup you've experienced. It's our top
priority to make sure you have the best experience and we've been
notified of this issue. We will working feverishly to fix this bug.
-----------------------------------------

I am able to add Contacts and Notes. Please help.

Steven Bristol

unread,
May 24, 2011, 10:37:29 AM5/24/11
to less-acco...@googlegroups.com
> --


Are you using the API? If so you should be using the .xml suffix.

cheers,
steven bristol

Brian J. Kim

unread,
May 24, 2011, 4:09:34 PM5/24/11
to Less Accounting API
I was using .xml, but i was not wrapping the properties as
expense[...]. It now works.

However, when I try to add an expense as paid
(expense[is_paid]=true&paid_date=5/24/2011), it keeps getting saved as
unpaid. I am also leaving out the due_date. What am i doing wrong?



On May 24, 7:37 am, Steven Bristol <st...@lesseverything.com> wrote:

Steven Bristol

unread,
May 24, 2011, 4:17:31 PM5/24/11
to less-acco...@googlegroups.com
On Tue, May 24, 2011 at 4:09 PM, Brian J. Kim <lame...@gmail.com> wrote:
> I was using .xml, but i was not wrapping the properties as
> expense[...].  It now works.
>
> However, when I try to add an expense as paid
> (expense[is_paid]=true&paid_date=5/24/2011), it keeps getting saved as
> unpaid.  I am also leaving out the due_date.  What am i doing wrong?
>
>
>


Does it mark as paid if you use 5/23/11? What about 2011-05-23 or 2011-05-24?

steve

Brian J. Kim

unread,
May 24, 2011, 6:02:37 PM5/24/11
to Less Accounting API
It had nothing to do with the date, it was the boolean. The value
needs to be a 1 or 0 and not true or false. It would help if that
were documented somewhere.

On May 24, 1:17 pm, Steven Bristol <st...@lesseverything.com> wrote:

Steven Bristol

unread,
Jun 10, 2011, 9:29:34 AM6/10/11
to less-acco...@googlegroups.com
On Tue, May 24, 2011 at 6:02 PM, Brian J. Kim <lame...@gmail.com> wrote:
> It had nothing to do with the date, it was the boolean.  The value
> needs to be a 1 or 0 and not true or false.  It would help if that
> were documented somewhere.
>

I'm adding it to the docs now.

steve

Reply all
Reply to author
Forward
0 new messages