Supplier Returns
The SupplierReturns resource allows Supplier Returns to be listed and viewed. An individual Supplier Return’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 SupplierReturns
GET /SupplierReturns/
View a Supplier Return with the specified Guid
GET /SupplierReturns/{returnGuid}
Create a new Supplier Return
POST /SupplierReturns/
Update a Supplier Return
PUT /SupplierReturns/{returnGuid}
Delete a Supplier Return
DELETE /SupplierReturns/{returnGuid}
Complete a Supplier Return
POST /SupplierReturns/{returnGuid}/Complete
Update a Supplier Return Cost line
PUT SupplierReturns/{returnGuid}/Costs/{costLineGuid}
Update a Supplier Return Line
PUT SupplierReturns/{returnGuid}/Lines/{lineGuid}
Delete a Supplier Return Line
DELETE /SupplierReturns/{returnGuid}/Lines/{lineGuid}
Delete batch and serial numbers from a Supplier Return
DELETE /SupplierReturns/{returnGuid}/ProductTracking
Append batch and serial numbers to a Supplier Return
POST /SupplierReturns/{returnGuid}/ProductTracking
GET SupplierReturns
Available Filters for GET Supplier Returns
Filter
Description
endDate
Returns Supplier Returns created before a specified date.
modifiedSince
Returns Supplier Returns created or edited after a specified date, must be UTC format.
pageSize
Specifies the page size for pagination. Default page size is 200 Supplier Returns.
Note: Requesting large numbers of supplier returns can be susceptible to poor network performance. Please reduce the page size if you experience delayed requests.
purchaseOrderNumber
Returns the supplier return(s) associated with the specified purchase order number.
startDate
Returns Supplier Returns created after a specified date.
supplierCode
Returns customers that start with the specific customer code.
supplierReturnNumber
Returns a single supplier return with the specified supplier return number. If set, it overrides all other filters.
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:
/SupplierReturns?supplierCode=ACME&startDate=2012-12-31
Available Fields for Supplier Returns
Property
Type
Length
BaseReturnCostTaxTotal
Decimal
BaseReturnCostTotal
Decimal
BaseSubTotal
Decimal
BaseTaxTotal
Decimal
BaseTotal
Decimal
Comments
String
1024
CreatedBy
String
50
CreatedOn
DateTime
Currency
Currency
ExchangeRate
Nullable Decimal
Guid
Guid
LastModifiedBy
String
50
LastModifiedOn
Nullable DateTime
PurchaseOrder
PurchaseOrder
ReturnDate
Nullable DateTime
Status
String
20
SubTotal
Decimal
Supplier
Supplier
SupplierRef
String
500
SupplierReturnCosts
SupplierReturnCost Collection
SupplierReturnLines
SupplierReturnLine Collection
SupplierReturnNumber
String
20
TaxRate
Nullable Decimal
TaxTotal
Decimal
Total
Decimal
Warehouse
Warehouse
XeroTaxCode
String
50
Available Fields for Purchase Order:
Property
Type
Length
Guid
Guid
ProductCode
String
100
ProductDescription
String
500
Available Fields for Supplier
Property
Type
Length
Guid
Guid
SupplierCode
String
500
SupplierName
String
500
Available Fields for Supplier Return Lines
Property
Type
Length
AverageLandedPriceAfterReturn
Nullable Decimal
AverageLandedPriceBeforeReturn
Nullable Decimal
Comments
String
1024
Guid
Guid
LineNumber
Int
LineTax
Nullable Decimal
OrderPrice
Decimal
OrderQuantity
Decimal
Product
Product
PurchaseUnitOrderQuantity
Decimal
PurchaseUnitReturnQuantity
Decimal
RequiredDate
DateTime
ReturnCost
Decimal
ReturnPrice
Decimal
ReturnQuantity
Decimal
ReturnReason
String
25
ReturnToSupplier
Boolean
StockOnHandBeforeReturn
Nullable Decimal
TaxRate
Nullable Decimal
XeroCostOfGoodsAccount
String
500
XeroSalesAccount
String
500
XeroTaxCode
String
50
Available Fields for Supplier Return Costs
Property
Type
Length
BCCost
Decimal
BCTaxCost
Decimal
BCTotalCost
Decimal
Cost
Decimal
CostDate
DateTime
ExchangeRate
Nullable Decimal
Guid
Guid
Refund
Boolean
Supplier
Supplier
TaxCode
String
50
TaxCost
Decimal
TaxRate
Nullable Decimal
TotalCost
Decimal
Available Fields for Currency
Property
Type
Length
CurrencyCode
String
3
Description
String
200
Guid
Guid
LastModifiedOn
DateTime
Available Fields for Product
Property
Type
Length
Guid
Guid
ProductCode
String
100
ProductDescription
String
500
Available Fields for Purchase Order
Property
Type
Length
Guid
Guid
OrderDate
DateTime
OrderNumber
String
20
Available Fields for Supplier
Property
Type
Length
Guid
Guid
SupplierCode
String
500
SupplierName
String
500
Available Fields for Warehouse
Property
Type
Length
Guid
Guid
WarehouseCode
String
15
WarehouseName
String
100
Examples for Response GET /SupplierReturns
show xml example
<?xml version="1.0"?>
<SupplierReturn 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> 5ac7e6f1-fe7c-4eee-9210-f6fd1baf63c3</Guid>
<SupplierReturnNumber> SR-00000008</SupplierReturnNumber>
<Supplier>
<Guid> fd3bbb5f-c9ae-4986-9dda-d9fbd0f3944c</Guid>
<SupplierCode> PPP01</SupplierCode>
<SupplierName> Paul's Produce & Particulars</SupplierName>
</Supplier>
<PurchaseOrder>
<Guid> 9cbc95fc-c78a-4984-b1dd-fe8e80ea2645</Guid>
<OrderNumber> PO-00000013</OrderNumber>
<OrderDate> 2017-05-24T12:00:00</OrderDate>
</PurchaseOrder>
<Warehouse>
<Guid> c7447caa-5d05-427f-8dc0-c3406bb6b5d4</Guid>
<WarehouseCode> MAIN</WarehouseCode>
<WarehouseName> Main Warehouse</WarehouseName>
</Warehouse>
<SupplierReturnLines>
<SupplierReturnLine>
<AverageLandedPriceAfterReturn xsi:nil= "true" />
<AverageLandedPriceBeforeReturn xsi:nil= "true" />
<Guid> 9857f811-3920-4b78-86b9-477fd9e3dfac</Guid>
<LineNumber> 1</LineNumber>
<LineTax> 0.90</LineTax>
<ReturnCost> 2.40</ReturnCost>
<ReturnPrice> 3.0000</ReturnPrice>
<ReturnQuantity> 2.0000</ReturnQuantity>
<PurchaseUnitReturnQuantity> 2.0000</PurchaseUnitReturnQuantity>
<ReturnToSupplier> true</ReturnToSupplier>
<StockOnHandBeforeReturn xsi:nil= "true" />
<TaxRate> 0.150000</TaxRate>
<XeroTaxCode> G.S.T.</XeroTaxCode>
<Product>
<Guid> 6b59e251-ef1d-4532-a53e-dd0c0ad30b77</Guid>
<ProductCode> DININGCHAIR</ProductCode>
<ProductDescription> Dining Chair</ProductDescription>
</Product>
<ReturnReason> Return</ReturnReason>
<OrderPrice> 12.2000</OrderPrice>
<OrderQuantity> 2.0000</OrderQuantity>
<PurchaseUnitOrderQuantity> 2.0000</PurchaseUnitOrderQuantity>
<RequiredDate> 2017-05-24T12:00:00</RequiredDate>
</SupplierReturnLine>
</SupplierReturnLines>
<SupplierReturnCosts>
<SupplierReturnCost>
<BCCost> 5.00</BCCost>
<BCTaxCost> 0.75</BCTaxCost>
<BCTotalCost> 5.75</BCTotalCost>
<Cost> 5.00</Cost>
<Guid> c977d550-8dda-4570-aec3-0473011a57b6</Guid>
<Refund> false</Refund>
<TaxCost> 0.75</TaxCost>
<TotalCost> 5.75</TotalCost>
<ExchangeRate> 1.000000</ExchangeRate>
<Supplier>
<Guid> fd3bbb5f-c9ae-4986-9dda-d9fbd0f3944c</Guid>
<SupplierCode> PPP01</SupplierCode>
<SupplierName> Paul's Produce & Particulars</SupplierName>
</Supplier>
<CostDate> 2017-05-24T13:54:08</CostDate>
<TaxRate> 0.150000</TaxRate>
<TaxCode> G.S.T.</TaxCode>
</SupplierReturnCost>
<SupplierReturnCost>
<BCCost> 5.27</BCCost>
<BCTaxCost> 0.79</BCTaxCost>
<BCTotalCost> 6.06</BCTotalCost>
<Cost> 5.00</Cost>
<Guid> 9f184e27-f784-4745-afb2-56faaac18558</Guid>
<Refund> true</Refund>
<TaxCost> 0.75</TaxCost>
<TotalCost> 5.75</TotalCost>
<ExchangeRate> 0.949200</ExchangeRate>
<Supplier>
<Guid> 0e0a13d4-f939-4058-8f65-a8d3cef7ce00</Guid>
<SupplierCode> DEPOT</SupplierCode>
<SupplierName> Depot Dadello</SupplierName>
</Supplier>
<CostDate> 2017-05-24T13:54:32</CostDate>
<TaxRate> 0.150000</TaxRate>
<TaxCode> G.S.T.</TaxCode>
</SupplierReturnCost>
</SupplierReturnCosts>
<Currency>
<Guid> de7e8348-58b6-4712-baa2-68d7b9b917c7</Guid>
<LastModifiedOn> 2017-05-24T21:07:51.0233333</LastModifiedOn>
<CurrencyCode> NZD</CurrencyCode>
<Description> New Zealand, Dollars</Description>
</Currency>
<Status> Parked</Status>
<Comments></Comments>
<ExchangeRate> 1.000000</ExchangeRate>
<TaxRate> 0.150000</TaxRate>
<XeroTaxCode> G.S.T.</XeroTaxCode>
<LastModifiedOn> 2017-05-25T02:16:51.2636428</LastModifiedOn>
<ReturnDate> 2017-06-16T12:00:00</ReturnDate>
<SubTotal> 6.00</SubTotal>
<BaseSubTotal> 6.00</BaseSubTotal>
<TaxTotal> 0.90</TaxTotal>
<Total> 6.90</Total>
<BaseReturnCostTaxTotal> 1.54</BaseReturnCostTaxTotal>
<BaseReturnCostTotal> 10.27</BaseReturnCostTotal>
<BaseTaxTotal> 2.44</BaseTaxTotal>
<BaseTotal> 18.71</BaseTotal>
</SupplierReturn>
show json example
{
"Pagination" :
{ "NumberOfItems" : 1 , "PageSize" : 200 , "PageNumber" : 1 , "NumberOfPages" : 1 }
,
"Items" : [
{
"Guid" : "5ac7e6f1-fe7c-4eee-9210-f6fd1baf63c3" ,
"SupplierReturnNumber" : "SR-00000008" ,
"Supplier" : {
"SupplierCode" : "PPP01" ,
"SupplierName" : "Paul's Produce & Particulars" ,
"Guid" : "fd3bbb5f-c9ae-4986-9dda-d9fbd0f3944c"
},
"PurchaseOrder" : {
"OrderDate" : "/Date(1495627200000)/" ,
"Guid" : "9cbc95fc-c78a-4984-b1dd-fe8e80ea2645" ,
"OrderNumber" : "PO-00000013"
},
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"WarehouseName" : "Main Warehouse" ,
"Guid" : "c7447caa-5d05-427f-8dc0-c3406bb6b5d4"
},
"SupplierReturnLines" : [
{
"AverageLandedPriceAfterReturn" : null ,
"AverageLandedPriceBeforeReturn" : null ,
"Comments" : null ,
"Guid" : "9857f811-3920-4b78-86b9-477fd9e3dfac" ,
"LineNumber" : 2 ,
"LineTax" : 0.9 ,
"ReturnCost" : 2.4 ,
"ReturnPrice" : 3 ,
"ReturnQuantity" : 2 ,
"PurchaseUnitReturnQuantity" : 2 ,
"ReturnToSupplier" : true ,
"StockOnHandBeforeReturn" : null ,
"TaxRate" : 0.15 ,
"XeroCostOfGoodsAccount" : null ,
"XeroSalesAccount" : null ,
"XeroTaxCode" : "G.S.T." ,
"Product" : {
"Guid" : "6b59e251-ef1d-4532-a53e-dd0c0ad30b77" ,
"ProductCode" : "DININGCHAIR" ,
"ProductDescription" : "Dining Chair"
},
"ReturnReason" : "Return" ,
"OrderPrice" : 12.2 ,
"OrderPrice" : 12.2 ,
"OrderQuantity" : 2 ,
"PurchaseUnitOrderQuantity" : 2 ,
"RequiredDate" : "/Date(1495627200000)/"
}
],
"SupplierReturnCosts" : [
{
"BCCost" : 5 ,
"BCTaxCost" : 0.75 ,
"BCTotalCost" : 5.75 ,
"Cost" : 5 ,
"Guid" : "c977d550-8dda-4570-aec3-0473011a57b6" ,
"Refund" : false ,
"TaxCost" : 0.75 ,
"TotalCost" : 5.75 ,
"ExchangeRate" : 1 ,
"Supplier" : {
"SupplierCode" : "PPP01" ,
"SupplierName" : "Paul's Produce & Particulars" ,
"Guid" : "fd3bbb5f-c9ae-4986-9dda-d9fbd0f3944c"
},
"CostDate" : "/Date(1495634048000)/" ,
"TaxRate" : 0.150000 ,
"TaxCode" : "G.S.T."
},
{
"BCCost" : 5.27 ,
"BCTaxCost" : 0.79 ,
"BCTotalCost" : 6.06 ,
"Cost" : 5 ,
"Guid" : "9f184e27-f784-4745-afb2-56faaac18558" ,
"Refund" : true ,
"TaxCost" : 0.75 ,
"TotalCost" : 5.75 ,
"ExchangeRate" : 0.9492 ,
"Supplier" : {
"SupplierCode" : "DEPOT" ,
"SupplierName" : "Depot Dadello" ,
"Guid" : "0e0a13d4-f939-4058-8f65-a8d3cef7ce00"
},
"CostDate" : "/Date(1495634072000)/" ,
"TaxRate" : 0.150000 ,
"TaxCode" : "G.S.T."
}
],
"Currency" : {
"CurrencyCode" : "NZD" ,
"Description" : "New Zealand, Dollars" ,
"Guid" : "de7e8348-58b6-4712-baa2-68d7b9b917c7" ,
"LastModifiedOn" : "/Date(1495660071023)/"
},
"Status" : "Parked" ,
"Comments" : null ,
"ExchangeRate" : 1 ,
"TaxRate" : 0.15 ,
"XeroTaxCode" : "G.S.T." ,
"SupplierRef" : null ,
"LastModifiedOn" : "/Date(1495678611263)/" ,
"ReturnDate" : "/Date(1497614400000)/" ,
"SubTotal" : 6 ,
"BaseSubTotal" : 6 ,
"TaxTotal" : 0.9 ,
"Total" : 6.9 ,
"BaseReturnCostTaxTotal" : 1.54 ,
"BaseReturnCostTotal" : 10.27 ,
"BaseTaxTotal" : 2.44 ,
"BaseTotal" : 18.71
}
]
}
POST SupplierReturns
Available Fields for POST Supplier Returns
Property
Type
Length
Notes
PurchaseOrder
PurchaseOrder
Must be an existing Purchase Order with the Complete
status
Available Fields for Purchase Order
Note: At a minimum, a valid Guid
or OrderNumber
is required.
Property
Type
Length
Guid
Guid
OrderNumber
String
20
Examples for Request POST /SupplierReturns
show xml example
<?xml version="1.0"?>
<SupplierReturn xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<PurchaseOrder>
<OrderNumber> PO-00000254</OrderNumber>
<Guid> 08f775aa-a6dc-4dd8-873f-b196708f7bf6</Guid>
</PurchaseOrder>
</SupplierReturn>
show json example
{
"PurchaseOrder" : {
"OrderNumber" : "PO-00000254" ,
"Guid" : "08f775aa-a6dc-4dd8-873f-b196708f7bf6"
}
}
PUT SupplierReturns
Available Fields for PUT Supplier Returns
Property
Type
Length
Notes
Comments
String
1024
Guid
Guid
If provided, it must match the guid provided in the URL.
ReturnDate
DateTime
Must be on or after the Purchase Order's completed date.
SupplierEORI
String
20
SupplierRef
String
500
Warehouse
Warehouse
Available Fields for Warehouse
Note: At a minimum, a valid Guid
or WarehouseCode
is required.
Property
Type
Length
Guid
Guid
WarehouseCode
String
15
Examples for Request PUT /SupplierReturns
show xml example
<?xml version="1.0"?>
<SupplierReturn 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> SR comment</Comments>
<SupplierRef> 2015342</SupplierRef>
<ReturnDate> 2025-02-20T10:00:00.000</ReturnDate>
<Warehouse>
<WarehouseCode> MAIN</WarehouseCode>
<Guid> 211bc91f-1c7c-4db9-ada7-28e549752d69</Guid>
</Warehouse>
</SupplierReturn>
show json example
{
"Comments" : "SR Comment" ,
"SupplierRef" : "2015342" ,
"ReturnDate" : "2025-02-20T10:00:00.000" ,
"Warehouse" : {
"WarehouseCode" : "MAIN" ,
"Guid" : "211bc91f-1c7c-4db9-ada7-28e549752d69"
}
}
PUT Supplier Return Cost Lines
Available Fields for Supplier Return Cost Lines
Property
Type
Length
Notes
Cost
Decimal
Guid
Guid
If provided, it must match the costLineGuid
from the request path.
Refund
Boolean
Examples for Request PUT /SupplierReturns/{returnGuid}/Costs/{costLineGuid}
show xml example
<?xml version="1.0"?>
<SupplierReturnCost xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<Cost> 12.4</Cost>
<Guid> eaecec84-1553-4a81-9a37-5dc19e3c237e</Guid>
<Refund> true</Refund>
</SupplierReturnCost>
show json example
{
"Cost" : 12.4 ,
"Guid" : "eaecec84-1553-4a81-9a37-5dc19e3c237e" ,
"Refund" : true
}
PUT SupplierReturnLines
Available Fields for PUT Supplier Return Lines
Note: If one of the editable fields for PUT is blank, the previous value will be overwritten with the blank value
Property
Type
Length
Notes
Comments
String
1024
Guid
Guid
If provided, it must match the lineGuid
path parameter.
PurchaseUnitReturnQuantity
Decimal
ReturnCost
Decimal
ReturnPrice
Decimal
ReturnReason
String
25
Defaults to Return
.
ReturnToSupplier
Boolean
Examples for Request PUT /SupplierReturns/{returnGuid}/Lines/{lineGuid}
show xml example
<?xml version="1.0"?>
<SupplierReturnLine 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> 24b7395d-2871-49b8-9733-e6349c7f775e</Guid>
<PurchaseUnitReturnQuantity> 126</PurchaseUnitReturnQuantity>
<ReturnCost> 58.8</ReturnCost>
<ReturnPrice> 242.38</ReturnPrice>
<ReturnReason> Damaged goods</ReturnReason>
<ReturnToSupplier> True</ReturnToSupplier>
</SupplierReturnLine>
show json example
{
"Guid" : "24b7395d-2871-49b8-9733-e6349c7f775e" ,
"PurchaseUnitReturnQuantity" : 126 ,
"ReturnCost" : 58.8 ,
"ReturnPrice" : 242.38 ,
"ReturnReason" : "Damaged goods" ,
"ReturnToSupplier" : true
}
POST ProductTracking
Available Fields for POST Product Tracking
Property
Type
Notes
Guid
Guid
If provided, it must match the returnGuid
provided in the URL.
ProductBatches
ProductBatch collection
ProductSerials
ProductSerial collection
Available Fields for Product Batches
Property
Type
Length
Batches
Batch entity
Product
Product entity
Available Fields for Product Serials
Property
Type
Length
Product
Product entity
SerialNumbers
String collection
String length 50
Available Fields for Batch
Property
Type
Length
BatchNumber
String
50
Quantity
Decimal
Available Fields for Product
Note: At a minimum, a valid Guid
or ProductCode
is required.
Property
Type
Length
Guid
Guid
ProductCode
String
50
Examples for Request POST /SupplierReturns/{returnGuid}/ProductTracking
show xml example
<?xml version="1.0"?>
<SupplierReturnProductTracking xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<ProductBatches>
<ProductBatch>
<Product>
<ProductCode> GLUE</ProductCode>
</Product>
<Batches>
<Batch>
<BatchNumber> Batch 2000</BatchNumber>
<Quantity> 6</Quantity>
</Batch>
<Batch>
<BatchNumber> Batch 2001</BatchNumber>
<Quantity> 1</Quantity>
</Batch>
</Batches>
</ProductBatch>
</ProductBatches>
<ProductSerials>
<ProductSerial>
<Product>
<ProductCode> DINING</ProductCode>
</Product>
<SerialNumbers>
<SerialNumber> S-34698</SerialNumber>
<SerialNumber> S-34206</SerialNumber>
</SerialNumbers>
</ProductSerial>
</ProductSerials>
</SupplierReturnProductTracking>
show json example
{
"ProductBatches" : [
{
"Product" : {
"ProductCode" : "GLUE"
},
"Batches" : [
{
"BatchNumber" : "Batch 2000" ,
"Quantity" : 6
},
{
"BatchNumber" : "Batch 2001" ,
"Quantity" : 1
}
]
}
],
"ProductSerials" : [
{
"Product" : {
"ProductCode" : "DINING"
},
"SerialNumbers" : [
"S-34698" ,
"S-34206"
]
}
]
}