Supported Formats

json

GET /api/v2/stock_transfers.json
Retrieves a list of stock transfers

Supported Formats

json

Examples

{
  "stock_transfers": [
    {
      "id": 1,
      "note": "Display this in the store window.",
      "sequential_id": 1000,
      "transferred_by": "Jane Doe",
      "from_location_id": 905684977,
      "to_location_id": 48752903,
      "created_at": "2021-02-05T16:41:38.000Z",
      "updated_at": "2021-02-05T16:42:20.000Z",
      "sent_at": "2021-02-05T16:41:57.000Z",
      "received_at": "2021-02-05T16:42:20.000Z",
      "stock_transfer_reason": "Display case",
      "archived": true,
      "forecast_type": "last_days",
      "restock_for": 7,
      "tracking_number": "112345Z2345",
      "stock_transfer_items": [
        {
          "id": 1,
          "inventory_item_id": 808950810,
          "product_title": "Shirt",
          "variant_title": "Medium",
          "quantity": 6,
          "status": "received",
          "received_at": "2021-02-05T16:42:20.000Z",
          "updated_at": "2021-02-05T16:42:20.000Z"
        }
      ]
    },
    {
      "id": 2,
      "note": "",
      "sequential_id": 1001,
      "transferred_by": "",
      "from_location_id": 48752903,
      "to_location_id": 905684977,
      "created_at": "2021-02-05T16:47:58.000Z",
      "updated_at": "2021-02-06T16:48:18.000Z",
      "sent_at": null,
      "received_at": null,
      "stock_transfer_reason": "Replenish stock",
      "archived": false,
      "forecast_type": "last_days",
      "restock_for": null,
      "tracking_number": "",
      "stock_transfer_items": [
        {
          "id": 2,
          "inventory_item_id": 808950810,
          "product_title": "Shirt",
          "variant_title": "Medium",
          "quantity": 9,
          "status": "not_transferred",
          "received_at": null,
          "updated_at": "2021-02-05T16:48:05.000Z"
        },
        {
          "id": 3,
          "inventory_item_id": 39072856,
          "product_title": "Shirt",
          "variant_title": "Large",
          "quantity": 8,
          "status": "not_transferred",
          "received_at": null,
          "updated_at": "2021-02-05T16:48:11.000Z"
        },
        {
          "id": 4,
          "inventory_item_id": 457924702,
          "product_title": "Shirt",
          "variant_title": "Small",
          "quantity": 5,
          "status": "not_transferred",
          "received_at": null,
          "updated_at": "2021-02-06T16:48:18.000Z"
        }
      ]
    }
  ]
}

Params

Param name Description
from_location_id
optional

Show stock transfers coming from the Shopify Location matching the given identifier.

Validations:

  • Must be a Integer

to_location_id
optional

Show stock transfers going to the Shopify Location matching the given identifier.

Validations:

  • Must be a Integer

order
optional

Optionally specify the order in which stock transfers should be returned. Stock transfers are orderd by id.
Default value: desc.
Valid values: desc, asc.

Validations:

  • Must be a String

limit
optional

The maximum number of stock transfers to retrieve.

Validations:

  • Must be a Integer

offset
optional

Specifies the number of matching records to skip over. NOTE: This should not be used for pagination. Use the since_id param instead. If both offset and since_id are provided, only since_id will be used. Any custom ordering is applied before the offset.

Validations:

  • Must be a Integer

archived
optional

