Create

Create a purchase order

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areapurchases.json
GeneralYesParameters described in overviewSee overviewStructure of an API call
ActionYesThe action to performaction=create
InputYesJSON stringSee below
JSON InputMandatoryDescriptionExamples
poJobandPhaseYesPhase number"poJobandPhase":"1/00000516.003"
poSupplytypeYesSupply type"poSupplytype":"1/ENG"
poSupplierCodeYesSupplier code"poSupplierCode":"1/AAMATT2"
poDescriptionYesDescription"poDescription":"Description"
poOrderTextNoPO text tab description"poOrderText":"Order text"
poEstCostNoEstimated cost""poEstCost": 25
poEstMarkUpNoEstimated Markup%"poEstMarkUp":100
poEstRecChgOutNoEstimated charge"poEstRecChgOut":50
poCurrencyCodeNoCurrency code"poCurrencyCode":"1\EUR"
poCurrencyRateNoCurrency - rate"poCurrencyRate":1.15
poCurrencyEstCostNoCurrency - estimated cost"poCurrencyEstCost":50
poCurrencyEstChargeNoCurrency - estimated charge"poCurrencyEstCharge":50

The currency estimated cost is related to the currency code passed. However, the estimated currency charge out relates to the currency of the job.

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.9&action=create&input={
  "data": [
    {
      "poCurrencyEstCost": 25,
      "poCurrencyEstCharge": 50,
      "poJobandPhase": "1/00001076.002",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "Mypurchaseorder",
      "poCurrencyCode": "1/EUR"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCurrencyCode": "1/EUR",
      "poCurrencyRate": 1.21,
      "poCost": 0,
      "poCurrencyCost": 0,
      "poMarkup": 142.01,
      "poCharge": 0,
      "poCurrencyCharge": 0,
      "poInvest": false,
      "poInvestment": 0,
      "poInvestmentMarkup": 0,
      "poEstCost": 20.66,
      "poCurrencyEstCost": 25,
      "poEstMarkUp": 142.01,
      "poEstRecChgOut": 50,
      "poCurrencyEstCharge": 50,
      "poOriginalCost": 0,
      "poCurrencyOrigCost": 0,
      "poInternal": 10008335,
      "poUuid": "D6198877AB807C468CD3E80A9D81C19B",
      "poTimeStampModified": 1522759412,
      "poRecordVersionNumber": 2,
      "poPONumber": "{EST}",
      "poDateOrdered": "0000-00-00",
      "poEstimatedDate": "2018-04-03",
      "poSupplierCode": "1/AAMATT2",
      "poSupplierContactInternalRef": 0,
      "poSupplytype": "1/ENG",
      "poInvoiceMemo": "",
      "poDescription": "My purchase order ",
      "poTheirRef": "",
      "poOrderedByUserId": 3,
      "poOrderText": "",
      "poPicked": false,
      "poPickedForQuote": false,
      "poOption": ""
    }
  ]
}