Using the Whiplash API, you can create an application to do any task you would normally do via the app UI—and more.
The most common type of integration is notifying Whiplash of an order that needs to ship. In that scenario, there are four basic steps to cover:
- Authenticate your connection
- Create an Item, which represents a product in a specific size, style, and color
- Create an Order, which contains the address and shipping method
- Create an OrderItem, which references both the Order and the Item, telling Whiplash what product to ship.
Note that your implementation of each of these steps should check for the existence of the Whiplash object prior to your application creating it. For example, an item is created once and shared by many orders.
Pro Tip: You can save your own order/item ID as originator_id which will make it easier to look up your orders later. Using the Originator ID will also act as a safeguard to prevent your application from creating multiple copies of the same order/item.
We provide a testing server at https://sandbox.getwhiplash.com.
Fill in this form for your own test account.
Learn more about testing the v2 API.
There are a number of libraries allowing you to easily connect to the Whiplash API.
The V2.1 API is almost identical to the V2—the key difference is that it limits the size of the payloads we return. V2 requests are backwards compatible, and will not fail. Apps which do not inspect our responses and just use status code should be able to use the 2.1 API as a drop-in replacement. Calls to resources which do not implement V2.1 API will be forwarded to the V2.0 API.