When ‘true`, shows archived stock transfers. When `false`, shows un-archivedstock transfers.

Validations:

  • Must be one of: true, false, 1, 0.

status
optional

Optionally filter stock transfers by their status. Valid values: not_transferred, in_transit, received.

Validations:

  • Must be a String

updated_since
optional

Return only stock transfers that have been updated on or after a specified date (Using ISO 8601 format; e.g. 2014-04-25T16:15:47-04:00)

Validations:

  • Must be a String

since_id
optional

Return only stock transfers with ID values less than the provided ID. If the order param is set to asc then it will return stock transfers with ID values greater than the provided ID. Use in combination with the limit param for pagination. Can not be used in combination with the offset param. If both offset and since_id are provided, only since_id will be used.

Validations:

  • Must be a Integer

Returns

Code: 200

Description:

A list of stock transfers

Param name Description
id
required

A unique numeric identifier for the stock transfer.

Validations:

  • Must be a Integer

note
required

An optional note that can be attached to the stock transfer.

Validations:

  • Must be a String

sequential_id
required

A sequential identifier for the stock transfer.

Validations:

  • Must be a String

transferred_by
required

The name of the staff member written in the stock transfer’s “Employee” field.

Validations:

  • Must be a String

from_location_id
required

The identifier for the Shopify Location that inventory is coming from.

Validations:

  • Must be a Integer

to_location_id
required

The identifier for the Shopify Location that inventory is going to.

Validations:

  • Must be a Integer

created_at
required

The date and time when the stock transfer was created.

Validations:

  • Must be a String

updated_at
required

The date and time when the stock transfer was last updated.

Validations:

  • Must be a String

sent_at
required

The date and time when the stock transfer was sent. If this property is null, the stock transfer has not been sent yet.

Validations:

  • Must be a String

received_at
required

The date and time when the first stock transfer item was received. If this property is null, no stock transfer items have been received yet.

Validations:

  • Must be a String

reason
required

An optional string that can be attached to a stock transfer to explain why it was created. Merchants can add new reasons to their Stocky account in Preferences > Stock transfers.

Validations:

  • Must be a String

archived
required

Indicates whether the stock transfer has been archived or not.

Validations:

  • Must be one of: true, false, 1, 0.

forecast_type
required

The type of forecasting used to create the stock transfer. Valid values:

  • last_days: based on the destination’s demand but limited to the stock available at the source,

  • fill_shelves: brings inventory levels at the destination up to the maximum stock level but limited to the stock available at the source,

  • fill_shelves_if_min: brings inventory levels at the destination up to the maximum stock level only if below the minimum stock level but limited to the stock available at the source

Validations:

  • Must be a String

restock_for
required

The number of days of sales history used to estimate demand at the destination; only applies when ‘forecast_type` is `last_days`.

Validations:

  • Must be a Integer

tracking_number
required

The tracking number for the stock transfer.

Validations:

  • Must be a String

stock_transfer_item
required

A list of stock transfer items.

Validations:

  • Must be a Hash

stock_transfer_item[id]
required

A unique numeric identifier for the stock transfer item.

Validations:

  • Must be a Integer

stock_transfer_item[inventory_item_id]
required

The identifier for the Shopify InventoryItem associated with the stock transfer item.

Validations:

  • Must be a Integer

stock_transfer_item[product_title]
required

The name of the product.

Validations:

  • Must be a String

stock_transfer_item[variant_title]
required

The title of the product variant.

Validations:

  • Must be a String

stock_transfer_item[quantity]
required

The number of items being transferred.

Validations:

  • Must be a Integer

stock_transfer_item[status]
required

The status of the stock transfer item. Valid values:

  • not_transferred,

  • sent,

  • send_failed,

  • received,

  • receive_failed,

  • restocked,

  • restock_failed,

  • rejected,

  • syncing,

  • failed,

  • inventory_tracking_not_set

Validations:

  • Must be a String

stock_transfer_item[received_at]
required

The date and time when the stock transfer item was received. If this property is null, the item has not been received yet.

Validations:

  • Must be a String

stock_transfer_item[updated_at]
required

The date and time when the stock transfer item was last modified.

Validations:

  • Must be a DateTime


GET /api/v2/stock_transfers/{stock_transfer_id}.json
Retrieves a specific stock transfer

Supported Formats

json

Errors

Code Description
404 Stock transfer not found.

Examples

