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

شکل
شکل
شکل
شکل
شکل
شکل
شکل
شکل

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

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

GET Get route details by job ID

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

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

Reponse Object

Property

TypeDescription
requestObjectA duplicate of your request object
statusString

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.

resultObject

Your trip’s stops along with their calculated priorities

Result Object Definition

Parameter

Type

Description

feasibleBooleanIndicates 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.
routesArrayThe optimized route with priority holding the fastest route
routes.priorityNumberPriority of the route
routes.nameStringEither origin, destination or ID of the stop
routes.arrivalNumberArival time relative to trip’s start, in minutes
routes.distanceNumberCumulative 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 CodeDescription
RATE_LIMITED_ERROR429Too many requests. You can only send requests every 1 second
AUTHENTICATION_ERROR401Your access token is not valid or has been expired
ROUTE_PLANNER_ERROR400We 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

منبع

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

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