How can I set a parent / child relationship

Its not the same time; the rule is - parent should not exist before child creation, thats why i pointed that the problem is in the client.

What you can try is to change the order of your type creation in the mapping. Put child mapping before parent. It should work.

Your mapping will be like below:

'mappings' => [
        "carType" => [
            "_parent" => [
                "type" => "roadType"
            ],
            "properties" => [
                "make" => [
                    "type" => "text"
                ],
                "model" => [
                    "type" => "text"
                ]
            ]
        ],
        "roadType" => [
            "properties" => [
            ]
        ]
    ]