Index | Conventions

api/v1/pos

Path: api/v1/pos

This API is JSON:API compliant.

This endpoint supports the following methods:
GET PATCH

This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.

The resource type for this endpoint is Purchase
The identifier is pono

Relationships

A relationship links this Purchase to another resource. By default only the related resource's type and id are returned. Relationships marked Includable can be embedded in the response via the include query parameter (see Includes below). To set or change a relationship, send a resource identifier (type and id) for it. Postable means the relationship can be set when creating the resource (POST); Patchable means it can be changed when updating an existing resource (PATCH). Some relationships are Postable but not Patchable — they can be set at creation but not changed afterwards. A value sent for a relationship that is not Postable/Patchable in that context is not applied.

NotePostable and Patchable describe what the API surface accepts. Whether a particular change is permitted also depends on the resource's current state and your permissions, which Jim2 enforces — a change that is not allowed is rejected with an error response (see the Conventions page).
RelationshipTypeReturnsIncludablePostablePatchable
commentsPurchaseCommentarray
fromCardFileobject
shipCardFileobject
stockPurchaseStockarray
vendorCardFileobject

Includes

Use the include query parameter to embed Includable relationships in a single response, for example:
GET /api/v1/pos/{pono}?include=comments,stock,vendor,from,ship

Embedded resources are returned in a top-level included array, not nested inside the relationship. Match each one back to its relationship by type and id.

NoteEach relationship you include embeds its full related resources in the response, so requesting includes — especially several at once, or to-many relationships that return every related row with no paging — can greatly increase the size of the payload. Only request the includes you actually need.

For example, requesting include=comments returns the comments reference under relationships and the full resource in the included array. The reference and the included entry share the same type and id:

		
GET /api/v1/pos/{pono}?include=comments

{
  "data": {
    "type": "Purchase",
    "id": "1001",
    "relationships": {
      "comments": {
        "data": [ { "type": "PurchaseComment", "id": "2002" } ]
      }
    }
  },
  "included": [
    {
      "type": "PurchaseComment",
      "id": "2002",
      "attributes": { ... }
    }
  ]
}
	

Attributes

The Purchase resource type attributes are as follows:

AttributeTypeRead-onlyDescription
allowPartShipbooleanWhether part shipment is allowed on the PO.
bidReferencestringThe bid reference.
branchCodestringThe branch code. On update, must be a configured branch belonging to the PO's company.
Branches are optional in Jim2 - this is only set when your site is configured to use branches.
calcPricesFromTaxPaidbooleanWhether prices are calculated from the tax-paid (tax-inclusive) amount.
companyCodestringThe company code.
costMethodintegerThe cost method as a numeric value.
currencyCodestringThe currency code.
custRetNointegerThe customer return number associated with the PO.
dateDuestring (DateTime in ISO format)The date the PO is due.
estimatedDeparturestring (DateTime in ISO format)The estimated time of departure (ETD) for the PO.
exchangeRatenumberThe currency exchange rate applied to the PO.
gLDeptCodestringThe GL department code. On update, must match a configured GL department.
GL departments are optional in Jim2 - this is only set when your site is configured to use GL departments.
notesstringNotes / description on the PO.
origPONointegerThe original PO number this PO derives from.
ourRefstringOur reference number for the PO.
pODatestring (DateTime in ISO format)The purchase order date.
pOTypeintegerThe PO type as a numeric value (Purchase or Debtors PO).
prevPONointegerThe previous PO number in the backorder chain.
prioritystringThe PO's priority.
rateLockedbooleanWhether the PO's currency exchange rate is locked.
recDatestring (DateTime in ISO format)The vendor invoice date / received date.
sourcestringThe PO's source name, identifying where it originated.
sourceValuestringThe value associated with the PO's source.
StatusstringThe PO's current status. Setting it changes the PO status (see the PO's setStatus).
subBranchCodestringThe sub-branch code. On update, must match a configured sub-branch.
Sub-branches are optional in Jim2 - this is only set when your site is configured to use sub-branches.
TaxIncbooleanDeprecated: whether prices are calculated tax-inclusive. Use calcPricesFromTaxPaid instead.
taxPaidbooleanWhether the PO pays tax.
totalsobjectThe PO totals (tax-free, tax, tax-paid).
See the totals section below.
vendorInvNostringThe vendor's invoice number.
withholdGSTnumberThe withheld GST amount on the PO.

totals

Attributes of the totals object.

