Create

Create a purchase order

Create

Create a purchase estimate

  <th>
    Description
  </th>

  <th>
    Examples
  </th>

  <th>
    More info
  </th>
</tr>
  <td>
    The API area
  </td>

  <td>
    purchases.json
  </td>
</tr>

<tr>
  <td>
    Action
  </td>

  <td>
    Create a new record in the purchase orders table
  </td>

  <td>
    action=create
  </td>
</tr>

<tr>
  <td>
    <General />
  </td>

  <td>
    Parameters described in overview
  </td>

  <td>
    user=user\&password=user\&version=3.3
  </td>

  <td>
    [Overview](ref:overview-2)
  </td>
</tr>

<tr>
  <td>
    Company
  </td>

  <td>
    The company context
  </td>

  <td>
    company=1
  </td>
</tr>

<tr>
  <td>
    Input
  </td>

  <td>
    JSON string
  </td>

  <td>
    input="data": ...
  </td>
</tr>

<tr>
  <td>
    <input mandatory>poJobandPhase
  </td>

  <td>
    Phase number
  </td>

  <td>
    "poJobandPhase":"1/00000516.003"
  </td>
</tr>

<tr>
  <td>
    <input mandatory>poSupplytype
  </td>

  <td>
    Supply type
  </td>

  <td>
    "poSupplytype":"1/ENG"
  </td>
</tr>

<tr>
  <td>
    <input mandatory>poSupplierCode
  </td>

  <td>
    Supplier code
  </td>

  <td>
    "poSupplierCode":"1/AAMATT2"
  </td>
</tr>

<tr>
  <td>
    <input mandatory>poDescription
  </td>

  <td>
    Description
  </td>

  <td>
    "poDescription":"Description"
  </td>
</tr>

<tr>
  <td>
    <input optional>poOrderText
  </td>

  <td>
    PO text tab description
  </td>

  <td>
    "poOrderText":"Order text"
  </td>
</tr>

<tr>
  <td>
    <input optional>poEstCost
  </td>

  <td>
    Estimated cost
  </td>

  <td>
    "poEstCost": 25
  </td>
</tr>

<tr>
  <td>
    <input optional>poEstMarkUp
  </td>

  <td>
    Estimated Markup%
  </td>

  <td>
    "poEstMarkUp":100
  </td>
</tr>

<tr>
  <td>
    <input optional>poEstRecChgOut
  </td>

  <td>
    Estimated charge
  </td>

  <td>
    "poEstRecChgOut":50
  </td>
</tr>

<tr>
  <td>
    <input optional>poCurrencyCode
  </td>

  <td>
    Currency code
  </td>

  <td>
    "poCurrencyCode":"1/EUR"
  </td>
</tr>

<tr>
  <td>
    <input optional>poCurrencyRate
  </td>

  <td>
    Currency - rate
  </td>

  <td>
    "poCurrencyRate":1.15
  </td>
</tr>

<tr>
  <td>
    <input optional>poCurrencyEstCost
  </td>

  <td>
    Currency - estimated cost
  </td>

  <td>
    "poCurrencyEstCost":50
  </td>
</tr>

<tr>
  <td>
    <input optional>poCurrencyEstCharge
  </td>

  <td>
    Currency - estimated charge
  </td>

  <td>
    "poCurrencyEstCharge":50
  </td>
</tr>

<tr>
  <td>
    Response
  </td>

  <td>
    Returned data
  </td>

  <td>
    See below
  </td>
</tr>
Parameter
API

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": ""
    }
  ]
}