Method: providers.vehicles.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
मांग पर राइडशेयर या डिलीवरी की सेवा देने वाली कंपनी से जुड़ा नया वाहन चालू करता है. हर Vehicle
का वाहन आईडी यूनीक होना चाहिए.
Vehicle
बनाते समय, इन Vehicle
फ़ील्ड की ज़रूरत होती है:
vehicleState
supportedTripTypes
maximumCapacity
vehicleType
Vehicle
बनाते समय, इन Vehicle
फ़ील्ड को अनदेखा किया जाता है:
name
currentTrips
availableCapacity
currentRouteSegment
currentRouteSegmentEndPoint
currentRouteSegmentVersion
currentRouteSegmentTraffic
route
waypoints
waypointsVersion
remainingDistanceMeters
remainingTimeSeconds
eta_to_next_waypoint
navigationStatus
अन्य सभी फ़ील्ड वैकल्पिक होते हैं. अगर दिए गए हों, तो उनका इस्तेमाल किया जाता है.
एचटीटीपी अनुरोध
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. providers/{provider} फ़ॉर्मैट में होना चाहिए. सेवा देने वाली कंपनी, उस Google Cloud प्रोजेक्ट का प्रोजेक्ट आईडी (उदाहरण के लिए, sample-cloud-project ) होनी चाहिए जिसका सदस्य यह कॉल कर रहा है.
|
क्वेरी पैरामीटर
पैरामीटर |
header |
object (RequestHeader )
स्टैंडर्ड फ़्लीट इंजन अनुरोध का हेडर.
|
vehicleId |
string
ज़रूरी है. यूनीक वाहन आईडी. कॉन्टेंट पर ये पाबंदियां लागू होती हैं:
- एक मान्य यूनिकोड स्ट्रिंग होनी चाहिए.
- इसमें 64 से ज़्यादा वर्ण इस्तेमाल नहीं किए जा सकते.
- इसे यूनिकोड नॉर्मलाइज़ेशन फ़ॉर्म C के हिसाब से नॉर्मलाइज़ किया जाता है.
- इनमें से कोई भी ASCII वर्ण शामिल नहीं होना चाहिए: '/', ':', '?', ',' या '#'.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Vehicle
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब होने पर, जवाब के मुख्य हिस्से में Vehicle
का नया इंस्टेंस शामिल किया जाता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eInstantiates a new vehicle associated with an on-demand rideshare or deliveries provider, requiring a unique vehicle ID for each vehicle.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a \u003ccode\u003eVehicle\u003c/code\u003e, \u003ccode\u003evehicleState\u003c/code\u003e, \u003ccode\u003esupportedTripTypes\u003c/code\u003e, \u003ccode\u003emaximumCapacity\u003c/code\u003e, and \u003ccode\u003evehicleType\u003c/code\u003e fields are required; while fields like \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003ecurrentTrips\u003c/code\u003e, \u003ccode\u003eavailableCapacity\u003c/code\u003e, and route-related fields are ignored.\u003c/p\u003e\n"],["\u003cp\u003eSends a POST request to \u003ccode\u003ehttps://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles\u003c/code\u003e to create a vehicle, with the provider specified in the path parameter.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003eheader\u003c/code\u003e for the Fleet Engine request and a unique \u003ccode\u003evehicleId\u003c/code\u003e in the query parameters, adhering to specified restrictions for the \u003ccode\u003evehicleId\u003c/code\u003e format.\u003c/p\u003e\n"],["\u003cp\u003eIncludes the \u003ccode\u003eVehicle\u003c/code\u003e object details in the request body and returns the newly created \u003ccode\u003eVehicle\u003c/code\u003e object in the response body upon successful creation.\u003c/p\u003e\n"]]],[],null,[]]