POST public-api/ic/purchaseorder/create
This method creates a new purchase order. It requires the Create Purchase Order permission. It accepts a maximum of 500 records at a time.
Request Information
URI Parameters
None.
Body Parameters
Collection of PurchaseOrderInfoName | Description | Type | Additional information |
---|---|---|---|
LastUpdatedDate | date |
None. |
|
RowNumber | integer |
None. |
|
OrderId | integer |
None. |
|
PurchaseOrderNumber | string |
None. |
|
DescriptionText | string |
None. |
|
ReferenceNumber | string |
None. |
|
DateStarted | date |
None. |
|
DateDue | date |
None. |
|
VendorNumber | string |
None. |
|
OrderStatus | string |
None. |
|
OrderStatusReasonCode | string |
None. |
|
ShipMethod | string |
None. |
|
PayMethod | string |
None. |
|
ShippingCost | decimal number |
None. |
|
TaxCost | decimal number |
None. |
|
TotalCost | decimal number |
None. |
|
ShipToContact | AddressInfo |
None. |
|
VendorContact | AddressInfo |
None. |
|
PurchaseOrderLines | Collection of PurchaseOrderLineInfo |
None. |
|
PurchaseOrderNotes | Collection of NoteInfo |
None. |
|
Quantity | decimal number |
None. |
|
LocationId | integer |
None. |
|
ContainerId | integer |
None. |
|
PurchaseDate | date |
None. |
|
SupplierId | integer |
None. |
|
SupplierName | string |
None. |
|
PurchaseCost | decimal number |
None. |
|
Accrual | decimal number |
None. |
|
Outstanding | decimal number |
None. |
|
CustomFields | Collection of DcfValueInfo |
None. |
|
SupplierContact | OrderContactModel |
None. |
|
Supplier | SupplierModel |
None. |
Request Formats
application/json
[ { "RowNumber": 0, "OrderId": 0, "PurchaseOrderNumber": "5f83a14eacc348a2afb1d799df71eb8e-3", "DescriptionText": "Some Purchase order 5f83a14eacc348a2afb1d799df71eb8e for testing", "ReferenceNumber": "AB123455f83a14eacc348a2afb1d799df71eb8e", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "ItemNumber": "403226", "UomName": "each", "ItemPrice": 10.0, "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 20.0, "QuantityComplete": 0.0 }, { "ItemNumber": "614126", "UomName": "each", "ItemPrice": 15.0, "VendorSku": "614126", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 10.0, "QuantityComplete": 0.0 } ], "ContainerId": 0, "PurchaseDate": "0001-01-01T00:00:00", "PurchaseCost": 0.0, "CustomFields": [ { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 } ] } ]
application/json
[ { "RowNumber": 0, "PurchaseOrderNumber": "8a63e79245c44aa38f97a3a126bc2074-3", "DescriptionText": "Some Purchase order 8a63e79245c44aa38f97a3a126bc2074 for testing", "ReferenceNumber": "AB123458a63e79245c44aa38f97a3a126bc2074", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "UomName": "each", "ItemPrice": 10.0, "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 20.0, "QuantityComplete": 0.0 } ], "PurchaseDate": "0001-01-01T00:00:00", "PurchaseCost": 0.0 } ]
application/json
[ { "RowNumber": 0, "PurchaseOrderNumber": "8a63e79245c44aa38f97a3a126bc2074-3", "DescriptionText": "Some Purchase order 8a63e79245c44aa38f97a3a126bc2074 for testing", "ReferenceNumber": "AB123458a63e79245c44aa38f97a3a126bc2074", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "ItemNumber": "403226", "UomName": "each", "ItemPrice": 10.0, "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 20.0, "QuantityComplete": 0.0 }, { "ItemNumber": "614126", "UomName": "each", "ItemPrice": 15.0, "VendorSku": "614126", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 10.0, "QuantityComplete": 0.0 } ], "PurchaseDate": "0001-01-01T00:00:00", "PurchaseCost": 0.0, "CustomFields": [ { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 } ] } ]
application/json
[ { "RowNumber": 0, "PurchaseOrderNumber": "6b4fe81f009a4127b16318b4bfd3edee-4", "DescriptionText": "Some Purchase order 6b4fe81f009a4127b16318b4bfd3edee-4 for testing", "ReferenceNumber": "AB123456b4fe81f009a4127b16318b4bfd3edee-4", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "ItemNumber": "403226", "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "UomName": "each", "QuantityRequested": 20.0, "QuantityComplete": 0.0, "ItemPrice": 10.0 }, { "ItemNumber": "614126", "VendorSku": "614126", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "UomName": "each", "QuantityRequested": 10.0, "QuantityComplete": 0.0, "ItemPrice": 15.0 } ] } ]
application/json
[ { "RowNumber": 0, "OrderId": 0, "PurchaseOrderNumber": "0061374f5f414c4daba6c33f189f2062-3", "DescriptionText": "Some Purchase order 0061374f5f414c4daba6c33f189f2062 for testing", "ReferenceNumber": "AB123450061374f5f414c4daba6c33f189f2062", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "ItemNumber": "403226", "UomName": "each", "ItemPrice": 10.0, "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 20.0, "QuantityComplete": 0.0 }, { "ItemNumber": "614126", "UomName": "each", "ItemPrice": 15.0, "VendorSku": "614126", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 10.0, "QuantityComplete": 0.0 } ], "ContainerId": 0, "PurchaseDate": "0001-01-01T00:00:00", "PurchaseCost": 0.0, "CustomFields": [ { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 } ] } ]
application/json
[ { "RowNumber": 0, "OrderId": 0, "PurchaseOrderNumber": "6f6484fddb4f49b6a49f26b6201f8033-3", "DescriptionText": "Some Purchase order 6f6484fddb4f49b6a49f26b6201f8033 for testing", "ReferenceNumber": "AB123456f6484fddb4f49b6a49f26b6201f8033", "DateDue": "2169-07-20T00:00:00Z", "VendorNumber": "20160708", "ShipMethod": "Priority Overnight", "PayMethod": "Credit Card", "ShippingCost": 0.0, "TaxCost": 0.0, "TotalCost": 0.0, "ShipToContact": { "AddressLine1": "2" }, "VendorContact": { "AddressLine1": "1" }, "PurchaseOrderLines": [ { "ItemNumber": "403226", "UomName": "each", "ItemPrice": 10.0, "VendorSku": "403226", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 20.0, "QuantityComplete": 0.0 }, { "ItemNumber": "614126", "UomName": "each", "ItemPrice": 15.0, "VendorSku": "614126", "TaxCost": 0.0, "ShippingCost": 0.0, "TotalLineCost": 0.0, "GrandTotalLineCost": 0.0, "QuantityRequested": 10.0, "QuantityComplete": 0.0 } ], "ContainerId": 0, "PurchaseDate": "0001-01-01T00:00:00", "PurchaseCost": 0.0, "CustomFields": [ { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment Shipped", "DCFDataType": 2, "DcfNumberValue": 10.0, "DcfValueRecordStatus": 1 }, { "ImportRowNumber": 0, "DcfLabel": "Shipment not Received", "DCFDataType": 2, "DcfNumberValue": -1.0, "DcfValueRecordStatus": 1 } ] } ]
Response Information
Resource Description
WaspResultOfResultsName | Description | Type | Additional information |
---|---|---|---|
Data |
Type specific result that always depends on the function called. |
Results |
None. |
Messages |
List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. |
Collection of WtResult |
None. |
BatchNumber |
This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. |
integer |
None. |
HasError |
True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. |
boolean |
None. |
HasHttpError |
True if an API function call could not be fully posted to the server or the results could not be fully returned. |
boolean |
None. |
HasMessage |
True if any message is available. |
boolean |
None. |
HasSuccessWithMoreDataRemaining |
True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. |
boolean |
None. |
TotalRecordsLongCount |
This is the total number of records available in the database based on the query and filer conditions provided. It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. This is used, for example, to set relative scroll bar sizes. When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation. To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster. |
integer |
None. |
Response Formats
application/json
{ "Data": { "ResultList": [ { "ResultCode": -57001, "Message": "The field, Shipment Shipped, does not exist in the system.", "HttpStatusCode": 422, "FieldName": "Shipment Shipped" } ], "SuccessfullResults": 0, "TotalResults": 1, "ErrorCount": 1 }, "Messages": [ { "ResultCode": -57001, "Message": "The field, Shipment Shipped, does not exist in the system.", "HttpStatusCode": 422, "FieldName": "Shipment Shipped" } ], "TotalRecordsLongCount": 1, "HasSuccessWithMoreDataRemaining": false, "HasError": true, "HasMessage": true, "HasHttpError": true }