import shiphawk
shiphawk = shiphawk.Client(api_token='api_token') shiphawk.products.create(product)Expects: product object without id
Returns: product object with id
shiphawk.products.get()Returns: a list of product objects with ids
shiphawk.products.get(345)Returns: product object with id
shiphawk.products.delete(345)Expects: product id (number or string)
Returns: None
shiphawk.products.delete([345, 346])Expects: list of product ids (numbers or strings)
Returns: None
shiphawk.rates.request(request)Expects: request object
Returns: a list of rate objects
To accept a rate and create a shipment, see shipments.create.
shiphawk.shipments.create(rate_id, origin_address, destination_address)Expects: rate_id (string), origin_address (address), destination_address (address)
Returns: shipment object
shiphawk.shipments.cancel(shipment_id)Expects: shipment_id
Returns: shipment object
tracking_info = shiphawk.shipments.track(shipment_id)Expects: shipment_id
Returns: tracking object