Search transactions

POST /transaction/search/{fromthisid}

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.

    • user_id integer

      Required. CORE user id

    • Minimum value is 1.

    • amount number

      Required. the amount of this transaction including any taxes

      Minimum value is 0.

    • date string

      Required. the local date of the transaction

    • What does this transaction relate to. This determines what other fields are required

      Maximum length is 1. Values are C, I, or S.

    • Required. Must link to an Accountcode that the user is able to see.

    • taxable integer

      Whether this is a taxable item (1) or not (0)

      Values are 0 or 1.

    • batch_id integer

      Required. The transaction Batch that this transaction is a part of

    • If supplied, must link to a Campaign the user can see

    • If supplied, must link to a Location

    • If supplied, must link to a Stock item the user can see

    • stock_qty integer

      Required for transaction_type S. How many stock items were purchased

    • Required for transaction_type I. Text to describe the donation

    • Whether to identify which entity the transaction is to be receipted to, Individual (ind) or Organisation/Household (hh)

      Values are hh or ind.

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

    • Identify whether this should be receipted as a One-off (0) or combined (1)

      Minimum value is 0, maximum value is 1.

    • If supplied must link to a valid PledgeDrive

    • note string

      A short text note to add to the transaction

      Maximum length is 255.

    • When this transaction was created in UTC time

    • When this transaction was last modified in UTC time

  • 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 /transaction/search/{fromthisid}
curl \
 -X POST https://YOURSITE.infoodle.com/apiv2/transaction/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,
    "user_id": 32132,
    "transaction_id": 443,
    "amount": 50.65,
    "date": "2012-07-06",
    "transaction_type": "C",
    "accountcode_id": 43,
    "taxable": 1,
    "batch_id": 405,
    "campaign_id": 43,
    "location_id": 32,
    "stockcode_id": 32,
    "stock_qty": 12,
    "inkind_description": "Donated sweater",
    "who_to_receipt": "hh",
    "salestax": 1,
    "receipt_annually": 1,
    "pledge_drive_id": 3,
    "note": "Donation out of the blue",
    "datetime_created_utc": "2024-05-31 14:01:02",
    "datetime_modified_utc": "2024-06-04 07:03:33"
  }
]
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}