Method: providers.tasks.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างและแสดงผลออบเจ็กต์ Task
ใหม่
คำขอ HTTP
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ ต้องอยู่ในรูปแบบ providers/{provider} provider ต้องเป็นรหัสโปรเจ็กต์ Google Cloud เช่น sample-cloud-project
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
header |
object (DeliveryRequestHeader )
ไม่บังคับ ส่วนหัวของคำขอ Delivery API แบบมาตรฐาน
|
taskId |
string
ต้องระบุ รหัสงานต้องไม่ซ้ำกัน แต่ไม่ควรเป็นรหัสติดตามการจัดส่ง หากต้องการจัดเก็บรหัสติดตามการจัดส่ง ให้ใช้ช่อง trackingId โปรดทราบว่างานหลายรายการมี trackingId เดียวกันได้ รหัสงานอยู่ภายใต้ข้อจำกัดต่อไปนี้
- ต้องเป็นสตริง Unicode ที่ถูกต้อง
- จำกัดให้มีความยาวไม่เกิน 64 อักขระ
- ทำให้เป็นมาตรฐานตามแบบฟอร์มการปรับมาตรฐาน Unicode
- ต้องไม่มีอักขระ ASCII ต่อไปนี้: '/', ':', '?', ',' หรือ '#'
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Task
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ที่สร้างขึ้นใหม่ Task
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eCreates and returns a new \u003ccode\u003eTask\u003c/code\u003e object via a \u003ccode\u003ePOST\u003c/code\u003e request to the specified URL.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003eprovider\u003c/code\u003e path parameter which should be set to your Google Cloud Project ID.\u003c/p\u003e\n"],["\u003cp\u003eRequires a unique \u003ccode\u003etaskId\u003c/code\u003e query parameter and optionally accepts a \u003ccode\u003eheader\u003c/code\u003e for the Delivery API request.\u003c/p\u003e\n"],["\u003cp\u003eThe request body and successful response body both contain an instance of \u003ccode\u003eTask\u003c/code\u003e object, detailed further in provided documentation links.\u003c/p\u003e\n"]]],[],null,["# Method: providers.tasks.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n\nCreates and returns a new `Task` object.\n\n### HTTP request\n\n`POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Must be in the format `providers/{provider}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |\n\n### Query parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[DeliveryRequestHeader](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryRequestHeader)`)` Optional. The standard Delivery API request header. |\n| `taskId` | `string` Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the `trackingId` field. Note that multiple tasks can have the same `trackingId`. Task IDs are subject to the following restrictions: - Must be a valid Unicode string. - Limited to a maximum length of 64 characters. - Normalized according to [Unicode Normalization Form C](http://www.unicode.org/reports/tr15/). - May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'. |\n\n### Request body\n\nThe request body contains an instance of [Task](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks#Task).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Task](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks#Task)."]]