Purchase order list

Returns one or more purchase orders

List of purchases orders

If you wish to access multiple purchase records you would normally use the purchaseorderlist model

For purchase orders two models are available:

  • purchaseorderlist
  • purchaseorderdetails

If a list of records is required a ‘view’ parameter should be passed. If no ‘view’ parameter is passed all records for the synergist company are returned.

Parameter

Description

Examples

More info

API

The API area

purchases.json

General

Parameters described in overview

user=user&password=user&version=3.3

Overview

Company

The company context

company=1

Job/phase (optional)

Filter by job/phase

jobphase=1/00001076.002

Views (optional)

Views

&views=-2004

Using views

Sort

Change the view's default sort order

sort=CREATED

Sorting

Filters

Filter by a key field

Filters

Response

Returned data

See below

Example requests:
Request for data (list of records using specified job/phase)

http://<SERVER>/jsonapi/purchases.json?modelstructure=purchaseorderdetails&user=user&password=user&company=1&version=3.3&jobphase=1/00001076.002

Request for data (list of records using specified model)](http://google.com)

http://<SERVER>/jsonapi/purchases.json?style=modeldata&modelstructure=purchaseorderlist&user=user&password=user&company=1&version=3.3&rows=2&page=1&view=-2004

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3407,
  "totalpages": 1704,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "poUuid": "AE38CED93A63472AA014D159DB8F41C3",
      "poTimeStampModified": 1520341389,
      "poRecordVersionNumber": 32,
      "poCostDisplay": "£200.00",
      "poInternal": 10000167,
      "poPONumber": "{EST}",
      "poDescription": "Subcontract Web Design",
      "poJobandPhase": "1/00000543.001",
      "poTheirRef": "Ref123123",
      "poOrderedByUserId": 242,
      "poOrderedByFullName": "Adele Graham",
      "poSupplytype": "1/PRI",
      "poSupplyTypeDescription": "Printers",
      "poSupplierName": "The Printing Shop",
      "poViewDate": "2002-05-30",
      "poEstimatedDate": "2002-05-30",
      "poInvoiceDate": "0000-00-00",
      "poDateCreated": "0000-00-00",
      "poDateSent": "0000-00-00",
      "poViewTime": "00:00:00",
      "poViewTimeZone": "",
      "poEstCost": 200,
      "poCost": 0,
      "poPurchaseOrderType": "P",
      "poSupplierCode": "1/PS1"
    },
    {
      "poUuid": "BA5C900B756E4363BEE26BF0239D34A2",
      "poTimeStampModified": 1385821179,
      "poRecordVersionNumber": 25,
      "poCostDisplay": "£244.00",
      "poInternal": 10000162,
      "poPONumber": "{EST}",
      "poDescription": "Printing Purchase",
      "poJobandPhase": "1/00000592.001",
      "poTheirRef": "",
      "poOrderedByUserId": 0,
      "poOrderedByFullName": "",
      "poSupplytype": "1/PRI",
      "poSupplyTypeDescription": "Printers",
      "poSupplierName": "Brilliant",
      "poViewDate": "2002-05-28",
      "poEstimatedDate": "2002-05-28",
      "poInvoiceDate": "2002-08-28",
      "poDateCreated": "0000-00-00",
      "poDateSent": "0000-00-00",
      "poViewTime": "00:00:00",
      "poViewTimeZone": "",
      "poEstCost": 244,
      "poCost": 0,
      "poPurchaseOrderType": "P",
      "poSupplierCode": "1/BRILLIAN"
    }
  ]
}