繁体   English   中英

无法使用 REST API for Oracle Eloqua Marketing Cloud Service 创建具有多个 FormField 的表单?

[英]Unable to create a form with multiple FormFields using REST API for Oracle Eloqua Marketing Cloud Service?

我正在测试用于使用POSTMAN创建表单的Oracle Eloqua Marketing Cloud Service方法的REST API REST API 链接

当我给出单个表单字段时,表单正在创建。 这是我的要求:

POST /assets/form
Content-Type: application/json

但是当我尝试使用多个表单字段创建表单时,如下所示:

  Request body: {
  "type": "Form",
  "createdAt": "1510563258",
  "createdBy": "9",
  "folderId": "7",
  "name": "Form with 3 fields_de-DE1254",
  "updatedAt": "1510563258",
  "elements": [
    {
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "type": "FormField",
      "name": "Æddrèëss 2",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "address2",
      "useGlobalSubscriptionStatus": "False",
      "validations": []
    },
    {
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "type": "FormField",
      "name": "Æddrèëss 3",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "address3",
      "useGlobalSubscriptionStatus": "False",
      "validations": []
    }
  ]
}

我得到错误:

Status : 500 InternalServerError

<html>
    <head>
        <title>Internal Server Error</title>
    </head>
    <body>
        <h1>
        Internal Server Error
    </h1>
        <div>
        There was an internal server error.
    </div>
        <div>
        The error has been logged with log identifier 
            <b>115451307</b>.
        </div>
        <div>
        Please provide this log identifier to technical support.
    </div>
    </body>
</html>

请有人帮我解决这个问题吗? 另外,这个日志标识符是什么,我在哪里可以找到它?

我刚刚有了这个并从支持那里得到了解决方案。 您需要为字段 id 输入一个唯一的负整数。 执行此操作后,您可以发送一组表单字段,它们都将在一次调用中得到处理。 如果成功,响应将包含新生成的 ID。

这是修改后的片段:

Request body: {
  "type": "Form",
  "createdAt": "1510563258",
  "createdBy": "9",
  "folderId": "7",
  "name": "Form with 3 fields_de-DE1254",
  "updatedAt": "1510563258",
  "elements": [
    {
      "id": "-1",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "type": "FormField",
      "name": "Æddrèëss 2",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "address2",
      "useGlobalSubscriptionStatus": "False",
      "validations": []
    },
    {
      "id": "-2",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "type": "FormField",
      "name": "Æddrèëss 3",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "address3",
      "useGlobalSubscriptionStatus": "False",
      "validations": []
    }
  ]
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM