Sales Orders
The SalesOrders resource allows sales orders to be listed, viewed, and created. An individual sales 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 Sales Orders
GET /SalesOrders
View a Sales Order with the specified Guid
GET /SalesOrders/{orderGuid}
Create a new Sales Order
POST /SalesOrders/{orderGuid}
Complete a Sales Order
POST /SalesOrders/{orderGuid}/Complete
Update a Sales Order
PUT /SalesOrders/{orderGuid}
Delete a Sales Order
DELETE /SalesOrders/{orderGuid}
Delete a Sales Order Line
DELETE /SalesOrders/Lines/{lineGuid}
GET Sales Orders
Available Filters for GET Sales Orders
Filter
Description
completedAfter
Returns sales orders completed after the specified date.
completedBefore
Returns sales orders completed before the specified date.
customerCode
Returns orders that start with the specific customer code.
customerId
Only returns orders for a specified Customer GUID. The CustomerId can be specified as a list of comma-separated GUIDs.
customOrderStatus
Returns orders with the specified custom status. Multiple selection can be specified as comma separated. If specified, this filter will override the orderStatus filter.
endDate
Returns orders with order date before the specified date.
modifiedSince
Returns orders created or edited after a specified date, must be UTC format.
orderNumber
Returns a single order with the specified order number. If set, it overrides all other filters.
orderStatus
Returns orders with the specified status. Multiple selection can be specified as comma separated. For example: orderStatus=Completed,Backordered
. If no orderStatus filter is specified, then we exclude "Deleted" by default.
pageSize
Specifies the page size for pagination, default is 200 orders.
Note: Requesting large numbers of orders can be susceptible to poor network performance. Please reduce the page size if you experience delayed requests.
serialBatch
False by default. If set to true then the attributes SerialNumbers and BatchNumbers are displayed.
sourceId
Returns orders with the specified sourceId. If set, it overrides all other filters.
startDate
Returns orders with order date after the specified date.
warehouseCode
Returns sales 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:
/SalesOrders?customerCode=ACME&startDate=2012-01-01
Tip: To efficiently retrieve a count of the orders that match a filter, specify a pageSize of 0: /SalesOrders?orderStatus=Parked,Placed&pageSize=0
. The default ordering is by LastModifiedOn descending.
Available Fields for GET Sales 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
2048
CompletedDate
Nullable DateTime
UTC timezone only
CreatedBy
String
50
CreatedOn
DateTime
Currency
Currency
Customer
Customer
CustomerRef
String
500
CustomOrderStatus
String
15
DeliveryCity
String
500
DeliveryContact
DeliveryContact
DeliveryCountry
String
500
DeliveryInstruction
String
500
DeliveryMethod
String
50
DeliveryName
String
500
DeliveryPostCode
String
50
DeliveryRegion
String
500
DeliveryStreetAddress
String
500
DeliveryStreetAddress2
String
500
DeliverySuburb
String
500
DiscountRate
Decimal
ExchangeRate
Nullable Decimal
Guid
Guid
LastModifiedBy
String
50
LastModifiedOn
Nullable DateTime
OrderDate
Nullable DateTime
OrderNumber
String
20
OrderStatus
String
20
PaymentDueDate
Nullable DateTime
UTC timezone only
ReceivedDate
Nullable DateTime
UTC timezone only
RequiredDate
Nullable DateTime
CompletedDate
Nullable DateTime
UTC timezone only
SalesOrderGroup
String
50
SalesAccount
String
50
SalesOrderLines
SalesOrderLine collection
Salesperson
Salesperson
SourceId
String
500
SubTotal
Decimal
Tax
Tax
TaxRate
Nullable Decimal
TaxTotal
Decimal
Total
Decimal
TotalVolume
Nullable Decimal
TotalWeight
Nullable Decimal
Warehouse
Warehouse
XeroTaxCode
String
50
Available Fields for Currency
Property
Type
Length
CurrencyCode
String
3
Description
String
200
DefaultBuyRate
Decimal
DefaultSellRate
Decimal
Guid
Guid
LastModifiedOn
DateTime
Available Fields for Customer
Property
Type
Length
CurrencyId
Integer
CustomerCode
String
500
CustomerName
String
500
Guid
Guid
LastModifiedOn
DateTime
Available Fields for Delivery Contact
Property
Type
Length
EmailAddress
String
500
FirstName
String
500
Guid
Guid
LastName
String
500
MobilePhone
String
500
OfficePhone
String
500
PhoneNumber
String
500
Available Fields for Salesperson
Property
Type
Length
Email
String
500
FullName
String
500
Guid
Guid
Obsolete
Boolean
LastModifiedOn
DateTime
Available Fields for Tax
Property
Type
Length
CanApplyToExpenses
Boolean
CanApplyToRevenue
Boolean
Description
String
50
Guid
Guid
LastModifiedOn
DateTime
Obsolete
Boolean
TaxCode
String
25
TaxRate
Decimal
Available Fields for Warehouse
Property
Type
Length
AddressLine1
String
500
AddressLine2
String
500
City
String
500
ContactName
String
50
Country
String
500
DDINumber
String
25
FaxNumber
String
25
Guid
Guid
IsDefault
Boolean
LastModifiedOn
DateTime
MobileNumber
String
25
Obsolete
Boolean
PostCode
String
500
PhoneNumber
String
25
Region
String
500
StreetNo
String
500
Suburb
String
500
WarehouseCode
String
15
WarehouseName
String
100
Available Fields for Sales Order Lines
Property
Type
Length
Notes
Assembly
Assembly
BCLineTax
Decimal
BCLineTotal
Decimal
BCUnitPrice
Decimal
Comments
String
1024
CostOfGoodsAccount
String
50
DiscountRate
Decimal
DueDate
DateTime
This field is deprecated and will be removed in a future version of the API.
Guid
Guid
LastModifiedOn
Nullable DateTime
LineNumber
Integer
LineType
String
LineTax
Decimal
LineTaxCode
String
50
LineTotal
Decimal
OrderQuantity
Decimal
Product
Product
TaxRate
Nullable Decimal
UnitCost
Nullable Decimal
UnitPrice
Decimal
Volume
Nullable Decimal
Weight
Nullable Decimal
XeroSalesAccount
String
500
XeroTaxCode
String
50
Available Fields for Assembly
Property
Type
Length
Guid
Guid
AssemblyNumber
String
15
AssemblyStatus
String
15
Available Fields for Product
Property
Type
Length
Guid
Guid
ProductCode
String
100
ProductDescription
String
500
Examples for Response GET /SalesOrders
show xml example
<?xml version="1.0"?>
<SalesOrders 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> 2</NumberOfItems>
<PageSize> 200</PageSize>
<PageNumber> 1</PageNumber>
<NumberOfPages> 1</NumberOfPages>
</Pagination>
<SalesOrder>
<Guid> b599e7f5-7738-4ea1-a318-6b5298766013</Guid>
<LastModifiedOn> 2019-08-06T21:16:45.2962598</LastModifiedOn>
<OrderNumber> SO-138</OrderNumber>
<OrderDate> 2019-08-05T00:00:00</OrderDate>
<RequiredDate> 2019-08-05T00:00:00</RequiredDate>
<CompletedDate xsi:nil= "true" />
<OrderStatus> Parked</OrderStatus>
<Customer>
<Guid> b9f21e05-07fe-4d9d-b460-a09db4c3caa9</Guid>
<LastModifiedOn> 2019-06-05T23:47:17.1466667</LastModifiedOn>
<CustomerCode> WADE</CustomerCode>
<CustomerName> Wade's Apparel & Accessories</CustomerName>
</Customer>
<Warehouse>
<Guid> dba8974c-f12f-423d-b2c7-194847e54834</Guid>
<LastModifiedOn> 2019-08-05T01:37:40.6746097</LastModifiedOn>
<WarehouseCode> MAIN</WarehouseCode>
<WarehouseName> ABC St</WarehouseName>
<IsDefault> true</IsDefault>
<StreetNo> 2</StreetNo>
<AddressLine1> 91 Western Road</AddressLine1>
<Suburb> Brighton</Suburb>
<City> East Sussex</City>
<Region> East Sussex</Region>
<Country> United Kingdom</Country>
<PostCode> BN1 2NW</PostCode>
<PhoneNumber> 123123123</PhoneNumber>
<MobileNumber> 123123123</MobileNumber>
<ContactName> JamesT</ContactName>
<Obsolete> false</Obsolete>
</Warehouse>
<ReceivedDate xsi:nil= "true" />
<DeliveryContact>
<Guid> 9fd9dde8-a7a8-4a6b-8bc9-a2a445f9da7a</Guid>
<FirstName> Joan</FirstName>
<LastName> Smith</LastName>
</DeliveryContact>
<DeliveryInstruction> Handle with care.</DeliveryInstruction>
<Currency>
<Guid> 6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a</Guid>
<LastModifiedOn> 2019-06-05T23:42:47.5066667</LastModifiedOn>
<CurrencyCode> NZD</CurrencyCode>
<Description> New Zealand, Dollars</Description>
</Currency>
<ExchangeRate> 0.989200</ExchangeRate>
<DiscountRate> 0.0000</DiscountRate>
<Tax>
<Guid> 00000000-0000-0000-0000-000000000000</Guid>
<LastModifiedOn xsi:nil= "true" />
<TaxCode> V.A.T.</TaxCode>
<TaxRate> 0.200000</TaxRate>
<CanApplyToExpenses> false</CanApplyToExpenses>
<CanApplyToRevenue> false</CanApplyToRevenue>
<Obsolete> false</Obsolete>
</Tax>
<TaxRate> 0.200000</TaxRate>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<SubTotal> 25.00</SubTotal>
<TaxTotal> 5.00</TaxTotal>
<Total> 30.00</Total>
<TotalVolume> 0.000</TotalVolume>
<TotalWeight> 0.000</TotalWeight>
<BCSubTotal> 25.27</BCSubTotal>
<BCTaxTotal> 5.05</BCTaxTotal>
<BCTotal> 30.32</BCTotal>
<PaymentDueDate> 2019-09-20T00:00:00</PaymentDueDate>
<AllocateProduct> true</AllocateProduct>
<SendAccountingJournalOnly> false</SendAccountingJournalOnly>
<CreatedBy> api@unleashedsoftware.com</CreatedBy>
<CustomOrderStatus> CustomStatus</CustomOrderStatus>
<CreatedOn> 2019-08-06T02:29:01.5366576</CreatedOn>
<LastModifiedBy> james@JamesInc.com</LastModifiedBy>
<SalesOrderLines>
<SalesOrderLine>
<Guid> faf00f73-ad85-4168-952e-a79a7bf2ccc3</Guid>
<LastModifiedOn> 2019-08-06T02:29:01.5836574</LastModifiedOn>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 23280680-a2bd-4873-a390-501e0f3399d1</Guid>
<ProductCode> NAIL-M</ProductCode>
<ProductDescription> Medium Nails</ProductDescription>
</Product>
<DueDate> 2019-08-05T00:00:00</DueDate>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 25.0000</UnitPrice>
<DiscountRate> 0.0000</DiscountRate>
<LineTotal> 25.00000000</LineTotal>
<Volume xsi:nil= "true" />
<Weight xsi:nil= "true" />
<Comments />
<UnitCost> 9.12450000000000</UnitCost>
<TaxRate> 0.200000</TaxRate>
<LineTax> 5.000</LineTax>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<BCUnitPrice> 25.2729</BCUnitPrice>
<BCLineTotal> 25.270</BCLineTotal>
<BCLineTax> 5.050</BCLineTax>
</SalesOrderLine>
</SalesOrderLines>
</SalesOrder>
<SalesOrder>
<Guid> b599e7f5-7738-4ea1-a318-6b5298766012</Guid>
<LastModifiedOn> 2019-08-06T02:27:37.3319038</LastModifiedOn>
<OrderNumber> SO-137</OrderNumber>
<OrderDate> 2019-08-05T00:00:00</OrderDate>
<RequiredDate> 2019-08-05T00:00:00</RequiredDate>
<CompletedDate> 2019-08-06T02:27:37.3139298</CompletedDate>
<OrderStatus> Completed</OrderStatus>
<Customer>
<Guid> b9f21e05-07fe-4d9d-b460-a09db4c3caa9</Guid>
<LastModifiedOn> 2019-06-05T23:47:17.1466667</LastModifiedOn>
<CustomerCode> WADE</CustomerCode>
<CustomerName> Wade's Apparel & Accessories</CustomerName>
</Customer>
<Warehouse>
<Guid> dba8974c-f12f-423d-b2c7-194847e54834</Guid>
<LastModifiedOn> 2019-08-05T01:37:40.6746097</LastModifiedOn>
<WarehouseCode> MAIN</WarehouseCode>
<WarehouseName> ABC St</WarehouseName>
<IsDefault> true</IsDefault>
<StreetNo> aa</StreetNo>
<AddressLine1> 91 Western Road</AddressLine1>
<Suburb> Brighton</Suburb>
<City> East Sussex</City>
<Region> East Sussex</Region>
<Country> United Kingdom</Country>
<PostCode> BN1 2NW</PostCode>
<PhoneNumber> 123123123</PhoneNumber>
<MobileNumber> 123123123</MobileNumber>
<ContactName> JamesT</ContactName>
<Obsolete> false</Obsolete>
</Warehouse>
<ReceivedDate xsi:nil= "true" />
<DeliveryInstruction> Handle with care.</DeliveryInstruction>
<Currency>
<Guid> 6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a</Guid>
<LastModifiedOn> 2019-06-05T23:42:47.5066667</LastModifiedOn>
<CurrencyCode> NZD</CurrencyCode>
<Description> New Zealand, Dollars</Description>
</Currency>
<ExchangeRate> 0.989200</ExchangeRate>
<DiscountRate> 0.0000</DiscountRate>
<Tax>
<Guid> 00000000-0000-0000-0000-000000000000</Guid>
<LastModifiedOn xsi:nil= "true" />
<TaxCode> V.A.T.</TaxCode>
<TaxRate> 0.200000</TaxRate>
<CanApplyToExpenses> false</CanApplyToExpenses>
<CanApplyToRevenue> false</CanApplyToRevenue>
<Obsolete> false</Obsolete>
</Tax>
<TaxRate> 0.200000</TaxRate>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<SubTotal> 25.00</SubTotal>
<TaxTotal> 5.00</TaxTotal>
<Total> 30.00</Total>
<TotalVolume> 0.000</TotalVolume>
<TotalWeight> 0.000</TotalWeight>
<BCSubTotal> 25.27</BCSubTotal>
<BCTaxTotal> 5.05</BCTaxTotal>
<BCTotal> 30.32</BCTotal>
<PaymentDueDate> 2019-09-20T00:00:00</PaymentDueDate>
<AllocateProduct> true</AllocateProduct>
<SendAccountingJournalOnly> false</SendAccountingJournalOnly>
<CreatedBy> api@unleashedsoftware.com</CreatedBy>
<CreatedOn> 2019-08-06T02:27:34.1690698</CreatedOn>
<LastModifiedBy> james@JamesInc.com</LastModifiedBy>
<SalesOrderLines>
<SalesOrderLine>
<Guid> faf00f73-ad85-4168-952e-a79a7bf2ccc2</Guid>
<LastModifiedOn> 2019-08-06T02:27:35.8555896</LastModifiedOn>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 23280680-a2bd-4873-a390-501e0f3399d1</Guid>
<ProductCode> NAIL-M</ProductCode>
<ProductDescription> Medium Nails</ProductDescription>
</Product>
<DueDate> 2019-08-05T00:00:00</DueDate>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 25.0000</UnitPrice>
<DiscountRate> 0.0000</DiscountRate>
<LineTotal> 25.00000000</LineTotal>
<Volume xsi:nil= "true" />
<Weight xsi:nil= "true" />
<Comments />
<UnitCost> 9.12449763033175</UnitCost>
<TaxRate> 0.200000</TaxRate>
<LineTax> 5.000</LineTax>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<BCUnitPrice> 25.2729</BCUnitPrice>
<BCLineTotal> 25.270</BCLineTotal>
<BCLineTax> 5.050</BCLineTax>
<Assembly>
<Guid> 67f46a24-ace9-4773-b2b4-b92f59e8ecf4</Guid>
<AssemblyNumber> ASM-00000033</AssemblyNumber>
<AssemblyStatus> Parked</AssemblyStatus>
</Assembly>
</SalesOrderLine>
</SalesOrderLines>
</SalesOrder>
</SalesOrders>
show json example
{
"Pagination" : {
"NumberOfItems" : 2 ,
"PageSize" : 200 ,
"PageNumber" : 1 ,
"NumberOfPages" : 1
},
"Items" : [
{
"SalesOrderLines" : [
{
"LineNumber" : 1 ,
"LineType" : null ,
"Product" : {
"Guid" : "23280680-a2bd-4873-a390-501e0f3399d1" ,
"ProductCode" : "NAIL-M" ,
"ProductDescription" : "Medium Nails"
},
"DueDate" : " \/ Date(1564963200000) \/ " ,
"OrderQuantity" : 1.0000 ,
"UnitPrice" : 25.0000 ,
"DiscountRate" : 0.0000 ,
"LineTotal" : 25.00000000 ,
"Volume" : null ,
"Weight" : null ,
"Comments" : "" ,
"AverageLandedPriceAtTimeOfSale" : 9.12450000000000 ,
"TaxRate" : 0.200000 ,
"LineTax" : 5.000 ,
"XeroTaxCode" : "V.A.T." ,
"BCUnitPrice" : 25.2729 ,
"BCLineTotal" : 25.270 ,
"BCLineTax" : 5.050 ,
"LineTaxCode" : null ,
"XeroSalesAccount" : null ,
"SerialNumbers" : null ,
"BatchNumbers" : null ,
"Assembly" : null ,
"Guid" : "faf00f73-ad85-4168-952e-a79a7bf2ccc3" ,
"LastModifiedOn" : " \/ Date(1565058541583) \/ "
}
],
"OrderNumber" : "SO-138" ,
"OrderDate" : " \/ Date(1564963200000) \/ " ,
"RequiredDate" : " \/ Date(1564963200000) \/ " ,
"CompletedDate" : null ,
"OrderStatus" : "Parked" ,
"Customer" : {
"CustomerCode" : "WADE" ,
"CustomerName" : "Wade's Apparel & Accessories" ,
"CurrencyId" : 110 ,
"Guid" : "b9f21e05-07fe-4d9d-b460-a09db4c3caa9" ,
"LastModifiedOn" : " \/ Date(1559778437146) \/ "
},
"CustomerRef" : null ,
"Comments" : null ,
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"WarehouseName" : "ABC st" ,
"IsDefault" : true ,
"StreetNo" : "2" ,
"AddressLine1" : "91 Western Road" ,
"AddressLine2" : null ,
"Suburb" : "Brighton" ,
"City" : "East Sussex" ,
"Region" : "East Sussex" ,
"Country" : "United Kingdom" ,
"PostCode" : "BN1 2NW" ,
"PhoneNumber" : "123123123" ,
"FaxNumber" : null ,
"MobileNumber" : "123123123" ,
"DDINumber" : null ,
"ContactName" : "JamesT" ,
"Obsolete" : false ,
"Guid" : "dba8974c-f12f-423d-b2c7-194847e54834" ,
"LastModifiedOn" : " \/ Date(1564969060674) \/ "
},
"ReceivedDate" : null ,
"DeliveryContact" : {
"Guid" : "9fd9dde8-a7a8-4a6b-8bc9-a2a445f9da7a" ,
"FirstName" : "Joan" ,
"LastName" : "Smith"
},
"DeliveryInstruction" : "Handle with care." ,
"DeliveryName" : null ,
"DeliveryStreetAddress" : null ,
"DeliveryStreetAddress2" : null ,
"DeliverySuburb" : null ,
"DeliveryCity" : null ,
"DeliveryRegion" : null ,
"DeliveryCountry" : null ,
"DeliveryPostCode" : null ,
"Currency" : {
"CurrencyCode" : "NZD" ,
"Description" : "New Zealand, Dollars" ,
"Guid" : "6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a" ,
"LastModifiedOn" : " \/ Date(1559778167506) \/ "
},
"ExchangeRate" : 0.989200 ,
"DiscountRate" : 0.0000 ,
"Tax" : {
"TaxCode" : "V.A.T." ,
"Description" : null ,
"TaxRate" : 0.200000 ,
"CanApplyToExpenses" : false ,
"CanApplyToRevenue" : false ,
"Obsolete" : false ,
"Guid" : "00000000-0000-0000-0000-000000000000" ,
"LastModifiedOn" : null
},
"TaxRate" : 0.200000 ,
"XeroTaxCode" : "V.A.T." ,
"SubTotal" : 25.00 ,
"TaxTotal" : 5.00 ,
"Total" : 30.00 ,
"TotalVolume" : 0.000 ,
"TotalWeight" : 0.000 ,
"BCSubTotal" : 25.27 ,
"BCTaxTotal" : 5.05 ,
"BCTotal" : 30.32 ,
"PaymentDueDate" : " \/ Date(1568937600000) \/ " ,
"AllocateProduct" : true ,
"SalesOrderGroup" : null ,
"DeliveryMethod" : null ,
"Salesperson" : null ,
"SendAccountingJournalOnly" : false ,
"SourceId" : null ,
"CreatedBy" : "api@unleashedsoftware.com" ,
"CustomOrderStatus" : "CustomStatus" ,
"CreatedOn" : " \/ Date(1565058541536) \/ " ,
"LastModifiedBy" : "james@JamesInc.com" ,
"Guid" : "b599e7f5-7738-4ea1-a318-6b5298766013" ,
"LastModifiedOn" : " \/ Date(1565126205296) \/ "
},
{
"SalesOrderLines" : [
{
"LineNumber" : 1 ,
"LineType" : null ,
"Product" : {
"Guid" : "23280680-a2bd-4873-a390-501e0f3399d1" ,
"ProductCode" : "NAIL-M" ,
"ProductDescription" : "Medium Nails"
},
"DueDate" : " \/ Date(1564963200000) \/ " ,
"OrderQuantity" : 1.0000 ,
"UnitPrice" : 25.0000 ,
"DiscountRate" : 0.0000 ,
"LineTotal" : 25.00000000 ,
"Volume" : null ,
"Weight" : null ,
"Comments" : "" ,
"AverageLandedPriceAtTimeOfSale" : 9.12449763033175 ,
"TaxRate" : 0.200000 ,
"LineTax" : 5.000 ,
"XeroTaxCode" : "V.A.T." ,
"BCUnitPrice" : 25.2729 ,
"BCLineTotal" : 25.270 ,
"BCLineTax" : 5.050 ,
"LineTaxCode" : null ,
"XeroSalesAccount" : null ,
"SerialNumbers" : null ,
"BatchNumbers" : null ,
"Assembly" : {
"Guid" : "67f46a24-ace9-4773-b2b4-b92f59e8ecf4" ,
"AssemblyNumber" : "ASM-00000033" ,
"AssemblyStatus" : "Parked"
},
"Guid" : "faf00f73-ad85-4168-952e-a79a7bf2ccc2" ,
"LastModifiedOn" : " \/ Date(1565058455855) \/ "
}
],
"OrderNumber" : "SO-137" ,
"OrderDate" : " \/ Date(1564963200000) \/ " ,
"RequiredDate" : " \/ Date(1564963200000) \/ " ,
"CompletedDate" : " \/ Date(1565058457313) \/ " ,
"OrderStatus" : "Completed" ,
"Customer" : {
"CustomerCode" : "WADE" ,
"CustomerName" : "Wade's Apparel & Accessories" ,
"CurrencyId" : 110 ,
"Guid" : "b9f21e05-07fe-4d9d-b460-a09db4c3caa9" ,
"LastModifiedOn" : " \/ Date(1559778437146) \/ "
},
"CustomerRef" : null ,
"Comments" : null ,
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"WarehouseName" : "ABC st" ,
"IsDefault" : true ,
"StreetNo" : "2" ,
"AddressLine1" : "91 Western Road" ,
"AddressLine2" : null ,
"Suburb" : "Brighton" ,
"City" : "East Sussex" ,
"Region" : "East Sussex" ,
"Country" : "United Kingdom" ,
"PostCode" : "BN1 2NW" ,
"PhoneNumber" : "123123123" ,
"FaxNumber" : null ,
"MobileNumber" : "123123123" ,
"DDINumber" : null ,
"ContactName" : "JamesT" ,
"Obsolete" : false ,
"Guid" : "dba8974c-f12f-423d-b2c7-194847e54834" ,
"LastModifiedOn" : " \/ Date(1564969060674) \/ "
},
"ReceivedDate" : null ,
"DeliveryInstruction" : "Handle with care." ,
"DeliveryName" : null ,
"DeliveryStreetAddress" : null ,
"DeliveryStreetAddress2" : null ,
"DeliverySuburb" : null ,
"DeliveryCity" : null ,
"DeliveryRegion" : null ,
"DeliveryCountry" : null ,
"DeliveryPostCode" : null ,
"Currency" : {
"CurrencyCode" : "NZD" ,
"Description" : "New Zealand, Dollars" ,
"Guid" : "6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a" ,
"LastModifiedOn" : " \/ Date(1559778167506) \/ "
},
"ExchangeRate" : 0.989200 ,
"DiscountRate" : 0.0000 ,
"Tax" : {
"TaxCode" : "V.A.T." ,
"Description" : null ,
"TaxRate" : 0.200000 ,
"CanApplyToExpenses" : false ,
"CanApplyToRevenue" : false ,
"Obsolete" : false ,
"Guid" : "00000000-0000-0000-0000-000000000000" ,
"LastModifiedOn" : null
},
"TaxRate" : 0.200000 ,
"XeroTaxCode" : "V.A.T." ,
"SubTotal" : 25.00 ,
"TaxTotal" : 5.00 ,
"Total" : 30.00 ,
"TotalVolume" : 0.000 ,
"TotalWeight" : 0.000 ,
"BCSubTotal" : 25.27 ,
"BCTaxTotal" : 5.05 ,
"BCTotal" : 30.32 ,
"PaymentDueDate" : " \/ Date(1568937600000) \/ " ,
"AllocateProduct" : true ,
"SalesOrderGroup" : null ,
"DeliveryMethod" : null ,
"Salesperson" : null ,
"SendAccountingJournalOnly" : false ,
"SourceId" : null ,
"CreatedBy" : "api@unleashedsoftware.com" ,
"CreatedOn" : " \/ Date(1565058454169) \/ " ,
"LastModifiedBy" : "james@JamesInc.com" ,
"Guid" : "b599e7f5-7738-4ea1-a318-6b5298766012" ,
"LastModifiedOn" : " \/ Date(1565058457331) \/ "
}
]
}
Examples for Response GET /SalesOrders/{orderGuid}
show xml example
<?xml version="1.0"?>
<SalesOrder 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> b599e7f5-7738-4ea1-a318-6b5298766013</Guid>
<LastModifiedOn> 2019-08-06T21:16:45.2962598</LastModifiedOn>
<OrderNumber> SO-138</OrderNumber>
<OrderDate> 2019-08-05T00:00:00</OrderDate>
<RequiredDate> 2019-08-05T00:00:00</RequiredDate>
<CompletedDate xsi:nil= "true" />
<OrderStatus> Parked</OrderStatus>
<Customer>
<Guid> b9f21e05-07fe-4d9d-b460-a09db4c3caa9</Guid>
<LastModifiedOn> 2019-06-05T23:47:17.1466667</LastModifiedOn>
<CustomerCode> WADE</CustomerCode>
<CustomerName> Wade's Apparel & Accessories</CustomerName>
</Customer>
<Warehouse>
<Guid> dba8974c-f12f-423d-b2c7-194847e54834</Guid>
<LastModifiedOn> 2019-08-05T01:37:40.6746097</LastModifiedOn>
<WarehouseCode> MAIN</WarehouseCode>
<WarehouseName> ABC St</WarehouseName>
<IsDefault> true</IsDefault>
<StreetNo> 2</StreetNo>
<AddressLine1> 91 Western Road</AddressLine1>
<Suburb> Brighton</Suburb>
<City> East Sussex</City>
<Region> East Sussex</Region>
<Country> United Kingdom</Country>
<PostCode> BN1 2NW</PostCode>
<PhoneNumber> 123123123</PhoneNumber>
<MobileNumber> 123123123</MobileNumber>
<ContactName> JamesT</ContactName>
<Obsolete> false</Obsolete>
</Warehouse>
<ReceivedDate xsi:nil= "true" />
<DeliveryContact>
<Guid> 9fd9dde8-a7a8-4a6b-8bc9-a2a445f9da7a</Guid>
<FirstName> Joan</FirstName>
<LastName> Smith</LastName>
</DeliveryContact>
<DeliveryInstruction> Handle with care.</DeliveryInstruction>
<Currency>
<Guid> 6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a</Guid>
<LastModifiedOn> 2019-06-05T23:42:47.5066667</LastModifiedOn>
<CurrencyCode> NZD</CurrencyCode>
<Description> New Zealand, Dollars</Description>
</Currency>
<ExchangeRate> 0.989200</ExchangeRate>
<DiscountRate> 0.0000</DiscountRate>
<Tax>
<Guid> 00000000-0000-0000-0000-000000000000</Guid>
<LastModifiedOn xsi:nil= "true" />
<TaxCode> V.A.T.</TaxCode>
<TaxRate> 0.200000</TaxRate>
<CanApplyToExpenses> false</CanApplyToExpenses>
<CanApplyToRevenue> false</CanApplyToRevenue>
<Obsolete> false</Obsolete>
</Tax>
<TaxRate> 0.200000</TaxRate>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<SubTotal> 25.000</SubTotal>
<TaxTotal> 5.000</TaxTotal>
<Total> 30.000</Total>
<TotalVolume> 0.000</TotalVolume>
<TotalWeight> 0.000</TotalWeight>
<BCSubTotal> 25.270</BCSubTotal>
<BCTaxTotal> 5.050</BCTaxTotal>
<BCTotal> 30.320</BCTotal>
<PaymentDueDate> 2019-09-20T00:00:00</PaymentDueDate>
<AllocateProduct> true</AllocateProduct>
<SendAccountingJournalOnly> false</SendAccountingJournalOnly>
<CreatedBy> api@unleashedsoftware.com</CreatedBy>
<CustomOrderStatus> CustomStatus</CustomOrderStatus>
<CreatedOn> 2019-08-06T02:29:01.5366576</CreatedOn>
<LastModifiedBy> james@JamesInc.com</LastModifiedBy>
<SalesOrderLines>
<SalesOrderLine>
<Guid> faf00f73-ad85-4168-952e-a79a7bf2ccc3</Guid>
<LastModifiedOn> 2019-08-06T02:29:01.5836574</LastModifiedOn>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 23280680-a2bd-4873-a390-501e0f3399d1</Guid>
<ProductCode> NAIL-M</ProductCode>
<ProductDescription> Medium Nails</ProductDescription>
</Product>
<DueDate> 2019-08-05T00:00:00</DueDate>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 25.0000</UnitPrice>
<DiscountRate> 0.0000</DiscountRate>
<LineTotal> 25.00000000</LineTotal>
<Volume xsi:nil= "true" />
<Weight xsi:nil= "true" />
<Comments />
<UnitCost> 9.12450000000000</UnitCost>
<TaxRate> 0.200000</TaxRate>
<LineTax> 5.000</LineTax>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<BCUnitPrice> 25.2729</BCUnitPrice>
<BCLineTotal> 25.270</BCLineTotal>
<BCLineTax> 5.050</BCLineTax>
</SalesOrderLine>
</SalesOrderLines>
</SalesOrder>
show json example
{
"SalesOrderLines" : [
{
"LineNumber" : 1 ,
"LineType" : null ,
"Product" : {
"Guid" : "23280680-a2bd-4873-a390-501e0f3399d1" ,
"ProductCode" : "NAIL-M" ,
"ProductDescription" : "Medium Nails"
},
"DueDate" : " \/ Date(1564963200000) \/ " ,
"OrderQuantity" : 1.0000 ,
"UnitPrice" : 25.0000 ,
"DiscountRate" : 0.0000 ,
"LineTotal" : 25.00000000 ,
"Volume" : null ,
"Weight" : null ,
"Comments" : "" ,
"AverageLandedPriceAtTimeOfSale" : 9.12450000000000 ,
"TaxRate" : 0.200000 ,
"LineTax" : 5.000 ,
"XeroTaxCode" : "V.A.T." ,
"BCUnitPrice" : 25.2729 ,
"BCLineTotal" : 25.270 ,
"BCLineTax" : 5.050 ,
"LineTaxCode" : null ,
"XeroSalesAccount" : null ,
"SerialNumbers" : null ,
"BatchNumbers" : null ,
"Guid" : "faf00f73-ad85-4168-952e-a79a7bf2ccc3" ,
"LastModifiedOn" : " \/ Date(1565058541583) \/ "
}
],
"OrderNumber" : "SO-138" ,
"OrderDate" : " \/ Date(1564963200000) \/ " ,
"RequiredDate" : " \/ Date(1564963200000) \/ " ,
"CompletedDate" : null ,
"OrderStatus" : "Parked" ,
"Customer" : {
"CustomerCode" : "WADE" ,
"CustomerName" : "Wade's Apparel & Accessories" ,
"CurrencyId" : 110 ,
"Guid" : "b9f21e05-07fe-4d9d-b460-a09db4c3caa9" ,
"LastModifiedOn" : " \/ Date(1559778437146) \/ "
},
"CustomerRef" : null ,
"Comments" : null ,
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"WarehouseName" : "ABC st" ,
"IsDefault" : true ,
"StreetNo" : "2" ,
"AddressLine1" : "91 Western Road" ,
"AddressLine2" : null ,
"Suburb" : "Brighton" ,
"City" : "East Sussex" ,
"Region" : "East Sussex" ,
"Country" : "United Kingdom" ,
"PostCode" : "BN1 2NW" ,
"PhoneNumber" : "123123123" ,
"FaxNumber" : null ,
"MobileNumber" : "123123123" ,
"DDINumber" : null ,
"ContactName" : "JamesT" ,
"Obsolete" : false ,
"Guid" : "dba8974c-f12f-423d-b2c7-194847e54834" ,
"LastModifiedOn" : " \/ Date(1564969060674) \/ "
},
"ReceivedDate" : null ,
"DeliveryContact" : {
"Guid" : "9fd9dde8-a7a8-4a6b-8bc9-a2a445f9da7a" ,
"FirstName" : "Joan" ,
"LastName" : "Smith"
},
"DeliveryInstruction" : "Handle with care." ,
"DeliveryName" : null ,
"DeliveryStreetAddress" : null ,
"DeliveryStreetAddress2" : null ,
"DeliverySuburb" : null ,
"DeliveryCity" : null ,
"DeliveryRegion" : null ,
"DeliveryCountry" : null ,
"DeliveryPostCode" : null ,
"Currency" : {
"CurrencyCode" : "NZD" ,
"Description" : "New Zealand, Dollars" ,
"Guid" : "6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a" ,
"LastModifiedOn" : " \/ Date(1559778167506) \/ "
},
"ExchangeRate" : 0.989200 ,
"DiscountRate" : 0.0000 ,
"Tax" : {
"TaxCode" : "V.A.T." ,
"Description" : null ,
"TaxRate" : 0.200000 ,
"CanApplyToExpenses" : false ,
"CanApplyToRevenue" : false ,
"Obsolete" : false ,
"Guid" : "00000000-0000-0000-0000-000000000000" ,
"LastModifiedOn" : null
},
"TaxRate" : 0.200000 ,
"XeroTaxCode" : "V.A.T." ,
"SubTotal" : 25.000 ,
"TaxTotal" : 5.000 ,
"Total" : 30.000 ,
"TotalVolume" : 0.000 ,
"TotalWeight" : 0.000 ,
"BCSubTotal" : 25.270 ,
"BCTaxTotal" : 5.050 ,
"BCTotal" : 30.320 ,
"PaymentDueDate" : " \/ Date(1568937600000) \/ " ,
"AllocateProduct" : true ,
"SalesOrderGroup" : null ,
"DeliveryMethod" : null ,
"Salesperson" : null ,
"SendAccountingJournalOnly" : false ,
"SourceId" : null ,
"CreatedBy" : "api@unleashedsoftware.com" ,
"CustomOrderStatus" : "CustomStatus" ,
"CreatedOn" : " \/ Date(1565058541536) \/ " ,
"LastModifiedBy" : "james@JamesInc.com" ,
"Guid" : "b599e7f5-7738-4ea1-a318-6b5298766013" ,
"LastModifiedOn" : " \/ Date(1565126205296) \/ "
}
POST / PUT Sales Orders
Available Filters for POST/PUT Sales Orders
Filter
Description
saveAddress
False by default. If saveAddress=true and there is a delivery name, it will add/update the customer address. If there is no delivery name, the customer address will not be updated.
sendAccountingJournalOnly
When creating a sales order, if you want to pass only a journal and not the invoice into Xero / QuickBooks Online, you can set the parameter to true
.
serialBatch
If set to true then the attributes SerialNumbers and BatchNumbers are auto-assigned.
taxInclusive
Order includes sales tax on each of the order lines. Note that Unleashed will re-calculate the order exclusive of tax before saving it.
Filters are used by adding the filter and value to the URI:
/SalesOrders/E6E8163F-6911-40e9-B740-90E5A0A3A996?taxInclusive=true
/SalesOrders/E6E8163F-6911-40e9-B740-90E5A0A3A996?SendAccountingJournalOnly=true
/SalesOrders/E6E8163F-6911-40e9-B740-90E5A0A3A996?serialBatch=true
Available Fields for POST/PUT Sales Orders
Note: If one of the editable fields for PUT is blank, the previous value will be overwritten with the blank value
Property
Type
Length
POST
PUT
Notes
Comments
String
2048
CreatedBy
String
N/A
Currency
Currency
N/A
Must match Customer’s currency if specified
Customer
Customer
Required
N/A
CustomerRef
String
500
DeliveryCity
String
500
DeliveryCountry
String
500
Either CountryCode or CountryName can be provided. 2 character country codes are validated against the ISO 3166 list
DeliveryInstruction
String
500
Null or missing property will not override existing information
DeliveryMethod
String
50
DeliveryName
String
500
DeliveryPostCode
String
50
DeliveryRegion
String
500
DeliveryStreetAddress
String
500
DeliveryStreetAddress2
String
500
DeliverySuburb
String
500
DiscountRate
Decimal
ExchangeRate
Decimal
Required
Required
Guid
Guid
Required
N/A
OrderDate
DateTime
N/A
Must be greater than 2000-01-01
OrderNumber
String
17
N/A
Shorter than GET by 3 characters as those are reserved to support the suffix for split shipments and invoices.
OrderStatus
String
20
Required
Required
ReceivedDate
DateTime
N/A
RequiredDate
DateTime
Must be greater than 2000-01-01
SalesOrderGroup
String
50
SalesOrderLines
SalesOrderLine collection
Required
At least one must be specified.
Salesperson
Salesperson
SourceId
String
500
SubTotal
Decimal (2dp)
Required
N/A
SubTotal = Sum of SalesOrderLine Totals
Tax
Tax
Required
Required
TaxRate
Decimal
Required
N/A
TaxTotal
Decimal (2dp)
Required
N/A
TaxTotal = Sum of SalesOrderLine Taxes
Total
Decimal (2dp)
Required
N/A
Total = TaxTotal + SubTotal
Warehouse
Warehouse
Available Fields for Currency
Note: At a minimum, a valid Guid
or CurrencyCode
is required.
Property
Type
Length
POST
CurrencyCode
String
3
Optional
Guid
Guid
Optional
Available Fields for Customer
Note: At a minimum, a valid Guid
or CustomerCode
is required.
Property
Type
Length
POST
Guid
Guid
Optional
CustomerCode
String
500
Optional
Available Fields for Salesperson
Property
Type
Length
POST
Email
String
256
FullName
String
256
Guid
Guid
Required
Available 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 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
Available Fields for Sales Order Lines
Note: Please note that it is not possible to add new lines or amend existing lines to an existing Sales Order via the API
Property
Type
Length
POST
Notes
BatchNumbers
BatchNumber
Not supported in PUT
Comments
String
1024
DiscountRate
Decimal
Required
Guid
Guid
LineNumber
Integer
Required
LineType
String
Required
Accepts Charge
or Null
only.
LineTax
Decimal (2dp)
Required
LineTotal
Decimal (2dp)
Required
OrderQuantity
Decimal
Required
Product
Product
Required
SerialNumbers
SerialNumber
Not supported in PUT
TaxRate
Decimal
UnitPrice
Decimal
Required
For Charge
- this will be rounded to 2 decimal places
Volume
Decimal
Weight
Decimal
XeroSalesAccount
String
500
XeroTaxCode
String
50
Available Fields for Batch Number
Note: If not defined OR the batch is not in the selected warehouse, post will succeed and batch numbers will not be allocated.
Property
Type
Length
POST
BatchNumber (XML) / Number (JSON)
String
50
Required
Quantity
Decimal
Required
ExpiryDate
Nullable DateTime
Available 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 Fields for Serial Number
Note: If not defined OR the serials are not in the selected warehouse, post will succeed and serial numbers will not be allocated.
Property
Type
Length
POST
SerialNumber (XML) / Identifier (JSON)
String
50
Required
Examples for Request POST /SalesOrders/{orderGuid}
show xml example
<?xml version="1.0"?>
<SalesOrder 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> b599e7f5-7738-4ea1-a318-6b529876601a</Guid>
<OrderNumber> SO-00000135</OrderNumber>
<OrderDate> 2019-08-05</OrderDate>
<RequiredDate> 2019-08-05</RequiredDate>
<CompletedDate> 2019-08-05</CompletedDate>
<OrderStatus> Completed</OrderStatus>
<Customer>
<Guid> b9f21e05-07fe-4d9d-b460-a09db4c3caa9</Guid>
<CustomerCode> WADE</CustomerCode>
</Customer>
<Warehouse>
<Guid> dba8974c-f12f-423d-b2c7-194847e54834</Guid>
<WarehouseCode> MAIN</WarehouseCode>
</Warehouse>
<DeliveryCountry> NZ</DeliveryCountry>
<DeliveryInstruction> Handle with care.</DeliveryInstruction>
<Currency>
<Guid> 6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a</Guid>
<CurrencyCode> NZD</CurrencyCode>
</Currency>
<ExchangeRate> 0.989200</ExchangeRate>
<TaxRate> 0.200000</TaxRate>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<SubTotal> 25.000</SubTotal>
<TaxTotal> 5.000</TaxTotal>
<Total> 30.000</Total>
<BCSubTotal> 25.270</BCSubTotal>
<BCTaxTotal> 5.050</BCTaxTotal>
<BCTotal> 30.320</BCTotal>
<SalesOrderLines>
<SalesOrderLine>
<Guid> 1af00f73-ad85-4168-952e-a79a7bf2ccca</Guid>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 23280680-a2bd-4873-a390-501e0f3399d1</Guid>
<ProductCode> NAIL-M</ProductCode>
</Product>
<OrderQuantity> 1.0000</OrderQuantity>
<UnitPrice> 25.0000</UnitPrice>
<LineTotal> 25.00000000</LineTotal>
<TaxRate> 0.200000</TaxRate>
<LineTax> 5.000</LineTax>
<XeroTaxCode> V.A.T.</XeroTaxCode>
<BatchNumbers>
<BatchNumber> 123</BatchNumber>
<Quantity> 1</Quantity>
</BatchNumbers>
<SerialNumbers>
<SerialNumber> 9</SerialNumber>
</SerialNumbers>
</SalesOrderLine>
</SalesOrderLines>
</SalesOrder>
show json example
{
"SalesOrderLines" : [
{
"LineNumber" : 1 ,
"Product" : {
"Guid" : "23280680-a2bd-4873-a390-501e0f3399d1" ,
"ProductCode" : "NAIL-M"
},
"OrderQuantity" : 1.0000 ,
"UnitPrice" : 25.0000 ,
"LineTotal" : 25.00000000 ,
"TaxRate" : 0.200000 ,
"LineTax" : 5.000 ,
"XeroTaxCode" : "V.A.T." ,
"Guid" : "faf00f73-ad85-4168-952e-a79a7bf2ccc4" ,
"SerialNumbers" : [
{
"Identifier" : "9"
}
],
"BatchNumbers" : [
{
"Number" : "123" ,
"Quantity" : "1"
}
]
}
],
"OrderNumber" : "SO-139" ,
"OrderDate" : "2019-08-05" ,
"RequiredDate" : "2019-08-05" ,
"OrderStatus" : "Parked" ,
"Customer" : {
"CustomerCode" : "WADE" ,
"CustomerName" : "Wade's Apparel & Accessories"
},
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"Guid" : "dba8974c-f12f-423d-b2c7-194847e54834"
},
"DeliveryCountry" : "NZ" ,
"DeliveryInstruction" : "Handle with care." ,
"Currency" : {
"CurrencyCode" : "NZD" ,
"Guid" : "6cb5d67a-1c96-4fa8-bf59-b23c2d69f22a"
},
"ExchangeRate" : 0.989200 ,
"Tax" : {
"TaxCode" : "V.A.T." ,
"TaxRate" : 0.200000
},
"TaxRate" : 0.200000 ,
"XeroTaxCode" : "V.A.T." ,
"SubTotal" : 25.000 ,
"TaxTotal" : 5.000 ,
"Total" : 30.000 ,
"Guid" : "b599e7f5-7738-4ea1-a318-6b5298766014"
}