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/v2sandbox/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:
|
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 |
For more information, see the authentication and authorization page.
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, "channel": 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, "unitTax": { "value": string, "currency": string }, "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, "customer": { "fullName": string, "email": string, "explicitMarketingPreference": boolean, "marketingRightsInfo": { "explicitMarketingPreference": string, "lastUpdatedTimestamp": string } }, "predefinedDeliveryAddress": string, "predefinedPickupDetails": string, "paymentMethod": { "type": string, "lastFourDigits": string, "predefinedBillingAddress": string, "expirationMonth": integer, "expirationYear": integer }, "shippingCost": { "value": string, "currency": string }, "shippingCostTax": { "value": string, "currency": string }, "promotions": [ { "id": string, "productApplicability": string, "longTitle": string, "effectiveDates": string, "redemptionChannel": string, "genericRedemptionCode": string, "benefits": [ { "offerIds": [ string ], "type": string, "subType": string, "discount": { "value": string, "currency": string }, "taxImpact": { "value": string, "currency": 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.channel |
string |
Deprecated.
Acceptable values are:
|
|
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:
|
|
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:
|
|
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[].product.imageLink |
string |
URL of an image of the item. | |
template.lineItems[].quantityOrdered |
unsigned integer |
Number of items ordered. | |
template.lineItems[].unitTax |
nested object |
Deprecated. Ignored if provided. | |
template.lineItems[].unitTax.value |
string |
The price represented as a number. | writable |
template.lineItems[].unitTax.currency |
string |
The currency of the price. | writable |
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:
|
|
template.customer |
nested object |
The details of the customer who placed the order. | |
template.customer.fullName |
string |
Full name of the customer. | |
template.customer.email |
string |
Email address of the customer.
Acceptable values are:
|
|
template.customer.explicitMarketingPreference |
boolean |
Deprecated. Please use marketingRightsInfo instead. | |
template.predefinedDeliveryAddress |
string |
Identifier of one of the predefined delivery addresses for the delivery.
Acceptable values are:
|
|
template.paymentMethod |
nested object |
The details of the payment method. | |
template.paymentMethod.type |
string |
The type of instrument. Note that real orders might have different values than the four values accepted by createTestOrder .
Acceptable values are:
|
|
template.paymentMethod.lastFourDigits |
string |
The last four digits of the card number. | |
template.paymentMethod.predefinedBillingAddress |
string |
The billing address.
Acceptable values are:
|
|
template.paymentMethod.expirationMonth |
integer |
The card expiration month (January = 1, February = 2 etc.). | |
template.paymentMethod.expirationYear |
integer |
The card expiration year (4-digit, e.g. 2015). | |
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.shippingCostTax |
nested object |
Deprecated. Ignored if provided. | |
template.shippingCostTax.value |
string |
The price represented as a number. | writable |
template.shippingCostTax.currency |
string |
The currency of the price. | writable |
template.promotions[] |
list |
Deprecated. Ignored if provided. | |
template.promotions[].id |
string |
The unique ID of the promotion. | |
template.promotions[].productApplicability |
string |
Whether the promotion is applicable to all products or only specific products.
Acceptable values are:
|
|
template.promotions[].longTitle |
string |
The full title of the promotion. | |
template.promotions[].effectiveDates |
string |
The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. |
|
template.promotions[].redemptionChannel |
string |
Indicates that the promotion is valid online.
Acceptable values are:
|
|
template.promotions[].genericRedemptionCode |
string |
Optional. The text code that corresponds to the promotion when applied on the retailer?s website. | |
template.promotions[].benefits[] |
list |
||
template.promotions[].benefits[].offerIds[] |
list |
The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. | |
template.promotions[].benefits[].type |
string |
Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping).
Acceptable values are:
|
|
template.promotions[].benefits[].subType |
string |
Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types.
Acceptable values are:
|
|
template.promotions[].benefits[].discount |
nested object |
The discount in the order price when the promotion is applied. | |
template.promotions[].benefits[].discount.value |
string |
The price represented as a number. | writable |
template.promotions[].benefits[].discount.currency |
string |
The currency of the price. | writable |
template.promotions[].benefits[].taxImpact |
nested object |
The impact on tax when the promotion is applied. | |
template.promotions[].benefits[].taxImpact.value |
string |
The price represented as a number. | writable |
template.promotions[].benefits[].taxImpact.currency |
string |
The currency of the price. | writable |
template.customer.marketingRightsInfo |
nested object |
Customer's marketing preferences. | |
template.customer.marketingRightsInfo.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:
|
|
template.customer.marketingRightsInfo.lastUpdatedTimestamp |
string |
Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. | |
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:
|
|
template.predefinedPickupDetails |
string |
Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type pickup .
Acceptable values are:
|