AttributeTypeRead-onlyDescription
accFeenumberThe account fee amount.
accFeeTaxnumberThe tax on the account fee.
accFeeTaxCodestringThe tax code applied to the account fee.
freightnumberThe freight charge amount.
freightTaxnumberThe tax on the freight charge.
freightTaxAdjintegerThe freight tax adjustment indicator.
freightTaxCodestringThe tax code applied to the freight charge.
stockTotalnumberThe total of the PO's stock lines, excluding tax.
TaxnumberThe total tax on the PO.
taxAdjintegerThe tax adjustment indicator.
totalnumberThe PO total, including tax.

Example GET (Return using filter)

Path: api/v1/pos?filter[isActive]=True&filter[lastModified][-gt]2025-12-03T23%3A13%3A12Z

Filtering

For more information see Resource Filtering.

PO Filter uses list technology to retreive data. Names should match those on the list screen in Jim List Help.

The following fields can be used to filter by.
FieldTypeComment
bidReferenceText
branchCodeTextBranch code
cardGroupTextComma separated list of CardFile Group Ids to match vendor on the PO
companyCodeTextCompany code
contract.idInt
contractRefTextPOs with project with matching contract Ref
currencyCodeTextPOs that are for a specified currency code
dateCreatedDateTime
dateDueDateTime
estimatedDepartureDateTime
from.idInt
gLDeptCodeTextGLDept code
hasUnreadEmailBool
isActiveBoolStatus other than CANCEL, Received, FINISH
isFinishedBool
isReceivedBool
job.idInt
lastModifiedDateTime
masterContract.idIntPOs with project with matching master projectId
modeTextPOs picking mode
name.idInt
ourRefText
pODescText
pOIdInt
priorityText
PurchaseStock.serialNoTextMatch stock on the PO by serial#
PurchaseStock.stockIdInt
receiveDateDateTime
ship.idInt
sourceNameTextPOs created by Source Name
sourceValueTextPOs created by external source with Id
statusText
stockGroupTextComma separated list of Stock Group Ids to match stock on the PO
subBranchCodeTextSubBranch code
typeTextMatch PO by Type
typeIdTextMatch PO by Type Id
vendor.idInt
vendorInvNoText

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above).

Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.

{
    "data": [
        {
            "attributes": {
                "allowPartShip": true,
                "bidReference": "BID-0041",
                "branchCode": "SYD",
                "calcPricesFromTaxPaid": true,
                "companyCode": "P.COMPANY2",
                "costMethod": 0,
                "currencyCode": "AUD",
                "custRetNo": 0,
                "dateDue": "2023-02-24T14:35:00",
                "estimatedDeparture": "2023-03-01T08:00:00",
                "exchangeRate": 1.0,
                "gLDeptCode": "1",
                "notes": "Reorder of monitor connectors",
                "origPONo": 4,
                "ourRef": "OR-0041",
                "pODate": "2023-02-24T14:34:00",
                "pOType": 0,
                "prevPONo": 2,
                "priority": "Normal",
                "rateLocked": true,
                "recDate": "2023-02-28T09:15:00",
                "source": "AutoTask",
                "sourceValue": "AT-REF-0041",
                "Status": "Booked",
                "subBranchCode": "SALE",
                "TaxInc": true,
                "taxPaid": true,
                "totals": {
                    "accFee": 5.0,
                    "accFeeTax": 0.5,
                    "accFeeTaxCode": "G",
                    "freight": 10.0,
                    "freightTax": 1.0,
                    "freightTaxAdj": 0,
                    "freightTaxCode": "G",
                    "stockTotal": 15.5,
                    "Tax": 3.05,
                    "taxAdj": 0,
                    "total": 35.05
                },
                "vendorInvNo": "VINV-0041",
                "withholdGST": 12.5
            },
            "id": "4",
            "relationships": {
                "comments": {
                    "data": [
                        {
                            "id": "4-1",
                            "type": "PurchaseComment"
                        }
                    ]
                },
                "contract": {
                    "data": {
                        "id": "5",
                        "type": "Contract"
                    }
                },
                "from": {
                    "data": {
                        "id": "16",
                        "type": "CardFile"
                    }
                },
                "ship": {
                    "data": {
                        "id": "1",
                        "type": "CardFile"
                    }
                },
                "stock": {
                    "data": [
                        {
                            "id": "4-1",
                            "type": "PurchaseStock"
                        }
                    ]
                },
                "vendor": {
                    "data": {
                        "id": "15",
                        "type": "CardFile"
                    }
                }
            },
            "type": "Purchase"
        },
        {
            "id": "9",
            "type": "Purchase",
            "attributes": {
                "Status": "Booked",
                "pODate": "2023-10-12T13:19:00"
            }
        }
    ]
}

