- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- TriggerActionPayload
- ActionInput
- InputValue
- TextInputValue
- ChoiceInputValue
- CheckboxInputValue
- Try it!
Start an action. The action can be requested by merchants in third-party application. Before merchants can request the action, the third-party application needs to show them action specific content and display a user input form.
The action can be successfully started only once all required
inputs are provided. If any required
input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids
for all problematic field together with translated, human readable error messages that can be shown to the user.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/triggeraction
Path parameters
Parameters | |
---|---|
merchant |
Required. The ID of the merchant's account. |
Query parameters
Parameters | |
---|---|
language |
Optional. Language code IETF BCP 47 syntax used to localize the response. If not set, the result will be in default language |
Request body
The request body contains an instance of TriggerActionPayload
.
Response body
Response informing about the started action.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "message": string } |
Fields | |
---|---|
message |
The message for merchant. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
TriggerActionPayload
The payload for the triggered action.
JSON representation |
---|
{
"actionContext": string,
"actionInput": {
object ( |
Fields | |
---|---|
action |
Required. The |
action |
Required. Input provided by the merchant. |
ActionInput
Input provided by the merchant.
JSON representation |
---|
{
"actionFlowId": string,
"inputValues": [
{
object ( |
Fields | |
---|---|
action |
Required. |
input |
Required. Values for input fields. |
InputValue
Input provided by the merchant for input field.
JSON representation |
---|
{ "inputFieldId": string, // Union field |
Fields | |
---|---|
input |
Required. |
Union field value . Value provided by the merchant. value can be only one of the following: |
|
text |
Value for |
choice |
Value for |
checkbox |
Value for |
TextInputValue
Value for text input
field.
JSON representation |
---|
{ "value": string } |
Fields | |
---|---|
value |
Required. Text provided by the merchant. |
ChoiceInputValue
Value for choice input
field.
JSON representation |
---|
{ "choiceInputOptionId": string } |
Fields | |
---|---|
choice |
Required. [Id][InputField.ChoiceInput.id] of the option that was selected by the merchant. |
CheckboxInputValue
Value for checkbox input
field.
JSON representation |
---|
{ "value": boolean } |
Fields | |
---|---|
value |
Required. True if the merchant checked the box field. False otherwise. |