Purchase Orders
The PurchaseOrders resource allows PurchaseOrders to be listed, viewed and created. An individual purchase order’s details can be viewed by appending its identifier (a GUID formatted as XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
) to the URI.
The full range of URIs and HTTP Verbs supported are:
Operation
HTTP Action
List a page of Purchase Orders
GET /PurchaseOrders
View a Purchase Order with the specified Guid
GET /PurchaseOrders/{orderGuid}
View the Purchase Order Costs for a specific Purchase Order
GET /PurchaseOrders/{orderGuid}/Costs
Create a new Purchase Order
POST /PurchaseOrders/{orderGuid}
Create a new Purchase Order Line
POST /PurchaseOrders/{orderGuid}/Lines
Receipt a Purchase Order
POST /PurchaseOrders/{orderGuid}/Receipt
Complete a Purchase Order
POST /PurchaseOrders/{orderGuid}/Complete
Update a Purchase Order
PUT /PurchaseOrders/{orderGuid}
Update a Purchase Order Line
PUT /PurchaseOrders/{orderGuid}/Lines/{lineGuid}
Delete a Purchase Order
DELETE /PurchaseOrders/{orderGuid}
Delete a Purchase Order Line
DELETE /PurchaseOrders/{orderGuid}/Lines/{lineGuid}
GET Purchase Orders
Available Filters for GET Purchase Orders
Filter
Description
brief
Default is true. If set to true, returns a brief summary of the product list that only includes: Guid, ProductCode, and ProductDescription. If set to false, returns Guid, ProductCode, ProductDescription, SupplierProductDescription, SupplierProductCode, and Product Group.
completedAfter
Returns Purchase Orders completed after the specified date.
completedBefore
Returns Purchase Orders completed before the specified date.
customOrderStatus
Returns Purchase Orders with the specified custom status. If specified, this filter will override the orderStatus filter.
endDate
Only return Purchases with OrderDate before a specified date
modifiedSince
Returns Purchase Orders created or edited after a specified date, must be UTC format.
orderNumber
Returns a single Purchase Order with the specified order number. If set, it overrides all other filters.
orderStatus
If filter is not provided, returns all non-deleted Purchase Orders. Only returns deleted Purchase Orders if explicitly specified in filter.
serialBatch
False by default. If set to true then the attributes SerialNumbers, PendingSerialNumbers, BatchNumbers and PendingBatchNumbers are displayed.
startDate
Only return Purchases with OrderDate after a specified date
supplierCode
Only return suppliers that start with the specific supplier code
warehouseCode
Returns Purchase Orders with the specified warehouse code.
Note: Date filters should be provided in the ISO format YYYY-MM-DD.
Filters are used by adding the filter and value to the URI:
/PurchaseOrders?supplierCode=ACME&startDate=2012-12-31
Available Fields for GET Purchase Orders
Property
Type
Length
Notes
BCSubTotal
Nullable Decimal
Base Currency SubTotal
BCTaxTotal
Nullable Decimal
Base Currency TaxTotal
BCTotal
Nullable Decimal
Base Currency Total
Comments
String
1024
CompletedDate
Nullable DateTime
UTC timezone only
CreatedBy
String
50
CreatedOn
DateTime
Currency
Currency
CustomOrderStatus
String
15
DeliveryCity
String
50
DeliveryCountry
String
50
DeliveryDate
Nullable DateTime
DeliveryName
String
50
DeliveryPostCode
String
50
DeliveryRegion
String
50
DeliveryStreetAddress
String
200
DeliveryStreetAddress2
String
200
DeliverySuburb
String
50
DiscountRate
Decimal
ExchangeRate
Nullable Decimal
Guid
Guid
LastModifiedBy
String
50
LastModifiedOn
Nullable DateTime
OrderDate
Nullable DateTime
UTC timezone only
OrderNumber
String
15
OrderStatus
String
50
Printed
Nullable Boolean
PurchaseOrderLines
PurchaseOrderLine collection
ReceivedDate
Nullable DateTime
The date the Purchase Order was receipted. UTC timezone only
SalesOrders
SalesOrderCollection
A list of orders that are linked to a PurchaseOrder. The Guid and OrderNumber for every SalesOrder linked to a PurchaseOrder will be returned in the collection.
SubTotal
Nullable Decimal
Supplier
Supplier
SupplierEORI
String
20
SupplierInvoiceDate
Nullable DateTime
UTC timezone only
SupplierRef
String
500
Tax
Tax
TaxCode
String
50
TaxRate
Nullable Decimal
TaxTotal
Nullable Decimal
Total
Nullable Decimal
TotalVolume
Nullable Decimal
TotalWeight
Nullable Decimal
Warehouse
Warehouse
Available Fields for PurchaseOrderLine
Property
Type
Length
Notes
BatchNumbers
Batch collection
BCCostTotal
Decimal
Base Currency CostTotal
BCLandedCost
Decimal
Base Currency LandedCost
BCSubTotal
Nullable Decimal
Base Currency SubTotal
BCUnitPrice
Nullable Decimal
Base Currency UnitPrice
Comments
String
1024
DeliveryDate
Nullable DateTime
Date only, no time component.
DiscountedUnitPrice
Decimal
DiscountRate
Decimal
Guid
Guid
LastModifiedBy
String
256
LastModifiedOn
Nullable DateTime
LineNumber
Integer
LineTax
Nullable Decimal
LineTaxCode
String
50
LineTaxRate
Decimal
LineTotal
Decimal
OrderQuantity
Decimal
PurchaseUnitOrderQuantity
Decimal
PendingBatchNumbers
PendingBatch collection
Will not return a Guid (only available after the PO is receipted)
PendingSerialNumbers
PendingSerial collection
Will not return a Guid (only available after the PO is receipted)
Product
Product
PurchaseUnitOrderQuantity
Decimal
PurchaseUnitReceiptQuantity
Nullable Decimal
ReceiptQuantity
Nullable Decimal
SerialNumbers
Serial collection
UnitOfMeasure
UnitOfMeasure
UnitPrice
Decimal
Volume
Nullable Decimal
Weight
Nullable Decimal
Available Fields for Batch
Property
Type
Length
BatchNumber
String
50
ExpiryDate
Date
Guid
Guid
LastModifiedOn
DateTime
Quantity
Decimal
Available Fields for PendingBatch
Property
Type
Length
BatchNumber
String
50
CreatedOn
DateTime
ExpiryDate
Date
Quantity
Decimal
Available Fields for Serial
Property
Type
Length
SerialNumber
String
50
Guid
Guid
LastModifiedOn
DateTime
Available Fields for PendingSerial
Property
Type
Length
CreatedOn
DateTime
SerialNumber
String
50
Examples for Response GET /PurchaseOrders
show xml example
<?xml version="1.0"?>
<PurchaseOrders xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<Pagination>
<NumberOfItems> 1</NumberOfItems>
<PageSize> 200</PageSize>
<PageNumber> 1</PageNumber>
<NumberOfPages> 1</NumberOfPages>
</Pagination>
<PurchaseOrder>
<Guid> 6b35620c-9a43-44a3-b156-f10656b02710</Guid>
<OrderNumber> PO-00000001</OrderNumber>
<OrderDate> 2014-03-30T02:32:20.74</OrderDate>
<CompletedDate xsi:nil= "true" />
<Supplier>
<Guid> a07d2abb-06b1-434d-bfd5-547ca68fe1c6</Guid>
<SupplierCode> TRISH</SupplierCode>
<SupplierName> Trisha's Trinkets</SupplierName>
</Supplier>
<Printed xsi:nil= "true" />
<OrderStatus> Complete</OrderStatus>
<CustomOrderStatus> CustomStatus</CustomOrderStatus>
<ReceivedDate> 2014-03-30T02:32:20.74</ReceivedDate>
<Currency>
<Guid> 5dffbd6c-2c99-4649-bf84-169f1016995c</Guid>
<LastModifiedOn> 2016-03-22T19:45:59.843</LastModifiedOn>
<CurrencyCode> NZD</CurrencyCode>
<Description> New Zealand, Dollars</Description>
</Currency>
<ExchangeRate> 1.000000</ExchangeRate>
<Tax>
<Guid> 9ac12791-84b6-445f-bbe4-fc7413b13d58</Guid>
<LastModifiedOn> 2016-03-22T19:45:59.843</LastModifiedOn>
<TaxCode> G.S.T.</TaxCode>
<TaxRate> 0.150000</TaxRate>
<CanApplyToExpenses> false</CanApplyToExpenses>
<CanApplyToRevenue> false</CanApplyToRevenue>
<Obsolete> false</Obsolete>
</Tax>
<TaxRate> 0.150000</TaxRate>
<TaxCode> G.S.T.</TaxCode>
<SubTotal> 5648.000</SubTotal>
<TaxTotal> 847.200</TaxTotal>
<Total> 6495.200</Total>
<TotalVolume> 0.000</TotalVolume>
<TotalWeight> 0.000</TotalWeight>
<SupplierInvoiceDate> 2014-03-30T02:32:20.74</SupplierInvoiceDate>
<BCSubTotal> 5648.000</BCSubTotal>
<BCTaxTotal> 847.200</BCTaxTotal>
<BCTotal> 6495.200</BCTotal>
<PurchaseOrderLines>
<PurchaseOrderLine>
<Guid> 9265ceb6-b266-492f-b289-cba171ffac88</Guid>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 93123f93-a3fb-4a88-af3d-40d0bd28d600</Guid>
<ProductCode> DINING</ProductCode>
<ProductDescription> Dining Table</ProductDescription>
</Product>
<DeliveryDate> 2015-02-16T00:00:00</DeliveryDate>
<OrderQuantity> 60.0000</OrderQuantity>
<PurchaseUnitOrderQuantity> 60.0000</PurchaseUnitOrderQuantity>
<UnitPrice> 47.5000</UnitPrice>
<LineTotal> 2850.000</LineTotal>
<Volume xsi:nil= "true" />
<Weight xsi:nil= "true" />
<ReceiptQuantity xsi:nil= "true" />
<PurchaseUnitReceiptQuantity xsi:nil= "true" />
<BCUnitPrice> 47.5000</BCUnitPrice>
<BCSubTotal> 2850.000</BCSubTotal>
<LineTax> 427.50</LineTax>
<LastModifiedOn> 2015-02-16T20:35:39.54</LastModifiedOn>
<DiscountedUnitPrice> 47.5000</DiscountedUnitPrice>
<DiscountRate> 0.0000</DiscountRate>
<UnitOfMeasure>
<Guid> 662a48a5-440b-4529-ac38-6064e666d709</Guid>
<Name> EA</Name>
<Obsolete> false</Obsolete>
</UnitOfMeasure>
<LineTaxCode> G.S.T.</LineTaxCode>
<LineTaxRate> 0.150000</LineTaxRate>
</PurchaseOrderLine>
<PurchaseOrderLine>
<Guid> 9369e496-8c81-45a2-8d88-ff9fbf972afb</Guid>
<LineNumber> 2</LineNumber>
<Product>
<Guid> 3ddeddf2-76d8-49a4-bf31-bc05b138605e</Guid>
<ProductCode> DUST</ProductCode>
<ProductDescription> Fairy Dust</ProductDescription>
</Product>
<DeliveryDate> 2014-03-30T00:00:00</DeliveryDate>
<OrderQuantity> 50.0000</OrderQuantity>
<PurchaseUnitOrderQuantity> 50.0000</PurchaseUnitOrderQuantity>
<UnitPrice> 8.5000</UnitPrice>
<LineTotal> 425.000</LineTotal>
<Volume xsi:nil= "true" />
<Weight xsi:nil= "true" />
<ReceiptQuantity xsi:nil= "true" />
<PurchaseUnitReceiptQuantity xsi:nil= "true" />
<BCUnitPrice> 8.5000</BCUnitPrice>
<BCSubTotal> 425.000</BCSubTotal>
<LineTax> 63.75</LineTax>
<LastModifiedOn> 2014-03-30T02:32:20.74</LastModifiedOn>
<DiscountedUnitPrice> 8.5000</DiscountedUnitPrice>
<DiscountRate> 0.0000</DiscountRate>
<UnitOfMeasure>
<Guid> 662a48a5-440b-4529-ac38-6064e666d709</Guid>
<Name> EA</Name>
<Obsolete> false</Obsolete>
</UnitOfMeasure>
<LineTaxCode> G.S.T.</LineTaxCode>
<LineTaxRate> 0.150000</LineTaxRate>
</PurchaseOrderLine>
</PurchaseOrderLines>
<Warehouse>
<Guid> 5797c041-4d5b-4860-8ac4-eb4714e7bae0</Guid>
<LastModifiedOn> 2016-03-29T02:32:20.8</LastModifiedOn>
<WarehouseCode> MAIN</WarehouseCode>
<WarehouseName> Main Warehouse</WarehouseName>
<IsDefault> true</IsDefault>
<Obsolete> false</Obsolete>
</Warehouse>
<LastModifiedOn> 2014-03-30T02:32:20.74</LastModifiedOn>
<DiscountRate> 0.0000</DiscountRate>
</PurchaseOrder>
</PurchaseOrders>
show json example
{
"Pagination" : {
"NumberOfItems" : 1 ,
"PageSize" : 200 ,
"PageNumber" : 1 ,
"NumberOfPages" : 1
},
"Items" : [
{
"Guid" : "6b35620c-9a43-44a3-b156-f10656b02710" ,
"OrderNumber" : "PO-00000001" ,
"OrderDate" : "/Date(1396146740740)/" ,
"CompletedDate" : null ,
"Supplier" : {
"Guid" : "a07d2abb-06b1-434d-bfd5-547ca68fe1c6" ,
"SupplierCode" : "TRISH" ,
"SupplierName" : "Trisha's Trinkets"
},
"SupplierRef" : null ,
"Comments" : null ,
"Printed" : null ,
"OrderStatus" : "Complete" ,
"CustomOrderStatus" : "CustomStatus" ,
"ReceivedDate" : "/Date(1396146740740)/" ,
"DeliveryName" : null ,
"DeliveryStreetAddress" : null ,
"DeliveryStreetAddress2" : null ,
"DeliverySuburb" : null ,
"DeliveryRegion" : null ,
"DeliveryCity" : null ,
"DeliveryCountry" : null ,
"DeliveryPostCode" : null ,
"Currency" : {
"CurrencyCode" : "NZD" ,
"Description" : "New Zealand, Dollars" ,
"Guid" : "5dffbd6c-2c99-4649-bf84-169f1016995c" ,
"LastModifiedOn" : "/Date(1458675959843)/"
},
"ExchangeRate" : 1 ,
"Tax" : {
"TaxCode" : "G.S.T." ,
"Description" : null ,
"TaxRate" : 0.15 ,
"CanApplyToExpenses" : false ,
"CanApplyToRevenue" : false ,
"Obsolete" : false ,
"Guid" : "9ac12791-84b6-445f-bbe4-fc7413b13d58" ,
"LastModifiedOn" : "/Date(1458675959843)/"
},
"TaxRate" : 0.15 ,
"TaxCode" : "G.S.T." ,
"SubTotal" : 5648 ,
"TaxTotal" : 847.2 ,
"Total" : 6495.2 ,
"TotalVolume" : 0 ,
"TotalWeight" : 0 ,
"SupplierInvoiceDate" : "/Date(1396146740740)/" ,
"BCSubTotal" : 5648 ,
"BCTaxTotal" : 847.2 ,
"BCTotal" : 6495.2 ,
"PurchaseOrderLines" : [
{
"Guid" : "6ab9fe51-8a59-41dd-a494-d67178b67c3e" ,
"LineNumber" : 1 ,
"Product" : {
"ProductCode" : "ALIEN" ,
"ProductDescription" : "Alien Artifact" ,
"Guid" : "c92823f0-a5af-4e66-91a7-d2c66c25f885"
},
"DeliveryDate" : "/Date(1396146740740)/" ,
"OrderQuantity" : 60 ,
"PurchaseUnitOrderQuantity" : 60 ,
"UnitPrice" : 47.5 ,
"LineTotal" : 2850 ,
"Volume" : null ,
"Weight" : null ,
"Comments" : null ,
"ReceiptQuantity" : null ,
"PurchaseUnitReceiptQuantity" : null ,
"BCUnitPrice" : 47.5 ,
"BCSubTotal" : 2850 ,
"LineTax" : 427.5 ,
"LastModifiedOn" : "/Date(1396146740740)/" ,
"DiscountedUnitPrice" : 47.5 ,
"DiscountRate" : 0 ,
"UnitOfMeasure" : {
"Guid" : "662a48a5-440b-4529-ac38-6064e666d709" ,
"Name" : "EA" ,
"Obsolete" : false
},
"LineTaxCode" : "G.S.T." ,
"LineTaxRate" : 0.15
},
{
"Guid" : "9369e496-8c81-45a2-8d88-ff9fbf972afb" ,
"LineNumber" : 2 ,
"Product" : {
"ProductCode" : "DUST" ,
"ProductDescription" : "Fairy Dust" ,
"Guid" : "c8bd91f4-a254-42cb-9269-4fc0f22b917c"
},
"DeliveryDate" : "/Date(1396146740740)/" ,
"OrderQuantity" : 50 ,
"PurchaseUnitOrderQuantity" : 50 ,
"UnitPrice" : 8.5 ,
"LineTotal" : 425 ,
"Volume" : null ,
"Weight" : null ,
"Comments" : null ,
"ReceiptQuantity" : null ,
"PurchaseUnitReceiptQuantity" : null ,
"BCUnitPrice" : 8.5 ,
"BCSubTotal" : 425 ,
"LineTax" : 63.75 ,
"LastModifiedOn" : "/Date(1396146740740)/" ,
"DiscountedUnitPrice" : 8.5 ,
"DiscountRate" : 0 ,
"UnitOfMeasure" : {
"Guid" : "662a48a5-440b-4529-ac38-6064e666d709" ,
"Name" : "EA" ,
"Obsolete" : false
},
"LineTaxCode" : "G.S.T." ,
"LineTaxRate" : 0.15
}
],
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"WarehouseName" : "Main Warehouse" ,
"IsDefault" : true ,
"StreetNo" : null ,
"AddressLine1" : null ,
"AddressLine2" : null ,
"City" : null ,
"Region" : null ,
"Country" : null ,
"PostCode" : null ,
"PhoneNumber" : null ,
"FaxNumber" : null ,
"MobileNumber" : null ,
"DDINumber" : null ,
"ContactName" : null ,
"Obsolete" : false ,
"Guid" : "5797c041-4d5b-4860-8ac4-eb4714e7bae0" ,
"LastModifiedOn" : "/Date(1459218740800)/"
},
"LastModifiedOn" : "/Date(1396146740740)/" ,
"DiscountRate" : 0
}
]
}
Available Fields for GET /PurchaseOrders/{OrderGuid}/Costs
Property
Type
Length
AppliedDistributionMethod
String
15
BCCost
Nullable Decimal
BCTaxCost
Nullable Decimal
BCTotalCost
Nullable Decimal
Cost
Decimal
CostDate
Nullable DateTime
CostExchangeRate
Nullable Decimal
Currency
String
3
DistributionMethod
String
15
OrderExchangeRate
Nullable Decimal
Receipted
Boolean
Reference
String
200
Supplier
Supplier
TaxCode
String
50
TaxCost
Decimal
TaxRate
Nullable Decimal
TotalCost
Nullable Decimal
POST/PUT Purchase Orders
Available Request Fields for POST/PUT Purchase Orders
Note: Fields that specify the number of decimal places (dp) in their type will round any request values that do not match the specified accuracy.
Property
Type
Length
Notes
POST
PUT
Comments
String
1024
Currency
Currency
Must match supplier's default currency
N/A
DeliveryCity
String
50
DeliveryCountry
String
50
DeliveryDate
DateTime
DeliveryName
String
50
DeliveryPostCode
String
50
DeliveryRegion
String
50
DeliveryStreetAddress
String
200
DeliveryStreetAddress2
String
200
DeliverySuburb
String
50
DiscountRate
Decimal
Must be between 0 and 1
ExchangeRate
Decimal
Guid
Guid
Required
N/A
OrderDate
DateTime
UTC timezone only
OrderNumber
String
15
N/A
OrderStatus
String
50
POST values: Parked , Placed , and Complete PUT values: POST values and Costed
Required
Required
PurchaseOrderLines
PurchaseOrderLine collection
At least one with Placed, Costed or Complete status
N/A
ReceivedDate
DateTime
The date the Purchase Order was receipted. UTC timezone only
N/A
SubTotal
Decimal (2dp)
Required
N/A
Supplier
Supplier
Required
Required
SupplierEORI
String
20
If not provided, defaults to the Supplier EORI number
SupplierInvoiceDate
DateTime
UTC timezone only
SupplierRef
String
500
Tax
Tax
N/A
TaxCode
String
50
Takes precedence over the Tax
object
TaxRate
Decimal
TaxTotal
Decimal (2dp)
Required
N/A
Total
Decimal (2dp)
Required
N/A
Warehouse
Warehouse
Available Request Fields for Currency
Note: At a minimum, a valid Guid
or CurrencyCode
is required.
Property
Type
Length
POST
Guid
Guid
Optional
CurrencyCode
String
3
Optional
Available Request Fields for Supplier
Note: At a minimum, a valid Guid
or SupplierCode
is required.
Property
Type
Length
POST
Guid
Guid
Optional
SupplierCode
String
500
Optional
Available Request Fields for Tax
Note: At a minimum, a valid TaxCode
or TaxRate
is required.
Property
Type
Length
POST
TaxCode
String
25
Optional
TaxRate
Decimal
Optional
Available Request Fields for Warehouse
Note: At a minimum, a valid Guid
or WarehouseCode
is required.
Property
Type
Length
POST
Guid
Guid
Optional
WarehouseCode
String
15
Optional
Examples for Request POST /PurchaseOrders/{orderGuid}
show xml example
<?xml version="1.0"?>
<PurchaseOrder xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<Guid> 281faded-a79c-4aa9-8684-187ccefc6b77</Guid>
<Supplier>
<SupplierCode> TRISH</SupplierCode>
</Supplier>
<DeliveryDate> 2021-10-07</DeliveryDate>
<OrderStatus> Complete</OrderStatus>
<SubTotal> 10.00</SubTotal>
<TaxTotal> 250.00</TaxTotal>
<Total> 1456.00</Total>
<PurchaseOrderLines>
<PurchaseOrderLine>
<LineNumber> 1</LineNumber>
<Product>
<ProductCode> NAIL</ProductCode>
</Product>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 10.0000</UnitPrice>
<LineTotal> 10.00</LineTotal>
<ReceiptQuantity> 1.0000</ReceiptQuantity>
<LineTax> 1.50</LineTax>
<DiscountRate> 0.0000</DiscountRate>
</PurchaseOrderLine>
</PurchaseOrderLines>
<Warehouse>
<WarehouseCode> MAIN</WarehouseCode>
</Warehouse>
</PurchaseOrder>
show json example
{
"Guid" : "83c26809-ba40-4e94-880d-e2e95d822bc2" ,
"Supplier" : {
"SupplierCode" : "TRISH"
},
"DeliveryDate" : "2021-10-04" ,
"SupplierRef" : null ,
"OrderStatus" : "Parked" ,
"SubTotal" : 850.00 ,
"TaxTotal" : 127.50 ,
"Total" : 977.50 ,
"PurchaseOrderLines" : [
{
"LineNumber" : 1 ,
"Product" : {
"ProductCode" : "COUCH2"
},
"OrderQuantity" : 100.0000 ,
"UnitPrice" : 8.5000 ,
"LineTotal" : 850.00 ,
"ReceiptQuantity" : 100.0000 ,
"LineTax" : 127.50 ,
"DiscountRate" : 0.00
}
],
"Warehouse" : {
"WarehouseCode" : "MAIN"
}
}
Examples for Request PUT /PurchaseOrders/{orderGuid}
show xml example
<?xml version="1.0"?>
<PurchaseOrder xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<Supplier>
<SupplierCode> TRISH</SupplierCode>
</Supplier>
<DeliveryDate> 2023-08-07</DeliveryDate>
<TaxCode> NONE</TaxCode>
<TaxRate> 0</TaxRate>
<DiscountRate> 0.2</DiscountRate>
<OrderStatus> Placed</OrderStatus>
<Warehouse>
<WarehouseCode> MAIN</WarehouseCode>
</Warehouse>
</PurchaseOrder>
show json example
{
"Supplier" : {
"SupplierCode" : "TRISH"
},
"DeliveryDate" : "2023-08-07" ,
"TaxCode" : "NONE" ,
"TaxRate" : 0 ,
"DiscountRate" : 0.2 ,
"OrderStatus" : "Placed" ,
"Warehouse" : {
"WarehouseCode" : "MAIN"
}
}
Available Request Fields for POST/PUT Purchase Order Lines
Note: Fields that specify the number of decimal places (dp) in their type will round any request values that do not match the specified accuracy.
Property
Type
Length
Notes
POST
PUT
Comments
String
1024
DeliveryDate
DateTime
DiscountRate
Decimal
Must be between 0 and 1
Guid
Guid
N/A
LineNumber
Integer
Required
N/A
LineTax
Decimal (2dp)
Follows tax hierarchy: 1. Product 2. Purchase Order 3. Supplier 4. Default Purchase tax
Required
Required
LineTotal
Decimal (2dp)
Required
Required
OrderQuantity
Decimal (4dp)
Quantity will be treated in the purchasing unit if UnitOfMeasure is provided
Required
Required
PendingBatchNumbers
PendingBatch collection
PendingSerialNumbers
PendingSerial collection
Product
Product
Required
N/A
ReceiptQuantity
Decimal
Quantity will be treated in the purchasing unit if UnitOfMeasure is provided
UnitOfMeasure
UnitOfMeasure
Must be a valid purchasing unit for the line product. If not provided, defaults to the product's base unit
N/A
UnitPrice
Decimal (4dp)
Volume
Decimal
If supplied, will override the Product unit's default volume
N/A
Weight
Decimal
If supplied, will override the Product unit's default weight
N/A
Available Request Fields for Product
Note: At a minimum, a valid Guid
or ProductCode
is required.
Property
Type
Length
POST
Guid
Guid
Optional
ProductCode
String
100
Optional
Available Request Fields for UnitOfMeasure
Note: At a minimum, a valid Guid
or Name
is required.
Property
Type
Length
POST
Guid
Guid
Optional
Name
String
20
Optional
Available Request Fields for PendingBatch
Property
Type
Length
POST
BatchNumber (XML) / Number (JSON)
String
50
Required
Quantity
Decimal
Required
ExpiryDate
DateTime
Available Request Fields for PendingSerial
Property
Type
Length
POST
SerialNumber (XML) / Identifier (JSON)
String
50
Required
Examples for Request POST /PurchaseOrders/{orderGuid}/Lines
show xml example
<?xml version="1.0"?>
<PurchaseOrderLine xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<LineNumber> 1</LineNumber>
<Product>
<ProductCode> NAIL</ProductCode>
</Product>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 10.0000</UnitPrice>
<LineTotal> 10.00</LineTotal>
<ReceiptQuantity> 1.0000</ReceiptQuantity>
<LineTax> 1.50</LineTax>
</PurchaseOrderLine>
show json example
{
"LineNumber" : 1 ,
"Product" : {
"ProductCode" : "NAIL"
},
"OrderQuantity" : 100.0000 ,
"UnitPrice" : 8.5000 ,
"LineTotal" : 850.00 ,
"ReceiptQuantity" : 100.0000 ,
"LineTax" : 127.50
}
Examples for Request PUT /PurchaseOrders/{orderGuid}/Lines/{lineGuid}
show xml example
<?xml version="1.0"?>
<PurchaseOrderLine xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<Comments> Line comment</Comments>
<OrderQuantity> 2.0000</OrderQuantity>
<UnitPrice> 10.0000</UnitPrice>
<LineTotal> 20.00</LineTotal>
<ReceiptQuantity> 1.0000</ReceiptQuantity>
<LineTax> 3.00</LineTax>
</PurchaseOrderLine>
show json example
{
"Comments" : "Line comment" ,
"OrderQuantity" : 100.0000 ,
"UnitPrice" : 2.5000 ,
"LineTotal" : 250.00 ,
"ReceiptQuantity" : 50.0000 ,
"LineTax" : 20.00
}