Option

Sets the purchase as an option type

Set/Unset as an option type

Parameter

Description

Examples

More info

API

The API area

purchases.json

Action

Turn Option on

&action=option_on

Action

Turn Option off

&action=option_off

General

Parameters described in overview

user=user&password=user&version=3.3

Overview

Parameter

Identifies the record(s) you wish to set

Purchase

Internal Purchase ID

&purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=option_on&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=option_off&purchase=10007388

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order option changed.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "purchaseorder_internal": 10007388,
      "purchaseorder_uuid": "7A54C829DD0D174CA43A43B948386413",
      "purchaseorder_timestampmodified": 1521028279,
      "purchaseorder_recordversionnumber": 21,
      "purchaseorder_ponumber": "{EST}",
      "purchaseorder_option": "option"
    }
  ]
}