Methods


Entity Properties


Red Stag Fulfillment tracks each merchant’s inventory at all times using the following statuses:

  • Expected - Listed on open ASNs, RMAs and Other Deliveries that have not yet been received.
  • Processed - Counted on an ASN, RMA or Other Delivery but not yet put-away.
  • Put-Away - Has been received on an ASN, RMA or Other Delivery that has not yet been committed to the inventory. If you have auto-commit enabled this should always be 0.
  • Available - Available for new orders. Backordered amounts are not reflected as a negative Available amount but are tracked separately as “Backordered”.
  • Allocated - Allocated to existing orders but not yet Reserved.
  • Reserved - Reserved to a specific shelf location and waiting to be picked.
  • Picked - Picked from the shelves but not yet shipped.
  • Backordered - Reserved by existing orders but not in stock. Will be automatically converted to Reserved when stock is added. Backordered quantities are not reflected in the Available amount as a negative number.
  • Advertised - The “Available” quantity plus the virtual BOM quantity. The virtual BOM quantity is controlled by a product’s “Virtual Inventory” attribute.

Additionally, products have two flags that can be set which will affect whether or not they are retrieved in an inventory request.

  • Status - Enabled/Disabled - If “Disabled”, the product is effectively deleted and will not appear in responses to inventory requests.
  • Visibility - Visible/Not Visible - If “Not Visible”, the product will not appear in the inventory list but may still be ordered via the Merchant Panel.

inventory.list

inventory.list (string|array|null $skus, int|null $warehouseId, string|null $updatedSince)

Get inventory levels for one or more products by SKU. If a warehouse is not specified the sum of all warehouse inventories will be returned, otherwise the inventory levels for the specified warehouse will be returned.

Parameters

0 string|array|null
SKUs. If not specified then inventory for all SKUs will be returned.
  • string - Get inventory for a single product by SKU.
  • array - Get inventory for the specified products by SKU.
  • null - Get inventory for all products.
1 int|null
Warehouse. If not specified, returned values represent sums of all warehouses.
2 string|null
Return only SKUs updated since the time specified in the format ‘2008-07-01T22:38:07+00:00’.

Return Value

An array of Inventory Items or an empty array if there were no matching SKUs.

Example Request

Get inventory for two SKUs:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "inventory.list",
        [
            ["BlueWidget-1","BlueWidget-5"]
        ]
    ]
}

Get all inventory:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "inventory.list"
    ]
}

Get all inventory for warehouse “2”:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "inventory.list",
        [
            null,
            2
        ]
    ]
}

Example Response

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "result" : [
        {
            "sku" : "BlueWidget-1",
            "qty_expected"    : 0,
            "qty_processed"   : 0,
            "qty_putaway"     : 50,
            "qty_available"   : 22,
            "qty_allocated"   : 5,
            "qty_reserved"    : 16,
            "qty_picked"      : 1,
            "qty_backordered" : 0,
            "qty_advertised"  : 22
        },
        {
            "sku" : "BlueWidget-5",
            "qty_expected"    : 40,
            "qty_processed"   : 0,
            "qty_putaway"     : 0,
            "qty_available"   : 0,
            "qty_allocated"   : 0,
            "qty_reserved"    : 2,
            "qty_picked"      : 0,
            "qty_backordered" : 5,
            "qty_advertised"  : 0
        }
    ]
}

inventory.lots

inventory.lots (null|object $filters, array $options = [])

Retrieve list of lots by filters.

Parameters

0 null|object
Filters to apply for the search.
  • null - Retrieve list of all orders.
  • object - Retrieve list of orders using specified “Search Filters”.
1 null|object
Options to apply for the search.
  • null - No options will be applied.
  • object - Apply specified “Search Options”.

Return Value

An array of objects. Each object will contain “Lot Properties”.

Example Request

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "inventory.lots",
        [
            {
                "lot_id" : {
                    "in" : [1, 2]
                }
            },
            []
        ]
    ]
}

Example Response

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "result" : {
       "results": [
           {
               "lot_id": "1",
               "lot_number": "2018-07-09",
               "origination_date": "2018-07-09",
               "expiration_date": "2019-04-07",
               "is_active": "1",
               "group_value": "2018-07-09",
               "created_at": "2018-07-09T19:58:23+00:00",
               "sku": "product1",
               "name": "product 1",
               "locations": [
                   "location 1"
               ],
               "qty_putaway": "0.0000",
               "qty_available": "76.0000",
               "qty_reserved": "0.0000"
           },
           {
               "lot_id": "2",
               "lot_number": "2018-07-09",
               "origination_date": "2018-07-09",
               "expiration_date": "2019-04-11",
               "is_active": "1",
               "group_value": "2018-07-09",
               "created_at": "2018-07-09T19:59:03+00:00",
               "sku": "product2",
               "name": "product 2",
               "locations": [],
               "qty_putaway": "0.0000",
               "qty_available": "0.0000",
               "qty_reserved": "0.0000"
           }
       ],
       "totalCount": 2,
       "numPages": 1
   }
}

Error Codes

code message
102 Unexpected error applying filters.

