Orders: gettestordertemplate

Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. Try it now.

Request

HTTP request

GET https://www.googleapis.com/content/v2.1sandbox/merchantId/testordertemplates/templateName

Parameters

Parameter name Value Description
Path parameters
merchantId unsigned long The ID of the account that should manage the order. This cannot be a multi-client account.
templateName string The name of the template to retrieve.

Acceptable values are:
  • "template1"
  • "template1a"
  • "template1b"
  • "template2"
Optional query parameters
country string The country of the template to retrieve. Defaults to US.

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/content

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "content#ordersGetTestOrderTemplateResponse",
  "template": {
    "kind": "content#testOrder",
    "lineItems": [
      {
        "product": {
          "offerId": string,
          "targetCountry": string,
          "contentLanguage": string,
          "title": string,
          "price": {
            "value": string,
            "currency": string
          },
          "condition": string,
          "gtin": string,
          "brand": string,
          "mpn": string,
          "variantAttributes": [
            {
              "dimension": string,
              "value": string
            }
          ],
          "itemGroupId": string,
          "imageLink": string,
          "fees": [
            {
              "name": string,
              "amount": {
                "value": string,
                "currency": string
              }
            }
          ]
        },
        "quantityOrdered": unsigned integer,
        "shippingDetails": {
          "type": string,
          "method": {
            "methodName": string,
            "carrier": string,
            "minDaysInTransit": unsigned integer,
            "maxDaysInTransit": unsigned integer
          },
          "shipByDate": string,
          "deliverByDate": string
        },
        "returnInfo": {
          "isReturnable": boolean,
          "daysToReturn": integer,
          "policyUrl": string
        }
      }
    ],
    "shippingOption": string,
    "predefinedDeliveryAddress": string,
    "predefinedPickupDetails": string,
    "predefinedBillingAddress": string,
    "predefinedEmail": string,
    "shippingCost": {
      "value": string,
      "currency": string
    },
    "promotions": [
      {
        "merchantPromotionId": string,
        "type": string,
        "subtype": string,
        "funder": string,
        "title": string,
        "shortTitle": string,
        "priceValue": {
          "value": string,
          "currency": string
        },
        "taxValue": {
          "value": string,
          "currency": string
        },
        "applicableItems": [
          {
            "lineItemId": string,
            "productId": string,
            "quantity": integer,
            "offerId": string
          }
        ],
        "appliedItems": [
          {
            "lineItemId": string,
            "productId": string,
            "quantity": integer,
            "offerId": string
          }
        ],
        "startTime": string,
        "endTime": string
      }
    ],
    "notificationMode": string,
    "enableOrderinvoices": boolean
  }
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "content#ordersGetTestOrderTemplateResponse".
template nested object The requested test order template.
template.kind string Identifies what kind of resource this is. Value: the fixed string "content#testOrder".
template.lineItems[] list Line items that are ordered. At least one line item must be provided.
template.lineItems[].product nested object Product data from the time of the order placement.
template.lineItems[].product.offerId string An identifier of the item.
template.lineItems[].product.targetCountry string The CLDR territory code of the target country of the product.
template.lineItems[].product.contentLanguage string The two-letter ISO 639-1 language code for the item.

Acceptable values are:
  • "en"
  • "fr"
template.lineItems[].product.title string The title of the product.
template.lineItems[].product.price nested object 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.
template.lineItems[].product.price.value string The price represented as a number. writable
template.lineItems[].product.price.currency string The currency of the price. writable
template.lineItems[].product.condition string Condition or state of the item.

Acceptable values are:
  • "new"
template.lineItems[].product.gtin string Global Trade Item Number (GTIN) of the item. Optional.
template.lineItems[].product.brand string Brand of the item.
template.lineItems[].product.mpn string Manufacturer Part Number (MPN) of the item. Optional.
template.lineItems[].product.variantAttributes[] list Variant attributes for the item. Optional.
template.lineItems[].product.variantAttributes[].dimension string The dimension of the variant.
template.lineItems[].product.variantAttributes[].value string The value for the dimension.
template.lineItems[].product.itemGroupId string Shared identifier for all variants of the same product. Optional.
template.lineItems[].quantityOrdered unsigned integer Number of items ordered.
template.lineItems[].shippingDetails nested object Details of the requested shipping for the line item.
template.lineItems[].shippingDetails.method nested object Details of the shipping method.
template.lineItems[].shippingDetails.method.methodName string The name of the shipping method.
template.lineItems[].shippingDetails.method.carrier string The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values.
template.lineItems[].shippingDetails.method.minDaysInTransit unsigned integer Minimum transit time.
template.lineItems[].shippingDetails.method.maxDaysInTransit unsigned integer Maximum transit time.
template.lineItems[].shippingDetails.shipByDate string The ship by date, in ISO 8601 format.
template.lineItems[].shippingDetails.deliverByDate string The delivery by date, in ISO 8601 format.
template.lineItems[].returnInfo nested object Details of the return policy for the line item.
template.lineItems[].returnInfo.isReturnable boolean Whether the item is returnable.
template.lineItems[].returnInfo.daysToReturn integer How many days later the item can be returned.
template.lineItems[].returnInfo.policyUrl string URL of the item return policy.
template.shippingOption string The requested shipping option.

