Body Required
New Account code parameters
-
accountcode string
-
name string
-
incomeexpense integer
Whether this is an income (1) or expense account code (0)
Minimum value is
0
, maximum value is1
. -
taxable integer
Referenced when defaulting reconciliation, or identifying transactions that can be used to reclaim gift aid. Its a taxable code when its 1, non taxable when 0
Minimum value is
0
, maximum value is1
. -
salestax integer
Referenced when showing tax (VAT, GST). Sales tax is included when its 1, no sales tax applies when its 0
Minimum value is
0
, maximum value is1
. -
sort_order integer
The order this code appears in the list
Minimum value is
0
. -
xero_account_id string
If this is a xero account code, its the ID in xero. Read only
Maximum length is
100
. -
xero_status string
shows if the code is still available in xero. Blank if its not a xero account code. Read only
Maximum length is
50
. Values areOK
orNo longer in Xero
. -
primary_for_duplicates integer
When the code is duplicated in infoodle (for different settings), this identifies which is the primary one for reports
Minimum value is
0
, maximum value is1
. -
for_group_id integer
If this code is only to be referenced by a specific group. This is the group id that the user must have access to.
curl \
-X POST https://YOURSITE.infoodle.com/apiv2/accountcode \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"accountcode":"200-D","name":"Donations","incomeexpense":1,"taxable":1,"salestax":1,"sort_order":1,"xero_account_id":"62f28bd8-3d47-4302-88a3-dc6ff53d8126","xero_status":"OK","primary_for_duplicates":1,"for_group_id":28}'
{
"accountcode": "200-D",
"name": "Donations",
"incomeexpense": 1,
"taxable": 1,
"salestax": 1,
"sort_order": 1,
"xero_account_id": "62f28bd8-3d47-4302-88a3-dc6ff53d8126",
"xero_status": "OK",
"primary_for_duplicates": 1,
"for_group_id": 28
}
{
"id": 4325342
}
{
"error": "Invalid field contents",
"errors": {
"errorfield": [
{
"code": 400,
"message": "Invalid value supplied for field"
}
]
}
}
{
"error": "Unauthorised"
}
{
"error": "Invalid Permission"
}