Index

api/v1/pos

Path: api/v1/pos

This API is JSON:API compliant.

This endpoint supports the following methods:
GET PATCH

The resource type for this endpoint is Purchase
The identifier is pono
Supported inclusions are comments

The Purchase resource type attributes are as follows:

{
"status":string
"ourRef":string (read-only)
"priority":string (read-only)
"pODate":string (DateTime in ISO format) (read-only)
optional
"dateDue":string (DateTime in ISO format) (read-only)
optional
"recDate":string (DateTime in ISO format)
"vendorInvNo":string
optional
"origPONo":integer (read-only)
optional
"prevPONo":integer (read-only)
"notes":string (read-only)
"allowPartShip":boolean (read-only)
"custRetNo":integer (read-only)
"bidReference":string (read-only)
"currencyCode":string (read-only)
"exchangeRate":number (read-only)
"subBranchCode":string
"branchCode":string
"pOType":integer (read-only)
"gLDeptCode":string
"taxInc":boolean
"calcPricesFromTaxPaid":boolean
"totals":{
"stockTotal ":number (read-only)
"freight ":number (read-only)
"freightTax":number (read-only)
"freightTaxCode":string (read-only)
optional
"freightTaxAdj ":integer (read-only)
"accFee":number (read-only)
"accFeeTax":number (read-only)
"accFeeTaxCode":string (read-only)
"Tax":number (read-only)
optional
"taxAdj":integer (read-only)
"total":number (read-only)
}
"withholdGST":number (read-only)
optional
"costMethod":integer (read-only)
"taxPaid":boolean (read-only)
"rateLocked":boolean (read-only)
"source":string (read-only)
"sourceValue":string (read-only)
optional
"estimatedDeparture":string (DateTime in ISO format) (read-only)
"companyCode":string (read-only)
}

Example GET (Return specific)

Path: api/v1/pos/10?include=stock,comments

Response:

