Stock Adjustments
The StockAdjustments resource allows StockAdjustments to be listed, viewed and created. An individual product’s StockAdjustments details can be viewed, or updated 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 Stock Adjustments
GET /StockAdjustments
View any Stock Adjustment
GET /StockAdjustments/{id}
Create a new Stock Adjustment
POST /StockAdjustments/{id}
GET Stock Adjustments
Available Filters for GET Stock Adjustments:
Property
Type
Length
Required
Notes
adjustmentDate
Nullable DateTime
Retrieves all stock adjustments since the given date
modifiedSince
Nullable DateTime
Retrieves all stock adjustments modified since the given date
productCode
String
100
warehouseCode
String
15
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: /StockAdjustments?warehouseCode=w1&productCode=ACME
Available Fields for Stock Adjustments:
Property
Type
Length
Notes
AccountCode
String
50
AdjustmentDate
DateTime
UTC timezone only
AdjustmentNumber
String
20
AdjustmentReason
String
20
ConfirmedBy
String
50
ConfirmedOn
Nullable DateTime
CreatedBy
String
256
CreatedOn
DateTime
Guid
Guid
Unique identifier. Can only be set when adding a record.
LastModifiedBy
String
50
LastModifiedOn
Nullable DateTime
Status
String
20
StockAdjustmentLines
StockAdjustmentLine collection
Warehouse
Warehouse
Available Fields for Stock Adjustment Lines:
Property
Type
Length
Notes
BatchNumbers
BatchNumber collection
Comments
String
200
Guid
Guid
Unique identifier. Can only be set when adding a record.
LastModifiedOn
Nullable DateTime
LineNumber
Integer
NewActualValue
Decimal
NewQuantity
Decimal
Product
Product
SerialNumbers
SerialNumber collection
Available Fields for Warehouse:
Property
Type
Length
Notes
AddressLine1
String
500
AddressLine2
String
50
City
String
500
ContactName
String
50
Country
String
500
DDINumber
String
25
FaxNumber
String
25
Guid
Guid
Unique identifier. Can only be set when adding a record.
IsDefault
Boolean
LastModifiedOn
Nullable DateTime
MobileNumber
String
25
Obsolete
Boolean
PhoneNumber
String
25
PostCode
String
500
Region
String
500
StreetNo
String
500
Suburb
String
500
WarehouseCode
String
15
WarehouseName
String
100
Available Fields for Product:
Property
Type
Length
Notes
Description
String
500
Guid
Guid
Unique identifier. Can only be set when adding a record.
ProductCode
String
100
Available Fields for Serial Numbers:
Property
Type
Length
Notes
Guid
Guid
Unique identifier. Can only be set when adding a record.
Identifier
String
50
LastModifiedOn
Nullable DateTime
Available Fields for Batch Numbers:
Property
Type
Length
Notes
ExpiryDate
Nullable DateTime
Guid
Guid
Unique identifier. Can only be set when adding a record.
LastModifiedOn
Nullable DateTime
Number
String
50
Quantity
Integer
Examples for Response GET /StockAdjustment
show xml example
<?xml version="1.0"?>
<StockAdjustments xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<StockAdjustment>
<Guid> 8f665048-bc73-4c15-998f-22bb980956f9</Guid>
<LastModifiedOn> 2014-04-09T02:32:20.74</LastModifiedOn>
<AdjustmentNumber> SA-00000001</AdjustmentNumber>
<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>
<AdjustmentDate> 2014-04-09T02:32:20.74</AdjustmentDate>
<AdjustmentReason> Adjustment</AdjustmentReason>
<Status> Completed</Status>
<StockAdjustmentLines>
<StockAdjustmentLine>
<Guid> f2389b59-1cdf-43cf-ba0e-d7597fd5efb1</Guid>
<LastModifiedOn> 2014-04-09T02:32:20.74</LastModifiedOn>
<LineNumber> 1</LineNumber>
<Product>
<Guid> c92823f0-a5af-4e66-91a7-d2c66c25f885</Guid>
<ProductCode> ALIEN</ProductCode>
<ProductDescription> Alien Artifact</ProductDescription>
</Product>
<NewQuantity> 150.0000</NewQuantity>
<NewActualValue> 5272.500</NewActualValue>
<Comments />
<SerialNumbers />
<BatchNumbers />
</StockAdjustmentLine>
<StockAdjustmentLine>
<Guid> f263d249-0724-4c9b-a8cd-6073ae8e89b4</Guid>
<LastModifiedOn> 2014-04-09T02:32:20.74</LastModifiedOn>
<LineNumber> 2</LineNumber>
<Product>
<Guid> 5cf1c9ba-89de-4f59-879c-c08a447fd49c</Guid>
<ProductCode> BOOK</ProductCode>
<ProductDescription> Book of Spells</ProductDescription>
</Product>
<NewQuantity> 70.0000</NewQuantity>
<NewActualValue> 871.774</NewActualValue>
<Comments />
<SerialNumbers />
<BatchNumbers>
<Batch>
<BatchNumber> BookBatch54</BatchNumber>
<Quantity> 30</Quantity>
<ExpiryDate> 2025-01-01</ExpiryDate>
<Guid> 66f9a717-1b76-44bb-81c6-d423e136f680</Guid>
<LastModifiedOn> 2024-15-02</LastModifiedOn>
</Batch>
<Batch>
<BatchNumber> BookBatch55</BatchNumber>
<Quantity> 40</Quantity>
<ExpiryDate> 2025-01-01</ExpiryDate>
<Guid> f7f880d6-131a-4279-bb07-82bf26c8979a</Guid>
<LastModifiedOn> 2024-15-02</LastModifiedOn>
</Batch>
</BatchNumbers>
</StockAdjustmentLine>
</StockAdjustmentLines>
<ConfirmedOn xsi:nil= "true" />
<AccountCode />
</StockAdjustment>
<StockAdjustment>
<Guid> 6bf8ae17-4318-4faa-9871-64c66c948e85</Guid>
<LastModifiedOn> 2016-03-31T03:40:59.5682222</LastModifiedOn>
<AdjustmentNumber> SA-00000002</AdjustmentNumber>
<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>
<AdjustmentDate> 2016-03-31T03:40:23.1313742</AdjustmentDate>
<AdjustmentReason> Adjustment</AdjustmentReason>
<Status> Parked</Status>
<StockAdjustmentLines>
<StockAdjustmentLine>
<Guid> aa2842e3-79cc-444d-884b-17c1b5069aa8</Guid>
<LastModifiedOn> 2016-03-31T03:40:23.9438586</LastModifiedOn>
<LineNumber> 1</LineNumber>
<Product>
<Guid> 326eefb3-70e5-4845-9146-e8c63922edda</Guid>
<ProductCode> RTL</ProductCode>
<ProductDescription> Red T-shirt Large</ProductDescription>
</Product>
<NewQuantity> 2.0000</NewQuantity>
<NewActualValue> 97.271</NewActualValue>
<Comments> Found 2 in a box</Comments>
<SerialNumbers>
<Serial>
<Guid> 7bb2806c-8a82-48a8-8d80-99146e133e07</Guid>
<SerialNumber> 192-195-2397</SerialNumber>
<LastModifiedOn> 2024-02-12</LastModifiedOn>
</Serial>
<Serial>
<Guid> ad12ce66-0f30-465a-88d8-3eabe81dc605</Guid>
<SerialNumber> 192-195-2398</SerialNumber>
<LastModifiedOn> 2024-02-12</LastModifiedOn>
</Serial>
</SerialNumbers>
<BatchNumbers />
</StockAdjustmentLine>
<StockAdjustmentLine>
<Guid> d0b0905b-5c3c-47aa-acec-9592dab579f7</Guid>
<LastModifiedOn> 2016-03-31T03:40:51.3027083</LastModifiedOn>
<LineNumber> 2</LineNumber>
<Product>
<Guid> 3c787f82-fb51-4161-bc52-893d69ccb6b1</Guid>
<ProductCode> RTS</ProductCode>
<ProductDescription> Red T-shirt Small</ProductDescription>
</Product>
<NewQuantity> -2.0000</NewQuantity>
<NewActualValue> -18.884</NewActualValue>
<Comments> Lost 2 somewhere</Comments>
<SerialNumbers />
<BatchNumbers />
</StockAdjustmentLine>
</StockAdjustmentLines>
<ConfirmedOn xsi:nil= "true" />
<AccountCode />
</StockAdjustment>
</StockAdjustments>
show json example
{
"Items" : [
{
"AdjustmentNumber" : "SA-00000001" ,
"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)/"
},
"AdjustmentDate" : "/Date(1397010740740)/" ,
"AdjustmentReason" : "Adjustment" ,
"Status" : "Completed" ,
"StockAdjustmentLines" : [
{
"LineNumber" : 1 ,
"Product" : {
"Guid" : "c92823f0-a5af-4e66-91a7-d2c66c25f885" ,
"ProductCode" : "ALIEN" ,
"ProductDescription" : "Alien Artifact"
},
"NewQuantity" : 150 ,
"NewActualValue" : 5272.5 ,
"Comments" : null ,
"SerialNumbers" : [],
"BatchNumbers" : [],
"Guid" : "f2389b59-1cdf-43cf-ba0e-d7597fd5efb1" ,
"LastModifiedOn" : "/Date(1397010740740)/"
},
{
"LineNumber" : 2 ,
"Product" : {
"Guid" : "5cf1c9ba-89de-4f59-879c-c08a447fd49c" ,
"ProductCode" : "BOOK" ,
"ProductDescription" : "Book of Spells"
},
"NewQuantity" : 70 ,
"NewActualValue" : 871.774 ,
"Comments" : null ,
"SerialNumbers" : [],
"BatchNumbers" : [
{
"Number" : "BookBatch54" ,
"Quantity" : 30 ,
"ExpiryDate" : "2025-01-01" ,
"Guid" : "66f9a717-1b76-44bb-81c6-d423e136f680" ,
"LastModifiedOn" : "2024-15-02"
},
{
"Number" : "BookBatch55" ,
"Quantity" : 40 ,
"ExpiryDate" : "2025-01-01" ,
"Guid" : "f7f880d6-131a-4279-bb07-82bf26c8979a" ,
"LastModifiedOn" : "2024-15-02"
}
],
"Guid" : "f263d249-0724-4c9b-a8cd-6073ae8e89b4" ,
"LastModifiedOn" : "/Date(1397010740740)/"
}
],
"ConfirmedOn" : null ,
"ConfirmedBy" : null ,
"AccountCode" : "" ,
"Guid" : "8f665048-bc73-4c15-998f-22bb980956f9" ,
"LastModifiedOn" : "/Date(1397010740740)/"
},
{
"AdjustmentNumber" : "SA-00000002" ,
"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)/"
},
"AdjustmentDate" : "/Date(1459395623131)/" ,
"AdjustmentReason" : "Adjustment" ,
"Status" : "Parked" ,
"StockAdjustmentLines" : [
{
"LineNumber" : 1 ,
"Product" : {
"Guid" : "326eefb3-70e5-4845-9146-e8c63922edda" ,
"ProductCode" : "RTL" ,
"ProductDescription" : "Red T-shirt Large"
},
"NewQuantity" : 2 ,
"NewActualValue" : 97.271 ,
"Comments" : "Found 2 in a box" ,
"SerialNumbers" : [
{
"Guid" : "7bb2806c-8a82-48a8-8d80-99146e133e07" ,
"Identifier" : "192-195-2397" ,
"LastModifiedOn" : "2024-02-12"
},
{
"Guid" : "ad12ce66-0f30-465a-88d8-3eabe81dc605" ,
"Identifier" : "192-195-2398" ,
"LastModifiedOn" : "2024-02-12"
}
],
"BatchNumbers" : [],
"Guid" : "aa2842e3-79cc-444d-884b-17c1b5069aa8" ,
"LastModifiedOn" : "/Date(1459395623943)/"
},
{
"LineNumber" : 2 ,
"Product" : {
"Guid" : "3c787f82-fb51-4161-bc52-893d69ccb6b1" ,
"ProductCode" : "RTS" ,
"ProductDescription" : "Red T-shirt Small"
},
"NewQuantity" : -2 ,
"NewActualValue" : -18.884 ,
"Comments" : "Lost 2 somewhere" ,
"SerialNumbers" : [],
"BatchNumbers" : [],
"Guid" : "d0b0905b-5c3c-47aa-acec-9592dab579f7" ,
"LastModifiedOn" : "/Date(1459395651302)/"
}
],
"ConfirmedOn" : null ,
"ConfirmedBy" : null ,
"AccountCode" : "" ,
"Guid" : "6bf8ae17-4318-4faa-9871-64c66c948e85" ,
"LastModifiedOn" : "/Date(1459395659568)/"
}
]
}
POST Stock Adjustments
Available Fields for POST Stock Adjustment
Property
Type
Length
POST
Notes
AccountCode
String
50
AdjustmentDate
DateTime
UTC timezone only
AdjustmentReason
String
20
Required
ConfirmedBy
String
50
ConfirmedOn
Nullable DateTime
CreatedBy
String
256
Guid
Guid
Unique identifier. Can only be set when adding a record.
Status
String
20
StockAdjustmentLines
StockAdjustmentLine collection
Required
Must contain at least one line.
Warehouse
Warehouse
Required
Available Fields for Stock Adjustment Line
Property
Type
Length
POST
Notes
BatchNumbers
BatchNumber collection
Only for completed stock adjustments. XML collection element name is Batch .
Comments
String
200
Guid
Guid
Unique identifier. Can only be set when adding a record.
NewActualValue
Decimal
Required
NewQuantity
Decimal
Required
Product
Product
Required
SerialNumbers
SerialNumber collection
Only for completed stock adjustments. XML collection element name is Serial .
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 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: Serial number/s can only be assigned to 'Completed' stock adjustments.
Property
Type
Length
POST
SerialNumber (XML) / Identifier (JSON)
String
50
Required
Available Fields for Batch Number
Note: Batch number/s can only be assigned to 'Completed' stock adjustments.
Property
Type
Length
POST
BatchNumber (XML) / Number (JSON)
String
50
Required
ExpiryDate
Nullable DateTime
Quantity
Decimal
Required
Examples for Request POST /StockAdjustment/{id}
show xml example
<?xml version="1.0"?>
<StockAdjustment xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://api.unleashedsoftware.com/version/1" >
<AdjustmentNumber> SA-00000013</AdjustmentNumber>
<Warehouse>
<WarehouseCode> W1</WarehouseCode>
</Warehouse>
<AdjustmentDate> 2016-09-29</AdjustmentDate>
<AdjustmentReason> Adjustment</AdjustmentReason>
<Status> Parked</Status>
<AccountCode> 300</AccountCode>
<Guid> 55be3c10-2775-4350-b81f-0cc44306f9b8</Guid>
<StockAdjustmentLines>
<StockAdjustmentLine>
<LineNumber> 1</LineNumber>
<Product>
<ProductCode> 3033710073467</ProductCode>
</Product>
<BatchNumbers>
<Batch>
<BatchNumber> HS9371</BatchNumber>
<Quantity> 1</Quantity>
<ExpiryDate> 2025-01-01</ExpiryDate>
</Batch>
</BatchNumbers>
<NewQuantity> 1</NewQuantity>
<NewActualValue> 0</NewActualValue>
<Comments/>
<Guid> 18126dcb-8a3d-4850-952f-6f9cfc3d8307</Guid>
</StockAdjustmentLine>
<StockAdjustmentLine>
<LineNumber> 2</LineNumber>
<Product>
<ProductCode> 7613032655495</ProductCode>
</Product>
<SerialNumbers>
<Serial>
<SerialNumber> HS9372</SerialNumber>
</Serial>
</SerialNumbers>
<NewQuantity> 1</NewQuantity>
<NewActualValue> 0</NewActualValue>
<Comments/>
<Guid> 5a555a76-11ee-4772-bdc8-4e30f033634a</Guid>
</StockAdjustmentLine>
</StockAdjustmentLines>
</StockAdjustment>
show json example
{
"AdjustmentNumber" : "SA-00000013" ,
"Warehouse" :{
"WarehouseCode" : "W1"
},
"AdjustmentDate" : "2016-09-29" ,
"AdjustmentReason" : "Adjustment" ,
"Status" : "Parked" ,
"AccountCode" : "300" ,
"Guid" : "55be3c10-2775-4350-b81f-0cc44306f9b8" ,
"StockAdjustmentLines" :[
{
"LineNumber" : 1 ,
"Product" :{
"ProductCode" : "3033710073467"
},
"BatchNumbers" : [
{
"Number" : "HS9371" ,
"Quantity" : 1 ,
"ExpiryDate" : "2025-01-01"
},
{
"Number" : "HS9372" ,
"Quantity" : 2 ,
"ExpiryDate" : "2025-01-01"
},
],
"NewQuantity" : 3 ,
"NewActualValue" : 0 ,
"Comments" : null ,
"Guid" : "18126dcb-8a3d-4850-952f-6f9cfc3d8307"
},
{
"LineNumber" : 2 ,
"Product" :{
"ProductCode" : "7613032655495"
},
"SerialNumbers" :
[
{
"Identifier" : "HS9374"
},
{
"Identifier" : "HS9375"
}
]
"NewQuantity" : 2 ,
"NewActualValue" : 0 ,
"Comments" : null ,
"Guid" : "5a555a76-11ee-4772-bdc8-4e30f033634a"
}
]
}