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
-
transaction_type string
What does this transaction relate to. This determines what other fields are required
Maximum length is
1
. Values areC
,I
, orS
. -
accountcode_id integer
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
or1
. -
batch_id integer
Required. The transaction Batch that this transaction is a part of
-
campaign_id integer
If supplied, must link to a Campaign the user can see
-
location_id integer
If supplied, must link to a Location
-
stockcode_id integer
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
-
inkind_description string
Required for transaction_type I. Text to describe the donation
-
who_to_receipt string
Whether to identify which entity the transaction is to be receipted to, Individual (ind) or Organisation/Household (hh)
Values are
hh
orind
. -
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
. -
receipt_annually integer
Identify whether this should be receipted as a One-off (0) or combined (1)
Minimum value is
0
, maximum value is1
. -
pledge_drive_id integer
If supplied must link to a valid PledgeDrive
-
note string
A short text note to add to the transaction
Maximum length is
255
.
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"}'
{
"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"
}
{
"id": 4325342
}
{
"error": "Unauthorised"
}
{
"error": "Invalid Permission"
}