application/json

Body Required

New Account code parameters

  • name string
  • Whether this is an income (1) or expense account code (0)

    Minimum value is 0, maximum value is 1.

  • 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 is 1.

  • 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 is 1.

  • sort_order integer

    The order this code appears in the list

    Minimum value is 0.

  • If this is a xero account code, its the ID in xero. Read only

    Maximum length is 100.

  • shows if the code is still available in xero. Blank if its not a xero account code. Read only

    Maximum length is 50. Values are OK or No longer in Xero.

  • 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 is 1.

  • If this code is only to be referenced by a specific group. This is the group id that the user must have access to.

Responses

  • 200 application/json

    Item has been saved successfully

    Hide response attribute Show response attribute object
  • 400 application/json

    One or more errors have occurred

    Hide response attributes Show response attributes object
    • error string Deprecated

      A single error text or code

    • errors object

      An array of fields and the errors for each field

      Additional properties are allowed.

      Hide errors attribute Show errors attribute object
      • errorfield array[object]

        errorfield is the name of the field that is in error

        Hide errorfield attributes Show errorfield attributes object
        • code integer

          the specific error code for this error

        • message string

          the error message for this error

  • 401 application/json

    Authentication unauthorised

    Hide response attribute Show response attribute object
  • 403 application/json

    Invalid permission

    Hide response attribute Show response attribute object
POST /accountcode
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}'
Request examples
{
  "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
}
Response examples (200)
{
  "id": 4325342
}
Response examples (400)
{
  "error": "Invalid field contents",
  "errors": {
    "errorfield": [
      {
        "code": 400,
        "message": "Invalid value supplied for field"
      }
    ]
  }
}
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}