Returns one or more purchase orders
Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | purchases.json | |
General | Yes | Parameters described in overview | See overview | Structure of an API call |
Model Structure | Yes | Name of model required | modelstructure=purchaseorderlist | Using data models |
View | No | Stored filter applied | Using views | |
Sort | No | Change the view's default sort order | sort=CREATED | Sorting |
Filters | No | Filter by a key field | Filters | |
Company | Yes | The company number | company=1 | |
Job/phase | No | Filter by job/phase | jobphase =1/00001076.002 |
Example request:
http://<SERVER>/jsonapi/purchases.json?modelstructure=purchaseorderlist&user=user&password=user&company=1&version=3.9&jobphase=1/00001076.002
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"
}
]
}