Update a purchase record
Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | purchases.json | |
General | Yes | Parameters described in overview | See overview | Structure of an API call |
Action | Yes | The action to perform | action=update | |
Input | Yes | JSON string | See below |
JSON Input | Mandatory | Description | Examples |
---|---|---|---|
Identifier | Yes | Purchase ID or UUID | "poInternal":"10008229" |
Update data | Yes | Data to update | "poEstCost":33 |
Example request:
http://<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.9&action=update&input={
"data": [
{
"poInternal": "10008229",
"poEstCost": 33
}
]
}
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"poCurrencyCode": "",
"poCurrencyRate": 1,
"poCost": 150,
"poCurrencyCost": 0,
"poMarkup": 30,
"poChargeout": 195,
"poCurrencyCharge": 195,
"poInvest": false,
"poInvestment": 0,
"poInvestmentMarkup": 0,
"poEstCost": 33,
"poCurrencyEstCost": 33,
"poEstMarkUp": 30,
"poEstRecChgOut": 42.9,
"poCurrencyEstCharge": 42.9,
"poOriginalCost": 0,
"poCurrencyOrigCost": 0,
"poInternal": 10008180,
"poUuid": "EC2BCC0570400345AC130E1140DFB69E",
"poTimeStampModified": 1521020315,
"poRecordVersionNumber": 17,
"poPONumber": "012082"
}
]
}
Note:
To discover which fields are editable make a call to the "Purchase details" endpoint and specify '&style=modelstructure' see Meta-data
example of fields that can be updated using this endpoint:
In order to see all the possible fields see the return values in Purchase details
Note: this is subject to the business rules set up on the system.
poCurrencyCode
poCurrencyRate
poCost
poCurrencyCost
poMarkup
poCharge
poCurrencyCharge
poInvest
poInvestment
poInvestmentMarkup
poEstCost
poCurrencyEstCharge
poEstMarkUp
poEstRecChgOut
poOriginalCost
poCurrencyOrigCost