ShipHawk Guide

How to add references to rate requests from Magento

As a developer, you want to add reference numbers to the rate requests.

ANSWER

In Magento 2+, in app/code/ShipHawk/Shipping/Model/Carrier.php, the collectRates method gathers all the rates information and sends requests to ShipHawk. As a developer, you can add reference numbers to the rate requests.

Code example:

"reference_numbers" : [{ "code": "purchase_id", "name": "Purchase Order #", “value: "P099" }, { "code": "reference_id" "name": "Shipper's Order #", "value": "Test99" } ...

(Forms a regular rate request we can reference to regular ShipHawk API rate requests api/v4/rates.)

See https://docs.shiphawk.com/#rate-request-object.

 

Contact Technical Support
© ShipHawk 2024. All Rights Reserved.