{
    "data": {
        "attributes": {
            "allowPartShip": true,
            "bidReference": "21321231",
            "branchCode": "SYD",
            "calcPricesFromTaxPaid": true,
            "companyCode": "P.COMPANY2",
            "costMethod": 0,
            "currencyCode": "AUD",
            "custRetNo": 0,
            "dateDue": "2024-05-13T13:12:00",
            "estimatedDeparture": null,
            "exchangeRate": 1.0,
            "gLDeptCode": "1",
            "notes": "Po desc Notes",
            "origPONo": 30,
            "ourRef": "Ourrrrref",
            "pODate": "2024-05-13T13:11:00",
            "pOType": 0,
            "prevPONo": null,
            "priority": "Normal",
            "rateLocked": true,
            "recDate": "2025-11-30T13:50:34",
            "source": "Guff",
            "sourceValue": "686HGGH",
            "status": "Booked",
            "subBranchCode": "SALE",
            "taxInc": true,
            "taxPaid": true,
            "totals": {
                "accFee": 12.0,
                "accFeeTax": 1.2,
                "accFeeTaxCode": "G",
                "freight ": 33.0,
                "freightTax": 0.0,
                "freightTaxAdj ": 0,
                "freightTaxCode": "E",
                "stockTotal ": 507.08,
                "Tax": 50.71,
                "taxAdj": 0,
                "total": 603.99
            },
            "vendorInvNo": "wdwdwd",
            "withholdGST": 273.32
        },
        "id": "30",
        "links": {
            "self": "/jim_test/api/v1/pos/30"
        },
        "relationships": {
            "comments": {
                "data": [
                    {
                        "id": "30-4",
                        "type": "PurchaseComment"
                    },
                    {
                        "id": "30-3",
                        "type": "PurchaseComment"
                    },
                    {
                        "id": "30--1",
                        "type": "PurchaseComment"
                    },
                    {
                        "id": "30-2",
                        "type": "PurchaseComment"
                    },
                    {
                        "id": "30-1",
                        "type": "PurchaseComment"
                    }
                ]
            },
            "contract": {
                "data": {
                    "id": "5",
                    "type": "Contract"
                }
            },
            "from": {
                "data": {
                    "id": "16",
                    "type": "CardFile"
                }
            },
            "ship": {
                "data": {
                    "id": "1",
                    "type": "CardFile"
                }
            },
            "stock": {
                "data": [
                    {
                        "id": "30-3",
                        "type": "JobStock"
                    },
                    {
                        "id": "30-4",
                        "type": "JobStock"
                    }
                ]
            },
            "vendor": {
                "data": {
                    "id": "15",
                    "type": "CardFile"
                }
            }
        },
        "type": "Purchase"
    },
    "included": [
        {
            "attributes": {
                "adddate": "2025-11-24T17:08:00",
                "addinit": "HT",
                "description": "Simple test stock",
                "modifydate": "2025-11-24T17:08:00",
                "modifyinit": "HT",
                "qty": 20.0,
                "qtyReceived": 0.0,
                "stockCode": "PHRE2995",
                "stockId": 1,
                "unit": "UNIT",
                "unitPrice": 27.5,
                "unitPriceTF": 25.0,
                "unitPriceTP": 27.5
            },
            "id": "30-3",
            "type": "PurchaseStock"
        },
        {
            "attributes": {
                "adddate": "2025-11-24T17:08:00",
                "addinit": "HT",
                "description": "Simple test stock",
                "modifydate": "2025-11-24T17:08:00",
                "modifyinit": "HT",
                "qty": 3.0,
                "qtyReceived": 0.0,
                "stockCode": "PHRE2995",
                "stockId": 1,
                "unit": "UNIT",
                "unitPrice": 2.596,
                "unitPriceTF": 2.36,
                "unitPriceTP": 2.596
            },
            "id": "30-4",
            "type": "PurchaseStock"
        },
        {
            "attributes": {
                "comment": "",
                "include": false,
                "modifyDate": "2025-11-24T17:04:26+11:00",
                "modifyInit": "HT",
                "status": "Booked"
            },
            "id": "30-4",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "",
                "include": false,
                "modifyDate": "2025-11-24T13:50:52+11:00",
                "modifyInit": "SYS",
                "status": "Ordered"
            },
            "id": "30-3",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "wsws\r\nqaswsws",
                "include": false,
                "modifyDate": "1753-01-01T00:00:00+11:00",
                "modifyInit": null,
                "status": ""
            },
            "id": "30--1",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "wsws",
                "include": false,
                "modifyDate": "2024-09-19T16:27:27+10:00",
                "modifyInit": "SYS",
                "status": ""
            },
            "id": "30-2",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "",
                "include": false,
                "modifyDate": "2024-05-13T13:11:58+10:00",
                "modifyInit": "SYS",
                "status": "Booked"
            },
            "id": "30-1",
            "type": "PurchaseComment"
        }
    ]
}

Example PATCH

Path: api/v1/pos/10

Request:

{
    "data": {
        "id": "10",
        "type": "Purchase",
        "attributes": {
            "status": "Booked"
        }
    }
}

Response:

{
    "data": {
        "id": "10",
        "type": "Purchase",
        "attributes": {
            "Status": "Booked",
            "TaxInc": false
        },
        "relationships": {
            "vendor": {
                "data": {
                    "type": "CardFile",
                    "id": "1"
                }
            },
            "comments": {
                "data": [
                    {
                        "type": "PurchaseComment",
                        "id": "10-4"
                    },
                    {
                        "type": "PurchaseComment",
                        "id": "10-3"
                    },
                    {
                        "type": "PurchaseComment",
                        "id": "10-2"
                    },
                    {
                        "type": "PurchaseComment",
                        "id": "10-1"
                    }
                ]
            },
            "stock": {
                "data": [
                    {
                        "type": "JobStock",
                        "id": "10-4"
                    }
                ]
            }
        },
        "links": {
            "self": "/api/v1/pos/10"
        }
    }
}