Example GET (Return specific)

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

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every 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": "2024-05-20T08:00:00",
            "exchangeRate": 1.0,
            "gLDeptCode": "1",
            "notes": "Po desc Notes",
            "origPONo": 30,
            "ourRef": "Ourrrrref",
            "pODate": "2024-05-13T13:11:00",
            "pOType": 0,
            "prevPONo": 28,
            "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": "PurchaseStock"
                    },
                    {
                        "id": "30-4",
                        "type": "PurchaseStock"
                    }
                ]
            },
            "vendor": {
                "data": {
                    "id": "15",
                    "type": "CardFile"
                }
            }
        },
        "type": "Purchase"
    },
    "included": [
        {
            "attributes": {
                "adddate": "2025-11-24T17:08:00",
                "addinit": "HT",
                "configNo": 4501,
                "description": "Simple test stock",
                "modifydate": "2025-11-24T17:08:00",
                "modifyinit": "HT",
                "qty": 20.0,
                "qtyReceived": 20.0,
                "serials": [
                    {
                        "serialNo": "SN-PHRE-0001",
                        "stockAttrs": [
                            {
                                "name": "Colour",
                                "value": "R,Red"
                            },
                            {
                                "name": "Size",
                                "value": "8,Eight"
                            }
                        ]
                    },
                    {
                        "serialNo": "SN-PHRE-0002",
                        "stockAttrs": [
                            {
                                "name": "Colour",
                                "value": "R,Red"
                            },
                            {
                                "name": "Size",
                                "value": "8,Eight"
                            }
                        ]
                    }
                ],
                "stockAttrs": [
                    {
                        "name": "Colour",
                        "value": "R,Red"
                    },
                    {
                        "name": "Size",
                        "value": "8,Eight"
                    }
                ],
                "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",
                "configNo": 4502,
                "description": "Simple test stock",
                "modifydate": "2025-11-24T17:08:00",
                "modifyinit": "HT",
                "qty": 3.0,
                "qtyReceived": 3.0,
                "stockAttrs": [
                    {
                        "name": "Colour",
                        "value": "B,Blue"
                    },
                    {
                        "name": "Size",
                        "value": "9,Nine"
                    }
                ],
                "stockCode": "PHRE2995",
                "stockId": 1,
                "unit": "UNIT",
                "unitPrice": 2.596,
                "unitPriceTF": 2.36,
                "unitPriceTP": 2.596
            },
            "id": "30-4",
            "type": "PurchaseStock"
        },
        {
            "attributes": {
                "comment": "Received in full and reconciled against vendor invoice.",
                "include": true,
                "modifyDate": "2025-11-24T17:04:26+11:00",
                "modifyInit": "HT",
                "status": "Booked"
            },
            "id": "30-4",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "Awaiting shipment confirmation from vendor.",
                "include": true,
                "modifyDate": "2025-11-24T13:50:52+11:00",
                "modifyInit": "SYS",
                "status": "Ordered"
            },
            "id": "30-3",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "wsws\r\nqaswsws",
                "include": true,
                "modifyDate": "2024-09-19T16:27:27+10:00",
                "modifyInit": "HT",
                "status": "Booked"
            },
            "id": "30--1",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "wsws",
                "include": true,
                "modifyDate": "2024-09-19T16:27:27+10:00",
                "modifyInit": "SYS",
                "status": "Booked"
            },
            "id": "30-2",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "comment": "Purchase order raised from contract requirement.",
                "include": true,
                "modifyDate": "2024-05-13T13:11:58+10:00",
                "modifyInit": "SYS",
                "status": "Booked"
            },
            "id": "30-1",
            "type": "PurchaseComment"
        },
        {
            "attributes": {
                "aBN": "53004085616",
                "aCN": "004085616",
                "address": {
                    "country": "Australia",
                    "isAddressResidential": false,
                    "postCode": "2000",
                    "state": "NSW",
                    "streetAddress": "12 Vendor Street",
                    "suburb": "Sydney"
                },
                "branchCode": "SYD",
                "cardCode": "VENDORCO",
                "cardNo": 15,
                "contact": "Bill Vendor",
                "customer": {
                    "accFeePerc": 2.5,
                    "backorder": "Allow Backorders",
                    "batchInvGroupBy": "Customer",
                    "bPayRefNo": "123456789",
                    "creditHold": "OFF( Auto )",
                    "creditLimit": 50000.0,
                    "currencyCode": "AUD",
                    "custPONo": "PO-STANDING-15",
                    "groups": [
                        {
                            "Id": 3,
                            "Name": "Preferred Vendors",
                            "Type": "CardFileGroup"
                        }
                    ],
                    "priceLevel": "Wholesale",
                    "requiredDays": 30,
                    "requiredHours": 0,
                    "sendInvVia": "Email",
                    "sendStatementVia": "Email",
                    "taxExclCode": "E",
                    "taxInclCode": "G",
                    "taxPaid": true,
                    "terms": "30D"
                },
                "delAddress": {
                    "country": "Australia",
                    "isAddressResidential": false,
                    "postCode": "2000",
                    "state": "NSW",
                    "streetAddress": "12 Vendor Street",
                    "suburb": "Sydney"
                },
                "gLDeptCode": "1",
                "name": "Vendor Co Pty Ltd",
                "shipAmount": 15.0,
                "shipVia": "Courier",
                "subBranchCode": "SALE"
            },
            "id": "15",
            "relationships": {
                "accountManager": {
                    "data": {
                        "id": "2",
                        "type": "CardFile"
                    }
                },
                "contacts": {
                    "data": [
                        {
                            "id": "15-1",
                            "type": "CardFileContact"
                        }
                    ]
                },
                "parent": {
                    "data": {
                        "id": "14",
                        "type": "CardFile"
                    }
                }
            },
            "type": "CardFile"
        },
        {
            "attributes": {
                "aBN": "45123456789",
                "aCN": "123456789",
                "address": {
                    "country": "Australia",
                    "isAddressResidential": false,
                    "postCode": "3000",
                    "state": "VIC",
                    "streetAddress": "8 Sender Road",
                    "suburb": "Melbourne"
                },
                "branchCode": "SYD",
                "cardCode": "FROMCO",
                "cardNo": 16,
                "contact": "Fay From",
                "customer": {
                    "accFeePerc": 0.0,
                    "backorder": "Allow Backorders",
                    "batchInvGroupBy": "Customer",
                    "bPayRefNo": "987654321",
                    "creditHold": "OFF( Auto )",
                    "creditLimit": 25000.0,
                    "currencyCode": "AUD",
                    "custPONo": "PO-STANDING-16",
                    "groups": [
                        {
                            "Id": 4,
                            "Name": "Suppliers",
                            "Type": "CardFileGroup"
                        }
                    ],
                    "priceLevel": "Wholesale",
                    "requiredDays": 14,
                    "requiredHours": 0,
                    "sendInvVia": "Email",
                    "sendStatementVia": "Print",
                    "taxExclCode": "E",
                    "taxInclCode": "G",
                    "taxPaid": true,
                    "terms": "14D"
                },
                "delAddress": {
                    "country": "Australia",
                    "isAddressResidential": false,
                    "postCode": "3000",
                    "state": "VIC",
                    "streetAddress": "8 Sender Road",
                    "suburb": "Melbourne"
                },
                "gLDeptCode": "1",
                "name": "From Co Pty Ltd",
                "shipAmount": 10.0,
                "shipVia": "Courier",
                "subBranchCode": "SALE"
            },
            "id": "16",
            "relationships": {
                "accountManager": {
                    "data": {
                        "id": "2",
                        "type": "CardFile"
                    }
                },
                "contacts": {
                    "data": [
                        {
                            "id": "16-1",
                            "type": "CardFileContact"
                        }
                    ]
                },
                "parent": {
                    "data": {
                        "id": "14",
                        "type": "CardFile"
                    }
                }
            },
            "type": "CardFile"
        },
        {
            "attributes": {
                "aBN": "51824753556",
                "aCN": "824753556",
                "address": {
                    "country": "Australia",
                    "isAddressResidential": true,
                    "postCode": "4000",
                    "state": "QLD",
                    "streetAddress": "1 Delivery Lane",
                    "suburb": "Brisbane"
                },
                "branchCode": "SYD",
                "cardCode": "SHIPTO",
                "cardNo": 1,
                "contact": "Sam Ship",
                "customer": {
                    "accFeePerc": 0.0,
                    "backorder": "No Part Ship (Supply requested Quantity)",
                    "batchInvGroupBy": "Ship",
                    "bPayRefNo": "555666777",
                    "creditHold": "OFF( Auto )",
                    "creditLimit": 10000.0,
                    "currencyCode": "AUD",
                    "custPONo": "PO-STANDING-1",
                    "groups": [
                        {
                            "Id": 1,
                            "Name": "Retail Customers",
                            "Type": "CardFileGroup"
                        }
                    ],
                    "priceLevel": "Retail",
                    "requiredDays": 7,
                    "requiredHours": 0,
                    "sendInvVia": "Email & Print",
                    "sendStatementVia": "Email",
                    "taxExclCode": "E",
                    "taxInclCode": "G",
                    "taxPaid": true,
                    "terms": "COD"
                },
                "delAddress": {
                    "country": "Australia",
                    "isAddressResidential": true,
                    "postCode": "4000",
                    "state": "QLD",
                    "streetAddress": "1 Delivery Lane",
                    "suburb": "Brisbane"
                },
                "gLDeptCode": "1",
                "name": "Ship To Pty Ltd",
                "shipAmount": 20.0,
                "shipVia": "Courier",
                "subBranchCode": "SALE"
            },
            "id": "1",
            "relationships": {
                "accountManager": {
                    "data": {
                        "id": "2",
                        "type": "CardFile"
                    }
                },
                "contacts": {
                    "data": [
                        {
                            "id": "1-1",
                            "type": "CardFileContact"
                        }
                    ]
                },
                "parent": {
                    "data": {
                        "id": "14",
                        "type": "CardFile"
                    }
                }
            },
            "type": "CardFile"
        }
    ]
}

