REST API Update Field in Meta Box
-
Hello:-), I would like to be able to update by API the information included in a meta box (example of a meta box on the theme demo mycar “mileage”)
1 – In the first case I can see the meta box field created from ACF. With ACF it is possible to do this by making a POST request:
curl -X POST \
https://test.com/wp-json/acf/v3/annonce/183\\
-H’Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ \
-H’Postman-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ \
-H’cache-control: no-cache’ \
-H’ content-type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW’ \
-F’fields[mileage]=15019”2 – Whit WP JOB Manager, In this second case I can’t see the field of the meta box “mileage”. It exists well but is not visible by the API.
I can’t discover the meta box “mileage” fields via a GET request. This is the request I built, but it is not complete.curl -X POST \
https://test2.com/wp-json/wp/v2/job-listings/183 \
-H’Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ \
-H’Postman-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ \
-H’cache-control: no-cache’ \
-H’ content-type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW’ \
-F’ fields[?????????????]=15019”.Can you help me to complete understanding how to build the POST request that allows me to do this. Or I am willing to pay a plugin for the functionality to be available.
Thank you in advance:-)
- The topic ‘REST API Update Field in Meta Box’ is closed to new replies.