POST /apiv2/routes/returnmultipleroutes

Returns a list of available routes corresponding to supplied the route requests

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
[] Array Yes
[].despatchDateTimeLocal String No
[].carrierAccountId Integer No

An (optional) Carrier Account ID in Machship. When supplied routes returned will be restricted to those from this carrier account.

[].fromName String No

An optional Name field that can be filled. If present, a company location lookup by name will be attempted in order to ascertain the FromCompanyLocationId

[].carrierIds[] Array No

The (optional) listing of Machship Carrier IDs to restrict the returning routes for. When left blank all carriers you have available will be queried for routes.

[].companyCarrierAccountId Integer No

An (optional) Machship ID of the Company Carrier Account. When supplied routes returned will be restricted to those for this company carrier account.

[].items[] Array Yes

A collection of the items being sent

[].items[].name String No

Name or description of the goods you are sending

[].items[].sku String No

Optional: the SKU or code of the item you are sending

[].items[].height Number No

Height of the item in cm

[].items[].length Number No

Length of the item in cm

[].items[].width Number No

Width of the item in cm

[].items[].quantity Integer No

Number of items

[].items[].companyItemId Integer No

Optional: Links this item back up to a saved item in Machship

[].items[].weight Number No

Weight of the item in kg

[].items[].palletSpaces Number No
[].items[].itemType Integer No

1 = Carton, 2 = Skid, 3 = Pallet, 4 = Crate, 5 = Satchel, 6 = Roll, 7 = Panel, 8 = Bag, 9 = Tube, 10 = Stillage, 11 = Envelope, 12 = Pack, 13 = Rails, 14 = TimberLoose, 15 = Combined, 16 = TimberPack, 17 = Pipe, 18 = BDouble, 19 = Semi, 20 = TwentyFootContainer, 21 = FortyFootContainer, 22 = Bundle, 23 = Case, 24 = Volume, 26 = IBC, 27 = GLPallet, 28 = GLTrolley, 29 = GLCarton, 30 = Trolley, 31 = TotalVolume, 32 = Drum, 33 = Loscam, 34 = LoscamWood, 35 = LoscamPlastic, 36 = Chep, 37 = ChepWood, 38 = ChepPlastic, 39 = Tray, 40 = Pot, 41 = SeedlingRack, 42 = SilverTrolley, 43 = LightTruckTyre, 44 = PassengerTyre, 45 = AgriculturalTyre, 46 = MowerTyre, 47 = SolidTyre, 48 = TractorTyre, 49 = TrailerTyre, 50 = TruckTyre, 51 = Pallecon, 52 = Item, 53 = Machine, 54 = JiffyBag, 55 = Pot200mm, 56 = Pot250mm, 57 = Pot300mm, 58 = Flatpack, 59 = BrandedPallet, 60 = Disposable, 61 = Plastic, 62 = MhpItem, 63 = Length, 64 = ChepIbc, 65 = LoscamIbc, 66 = ChepDisplay, 67 = LoscamDisplay, 68 = ChepM3Palletcon, 69 = LoscamM3Palletcon, 70 = ChepUnicon, 71 = LoscamUnicon, 72 = ChepIbcI6, 73 = LoscamIbcI6, 74 = FortyEightFootContainer, 75 = Bottle

Valid values:

  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 10
  • 54
  • 11
  • 55
  • 12
  • 56
  • 13
  • 57
  • 14
  • 58
  • 15
  • 59
  • 16
  • 17
  • 18
  • 19
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 60
  • 61
  • 62
  • 63
  • 20
  • 64
  • 21
  • 65
  • 22
  • 66
  • 23
  • 67
  • 24
  • 68
  • 69
  • 26
  • 27
  • 28
  • 29
  • 70
  • 71
  • 72
  • 73
  • 30
  • 74
  • 31
  • 75
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
[].returnCustomerLatitude Number No

Returns pricing only (isReturn discovery mode): the customer's coordinates, when the caller (e.g. a returns portal) has them. When null, the request's from-location suburb centre-point is used to rank returns drop-off depots by distance. Ignored by all other routes endpoints.

[].fromCompanyLocationId Integer No

The machship ID of the saved company from (pickup) location. This only needs to be specified if this route is coming from a saved location

[].isReturn Boolean No

Optional, default false. When true, this request prices a customer return. Without returnsDepotId (discovery) the FROM fields describe the customer's location — used only to rank nearby drop-off depots by distance, never priced against — and the response carries one option per depot. With returnsDepotId (pinned) the FROM fields are optional and the origin is taken from the depot. Requires the returns-dropoffs feature to be enabled for your account.

Default value: false

[].toLocation Object No
[].toLocation.suburb String No
[].toLocation.postcode String No
[].customerReference String No

Optional

[].questionIds[] Array No

A collection of Machship IDs corresponding to questions who's result is true

[].carrierServiceId Integer No

An (optional) Machship ID of the Carrier Service. When supplied routes returned will be restricted to those for this service.

[].toLocationId Integer No

The machship ID of the to (receiver) location. Can be left blank if supplying the suburb / postcode instead

[].despatchDateTimeUtc String No

Optional: The date time the items would be available to despatched, in UTC. If this is not provided, it will default to NOW (UTC)

[].requestId String No

Optional: This GUID can be used to match up responses to requests when requesting multiple routes in the same call

[].toAbbreviation String No

An optional Abbreviation field that can be filled. If present, a company location lookup by abbreviation will be attempted in order to ascertain the ToCompanyLocationId

[].companyId Integer No

An (optional) Machship ID of a company. When supplied the routes will be those of the company specified, when left blank they will be routes for the company associated with the authorised user.

[].toName String No

An optional Name field that can be filled. If present, a company location lookup by name will be attempted in order to ascertain the ToCompanyLocationId

[].fromAddressLine2 String No
[].fromAddressLine1 String No
[].preRouteInputs Object No

Input the customer supplied for an add-on before routing, so a third party can price against the consignment. Keyed by AddOns.Code, with the value being exactly the object that add-on's input schema describes:

"preRouteInputs": {
  "FreightInsure": {
    "valueOfGoods": 4500.00,
    "categoryOfGoods": ["Electrical", "WhiteGoods"]
  }
}
[].toCompanyLocationId Integer No

The machship ID of the saved company to (delivery) location. This only needs to be specified if this route is going to a saved location

[].fromLocation Object No
[].fromLocation.suburb String No
[].fromLocation.postcode String No
[].toAddressLine2 String No
[].toAddressLine1 String No
[].returnCustomerLongitude Number No
[].fromLocationId Integer No

The machship ID of the from (pickup) location. Can be left blank if supplying the suburb / postcode instead

[].customerReference2 String No

Optional

[].fromAbbreviation String No

An optional Abbreviation field that can be filled. If present, a company location lookup by abbreviation will be attempted in order to ascertain the FromCompanyLocationId

[].returnsDepotId Integer No

Optional. Re-prices exactly one returns drop-off depot — echo the returnsDepotId of an option from a discovery response. Requires isReturn; supplying it alone is rejected.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.