v2

latestSwagger 2.02026-08-01139174369.1 KB
Purchases

Creates a new Purchase.

post/v1/purchases

Request body

referencestring
supplierIdinteger
unallocatednumber double
unpaidnumber double
detailCollectionstring[]
postponedAccountingboolean
internationalServicesboolean
isDiscrepancyAcceptedboolean
netGoodsnumber double
netServicesnumber double
vatTypeIdinteger
totalNetnumber double
totalVATnumber double
idinteger
bookTranTypeIdinteger
acCodestring
notestring
entryDatestring date-time
procDatestring date-time
totalnumber double
timestampstring byte

Example request

{
  "supplierId": 10173,
  "unallocated": 100,
  "unpaid": 100,
  "detailCollection": [],
  "acEntries": [
    {
      "id": 12518,
      "accountCode": "PU03",
      "analysisCategoryId": 10441,
      "description": "PUR 3",
      "value": 90.91
    }
  ],
  "vatEntries": [
    {
      "id": 12267,
      "vatRateId": 10317,
      "percentage": 10,
      "amount": 90.91
    }
  ],
  "postponedAccounting": false,
  "isDiscrepancyAccepted": false,
  "netGoods": 0,
  "netServices": 0,
  "vatTypeId": 1,
  "totalNet": 90.91,
  "totalVAT": 9.09,
  "id": 0,
  "bookTranTypeId": 4,
  "acCode": "SUP3",
  "note": "Supplier 3",
  "entryDate": "2016-06-01T00:00:00",
  "procDate": "2016-06-24T00:00:00",
  "total": 100,
  "customFields": []
}

Response

OK

object required