Home Forums General Issues API Post call error: Invalid parameter(s): acf


API Post call error: Invalid parameter(s): acf

  • Hello, I’m using an api connection to interact with my WP sites. This works fine when I use the default WordPress fields (title, slug, status, etc.). So get and post on the WP Post end-point (/wp-json/wp/v2/posts) works fine.

    Now I extended the call with the ACF property and then I get the error:
    {“code”:”rest_invalid_param”,”message”:”Invalid parameter(s): acf”,”data”:{“status”:400,”params”:{“acf”:”acf is not of type object.”},”details”:{“acf”:{“code”:”rest_invalid_type”,”message”:”acf is not of type object.”,”data”:{“param”:”acf”}}}}}

    JSON is turned on in the ACF plugin and when I do a GET call to the Post end-point in the result I see the acf property.

    The call that I tried (and again without acf it works):
    -X POST
    -H “Content-Type: multipart/form-data”
    -u “X:X”
    -F “slug=test;type=application/json”
    -F “acf={\”title\”:\”Title test\”};type=application/json”

    Thanks for the effort!

  • SOLVED: somehow Multiform calls only work with the default fields. I know tried an other way of calling the api and then it works.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.