Example PATCH

Path: api/v1/pos/10

Request:

{
    "data": {
        "id": "10",
        "type": "Purchase",
        "attributes": {
            "Status": "Booked",
            "recDate": "2026-07-10",
            "vendorInvNo": "VINV-99887",
            "subBranchCode": "SALE",
            "branchCode": "SYD",
            "gLDeptCode": "1",
            "TaxInc": false,
            "calcPricesFromTaxPaid": false
        }
    }
}

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
    "data": {
        "id": "10",
        "type": "Purchase",
        "attributes": {
            "Status": "Booked",
            "ourRef": "Ourrrrref",
            "priority": "Normal",
            "pODate": "2024-05-13T13:11:00",
            "dateDue": "2024-05-13T13:12:00",
            "recDate": "2026-07-10T00:00:00",
            "vendorInvNo": "VINV-99887",
            "origPONo": 10,
            "prevPONo": 8,
            "notes": "Po desc Notes",
            "allowPartShip": true,
            "custRetNo": 0,
            "bidReference": "21321231",
            "currencyCode": "AUD",
            "exchangeRate": 1.0,
            "subBranchCode": "SALE",
            "branchCode": "SYD",
            "pOType": 0,
            "gLDeptCode": "1",
            "TaxInc": false,
            "calcPricesFromTaxPaid": false,
            "totals": {
                "stockTotal": 507.08,
                "freight": 33.0,
                "freightTax": 0.0,
                "freightTaxCode": "E",
                "freightTaxAdj": 0,
                "accFee": 12.0,
                "accFeeTax": 1.2,
                "accFeeTaxCode": "G",
                "Tax": 50.71,
                "taxAdj": 0,
                "total": 603.99
            },
            "withholdGST": 273.32,
            "costMethod": 0,
            "taxPaid": true,
            "rateLocked": true,
            "source": "Guff",
            "sourceValue": "686HGGH",
            "estimatedDeparture": "2024-05-20T08:00:00",
            "companyCode": "P.COMPANY2"
        },
        "relationships": {
            "vendor": {
                "data": {
                    "type": "CardFile",
                    "id": "15"
                }
            },
            "from": {
                "data": {
                    "type": "CardFile",
                    "id": "16"
                }
            },
            "ship": {
                "data": {
                    "type": "CardFile",
                    "id": "1"
                }
            },
            "contract": {
                "data": {
                    "type": "Contract",
                    "id": "5"
                }
            },
            "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": "PurchaseStock",
                        "id": "10-3"
                    },
                    {
                        "type": "PurchaseStock",
                        "id": "10-4"
                    }
                ]
            }
        },
        "links": {
            "self": "/api/v1/pos/10"
        }
    }
}