We will sunset v2 of the Content API on March 29th, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible. For more information, see Migrating to v2.1.

TestOrder

JSON representation
{
  "kind": string,
  "lineItems": [
    {
      object (TestOrderLineItem)
    }
  ],
  "shippingOption": string,
  "predefinedDeliveryAddress": string,
  "customer": {
    object (TestOrderCustomer)
  },
  "shippingCost": {
    object (Price)
  },
  "shippingCostTax": {
    object (Price)
  },
  "paymentMethod": {
    object (TestOrderPaymentMethod)
  },
  "promotions": [
    {
      object (OrderLegacyPromotion)
    }
  ],
  "notificationMode": string,
  "enableOrderinvoices": boolean,
  "predefinedPickupDetails": string
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "content#testOrder"

lineItems[]

object (TestOrderLineItem)

Required. Line items that are ordered. At least one line item must be provided.

shippingOption

string

Required. The requested shipping option.

Acceptable values are:

  • "economy"
  • "expedited"
  • "oneDay"
  • "sameDay"
  • "standard"
  • "twoDay"

predefinedDeliveryAddress

string

Required. Identifier of one of the predefined delivery addresses for the delivery.

Acceptable values are:

  • "dwight"
  • "jim"
  • "pam"

customer

object (TestOrderCustomer)

Required. The details of the customer who placed the order.

shippingCost

object (Price)

Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states.

shippingCostTax

object (Price)

Deprecated. Ignored if provided.

paymentMethod

object (TestOrderPaymentMethod)

The details of the payment method.

promotions[]

object (OrderLegacyPromotion)

Deprecated. Ignored if provided.

notificationMode

string

Restricted. Do not use.

enableOrderinvoices

boolean

Whether the orderinvoices service should support this order.

predefinedPickupDetails

string

Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type pickup.

Acceptable values are:

  • "dwight"
  • "jim"
  • "pam"

TestOrderLineItem

JSON representation
{
  "product": {
    object (TestOrderLineItemProduct)
  },
  "quantityOrdered": integer,
  "unitTax": {
    object (Price)
  },
  "shippingDetails": {
    object (OrderLineItemShippingDetails)
  },
  "returnInfo": {
    object (OrderLineItemReturnInfo)
  }
}
Fields
product

object (TestOrderLineItemProduct)

Required. Product data from the time of the order placement.

quantityOrdered

integer (uint32 format)

Required. Number of items ordered.

unitTax

object (Price)

Deprecated. Ignored if provided.

shippingDetails

object (OrderLineItemShippingDetails)

Required. Details of the requested shipping for the line item.

returnInfo

object (OrderLineItemReturnInfo)

Required. Details of the return policy for the line item.

TestOrderLineItemProduct

JSON representation
{
  "offerId": string,
  "channel": string,
  "targetCountry": string,
  "contentLanguage": string,
  "title": string,
  "price": {
    object (Price)
  },
  "condition": string,
  "gtin": string,
  "brand": string,
  "mpn": string,
  "variantAttributes": [
    {
      object (OrderLineItemProductVariantAttribute)
    }
  ],
  "itemGroupId": string,
  "imageLink": string,
  "fees": [
    {
      object (OrderLineItemProductFee)
    }
  ]
}
Fields
offerId

string

Required. An identifier of the item.

channel

string

Deprecated.

Acceptable values are:

  • "online"

targetCountry

string

Required. The CLDR territory // code of the target country of the product.

contentLanguage

string

Required. The two-letter ISO 639-1 language code for the item.

Acceptable values are:

  • "en"
  • "fr"

title

string

Required. The title of the product.

price

object (Price)

Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied.

condition

string

Required. Condition or state of the item.

Acceptable values are:

  • "new"

gtin

string

Global Trade Item Number (GTIN) of the item. Optional.

brand

string

Required. Brand of the item.

mpn

string

Manufacturer Part Number (MPN) of the item. Optional.

variantAttributes[]

object (OrderLineItemProductVariantAttribute)

Variant attributes for the item. Optional.

itemGroupId

string

Shared identifier for all variants of the same product. Optional.

fees[]

object (OrderLineItemProductFee)

Fees for the item. Optional.

TestOrderCustomer

JSON representation
{
  "fullName": string,
  "email": string,
  "explicitMarketingPreference": boolean,
  "marketingRightsInfo": {
    object (TestOrderCustomerMarketingRightsInfo)
  }
}
Fields
fullName

string

Full name of the customer.

email

string

Required. Email address of the customer.

Acceptable values are:

  • "pog.dwight.schrute@gmail.com"
  • "pog.jim.halpert@gmail.com"
  • "penpog.pam.beesly@gmail.comding"

explicitMarketingPreference

boolean

Deprecated. Please use marketingRightsInfo instead.

marketingRightsInfo

object (TestOrderCustomerMarketingRightsInfo)

Customer's marketing preferences.

TestOrderCustomerMarketingRightsInfo

JSON representation
{
  "explicitMarketingPreference": string,
  "lastUpdatedTimestamp": string
}
Fields
explicitMarketingPreference

string

Last know user use selection regards marketing preferences. In certain cases selection might not be known, so this field would be empty.

Acceptable values are:

  • "denied"
  • "granted"

lastUpdatedTimestamp

string

Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.

TestOrderPaymentMethod

JSON representation
{
  "type": string,
  "lastFourDigits": string,
  "predefinedBillingAddress": string,
  "expirationMonth": integer,
  "expirationYear": integer
}
Fields
type

string

The type of instrument. Note that real orders might have different values than the four values accepted by createTestOrder.

Acceptable values are:

  • "AMEX"
  • "DISCOVER"
  • "MASTERCARD"
  • "VISA"

lastFourDigits

string

The last four digits of the card number.

predefinedBillingAddress

string

The billing address.

Acceptable values are:

  • "dwight"
  • "jim"
  • "pam"

expirationMonth

integer

The card expiration month (January = 1, February = 2 etc.).

expirationYear

integer

The card expiration year (4-digit, e.g. 2015).