-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Before using the API, you must have a valid client_id and secret which can be obtained under the Administration Section of the myFastway portal.
Please see the Authentication for obtaining an renewing an access_token
The following Endpoints are available within the myFastway API:
Endpoint | GET | POST | PUT | DELETE | Other |
---|---|---|---|---|---|
Accounts | X | available, pending, balances | |||
Addresses | X | localities, serviced-by, validate | |||
Consignments | X | X | X | deleted-reasons, labels, pending, quote, undelete | |
Consignment-Services | X | ||||
Contacts | X | X | X | X | search |
My-Items | X | X | X | X | |
Track | X | ||||
Utils | X | X | calc-cubic |
The api supports the following versioning methods
- via the query string e.g. /api/contacts?api-version=1.0
- Header versioning e.g. adding api-version: 1.0 to the request header
Where a version is not supplied, the endpoint will be assumed to be version 1.0
Where indicated, endpoints returning collections implement paging. By default, the endpoint will return the first 1000 rows of a collection. To return subsequent rows, zero index based pageNumber query param should be appended to the url. e.g. to return the second page of Contacts the url should be
/api/contacts?pageNumber=1
The following status codes are in use:
Status Code | Friendly Description |
---|---|
200 OK | Operation worked as expected |
201 Created | The object was created successfully |
400 BadRequest | Somethings gone wrong, we will typically return an Error object with more detail |
401 Unauthorized | You do not have a token, or your token has expired |
403 Forbidden | We know who you are (token is valid), your're just not allow to perform this operation |
404 Not Found | The endpoint you're looking for doesn't exist |
405 Method Not Allowed | The Endpoint and/or verb has not been implemented |
500 Internal Server Error | We are having a bad day |
All response data is wrapped in a data object. The data property can either be a single object
{
"data": { "Name" : "Value 1" }
}
or an array (for multiple results)
{
"data": [
{ "Name" : "Value 1" },
{ "Name" : "Value 2" },
]
}
In cases where a bad request is returned, an error object will provide further detail
{
"errors": [
{
"code": "",
"message": "",
"suggestedValues": [
"",
""
]
}
]
}
The list of available errors are located here
In the case where the error is an incorrectly defined lookup value (e.g. suburb or postcode), a list a valid alternatives are provided in the suggestedValues array