REST API: landing page update fails with code 701 | Community
Skip to main content
November 8, 2017
Question

REST API: landing page update fails with code 701

  • November 8, 2017
  • 1 reply
  • 3274 views

I'm trying to update a landing page using the REST API.

The docs state that all fields in the request body are optional. Yet, I am getting back the following error: code=701, message=type cannot be null.

I've tried setting type explicitly to both HTML and RichText, but the error persists.

My JSON payload looks like this:

{

  "type": "HTML",

  "value": "[A properly escaped chunk of HTML copied from the response to a GET request for the same asset]"

}

The URL is constructed correctly, as far I can see. I set Content-Type to application/json. Not sure what else I could do to make it happy.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
November 30, 2017

The documentation is incorrect, we will correct it.

Until then, two things:

1. The "type" parameter is required

2. The payload is application/x-www-form-urlencoded (not JSON)

January 23, 2019

the Documentation was not corrected (after +1year) and I still get an error when I try to do an update. As payload I use type RichText and a string value.

The payload is : "{\"type\":\"RichText\",\"value\":\"<![CDATA[<div>hello</div>]]>\"}"

The update response that is receive is "{\"success\":false,\"errors\":[{\"message\":\"type cannot be null\",\"code\":\"701\"}],\"requestId\":\"xxxx\",\"warnings\":[]}"

Can you please help out?

Adobe Employee
January 30, 2019

The payload must be sent as application/x-www-form-urlencoded (not JSON).

For example: POST /rest/asset/v1/landingPage/{id}/content/{contentId}.json?type=RichText&value=<![CDATA[<div>hello</div>]]>