Error creating journal entries via API


#1

Hi

I can authenticate okay but my journal entry generation request shown below fails with “journal_entries.code can’t be blank”. No mention of a code field in the docs. Any ideas?

Thanks

Jonathan

{
    "journal_set": {
        "dated_on": "2019-04-30",
        "description": "Sent from Venus",
        "journal_entries": [
            {
                "debit_value": 1700.00,
                "category": "https://api.sandbox.freeagent.com/v2/categories/404"
            },
            {
                "debit_value": -131.40,
                "category": "https://api.sandbox.freeagent.com/v2/categories/606"
            },
            {
                "debit_value": -253.10,
                "category": "https://api.sandbox.freeagent.com/v2/categories/249"
            },
            {
                "debit_value": -1450.88,
                "category": "https://api.sandbox.freeagent.com/v2/categories/101"
            },
            {
                "debit_value": 135.38,
                "category": "https://api.sandbox.freeagent.com/v2/categories/058"
            }
        ]
    }
}

#2

A bit more info on this:

My ip is 81.133.147.165
Sending application is BrightPay
Using the sandbox.


#3

Hmm. Not sure what the story is here.
I tried again with a different set of journal entries and met with success.