I started an ‘Idea’ on getsatisfaction.com (http://getsatisfaction.com/
freeagentcentral/topics/
cant_add_batches_of_expenses_from_a_spreadsheet) and have since been
trying to use the API to do a bulk upload of back-dated expenses. As
described in that post, I managed to get CURL to work on my Mac and
managed upload a test expense.
where the file new-expenses.txt contained the following XML
<?xml version='1.0' encoding='UTF-8'?>
2009-08-02
Test expense
Travel
-15
Fabulous!
I then parsed the spreadsheet with all my expenses on it and created a
large file with lots of similar XML in it and tried to upload the
expenses as before.
Now, it won’t accept the command, producing instead a 500 server
error.
I’ve reverted to the previous version of the text file but it now
refuses to load the test expense either.
Any help in sorting this out would be much appreciated.
Just to add to my last post - it seems to be the XML syntax is the
problem.
I’ve managed to get the single-expense working again - had to cut and
paste the XML code from the FAC API page. Might be my attention to
detail, but I’m wondering if it’s the fact that I’ve got some funny
characters in there.
Anyway, when I duplicate the ‘working’ expense item, so that there are
two of them in the XML file, I return to the 500 Internal Server
Error.
This is the contents of the file I’m trying to post:
<?xml version="1.0" encoding="UTF-8"?>
2008-03-29T
Test Expense No 1
Computer Hardware
-200.0
17.5
2008-03-29T
Test Expense no 2
Travel
-100.0
17.5
Just to add to my last post - it seems to be the XML syntax is the
problem.
I’ve managed to get the single-expense working again - had to cut and
paste the XML code from the FAC API page. Might be my attention to
detail, but I’m wondering if it’s the fact that I’ve got some funny
characters in there.
Anyway, when I duplicate the ‘working’ expense item, so that there are
two of them in the XML file, I return to the 500 Internal Server
Error.
This is the contents of the file I’m trying to post:
<?xml version="1.0" encoding="UTF-8"?>
2008-03-29T
Test Expense No 1
Computer Hardware
-200.0
17.5
2008-03-29T
Test Expense no 2
Travel
-100.0
17.5
Just to add to my last post - it seems to be the XML syntax is the
problem.
I’ve managed to get the single-expense working again - had to cut and
paste the XML code from the FAC API page. Might be my attention to
detail, but I’m wondering if it’s the fact that I’ve got some funny
characters in there.
Anyway, when I duplicate the ‘working’ expense item, so that there are
two of them in the XML file, I return to the 500 Internal Server
Error.
This is the contents of the file I’m trying to post:
<?xml version="1.0" encoding="UTF-8"?>
2008-03-29T
Test Expense No 1
Computer Hardware
-200.0
17.5
2008-03-29T
Test Expense no 2
Travel
-100.0
17.5