we are trying to develop an extension with capability to upload inventory in bulk. for same we where exploring the api given at link https://github.com/gofynd/fdk-client-javascript/blob/master/documentation/platform/CATALOG.md#createbulkinventory
we gone through above link but where unable to proceed. please provide sample code & request body
You can refer to this doc for sample request body and response : Create products in bulk associated with given batch Id. | Fynd Partners Help Center
hi @SoumyaAcharya tried calling above api but getting error as below
HTTP responseCode: 400 responseBody :{"code":400,"message":"Invalid request","errors":{"batch_id":["Invalid value."]}}
could you please help how to get batch Id
code snippet:
CatalogPlatformModels.SuccessResponse response = platformClient.catalog.createBulkInventory(
"2b10edcc-5b9c-4cda-9aa3-d28b7ec53aab", // batchId
new CatalogPlatformModels.InventoryBulkRequest(
Arrays.asList(
new CatalogPlatformModels.InventoryJobPayload(
"YogeshTestBatch", // traceId
null, // itemDimensionsUnitOfMeasure
1d, // price
null, // itemWeightUnitOfMeasure
"R280", // storeCode
Arrays.asList(), //tags
1d, // priceMarked
1000, // totalQuantity
1, // quantity
null, // expirationDate
"000000000490008104", // sellerIdentifier
1d, // priceEffective
null // currency
)
),
1, // companyId
null, // user
"2b10edcc-5b9c-4cda-9aa3-d28b7ec53aab" // batchId
)
);
Hi @yogesh_mahajan you are passing the batch_id in invalid format. Batch_id should be in this format.
Hi @Devendra_Kumari_Dhay Please let me know how to generate this batch id… is there any API ?
when used in above mentioned format getting below error
HTTP responseCode: 400 responseBody :{"code":400,"message":"64c772d663c3f86198be1fc5 bulk inventory job not found."}
HTTP responseCode: 400 responseBody :{"code":400,"message":"64c772d663c3f86198be1fd5 bulk inventory job not found."}
Hi, @yogesh_mahajan please refer to the below link, which has createbulkinventoryjob FDK which in response gives the batch_id.