This is Documentation for the V1 API
V2 API docmentation is located at developers.getwhiplash.com/
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
Name | Type | Description |
---|---|---|
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) |
Get the total number of items for a customer account.
HTTP/1.1 200 OK 1233
Name | Type | Description |
---|---|---|
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 an item by its Whiplash ID.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] }
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.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] }
Ideally, this will always return an array with just one item, but occasionally you might end up with multiple items with the same SKU.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
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.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
This will return all of the items for which we've got a Ship Notice--meaning they're on their way to us.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
This will return all of the items that are part of a Bundle.
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
This will return all of the items that are bundles only (i.e. that only contain other items).
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", "misc":null, "originators":[ { "group_id":"11223344", "original_id":"265512888", "provider":"api" } ] } ]
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", "misc":null }
Name | Type | Description |
---|---|---|
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 |
misc | String | Miscellaneous information relating to the item |
HTTP/1.1 204 OK
Name | Type | Description |
---|---|---|
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 |
misc | String | Miscellaneous information relating to the item |
HTTP/1.1 204 OK
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.
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" } ]
Name | Type | Description |
---|---|---|
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) |
If you're keeping stock in multiple Whiplash warehouses, you can quickly get an item's quantity in each.
HTTP/1.1 200 OK [ { "id": 1, "name": "Ann Arbor", "shipping_address_1": "4657 Platt Road", "shipping_address_2": "", "shipping_city": "Ann Arbor", "shipping_state": "Michigan", "shipping_zip": "48108", "shipping_country": "United States", "shipping_country_iso2": "US", "email": "annarbor@whiplashmerch.com", "latitude": 42.2206, "longitude": -83.6989, "quantity": 100, "projected_quantity": 100, "sellable_quantity": 100 }, { "id": 32, "name": "Chino", "shipping_address_1": "5026 Chino Hills Parkway", "shipping_address_2": "Building 17", "shipping_city": "Chino", "shipping_state": "California", "shipping_zip": "91710", "shipping_country": "United States", "shipping_country_iso2": "US", "email": "Chino@getwhiplash.com", "latitude": 33.9848, "longitude": -117.695, "quantity": 100, "projected_quantity": 100, "sellable_quantity": 100 } ]