create custom post type and populate custom fields using php

Have a look here:

How to add/edit advanced custom fields on custom post type’s WordPress REST API?

You need a little bit of extra code to hook up the WordPress REST API to the ACF functions to get and write ACF fields. Then with that, you can access the fields directly like other ‘regular’ post type fields (i.e. put them at the same level as title and status).

I’ve taken the example from that answer and tweaked it for your case, but you’ll need to test and debug it and you need to implement this for all your fields, not just titel:

function rest_api_mycustomposttype_titel() {
   register_rest_field( 'mycustomposttype', 'titel', array(
        'get_callback' => function(){ return get_field('titel'); },
        'update_callback' => function( $value, $post ){
            update_field('titel', $value, $post->ID );
        }
   ));
}

add_action("rest_api_init", 'rest_api_mycustomposttype_titel');

I also referred to this page, which notably does not reference this case, so I’m assuming that ACF still does not provide the functionality you need here ‘automatically’. It does reference POSTing to the ACF API to update the fields for an existing post, so that’s another option, to do it as two calls.

casinojojobetpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişcasinoholiganbet girişholiganbet güncel giriş