Last active
June 30, 2017 15:55
-
-
Save mikepaszkiewicz/eb8dda823264e492f9ee09290bcb5a78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X GET https://dispatch.tryhabitat.com/api/v1/rates/ \ | |
-H 'cache-control: no-cache' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "api_key": "YOUR_API_KEY", | |
"vendorId": "VENDOR_ID", | |
"destination": "ADDRESS_OR_COORDS" | |
"bagCount": "NUMBER_OF_DELIVERY_BAGS" | |
"allowedTransport": "[Walk,Skate,Bike,DeliveryBike,Car,Van]" | |
}' | |
NOTES: | |
- the ```destination``` param can either be an address or coords: | |
- address: '2198 N Broad St' //can be any format of address, mapbox is pretty good at parsing | |
- coords: '-75.156812,39.986591' //for now just a string, mapbox does lng first | |
RETURNS: { | |
quoteId: 'QUOTE_ID', | |
isAvailable: false, //can we do the delivery? | |
rate: 5, //returns false if insideZone is false | |
currency: 'USD', | |
companyName: 'Sangkee Noodle House', | |
vendorId: 'thm89eD8so6ERG8qn', | |
coordinates: [ -75.156812, 39.986591 ], | |
address: '1413 W Susquehanna Ave, Philadelphia, Pennsylvania 19132, United States' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment