Search account codes

POST /accountcode/search/{fromthisid}

Limited to those the user can see. Filtered by the posted fields. Returned in ID order

Path parameters

  • fromthisid integer Required

    The ID that is previous to the one to start from e.g. if IDs are 1,2,3 fromthisid as 1 will return 2,3

application/json

Body

1 or more Search parameters

  • search array[object]
    Hide search attributes Show search attributes object
    • by string

      any of the field names that are output from item or list calls

    • value string

      the search value for the term specified by the 'by'

Responses

  • 200 application/json

    List returned OK

    Hide response attributes Show response attributes object
    • id integer

      Minimum value is 1.

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

  • 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/search/{fromthisid}
curl \
 -X POST https://YOURSITE.infoodle.com/apiv2/accountcode/search/4 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"search":[{"by":"name","value":"Test Item"}]}'
Request examples
{
  "search": [
    {
      "by": "name",
      "value": "Test Item"
    }
  ]
}
Response examples (200)
[
  {
    "id": 123,
    "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 (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}