API مسیریابی چندگانه متد دریافت وضعیت

shape
shape
shape
shape
shape
shape
shape
shape

وب سرویس مسیریابی چندتایی متد دریافت وضعیت

در مطالب قبل در مورد معرفی وب سرویس مسیریابی چندتایی و متد برنامه ریزی سفر آن صحبت کردیم در این مقاله در مورد API مسیریابی چندگانه متد دریافت وضعیت توضیح میدهیم.

GET Get route details by job ID

https://planner.monhani.ir/api/v1/plan/{{job_id}}

با داشتن شناسه وظیفه که از رابط برنامه نویسی بالا بدست آورده‌اید، می‌توانید از وضعیت پردازش یا جواب آن در هر لحظه باخبر شوید.

Reponse Object

Property

Type Description
request Object A duplicate of your request object
status String

resolved means your request is processed successfully, rejected means We could not find a route between your provided points. e.g. points are outside the country of Iran, Points are in locations where there’s no roads, etc. and pending means your request is still on process.

result Object

Your trip’s stops along with their calculated priorities

Result Object Definition

Parameter

Type

Description

feasible Boolean Indicates if the restrictions are met. If the route meets all requirements from the input, the route is feasible (true). If one or more restrictions do not hold, the route is not feasible (false). Infeasible routes are unreliable and should not be used.
routes Array The optimized route with priority holding the fastest route
routes.priority Number Priority of the route
routes.name String Either origin, destination or ID of the stop
routes.arrival Number Arival time relative to trip’s start, in minutes
routes.distance Number Cumulative distance up to this point in kilometers

Response Types
You may get a response with 200 HTTP status if everything goes perfectly or one of these error types if there was something wrong with your request.

Type

Status Code Description
RATE_LIMITED_ERROR 429 Too many requests. You can only send requests every 1 second
AUTHENTICATION_ERROR 401 Your access token is not valid or has been expired
ROUTE_PLANNER_ERROR 400 We could not find a route between your provided points. Possible reasons: Points are outside the country of Iran, Points are in locations where there’s no roads/ways, etc.

HEADERS
AuthorizationBearer {{access_token}}
Content-Typeapplication/json

منبع

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *