This article explains potential error codes that can be received from the Solutions endpoints in the Stream Public API, as well as the reason they are happening and the solutions you can try to resolve them.
Invalid Location on group
Error:runs->0->stops->[Stop Sequence Number]->orderLink - Invalid Location on Group
Stream Internal error code: VSMGL
Reason:
When validating each order link on the solutions api POST, we check if the order has a valid address (an address which has a valid lat/long). This error is returned if the latitude or longitude is 0 and therefore does not have a valid address to route to.
Solution:
You can fix the address by clicking on the location pin on the order in the ‘Unplanned’ section, making sure all details are correct and pressing ‘Search’, which will try and geocode the address, you can then click ‘Save’.
Alternatively, you can right-click on the exact location on the Map, which will provide the latitude and longitude for that location, you can then accept this and press save.
No valid group found
Error:runs->0->stops->[Stop Sequence Number]->orderLink - No valid group found
Stream Internal error code: VSMGP
Reason:
On validation of the order link, this order cannot be Planned onto the Run and may already be planned onto another run, i.e. there is no Unplanned group on the order.
Solution:
To resolve this we would recommend checking the status of the order:
You can do this within Stream by:
- Searching for the order number in Order Search and checking the Status field
- If the status is Part Planned or Part Delivered we would advise checking you have specified the correct group on the order.
You can also check the order status via the API:
- Order Status GET endpoint – orders/status/{orderNo}
- Order Details GET endpoint – orders/orders/{orderNo} (this will provide the status for each group on the order as well as some Run information if any groups are Planned
Check if the affected order/group is on another run and remove it from that run if required.
Order number does not exist
Error:runs->0->stops->[Stop Sequence Number]->orderLink - Order number does not exist
Stream Internal error code: VSMON
Reason:
When validating each order link on the solutions API POST, we check if the order number exists and is valid and return this error if not (i.e. Order number does not exist, no order number provided or order number is not a valid string)
Additional potential reasons for this error code:
- If a Solutions POST is received before an order POST and the order is included in the Solution, the order number would not be available in Stream when the route creation was attempted and would therefore result in this error.
- If the order POST was attempted but failed before the Solutions POST, the order would not exist in Stream when the route creation was attempted, and would therefore result in this error.
Solution:
To resolve this we would recommend checking the following:
- Check the Order Number is present on the POST.
- Check the Order Number is valid and in the correct format, this should be a string, less than or equal to 40 characters in length.
Check the order number exists in Stream, you can check your active orders within Stream by searching for the order number in Order Search.
You can also use the api endpoints below to check if the order exists
- Order Status GET endpoint – orders/status/{orderNo}
- Order Details GET endpoint – orders/orders/{orderNo}