Acceptable values are:
  • "economy"
  • "expedited"
  • "oneDay"
  • "sameDay"
  • "standard"
  • "twoDay"
template.predefinedDeliveryAddress string Identifier of one of the predefined delivery addresses for the delivery.

Acceptable values are:
  • "dwight"
  • "jim"
  • "pam"
template.predefinedBillingAddress string The billing address.

Acceptable values are:
  • "dwight"
  • "jim"
  • "pam"
template.shippingCost nested object 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.
template.shippingCost.value string The price represented as a number. writable
template.shippingCost.currency string The currency of the price. writable
template.promotions[] list Promotions associated with the order.
template.promotions[].merchantPromotionId string This field is used to identify promotions within merchants' own systems.
template.promotions[].type string The scope of the promotion. Only product is supported for orders.createtestorder.

Acceptable values are:
  • "product"
  • "shipping"
template.promotions[].subtype string The category of the promotion. Only moneyOff is supported for orders.createtestorder.

Acceptable values are:
  • "buyMGetMoneyOff"
  • "buyMGetNMoneyOff"
  • "buyMGetNPercentOff"
  • "buyMGetPercentOff"
  • "freeGift"
  • "freeGiftWithItemId"
  • "freeGiftWithValue"
  • "freeShippingOvernight"
  • "freeShippingStandard"
  • "freeShippingTwoDay"
  • "moneyOff"
  • "percentOff"
  • "rewardPoints"
  • "salePrice"
template.promotions[].funder string The party funding the promotion. Only merchant is supported for orders.createtestorder.

Acceptable values are:
  • "google"
  • "merchant"
template.promotions[].title string The title of the promotion.
template.promotions[].shortTitle string A short title of the promotion to be shown on the checkout page. Do not provide for orders.createtestorder.
template.promotions[].taxValue nested object Estimated discount applied to tax (if allowed by law). Do not provide for orders.createtestorder.
template.promotions[].taxValue.value string The price represented as a number. writable
template.promotions[].taxValue.currency string The currency of the price. writable
template.promotions[].applicableItems[] list Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity.
template.promotions[].applicableItems[].lineItemId string The line item ID of a product. Do not provide for orders.createtestorder.
template.promotions[].applicableItems[].productId string orders.createtestorder.
template.promotions[].applicableItems[].quantity integer The quantity of the associated product. Do not provide for orders.createtestorder.
template.promotions[].appliedItems[] list Items which this promotion have been applied to. Do not provide for orders.createtestorder.
template.promotions[].appliedItems[].lineItemId string The line item ID of a product. Do not provide for orders.createtestorder.
template.promotions[].appliedItems[].productId string orders.createtestorder.
template.promotions[].appliedItems[].quantity integer The quantity of the associated product. Do not provide for orders.createtestorder.
template.promotions[].priceValue nested object Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order.
template.promotions[].priceValue.value string The price represented as a number. writable
template.promotions[].priceValue.currency string The currency of the price. writable
template.predefinedEmail string Email address of the customer.

Acceptable values are:
  • "pog.dwight.schrute@gmail.com"
  • "pog.jim.halpert@gmail.com"
  • "pog.pam.beesly@gmail.com"
template.lineItems[].product.fees[] list Fees for the item. Optional.
template.lineItems[].product.fees[].name string Name of the fee.
template.lineItems[].product.fees[].amount nested object Amount of the fee.
template.lineItems[].product.fees[].amount.value string The price represented as a number. writable
template.lineItems[].product.fees[].amount.currency string The currency of the price. writable
template.lineItems[].shippingDetails.type string Type of shipment. Indicates whether deliveryDetails or pickupDetails is applicable for this shipment.

Acceptable values are:
  • "delivery"
  • "pickup"
template.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"
template.promotions[].applicableItems[].offerId string Offer ID of a product. Only for orders.createtestorder.
template.promotions[].appliedItems[].offerId string Offer ID of a product. Only for orders.createtestorder.
template.promotions[].startTime string Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".
template.promotions[].endTime string Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".