Method: providers.tasks.create

  • Creates and returns a new Task object via a POST request to the specified URL.

  • Requires a provider path parameter which should be set to your Google Cloud Project ID.

  • Requires a unique taskId query parameter and optionally accepts a header for the Delivery API request.

  • The request body and successful response body both contain an instance of Task object, detailed further in provided documentation links.

Creates and returns a new Task object.

HTTP request

POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Query parameters

Parameters
header

object (DeliveryRequestHeader)

Optional. The standard Delivery API request header.

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.
  • May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.

Request body

The request body contains an instance of Task.

Response body

If successful, the response body contains a newly created instance of Task.