Hi Google team,

could you please help me to resolve issue. I create lead from asset using 
REST API : 
params = {
"operations": [{
"create": {
"name": "My Lead Form #1234",
"type": "LEAD_FORM",
...
"leadFormAsset": {
*     ...*
    "customQuestionFields": [
     {
            "customQuestionText": "Do you own a car?",
            "singleChoiceAnswers": {"answers": ["good", "bad", "normal"]}
      },
      {
            "customQuestionText": "Your phonenumber?",
            "singleChoiceAnswers": {"answers": ["good", "bad", "normal"]}
       }],
...
}

}
}],
}

Issue is with CustomQuestionsFields, when I try to post the data, I receive 
error:
 {
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": 
"type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "fieldError": "INVALID_VALUE"
                        },
                        "message": "The field's value is invalid.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "lead_form_asset"
                                },
                                {
                                    "fieldName": "custom_question_fields",
                                    "index": 0
                                },
                                {
                                    "fieldName": "custom_question_text"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "fieldError": "INVALID_VALUE"
                        },
                        "message": "The field's value is invalid.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "lead_form_asset"
                                },
                                {
                                    "fieldName": "custom_question_fields",
                                    "index": 1
                                },
                                {
                                    "fieldName": "custom_question_text"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "N-OnfIPCBTNTzC2N4etRtg"
            }
        ]
    }
}

>From the documentation its regular string 
https://developers.google.com/google-ads/api/rest/reference/rest/v11/Asset#LeadFormCustomQuestionField,
 
why that string value is incorrect - I don't have the idea. 

Could you please help me ?
Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7e8e3278-6535-49ec-95fa-bab7a906077fn%40googlegroups.com.
  • Le... Anna Lysak
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Anna Lysak
        • ... Anna Lysak
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
            • ... Anna Lysak
              • ... Anna Lysak
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
                • ... Anna Lysak
                • ... Anna Lysak
                • ... Anna Lysak

Reply via email to