I have few custom fields created by ACF on a custom post type "room".
I use postman and the REST API to try to create a new room with my custom fields.
The Autorization is ok. I success to create my room, but all the custom fields are empty. I'm sending a raw content like this :
{
"title":"Sample ACF field demo",
"status": "publish",
"acf":
{
"title_fields" : "Custom title",
"rent_field" : 100,
}
}
Why, the custom fields stay empty ? I'm doing something wrong ?
Thanks
I have few custom fields created by ACF on a custom post type "room".
I use postman and the REST API to try to create a new room with my custom fields.
The Autorization is ok. I success to create my room, but all the custom fields are empty. I'm sending a raw content like this :
{
"title":"Sample ACF field demo",
"status": "publish",
"acf":
{
"title_fields" : "Custom title",
"rent_field" : 100,
}
}
Why, the custom fields stay empty ? I'm doing something wrong ?
Thanks
Share Improve this question edited Feb 1, 2021 at 19:13 djoo asked Feb 1, 2021 at 19:02 djoodjoo 1577 bronze badges1 Answer
Reset to default 0Found it :
Replace acf by fields
{
"title":"Sample ACF field demo",
"status": "publish",
"fields":
{
"title_fields" : "Custom title",
"rent_field" : 100,
}
}