Items

Get a list of Items for a customer account

GET https://www.whiplashmerch.com/api/itemsView Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Parameters

NameTypeDescription
limit Integer The number of results returned. Default is 50
offset/page Integer Page to show (defaults to 1)
order_by String Order (defaults to updated_at DESC
since_id Integer Restrict results to after the specified ID
created_at_min Datetime Show results created after date (format: 2008-01-01 03:00)
created_at_max Datetime Show results created before date (format: 2008-01-01 03:00)
updated_at_min Datetime Show results last updated after date (format: 2008-01-01 03:00)
updated_at_max Datetime Show results last updated before date (format: 2008-01-01 03:00)

Item Count

Get the total number of items for a customer account.

GET https://www.whiplashmerch.com/api/items/countView Response
HTTP/1.1 200 OK
1233

Parameters

NameTypeDescription
since_id Integer Restrict results to after the specified ID
created_at_min Datetime Show results created after date (format: 2008-01-01 03:00)
created_at_max Datetime Show results created before date (format: 2008-01-01 03:00)
updated_at_min Datetime Show results last updated after date (format: 2008-01-01 03:00)
updated_at_max Datetime Show results last updated before date (format: 2008-01-01 03:00)

Get a single Item

Get an item by its Whiplash ID.

GET https://www.whiplashmerch.com/api/items/{item-id}View Response
HTTP/1.1 200 OK
{
  "id":1234,
  "available":true,
  "created_at":"2013-04-25T14:21:11-04:00",
  "currency":"USD",
  "description":"The best test item ever",
  "height":"0.5",
  "image_file_name":null,
  "image_originator_url":"http://yourserver.com/your/image/url",
  "image_updated_at":null,
  "is_bundle":false,
  "length":"7.0",
  "media_mail":false,
  "notify_originator_inventory":null,
  "packaging":false,
  "price":"10.0",
  "quantity":14,
  "returnable":true,
  "scancode":"123456",
  "sku":"TESTSKU",
  "street_date":null,
  "tariff_number":"0406.20.90.20",
  "title":"Test Item",
  "updated_at":"2013-08-30T15:01:52-04:00",
  "vendor":"Test Vendor",
  "weight":"0.305",
  "wholesale_cost":null,
  "width":"7.0",
  "category":"poster",
  "originators":[
    {
      "group_id":"11223344",
      "original_id":"265512888",
      "provider":"api"
    }
  ]
}

Get a single Item by Originator ID

Items received via an e-commerce platform or our API also store the incoming ID as the originator_id.
Any API method that returns a single item can use this originator lookup.

GET https://www.whiplashmerch.com/api/items/originator/{item-originator-id}View Response
HTTP/1.1 200 OK
{
  "id":1234,
  "available":true,
  "created_at":"2013-04-25T14:21:11-04:00",
  "currency":"USD",
  "description":"The best test item ever",
  "height":"0.5",
  "image_file_name":null,
  "image_originator_url":"http://yourserver.com/your/image/url",
  "image_updated_at":null,
  "is_bundle":false,
  "length":"7.0",
  "media_mail":false,
  "notify_originator_inventory":null,
  "packaging":false,
  "price":"10.0",
  "quantity":14,
  "returnable":true,
  "scancode":"123456",
  "sku":"TESTSKU",
  "street_date":null,
  "tariff_number":"0406.20.90.20",
  "title":"Test Item",
  "updated_at":"2013-08-30T15:01:52-04:00",
  "vendor":"Test Vendor",
  "weight":"0.305",
  "wholesale_cost":null,
  "width":"7.0",
  "category":"poster",
  "originators":[
    {
      "group_id":"11223344",
      "original_id":"265512888",
      "provider":"api"
    }
  ]
}

Get a list of Items by SKU

Ideally, this will always return an array with just one item, but occasionally you might end up with multiple items with the same SKU.

GET https://www.whiplashmerch.com/api/items/sku/{sku}View Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Get a list of Items by Group ID

When creating items, you may have specified a group_id, for grouping like items. You can grab all items for a group at once using the group endpoint.

GET https://www.whiplashmerch.com/api/items/group/{group_id}View Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Get a list of Inbound Items

This will return all of the items for which we've got a Ship Notice--meaning they're on their way to us.

GET https://www.whiplashmerch.com/api/items/inboundView Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Get a list of Bundled Items

This will return all of the items that are part of a Bundle.

GET https://www.whiplashmerch.com/api/items/in_bundlesView Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Get a list of Bundle Items

This will return all of the items that are bundles only (i.e. that only contain other items).

GET https://www.whiplashmerch.com/api/items/bundle_itemsView Response
HTTP/1.1 200 OK
[
  {
    "id":1234,
    "available":true,
    "created_at":"2013-04-25T14:21:11-04:00",
    "currency":"USD",
    "description":"The best test item ever",
    "height":"0.5",
    "image_file_name":null,
    "image_originator_url":"http://yourserver.com/your/image/url",
    "image_updated_at":null,
    "is_bundle":false,
    "length":"7.0",
    "media_mail":false,
    "notify_originator_inventory":null,
    "packaging":false,
    "price":"10.0",
    "quantity":14,
    "returnable":true,
    "scancode":"123456",
    "sku":"TESTSKU",
    "street_date":null,
    "tariff_number":"0406.20.90.20",
    "title":"Test Item",
    "updated_at":"2013-08-30T15:01:52-04:00",
    "vendor":"Test Vendor",
    "weight":"0.305",
    "wholesale_cost":null,
    "width":"7.0",
    "category":"poster",
    "originators":[
      {
        "group_id":"11223344",
        "original_id":"265512888",
        "provider":"api"
      }
    ]
  }
]

Create an Item

POST https://www.whiplashmerch.com/api/itemsView Response
HTTP/1.1 200 OK
{
  "id":1234,
  "available":true,
  "created_at":"2013-04-25T14:21:11-04:00",
  "currency":"USD",
  "description":"The best test item ever",
  "height":"0.5",
  "image_file_name":null,
  "image_originator_url":"http://yourserver.com/your/image/url",
  "image_updated_at":null,
  "is_bundle":false,
  "length":"7.0",
  "media_mail":false,
  "notify_originator_inventory":null,
  "packaging":false,
  "price":"10.0",
  "quantity":14,
  "returnable":true,
  "scancode":"123456",
  "sku":"TESTSKU",
  "street_date":null,
  "tariff_number":"0406.20.90.20",
  "title":"Test Item",
  "updated_at":"2013-08-30T15:01:52-04:00",
  "vendor":"Test Vendor",
  "weight":"0.305",
  "wholesale_cost":null,
  "width":"7.0",
  "category":"poster"
}

Parameters

NameTypeDescription
sku String The item's SKU (this should be unique) (optional
title String The name of the item (required)
description String Additional information about the item (optional)
price Decimal The cost of the item (required for international orders)
currency String The 3-letter currency code that the order item is priced in (USD
wholesale_cost Decimal What the item costs you--useful for your own analytics
tariff_number String Global tariff number--potentially useful for high value international shipments (optional)
street_date Date You can specify a future release date when we should attempt to ship this item by (optional)
available Boolean Should we process orders for this item? (default is true)
returnable Boolean Is this item eligible for returns? (default is null--this can also be set globally at the customer-level)
packaging Boolean Is this item packaging only? (default is false)
media_mail Boolean Is this item eligible for USPS Media Mail? (default is false)
is_bundle Boolean Is this a "bundle" item that represents a collection of actual items? (default is false)
originator_id String The ID you use for this item in your store (optional)
group_id String Use this to group similar items - sizes
image_originator_url String URL link to a hosted image of this item
category String The category the item belongs to (poster

Update an Item

PUT https://www.whiplashmerch.com/api/items/{item-id}View Response
HTTP/1.1 204 OK

Parameters

NameTypeDescription
sku String The item's SKU (this should be unique)
title String The name of the item
description String Additional information about the item
price Decimal The cost of the item
currency String The 3-letter currency code that the order item is priced in (USD
wholesale_cost Decimal What the item costs you--useful for your own analytics
street_date Date You can specify a future release date when we should attempt to ship this item by
available Boolean Should we process orders for this item?
returnable Boolean Is this item eligible for returns? (default is null--this can also be set globally at the customer-level)
packaging Boolean Is this item packaging only?
media_mail Boolean Is this item eligible for USPS Media Mail?
is_bundle Boolean Is this a "bundle" item that represents a collection of actual items?
originator_id String The ID you use for this item in your store
group_id String Use this to group similar items - sizes
image_originator_url String URL link to a hosted image of this item
category String The category the item belongs to (poster

Deactivate an Item

DELETE https://www.whiplashmerch.com/api/items/{item-id}View Response
HTTP/1.1 204 OK

Get a list of Item Transactions

Every time an item's quantity is changed, an item 'transaction' is created, showing the current quantity, how much the quantity was changed by, and why--whether stock was received, an order shipped, etc.

GET https://www.whiplashmerch.com/api/items/{item-id}/transactionsView Response
HTTP/1.1 200 OK
[
  { "change":-1,
    "description":"Added items to Order 111222, -1",
    "id":1234,
    "item_id":123,
    "order_id":111222,
    "quantity":0,
    "shipnotice_id":null,
    "created_at":"2014-01-03T12:48:11-05:00",
    "updated_at":"2014-01-03T12:48:11-05:00"
  },
  { "change":37,
    "description":"Inventory Received from Example Customer, + 37",
    "id":1111,
    "item_id":123,
    "order_id":null,
    "quantity":0,
    "shipnotice_id":1122,
    "created_at":"2014-01-03T12:48:11-05:00",
    "updated_at":"2014-01-03T12:48:11-05:00"
  },
  { "change":0,
    "description":"Opening Balance",
    "id":1001,
    "item_id":123,
    "order_id":null,
    "quantity":0,
    "shipnotice_id":null,
    "created_at":"2013-08-09T12:13:24-04:00",
    "updated_at":"2013-08-09T12:13:24-04:00"
  }
]

Parameters

NameTypeDescription
limit Integer The number of results returned. Default is 50
offset/page Integer Page to show (defaults to 1)
order_by String Order (defaults to updated_at DESC
since_id Integer Restrict results to after the specified ID
created_at_min Datetime Show results created after date (format: 2008-01-01 03:00)
created_at_max Datetime Show results created before date (format: 2008-01-01 03:00)
updated_at_min Datetime Show results last updated after date (format: 2008-01-01 03:00)
updated_at_max Datetime Show results last updated before date (format: 2008-01-01 03:00)
incoming Boolean Show only transactions for incoming items (i.e. shipnotices)
outgoing Boolean Show only transactions for outgoing items (i.e. orders)

Get a list of Item Quantities in each Warehouse

If you're keeping stock in multiple Whiplash warehouses, you can quickly get an item's quantity in each.

GET https://www.whiplashmerch.com/api/items/{item-id}/warehouse_quantitiesView Response
HTTP/1.1 200 OK
[
  {
    "id": 1,
    "name": "Ann Arbor",
    "email": "annarbor@whiplashmerch.com",
    "shipping_address_1": "4657 Platt Road",
    "shipping_address_2": null,
    "shipping_city": "Ann Arbor",
    "shipping_country": "US",
    "shipping_country_iso2": "US",
    "shipping_state": "Michigan",
    "shipping_zip": 48108,
    "quantity": 17
  },
  {
    "id": 2,
    "name": "San Francisco",
    "email": "sanfrancisco@whiplashmerch.com",
    "shipping_address_1": "1334 San Mateo Avenue",
    "shipping_address_2": null,
    "shipping_city": "South San Francisco",
    "shipping_country": "US",
    "shipping_country_iso2": "US",
    "shipping_state": "California",
    "shipping_zip": 94080,
    "quantity": 99
  }
]