application/json

Body Required

New transaction parameters

  • user_id integer

    Required. CORE user id

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

Responses

  • 200 application/json

    Item has been saved successfully

    Hide response attribute Show response attribute object
  • 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
curl \
 -X POST https://YOURSITE.infoodle.com/apiv2/transaction \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"user_id":32132,"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"}'
Request examples
{
  "user_id": 32132,
  "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"
}
Response examples (200)
{
  "id": 4325342
}
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}