Skip to content
Theo Mills edited this page Jul 9, 2014 · 12 revisions

The Partner API is not open to the general public. If you are interested in a ShippingEasy Partner API account, please contact support@shippingeasy.com.

Making requests via curl

First you will need to create an API signature. Concatenate these into a plaintext string using the following order:

  1. Capitilized method of the request. E.g. "POST"
  2. The URI path
  3. The query parameters sorted alphabetically and concatenated together into a URL friendly format: param1=ABC&param2=XYZ
  4. The request body as a string if one exists

All parts are then concatenated together with an ampersand. The result resembles something like this:

"POST&/partners/api/accounts&api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&{\"orders\":{\"name\":\"Flip flops\",\"cost\":\"10.00\",\"shipping_cost\":\"2.00\"}}"

Finally, using your Partner API secret encrypt the string using HMAC sha256. In ruby, it looks like this:

OpenSSL::HMAC::hexdigest("sha256", api_secret, "POST&/partners/api/accounts&api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&{\"orders\":{\"name\":\"Flip flops\",\"cost\":\"10.00\",\"shipping_cost\":\"2.00\"}}")

API timestamp

You must include an API timestamp in your requests. The timestamp should be an integer representation of the current time.

Example curl request

curl -H "Content-Type: application/json" --data @body.json "https://app.shippingeasy.com/partners/api/accounts?api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&api_signature=c65f43beed46e581939898a78acd10064cfa146845e97885ec02124d7ad648e4"

An example body.json can be found here:

https://gist.github.com/twmills/94433a409df0ac5960c4

Clone this wiki locally