Mark a purchase as an investment/non chargeable
Mark a purchase as an investment
Parameter | Description | Examples | More info |
---|---|---|---|
API | The API area | purchases.json | |
Action | Turn investment on | &action=investment_on | |
Action | Turn investment off | &action=investment_off | |
Parameters described in overview | user=user&password=user&version=3.3 | ||
Identifies the record(s) you wish to set | |||
Purchase | Internal Purchase ID | &purchase=10008229 |
Example requests:
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=investment_on&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=investment_off&purchase=10007388
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "Purchase order investment changed. ",
"warningmessage": "",
"success": true,
"data": [
{
"purchaseorder_currencycode": "",
"purchaseorder_currencyrate": 1,
"purchaseorder_cost": 100,
"purchaseorder_currencycost": 0,
"purchaseorder_markup": -100,
"purchaseorder_chargeout": 0,
"purchaseorder_curchargeout": 0,
"purchaseorder_invest": true,
"purchaseorder_investment": 102.5,
"purchaseorder_investmentmarkup": 2.5,
"purchaseorder_estcost": 100,
"purchaseorder_currencyestcost": 0,
"purchaseorder_estmarkup": 2.5,
"purchaseorder_estrecchgout": 102.5,
"purchaseorder_estcurchargeout": 102.5,
"purchaseorder_originalcost": 100,
"purchaseorder_currencyorigcost": 100,
"purchaseorder_internal": 10008268,
"purchaseorder_uuid": "8F632C2ECEEC5948A3EF2C53F8FC555B",
"purchaseorder_timestampmodified": 1521029739,
"purchaseorder_recordversionnumber": 8,
"purchaseorder_ponumber": "012094"
}
]
}