Skip to content

Instantly share code, notes, and snippets.

@LukeDavitt
Created June 1, 2016 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LukeDavitt/3a65296753be23c5cbe320d047e50203 to your computer and use it in GitHub Desktop.
Save LukeDavitt/3a65296753be23c5cbe320d047e50203 to your computer and use it in GitHub Desktop.

Whiplash API

This is a list of requirements for Whiplash integration with BKettner and tb_commerce.

Ruby Gem

Gem Documentation

We'll need to get a WL_API_KEY WL_OAUTH_KEY

Orders

Order Documentation

We can use Whiplash to generate orders for clients/customers.

After Stripe.js validates the purchase, a post can be fired off to the Whiplash Api.

Info needed for the post request are as follows:

shipping_name -> name of customer
shipping_address_1 -> street address of customer
shipping_city -> city of customer
shipping_state -> state of customer
shipping_zip -> zip of customer
email -> email of customer
order_items ->  an array of the Order Items **this will need to be formatted to the whiplash api specification

note: There are many other options, these are the required parameters

We can also update orders as needed with PUT requests to the Api

For the previously mentioned order, items will also need to be created before the order can be completed
Info needed for the post request are as follows:

order_id -> self explanatory  
item_id -> self explanatory  
quantity -> self explanatory

note: There are many other options, these are the required parameters

Items

Item Documentation

Before any testing is done, Items will need to be posted to the API. Info needed for the post request are as follows:

title -> name of the item
price -> (required for international orders, wasnt sure if this was applicable)

note: There are many other options, these are the required parameters

##Webhooks Webhook Documentation

This is completely optional but a nice feature. Webhooks can be setup so that whenever a certain event occurs, someone can be notified.

##Shipping

Shipping Method Options will need to be determined, Whiplash lists these as an option:

DHL EXPRESS 10:30
DHL EXPRESS 12:00
DHL EXPRESS 9:00
DHL EXPRESS WORLDWIDE
DPDUK Air Classic International Air
DPDUK Air Express International Air
DPDUK Parcel Dpd Classic
DPDUK Parcel Dpd Classic
DPDUK Parcel Dpd Next Day
DPDUK Parcel Dpd Next Day
FedEx 2 Day
FedEx 2 Day, Early AM
FedEx Express Saver
FedEx First Overnight
FedEx Ground
FedEx International Economy
FedEx International First
FedEx International Priority
FedEx Priority Overnight
FedEx Standard Overnight
ParcelForce Euro Priority Business
ParcelForce Express 10
ParcelForce Express 24
ParcelForce Express 48
ParcelForce Express 9
ParcelForce Express AM
ParcelForce Global Priority
ParcelForce Global Value
RoyalMail 1st Class
RoyalMail 1st Class Signed For
RoyalMail 24
RoyalMail 24 Signed For
RoyalMail 2nd Class
RoyalMail 2nd Class Signed For
RoyalMail 48
RoyalMail 48 Signed For
RoyalMail International Business Mail Large Letter Zone Sort Priority
RoyalMail International Business Parcels Tracked
RoyalMail International Business Parcels Tracked And Signed
RoyalMail International Business Parcels Zone Sort Priority
RoyalMail International Standard
RoyalMail International Tracked
RoyalMail International Tracked And Signed
UPS Expedited Mail Innovations
UPS Ground
UPS Next Day Air
UPS Next Day Air Early A.M.
UPS Next Day Air Saver
UPS Priority Mail Innovations
UPS Second Day Air
UPS Second Day Air A.M.
UPS Three-Day Select
UPS Worldwide Expedited
UPS Worldwide Express
UPS Worldwide Express Plus
UPS Worldwide Saver
UPSSurePost Over 1 lb
UPSSurePost Under 1 lb
USPS Express Mail
USPS Express Mail International
USPS First Class Mail
USPS First Class Mail International
USPS First Class Package International
USPS Media Mail
USPS Parcel Select
USPS Priority Mail
USPS Priority Mail International
USPSScanBasedReturns USPS Return Label First Class
USPSScanBasedReturns USPS Return Label Priority
Whiplash Cheapest Rate
Whiplash Cheapest Rate
Whiplash Customer Provided Label
Whiplash Customer Provided Label
Whiplash Pick Up
Whiplash Pickup
Whiplash Royal Mail Signed For
Whiplash Royal Mail Signed For: Non-UK
Whiplash Royal Mail Standard
Whiplash Royal Mail Standard: Non-UK

##Custom Packaging packaging documentation

Whiplash offers a way to customize the shipping slips, where we could use html/css/templates to create a uniquely designed slip for BKettner.

##Setting up Inventory Inventory Documentation

For production purposes, Ship Notices will need to be sent to Whiplash, informing them of whatever inventory is being shipped (content, quantity etc).

Billing

billing documentation

##Questions Contact:
luke.davitt@moserit.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment