REST Resource: accounts.orderTrackingSignals

Resource: OrderTrackingSignal

Represents a business trade from which signals are extracted, such as shipping.

JSON representation
{
  "orderTrackingSignalId": string,
  "merchantId": string,
  "orderCreatedTime": {
    object (DateTime)
  },
  "orderId": string,
  "shippingInfo": [
    {
      object (ShippingInfo)
    }
  ],
  "lineItems": [
    {
      object (LineItemDetails)
    }
  ],
  "shipmentLineItemMapping": [
    {
      object (ShipmentLineItemMapping)
    }
  ],
  "deliveryPostalCode": string,
  "deliveryRegionCode": string,
  "customerShippingFee": {
    object (Price)
  }
}
Fields
orderTrackingSignalId

string (int64 format)

Output only. The ID that uniquely identifies this order tracking signal.

merchantId

string (int64 format)

Optional. The Google Merchant Center ID of this order tracking signal. This value is optional. If left unset, the caller's Merchant Center ID is used. You must request access in order to provide data on behalf of another business. For more information, see Submitting Order Tracking Signals.

orderCreatedTime

object (DateTime)

Required. The time when the order was created on the businesses side. Include the year and timezone string, if available.

orderId

string

Required. The ID of the order on the businesses side. This field will be hashed in returned OrderTrackingSignal creation response.

shippingInfo[]

object (ShippingInfo)

Required. The shipping information for the order.

lineItems[]

object (LineItemDetails)

Required. Information about line items in the order.

shipmentLineItemMapping[]

object (ShipmentLineItemMapping)

Optional. The mapping of the line items to the shipment information.

deliveryPostalCode

string

Optional. The delivery postal code, as a continuous string without spaces or dashes, for example "95016". This field will be anonymized in returned OrderTrackingSignal creation response.

deliveryRegionCode

string

Optional. The CLDR territory code for the shipping destination.

customerShippingFee

object (Price)

Optional. The shipping fee of the order; this value should be set to zero in the case of free shipping.

ShippingInfo

The shipping information for the order.

JSON representation
{
  "shipmentId": string,
  "trackingId": string,
  "carrier": string,
  "carrierService": string,
  "shippedTime": {
    object (DateTime)
  },
  "earliestDeliveryPromiseTime": {
    object (DateTime)
  },
  "latestDeliveryPromiseTime": {
    object (DateTime)
  },
  "actualDeliveryTime": {
    object (DateTime)
  },
  "shippingStatus": enum (ShippingState),
  "originPostalCode": string,
  "originRegionCode": string
}
Fields
shipmentId

string

Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.

trackingId

string

Optional. The tracking ID of the shipment. This field is required if one of the following fields is absent: earliestDeliveryPromiseTime, latestDeliveryPromiseTime, and actualDeliveryTime.

carrier

string

Optional. The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliestDeliveryPromiseTime, latestDeliveryPromiseTime, and actualDeliveryTime.

carrierService

string

Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, etc.

shippedTime

object (DateTime)

Optional. The time when the shipment was shipped. Include the year and timezone string, if available.

earliestDeliveryPromiseTime

object (DateTime)

Optional. The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: trackingId or carrier_name.

latestDeliveryPromiseTime

object (DateTime)

Optional. The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: trackingId or carrier_name.

actualDeliveryTime

object (DateTime)

Optional. The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: trackingId or carrier_name.

shippingStatus

enum (ShippingState)

Required. The status of the shipment.

originPostalCode

string

Required. The origin postal code, as a continuous string without spaces or dashes, for example "95016". This field will be anonymized in returned OrderTrackingSignal creation response.

originRegionCode

string

Required. The CLDR territory code for the shipping origin.

ShippingState

The current status of the shipments.

Enums
SHIPPING_STATE_UNSPECIFIED The shipping status is not known to business.
SHIPPED All items are shipped.
DELIVERED The shipment is already delivered.

LineItemDetails

The line items of the order.

JSON representation
{
  "lineItemId": string,
  "productId": string,
  "gtin": string,
  "mpn": string,
  "quantity": string,
  "productTitle": string,
  "brand": string
}
Fields
lineItemId

string

Required. The ID for this line item.

productId

string

Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.

gtin

string

Optional. The Global Trade Item Number.

mpn

string

Optional. The manufacturer part number.

quantity

string (int64 format)

Required. The quantity of the line item in the order.

productTitle

string

Optional. Plain text title of this product.

brand

string

Optional. Brand of the product.

ShipmentLineItemMapping

Represents how many items are in the shipment for the given shipmentId and lineItemId.

JSON representation
{
  "shipmentId": string,
  "lineItemId": string,
  "quantity": string
}
Fields
shipmentId

string

Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.

lineItemId

string

Required. The line item ID.

quantity

string (int64 format)

Required. The line item quantity in the shipment.

Methods

create

Creates new order tracking signal.