Sandbox only. Creates a test order. Try it now.
Request
HTTP request
POST https://www.googleapis.com/content/v2.1sandbox/merchantId/testorders
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. |
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/content |
Request body
In the request body, supply data with the following structure:
{ "country": string, "testOrder": { "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 }, "templateName": string }
Property name | Value | Description | Notes |
---|---|---|---|
country |
string |
The CLDR territory code of the country of the test order to create. Affects the currency and addresses of orders created via template_name , or the addresses of orders created via test_order . Acceptable values are:
US . |
|
testOrder |
nested object |
The test order to create. | |
testOrder. |
string |
Identifies what kind of resource this is. Value: the fixed string "content#testOrder" . |
|
testOrder. |
list |
Line items that are ordered. At least one line item must be provided. | |
testOrder. |
nested object |
Product data from the time of the order placement. | |
testOrder. |
string |
An identifier of the item. | |
testOrder. |
string |
The CLDR territory code of the target country of the product. | |
testOrder. |
string |
The two-letter ISO 639-1 language code for the item.
Acceptable values are:
|
|
testOrder. |
string |
The title of the product. | |
testOrder. |
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. | |
testOrder. |
string |
The price represented as a number. | writable |
testOrder. |
string |
The currency of the price. | writable |
testOrder. |
string |
Condition or state of the item.
Acceptable values are:
|
|
testOrder. |
string |
Global Trade Item Number (GTIN) of the item. Optional. | |
testOrder. |
string |
Brand of the item. | |
testOrder. |
string |
Manufacturer Part Number (MPN) of the item. Optional. | |
testOrder. |
list |
Variant attributes for the item. Optional. | |
testOrder. |
string |
The dimension of the variant. | |
testOrder. |
string |
The value for the dimension. | |
testOrder. |
string |
Shared identifier for all variants of the same product. Optional. | |
testOrder. |
string |
URL of an image of the item. | |
testOrder. |
unsigned integer |
Number of items ordered. | |
testOrder. |
nested object |
Details of the requested shipping for the line item. | |
testOrder. |
nested object |
Details of the shipping method. | |
testOrder. |
string |
The name of the shipping method. | |
testOrder. |
string |
The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. |
|
testOrder. |
unsigned integer |
Minimum transit time. | |
testOrder. |
unsigned integer |
Maximum transit time. | |
testOrder. |
string |
The ship by date, in ISO 8601 format. | |
testOrder. |
string |
The delivery by date, in ISO 8601 format. | |
testOrder. |
nested object |
Details of the return policy for the line item. | |
testOrder. |
boolean |
Whether the item is returnable. | |
testOrder. |
integer |
How many days later the item can be returned. | |
testOrder. |
string |
URL of the item return policy. | |
testOrder. |
string |
The requested shipping option.
Acceptable values are:
|
|
testOrder. |
string |
Identifier of one of the predefined delivery addresses for the delivery.
Acceptable values are:
|
|
testOrder. |
string |
The billing address.
Acceptable values are:
|
|
testOrder. |
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. | |
testOrder. |
string |
The price represented as a number. | writable |
testOrder. |
string |
The currency of the price. | writable |
testOrder. |
list |
Promotions associated with the order. | |
testOrder. |
string |
This field is used to identify promotions within merchants' own systems. | |
testOrder. |
string |
The scope of the promotion. Only product is supported for orders.createtestorder .
Acceptable values are:
|
|
testOrder. |
string |
The category of the promotion. Only moneyOff is supported for orders.createtestorder .
Acceptable values are:
|
|
testOrder. |
string |
The party funding the promotion. Only merchant is supported for orders.createtestorder .
Acceptable values are:
|
|
testOrder. |
string |
The title of the promotion. | |
testOrder. |
string |
A short title of the promotion to be shown on the checkout page. Do not provide for orders.createtestorder . |
|
testOrder. |
nested object |
Estimated discount applied to tax (if allowed by law). Do not provide for orders.createtestorder . |
|
testOrder. |
string |
The price represented as a number. | writable |
testOrder. |
string |
The currency of the price. | writable |
testOrder. |
list |
Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. | |
testOrder. |
string |
The line item ID of a product. Do not provide for orders.createtestorder . |
|
testOrder. |
string |
orders.createtestorder . |
|
testOrder. |
integer |
The quantity of the associated product. Do not provide for orders.createtestorder . |
|
testOrder. |
list |
Items which this promotion have been applied to. Do not provide for orders.createtestorder . |
|
testOrder. |
string |
The line item ID of a product. Do not provide for orders.createtestorder . |
|
testOrder. |
string |
orders.createtestorder . |
|
testOrder. |
integer |
The quantity of the associated product. Do not provide for orders.createtestorder . |
|
testOrder. |
string |
Determines if test order must be pulled by merchant or pushed to merchant via push integration.
Acceptable values are:
|
|
testOrder. |
boolean |
Whether the orderinvoices service should support this order. | |
templateName |
string |
The test order template to use. Specify as an alternative to testOrder as a shortcut for retrieving a template and then creating an order using that template.
Acceptable values are:
|
|
testOrder. |
nested object |
Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. | |
testOrder. |
string |
The price represented as a number. | writable |
testOrder. |
string |
The currency of the price. | writable |
testOrder. |
string |
Email address of the customer.
Acceptable values are:
|
|
testOrder. |
list |
Fees for the item. Optional. | |
testOrder. |
string |
Name of the fee. | |
testOrder. |
nested object |
Amount of the fee. | |
testOrder. |
string |
The price represented as a number. | writable |
testOrder. |
string |
The currency of the price. | writable |
testOrder. |
string |
Type of shipment. Indicates whether deliveryDetails or pickupDetails is applicable for this shipment.
Acceptable values are:
|
|
testOrder. |
string |
Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type pickup .
Acceptable values are:
|
|
testOrder. |
string |
Offer ID of a product. Only for orders.createtestorder . |
|
testOrder. |
string |
Offer ID of a product. Only for orders.createtestorder . |
|
testOrder. |
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". | |
testOrder. |
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". |
Response
If successful, this method returns a response body with the following structure:
{ "kind": "content#ordersCreateTestOrderResponse", "orderId": string }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestOrderResponse" . |
|
orderId |
string |
The ID of the newly created test order. |