Cancel

Cancels a real purchase order - allocating a write off invoice against it

Cancel

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areapurchases.json
GeneralYesParameters described in overviewsee overviewStructure of an API call
ActionYesThe action to performaction=cancel
IdentifierYesPurchase ID or UUIDpurchase=10008229

Example request (OAuth 2.0):

Authorization: Bearer <access_token>
http://&lt;SERVER&gt;/jsonapi/purchases.json?&version=6&action=cancel&purchase=10008233

Example request (legacy username/password):

http://&lt;SERVER&gt;/jsonapi/purchases.json?&version=6&action=cancel&purchase=10008233&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order cancelled and written off. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCancelDate": "2018-03-14",
      "poCancelTime": "11:16",
      "poCancelTimeZone": "UTCA",
      "poCancelDateUtc": "2018-03-14",
      "poCancelTimeUtc": "11:16",
      "poCancelUserId": 54,
      "poPicked": false,
      "poPickedForQuote": false,
      "poOption": "",
      "poInternal": 10005708,
      "poUuid": "BEA6082B7BE911E2B9FC00155D003416",
      "poTimeStampModified": 1521026168,
      "poRecordVersionNumber": 8,
      "poPONumber": "012097"
    }
  ]
}