Syntax for including post_meta when creating a post
-
Hi. Can anyone spot something wrong with my syntax for including post meta data for a newly created post. Here’s my POST body:
{ "title": "random string", "content_raw": "randon string", "type": "location", "status": "publish", "post_meta": [ { "key": "location_text", "value": "random string" } ] }
Without the post_meta element the post succeeds. With it I’m returned a 400 bad request:
{ "code": "json_meta_post_mismatch", "message": "Meta does not belong to this object" }
Ta!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Syntax for including post_meta when creating a post’ is closed to new replies.