inventory.detailed

inventory.detailed (string|array|null $skus, string|null $updatedSince)

Get global and per-warehouse inventory levels for one or more products by SKU.

Parameters

0 string|array|null
SKUs. If not specified then inventory for all SKUs will be returned.
  • string - Get inventory for a single product by SKU.
  • array - Get inventory for the specified products by SKU.
  • null - Get inventory for all products.
1 string|null
Return only SKUs updated since the time specified in the format ‘2008-07-01T22:38:07+00:00’.

Return Value

An array of detailed items inventory, or an empty array if there were no matching SKUs.

Example Request

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "inventory.detailed",
        [
            ["BlueWidget-1","BlueWidget-5"],
            "2014-07-24T18:51:18+00:00"
        ]
    ]
}

Example Response

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "result" : [
        {
            "sku": "BlueWidget-1",
            "qty_expected": "0.0000",
            "qty_processed": "0.0000",
            "qty_putaway": "0.0000",
            "qty_available": "8.0000",
            "qty_allocated": "0.0000",
            "qty_reserved": "0.0000",
            "qty_picked": "2.0000",
            "qty_backordered": "0.0000",
            "qty_advertised": "8",
            "detailed": [
                {
                    "warehouse_id": "1",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "8.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "2.0000",
                    "qty_advertised": "8"
                },
                {
                    "warehouse_id": "2",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "0.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "0.0000",
                    "qty_advertised": "0"
                },
                {
                    "warehouse_id": "3",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "0.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "0.0000",
                    "qty_advertised": "0"
                }
            ]
        },
        {
            "sku": "BlueWidget-5",
            "qty_expected": "0.0000",
            "qty_processed": "0.0000",
            "qty_putaway": "0.0000",
            "qty_available": "98.0000",
            "qty_allocated": "0.0000",
            "qty_reserved": "0.0000",
            "qty_picked": "1.0000",
            "qty_backordered": "0.0000",
            "qty_advertised": "98",
            "detailed": [
                {
                    "warehouse_id": "1",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "98.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "1.0000",
                    "qty_advertised": "98"
                },
                {
                    "warehouse_id": "2",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "0.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "0.0000",
                    "qty_advertised": "0"
                },
                {
                    "warehouse_id": "3",
                    "qty_expected": "0.0000",
                    "qty_processed": "0.0000",
                    "qty_putaway": "0.0000",
                    "qty_available": "0.0000",
                    "qty_allocated": "0.0000",
                    "qty_reserved": "0.0000",
                    "qty_picked": "0.0000",
                    "qty_advertised": "0"
                }
            ]
        }
    ]
}

Error Codes

code message
102 Unexpected error applying filters.

Entity Properties

Inventory Item

sku
{ "sku" : "BlueWidget-1" }
A unique identifier for a product. The SKU does appear on the packing slip. It is recommended that this be human-readable and end with a per-pack quantity to facilitate proper receiving. For example, a single blue widget may be "BlueWidget-1" and a pack of 5 blue widgets may be "BlueWidget-5". Maximum character length is 64.
qty_expected
{ "qty_expected" : 1 }
The "Expected" quantity.
qty_processed
{ "qty_processed" : 1 }
The "Processed" quantity.
qty_putaway
{ "qty_putaway" : 1 }
The "Put-Away" quantity.
qty_available
{ "qty_available" : 1 }
The "Available" quantity.
qty_allocated
{ "qty_allocated" : 1 }
The "Allocated" quantity.
qty_reserved
{ "qty_reserved" : 1 }
The "Reserved" quantity.
qty_picked
{ "qty_picked" : 1 }
The "Picked" quantity.
qty_backordered
{ "qty_backordered" : 1 }
The "Backordered" quantity. This quantity will not be present for single-warehouse requests since backordered amounts are not apportioned to specific warehouses.
qty_advertised
{ "qty_advertised" : 1 }
The "Advertised" quantity. This is the "Available" quantity plus the virtual BOM quantity. The virtual BOM quantity is controlled by a product's "Virtual Inventory" attribute.

Lot Properties

lot_id
{ "lot_id": 25 }
The internal lot ID.
is_active
{ "is_active": 1 }
Flag whether lot is active.
sku
{ "sku": "product1" }
The "SKU" property.
name
{ "name": "product 1" }
The "Name" property.
lot_number
{ "lot_number": "AB190405ZZ9Z" }
The "Lot Number" property.
expiration_date
{ "expiration_date": "2019-04-07" }
The "Expiration Date" property.
origination_date
{ "origination_date": "2018-07-09" }
The "Origination Date" property.
group_value
{ "group_value": "2018-07-09" }
The "Group Value" property.
created_at
{ "created_at": "2018-07-09T18:51:34+00:00" }
The "Created At" property in ISO 8601 format.
locations
{ "locations": ["location A", "location B"] }
A list of locations.
qty_putaway
{ "qty_putaway": "1.0000" }
The "Put-Away" quantity.
qty_available
{ "qty_available": "55.0000" }
The "Available" quantity.
qty_reserved
{ "qty_reserved": "1.0000" }
The "Reserved" quantity.