Skip to content

joaomdmoura/shiphawk-elixir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShipHawk

Ebert Build Status Coverage Status

This is an abstraction of Shiphawk API to Elixir applications. It comes with a nice and clean DSL that easily enable projects to integrate with ShipHawk. You can check the docs on https://hexdocs.pm/shiphawk.

Installation

Add shiphawk to your list of dependencies in mix.exs:

def deps do
  [
    {:shiphawk, "~> 0.1.0"}
  ]
end

Make sure you also add the necessary configuration:

config :shiphawk, api_key: "your_api_key"

Supported Endpoints

These are the supported API groups currenlty supported:

Rates

Getting Rates

Shiphawk.Rates.get/3 is used to get shipping rates

Parameters

Example

items = [%{
  package_type: "box",
  item_type: "handling_unit",
  handling_unit_type: "pallet", # Must be "pallet", "carton", "box", "crate", or "bag"
  length: "10",
  width: "10",
  height: "11",
  weight: "10",
  value: 100.00
}]

from = %{ "zip" => "93101"}
to = %{ "zip" => "60060"}

Shiphawk.Rates.get(items, from, to)

# {
#   :ok,
#   %{"rates" => [...]}
#  }

About

ShipHawk API Client Library for Elixir https://shiphawk.com/api-docs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%