WP Rest API with Custom post types and / Advanced custom fields

Prerequisites:

Make it work

  • Create a Custom post Type
    • Set Show in REST API to TRUE
    • enter a REST API base slug (need this for your requests)
  • Create some ACF fields for the custom post type
  • Create a Custom post
  • Test the API in Postman:
    GET    http://localhost/sitename/wp-json/wp/v2/rest-api-base-slug

    You should see a json file with acf fields