Can we create the child record of a parent object using the Bulk API. I am trying to use the bulk API and I want to create all the child record of a parent record. Is it possible through using bulk API? I just want to create the child record. I would like to do it in one request and mention all the childs when using the bulk api.
No, the bulk api is only able to work with a single object at a time.
You can, however, do this with the SOAP API.
You can create records for multiple object types, including custom objects, in one call with API version 20.0 and later. For example, you could create a contact and an account in one call. You can create records for up to 10 object types in one call.
Records are saved in the same order that they are entered in the sObjects input array. If you are entering new records that have a parent-child relationship, the parent record must precede the child record in the sObjects array. For example, if you are creating a contact that references an account that is also being created in the same call, the account must have a smaller index in the sObjects array than the contact does. The contact references the account by using an External ID field.
Even though you can't do this in one call with the bulk API, if you have an external Id on the parent object you can use that to specify the parent for a child record in a subsequent call.
So you would create the parent records first, and then do another upload to create the child records and supplying the external id for the parent to link them.
There are details on that in the bulk API docs.
If you have a field on the parent object called ExtId__c, you can specify that in the child update as ParentObject__r.ExtId__c and the bulk api will associate them.