4 years ago
create purchase order not working
{
"Number": "PSMN001",
"Date": "2021-07-14T00:00:00",
"SupplierInvoiceNumber": null,
"Supplier": {
"UID": "afdc59ae-d844-4068-bf39-073b3e395b79"
},
"ShipToAddress": "Postman Sample, Address, Here",
"Terms": {
"PaymentIsDue": "DayOfMonthAfterEOM",
"DiscountDate": 1,
"BalanceDueDate": 30,
"DiscountForEarlyPayment": 0,
"MonthlyChargeForLatePayment": 0,
"DiscountExpiryDate": "2021-07-14T00:00:00",
"Discount": 0,
"DueDate": "2021-08-14T00:00:00"
},
"IsTaxInclusive": false,
"IsReportable": false,
"Lines": [{
"Type": "Transaction",
"Description": "Iten 123",
"BillQuantity": 100,
"ReceivedQuantity": 100,
"BackorderQuantity": 0,
"Total": 1000,
"UnitPrice": 10,
"Job": null,
"DiscountPercent": 0,
"TaxCode": {
"UID": "ea4e5559-1386-4326-943d-2e79e3ee2a19"
},
"Item": {
"UID": "280cdf4d-7ac5-4968-8760-c244af1ea5d6"
}
}],
"Subtotal": 1000,
"Freight": 0,
"FreightTaxCode": {
"UID": "ea4e5559-1386-4326-943d-2e79e3ee2a19"
},
"TotalTax": 100,
"TotalAmount": 1100,
"Category": null,
"Comment": "",
"ShippingMethod": null,
"PromisedDate": null,
"JournalMemo": "Purchase; 786",
"BillDeliveryStatus": "Print",
"AppliedToDate": 0,
"BalanceDueAmount": 1100,
"Status": "Open",
"LastPaymentDate": null,
"Order": null,
"ForeignCurrency": null
}
Response error
Response error
{
"Errors": [
{
"Name": "ValidationError",
"Message": "BusinessLine_AccountRequired",
"AdditionalDetails": "AccountId:(PurchaseOrderItemLine)",
"ErrorCode": 4239,
"Severity": "Error",
"LearnMore": null
},
{
"Name": "ValidationError",
"Message": "PurchaseOrderLine_ItemBoughtOrInventoriedRequired",
"AdditionalDetails": "ItemId:(PurchaseOrderItemLine)",
"ErrorCode": 4302,
"Severity": "Error",
"LearnMore": null
}
],
"Information": "Warning, error messages have not been finalised in this release and may change"
}