API DOCUMENTATION
    Try Unleashed Now Sandbox

    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 to the URI. Here are some example URIs:

    • /StockAdjustments/E6E8163F-6911-40e9-B740-90E5A0A3A996 - returns details of a particular StockAdjustment;
    • /StockAdjustments/Page/1 - returns the first page of 200 StockAdjustments;
    • /StockAdjustments/1 - also returns the first page of 200 StockAdjustments;
    • /StockAdjustments - also returns the first 200 StockAdjustments because page number 1 is the default;
    • /StockAdjustments/3?pageSize=100 - returns the third page of 100 StockAdjustments; ie. the 201st to 300th StockAdjustments;

    The full range of URIs and HTTP Verbs supported are:

    Operation HTTP Action
    List all StockAdjustments GET /StockAdjustments
    View any StockAdjustment GET /StockAdjustments/{id}
    Create a new StockAdjustment POST /StockAdjustments/{id}

    GET StockAdjustments

    Available Filters for GET Stock Adjustments:
    Property Type Length Required Notes
    ExpiryDate Nullable DateTime
    Guid Guid Unique identifier. Can only be set when adding a record.
    Number String 200 Yes
    ProductId Integer
    Quantity Integer
    TransactionId Integer
    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 Request GET /StockAdjustment

    show xml example
    show json example

    POST StockAdjustments

    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 StockAdjustmentLine
    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 SerialNumber

    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 BatchNumber

    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
    show json example

    Use the API Sandbox to see how the object is rendered in JSON or XML.

    Note: An Unleashed account is required before you can use the API Sandbox.

    Trial accounts are also allowed to connect to the API.
    You can register a new account here: Register.