Create

Create a purchase order

Create

Create a purchase estimate

Parameter

Description

Examples

More info

API

The API area

purchases.json

Action

Create a new record in the purchase orders table

action=create

<General />

Parameters described in overview

user=user&password=user&version=3.3

Overview

Company

The company context

company=1

Input

JSON string

input="data": ...

<input mandatory>poJobandPhase

Phase number

"poJobandPhase":"1/00000516.003"

<input mandatory>poSupplytype

Supply type

"poSupplytype":"1/ENG"

<input mandatory>poSupplierCode

Supplier code

"poSupplierCode":"1/AAMATT2"

<input mandatory>poDescription

Description

"poDescription":"Description"

<input optional>poOrderText

PO text tab description

"poOrderText":"Order text"

<input optional>poEstCost

Estimated cost

"poEstCost": 25

<input optional>poEstMarkUp

Estimated Markup%

"poEstMarkUp":100

<input optional>poEstRecChgOut

Estimated charge

"poEstRecChgOut":50

<input optional>poCurrencyCode

Currency code

"poCurrencyCode":"1/EUR"

<input optional>poCurrencyRate

Currency - rate

"poCurrencyRate":1.15

<input optional>poCurrencyEstCost

Currency - estimated cost

"poCurrencyEstCost":50

<input optional>poCurrencyEstCharge

Currency - estimated charge

"poCurrencyEstCharge":50

Response

Returned data

See below

Example request:
Request to create a purchase estimate

Base currency Purchase Estimate passing recommended charge

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "poEstCost": 25,
      "poEstRecChgOut": 50,
      "poJobandPhase": "1/00001076.001",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order "
    }
  ]
}

Base currency Purchase Estimate passing markup

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "poEstCost": 25,
      "poEstMarkUp": 10,
      "poJobandPhase": "1/00001076.001",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order 2"
    }
  ]
}

Currency Purchase estimate

Note: The currency estimated cost is related to the currency code past. However, the Estimated currency charge-out relates to the currency of the JOB.

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "poCurrencyEstCost": 25,
      "poCurrencyEstCharge": 50,
      "poJobandPhase": "1/00001076.002",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order ",
      "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": ""
    }
  ]
}