{
  "id": 1,
  "note": "Display this in the store window.",
  "sequential_id": 1000,
  "transferred_by": "Jane Doe",
  "from_location_id": 905684977,
  "to_location_id": 48752903,
  "created_at": "2021-02-05T16:41:38.000Z",
  "sent_at": "2021-02-05T16:41:57.000Z",
  "received_at": "2021-02-05T16:42:20.000Z",
  "stock_transfer_reason": "Display case",
  "archived": true,
  "forecast_type": "last_days",
  "restock_for": 7,
  "tracking_number": "112345Z2345",
  "stock_transfer_items": [
    {
      "id": 1,
      "inventory_item_id": 808950810,
      "product_title": "Shirt",
      "variant_title": "Medium",
      "quantity": 6,
      "status": "received",
      "received_at": "2021-02-05T16:42:20.000Z",
      "updated_at": "2021-02-05T16:42:20.000Z"
    }
  ]
}

Params

Param name Description
stock_transfer_id
required

The ID of the stock transfer

Validations:

  • Must be a Integer

Returns

Code: 200

Description:

A stock transfer

Param name Description
id
required

A unique numeric identifier for the stock transfer.

Validations:

  • Must be a Integer

note
required

An optional note that can be attached to the stock transfer.

Validations:

  • Must be a String

sequential_id
required

A sequential identifier for the stock transfer.

Validations:

  • Must be a String

transferred_by
required

The name of the staff member written in the stock transfer’s “Employee” field.

Validations:

  • Must be a String

from_location_id
required

The identifier for the Shopify Location that inventory is coming from.

Validations:

  • Must be a Integer

to_location_id
required

The identifier for the Shopify Location that inventory is going to.

Validations:

  • Must be a Integer

created_at
required

The date and time when the stock transfer was created.

Validations:

  • Must be a String

updated_at
required

The date and time when the stock transfer was last updated.

Validations:

  • Must be a String

sent_at
required

The date and time when the stock transfer was sent. If this property is null, the stock transfer has not been sent yet.

Validations:

  • Must be a String

received_at
required

The date and time when the first stock transfer item was received. If this property is null, no stock transfer items have been received yet.

Validations:

  • Must be a String

reason
required

An optional string that can be attached to a stock transfer to explain why it was created. Merchants can add new reasons to their Stocky account in Preferences > Stock transfers.

Validations:

  • Must be a String

archived
required

Indicates whether the stock transfer has been archived or not.

Validations:

  • Must be one of: true, false, 1, 0.

forecast_type
required

The type of forecasting used to create the stock transfer. Valid values:

  • last_days: based on the destination’s demand but limited to the stock available at the source,

  • fill_shelves: brings inventory levels at the destination up to the maximum stock level but limited to the stock available at the source,

  • fill_shelves_if_min: brings inventory levels at the destination up to the maximum stock level only if below the minimum stock level but limited to the stock available at the source

Validations:

  • Must be a String

restock_for
required

The number of days of sales history used to estimate demand at the destination; only applies when ‘forecast_type` is `last_days`.

Validations:

  • Must be a Integer

tracking_number
required

The tracking number for the stock transfer.

Validations:

  • Must be a String

stock_transfer_item
required

A list of stock transfer items.

Validations:

  • Must be a Hash

stock_transfer_item[id]
required

A unique numeric identifier for the stock transfer item.

Validations:

  • Must be a Integer

stock_transfer_item[inventory_item_id]
required

The identifier for the Shopify InventoryItem associated with the stock transfer item.

Validations:

  • Must be a Integer

stock_transfer_item[product_title]
required

The name of the product.

Validations:

  • Must be a String

stock_transfer_item[variant_title]
required

The title of the product variant.

Validations:

  • Must be a String

stock_transfer_item[quantity]
required

The number of items being transferred.

Validations:

  • Must be a Integer

stock_transfer_item[status]
required

The status of the stock transfer item. Valid values:

  • not_transferred,

  • sent,

  • send_failed,

  • received,

  • receive_failed,

  • restocked,

  • restock_failed,

  • rejected,

  • syncing,

  • failed,

  • inventory_tracking_not_set

Validations:

  • Must be a String

stock_transfer_item[received_at]
required

The date and time when the stock transfer item was received. If this property is null, the item has not been received yet.

Validations:

  • Must be a String

stock_transfer_item[updated_at]
required

The date and time when the stock transfer item was last modified.

Validations:

  • Must be a DateTime