Endpoints꞉ Addresses - Fastway-Couriers-South-Africa/myFastway.ApiClient GitHub Wiki
Endpoints
Endpoint | Verb | Paging | Description |
---|---|---|---|
/api/addresses/localities | GET | Y | returns all localities |
/api/addresses/localities/{locality}/postalcodes | GET | returns all postcodes for a given locality | |
/api/addresses/postalcodes/{postalcode}/localities | GET | returns all localities for a given postal code | |
/api/addresses/serviced-by | POST | returns Franchise and Courier information for a given address | |
/api/addresses/validate | POST | validates and geocodes a given address |
localities
/api/addresses/localities
Response
{
"data": ["AARONS PASS", "ABBA RIVER", "ABBEY", "ABBEYARD", "ABBEYWOOD"]
}
/api/addresses/localities/{locality}/postalcodes
Response
{
"data": ["2000", "2001"]
}
/api/addresses/postalcodes/{postalcode}/localities
Response
{
"data": [
"SYDNEY SOUTH",
"THE ROCKS",
"DAWES POINT",
"MILLERS POINT",
"BARANGAROO",
"HAYMARKET",
"SYDNEY",
"PARLIAMENT HOUSE"
]
}
Serviced-By
Once an address is validated, a call can be made to check whether that address is serviced by Fastway. It is possible to have a valid address which is in a location not currently covered by our network
Request
{
"fromRF": "",
"locality": "",
"postalCode": "",
"lat": 0,
"lng": 0
}
fromRF - The Regional Franchise where the Parcel will be being collected from. A list of Franchise Codes can be found here
locality - The delivery Locality / Suburb
postalCode - The delivery Postcode
lat - The delivery Latitude
lng - The delivery Longitude
Response
{
"Deeded": true,
"RF": "",
"CF": "",
"Zone": "",
"SubDepot": ""
}
Deeded - The delivery address, is deeded within the Fastway network. The delivery will not be on-forwarded to a agent (or for NZ attract Rural Services)
RF - The Regional Franchise responsible for delivery
CF - The Courier Franchise responsible for delivery
Zone - In the case where the delivery will be on-forwarded, this field will be populated with the on-forwarding zone (typically ONF1, ONF2, etc)
When delivery is into an onforward area, Fastway are arranging the delivery via an onforward agent, however a delivery to door is still expected. There are situations where service cycles are limited and the final mile delivery agent or Fastway may contact the receiver to see if they want to arrange collection from a township etc to get it quicker, however delivery to door is still the standard Fastway service
SubDepot - Within New Zealand, there a localised smaller depots. This is populated with the SubDepot code, if one is to be used for the delivery
Validate
When creating a consignment (or new contact as part of a consignment) the from and to addresses have to be considered valid (see address validation)
Request
{
"streetAddress": "100 Katoomba Street",
"additionalDetails": "",
"locality": "Katoomba",
"stateOrProvince": "NSW",
"postalCode": "2780",
"country": "AU"
}
Response
{
"data": {
"addressId": 0,
"streetAddress": "",
"additionalDetails": "",
"locality": "",
"stateOrProvince": "",
"postalCode": "",
"country": "",
"userCreated": false,
"placeId": "",
"lat": 0.0,
"lng": 0.0,
"hash": "",
"updatedOn": "2018-08-17T15:40:10.2152519+10:00",
"updatedBy": ""
}
}