Create An Order API
Passing Payload with product_id and variant_id as shown in screenshot 1
But in response getting null in product_id and variant_id in lines_items in screenshot 2
The REST admin API will allow an app to create an order with custom line items. If you are providing product and variant ID values for products/ variants that do not exist on the shop, then it is expected behaviour for the product and variant IDs to be null in the response.
If you create the product variant first, then you can also create orders by simply including the variant ID and quantity, like the fifth example in our documentation on creating orders.